@isardsat/editorial-admin 6.0.6 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{authSlice-B3Tyl-Nw.js → authSlice-C1VgtCUs.js} +211 -182
- package/build/client/assets/button-D7P-1kQx.js +1 -0
- package/build/client/assets/{chevron-down-D_Gla76b.js → chevron-down-DTegokyb.js} +1 -1
- package/build/client/assets/chunk-QMGIS6GS-BoPxQm7X.js +51 -0
- package/build/client/assets/{createLucideIcon-R2-3a7hN.js → createLucideIcon-CEJSFbyG.js} +1 -1
- package/build/client/assets/dashboard-Bq2GbE6X.js +1 -0
- package/build/client/assets/dashboard._collection-BWEvWDTh.js +16 -0
- package/build/client/assets/dashboard._collection._document-BkkancgH.js +1 -0
- package/build/client/assets/dashboard._collection.new-B-tJAKkX.js +1 -0
- package/build/client/assets/dashboard._layout-DoAIhr2p.js +61 -0
- package/build/client/assets/dashboard.files-C7Nji4gT.js +36 -0
- package/build/client/assets/editorialApi-C-fP7K3Z.js +1 -0
- package/build/client/assets/entry.client-B2XAvOmi.js +34 -0
- package/build/client/assets/home-C_M0Cqq5.js +11 -0
- package/build/client/assets/index-C4BMMXbp.js +1 -0
- package/build/client/assets/{index-C-vcF2DZ.js → index-CvFp8wi_.js} +2 -2
- package/build/client/assets/index-DWY8ISpx.js +50 -0
- package/build/client/assets/index-ofqdEjlP.js +22 -0
- package/build/client/assets/input-BScD3Ruq.js +6 -0
- package/build/client/assets/itemForm-BIVbiH-T.js +95 -0
- package/build/client/assets/itemForm-BVtnhZqg.css +1 -0
- package/build/client/assets/manifest-4579fceb.js +1 -0
- package/build/client/assets/react-redux-CRJHAKt_.js +9 -0
- package/build/client/assets/root-CFn4sGwt.js +1 -0
- package/build/client/assets/root-DGV68qoS.css +1 -0
- package/build/client/assets/{trash-wq_ppIxP.js → trash-DN4yNrfZ.js} +1 -1
- package/build/client/assets/{tslib.es6-CDuPK5Eb.js → tslib.es6-De9GV7Vy.js} +1 -1
- package/build/client/assets/utils-BSDwSRl3.js +1 -0
- package/build/client/index.html +5 -5
- package/package.json +3 -4
- package/build/client/assets/button-Da66T3Bb.js +0 -1
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +0 -51
- package/build/client/assets/dashboard-BTu7-8Ba.js +0 -1
- package/build/client/assets/dashboard._collection-MtSHvYYW.js +0 -16
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +0 -1
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +0 -1
- package/build/client/assets/dashboard._layout-BjRnQPQr.js +0 -66
- package/build/client/assets/dashboard.files-DKh39mcB.js +0 -36
- package/build/client/assets/editorialApi-fQchmMa9.js +0 -1
- package/build/client/assets/entry.client-BGu2H8xv.js +0 -34
- package/build/client/assets/home-C2nWtN4c.js +0 -11
- package/build/client/assets/index-Bd1u2_LZ.js +0 -45
- package/build/client/assets/index-BvKqmqc2.js +0 -1
- package/build/client/assets/index-DeO5nu0f.js +0 -22
- package/build/client/assets/input-BmmdOdbj.js +0 -6
- package/build/client/assets/itemForm-CDbHkFXh.css +0 -1
- package/build/client/assets/itemForm-DlRBjBsd.js +0 -90
- package/build/client/assets/manifest-2ff77582.js +0 -1
- package/build/client/assets/react-redux-kbMjYGuQ.js +0 -9
- package/build/client/assets/root-DS7N36v7.css +0 -1
- package/build/client/assets/root-wKvfXBjk.js +0 -1
- package/build/client/assets/utils-DslUJpbf.js +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import{w as le}from"./react-redux-kbMjYGuQ.js";import{n as e,a as d,t as N,N as ce,q as ue,v as he,w as pe,O as xe}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as fe,d as E,e as be}from"./authSlice-B3Tyl-Nw.js";import{u as W,a as ge,b as me,c as je,d as ve}from"./editorialApi-fQchmMa9.js";import{R as U,C as Q,a as X,T as Z,D as Y,P as J,O as ee,b as we,c as ye,d as Ne,e as Ce,f as Se,A as _e,u as ke}from"./index-Bd1u2_LZ.js";import{c as r}from"./utils-DslUJpbf.js";import{c as x}from"./createLucideIcon-R2-3a7hN.js";import{B as O,S as R,c as Me,u as Ee}from"./button-Da66T3Bb.js";import{P as k,u as Oe,c as Re,a as ze,b as Ae,d as De}from"./index-BvKqmqc2.js";import{C as $}from"./chevron-down-D_Gla76b.js";import"./tslib.es6-CDuPK5Eb.js";import"./index-C-vcF2DZ.js";const Pe={};/**
|
|
2
|
-
* @license lucide-react v0.487.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Ie=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Te=x("arrow-down",Ie);/**
|
|
7
|
-
* @license lucide-react v0.487.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const $e=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Le=x("arrow-up",$e);/**
|
|
12
|
-
* @license lucide-react v0.487.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Be=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],He=x("blocks",Be);/**
|
|
17
|
-
* @license lucide-react v0.487.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Ge=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=x("chevron-right",Ge);/**
|
|
22
|
-
* @license lucide-react v0.487.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Fe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ve=x("external-link",Fe);/**
|
|
27
|
-
* @license lucide-react v0.487.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Ke=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],We=x("files",Ke);/**
|
|
32
|
-
* @license lucide-react v0.487.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Ue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Qe=x("grid-3x3",Ue);/**
|
|
37
|
-
* @license lucide-react v0.487.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=x("heart",Xe);/**
|
|
42
|
-
* @license lucide-react v0.487.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Ye=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Je=x("log-out",Ye);/**
|
|
47
|
-
* @license lucide-react v0.487.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=x("panel-left",et);/**
|
|
52
|
-
* @license lucide-react v0.487.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=x("square",at);/**
|
|
57
|
-
* @license lucide-react v0.487.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const nt=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ot=x("upload",nt);/**
|
|
62
|
-
* @license lucide-react v0.487.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],te=x("x",it);function rt({...t}){return e.jsx(U,{"data-slot":"dialog",...t})}function dt({...t}){return e.jsx(J,{"data-slot":"dialog-portal",...t})}function lt({className:t,...a}){return e.jsx(ee,{"data-slot":"dialog-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(dt,{"data-slot":"dialog-portal",children:[e.jsx(lt,{}),e.jsxs(Q,{"data-slot":"dialog-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(X,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(te,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ht({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function pt({className:t,...a}){return e.jsx(Z,{"data-slot":"dialog-title",className:r("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(Y,{"data-slot":"dialog-description",className:r("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),gt="#85EA2D",mt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=gt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function jt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(pt,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc",children:[e.jsx(mt,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(ht,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Ze,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var vt="Separator",L="horizontal",wt=["horizontal","vertical"],ae=d.forwardRef((t,a)=>{const{decorative:n,orientation:s=L,...o}=t,i=yt(s)?s:L,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(k.div,{"data-orientation":i,...u,...o,ref:a})});ae.displayName=vt;function yt(t){return wt.includes(t)}var Nt=ae;function Ct({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:n,orientation:a,className:r("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function St({...t}){return e.jsx(U,{"data-slot":"sheet",...t})}function _t({...t}){return e.jsx(J,{"data-slot":"sheet-portal",...t})}function kt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function Mt({className:t,children:a,side:n="right",...s}){return e.jsxs(_t,{children:[e.jsx(kt,{}),e.jsxs(Q,{"data-slot":"sheet-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(X,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(te,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Et({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(Z,{"data-slot":"sheet-title",className:r("text-foreground font-semibold",t),...a})}function Rt({className:t,...a}){return e.jsx(Y,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",t),...a})}function se({delayDuration:t=0,...a}){return e.jsx(we,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function zt({...t}){return e.jsx(se,{children:e.jsx(ye,{"data-slot":"tooltip",...t})})}function At({...t}){return e.jsx(Ne,{"data-slot":"tooltip-trigger",...t})}function Dt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Ce,{children:e.jsxs(Se,{"data-slot":"tooltip-content",sideOffset:a,className:r("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(_e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const M=768;function Pt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${M-1}px)`),s=()=>{a(window.innerWidth<M)};return n.addEventListener("change",s),a(window.innerWidth<M),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=60*60*24*7,$t="16rem",Lt="18rem",Bt="3rem",Ht="b",ne=d.createContext(null);function z(){const t=d.useContext(ne);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Gt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...c}){const u=Pt(),[f,p]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const l=typeof h=="function"?h(m):h;n?n(l):C(l),document.cookie=`${It}=${l}; path=/; max-age=${Tt}`},[n,m]),v=d.useCallback(()=>u?p(h=>!h):j(h=>!h),[u,j,p]);d.useEffect(()=>{const h=l=>{l.key===Ht&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const y=m?"expanded":"collapsed",S=d.useMemo(()=>({state:y,open:m,setOpen:j,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:v}),[y,m,j,u,f,p,v]);return e.jsx(ne.Provider,{value:S,children:e.jsx(se,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":$t,"--sidebar-width-icon":Bt,...o},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...c,children:i})})})}function qt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:c,state:u,openMobile:f,setOpenMobile:p}=z();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):c?e.jsx(St,{open:f,onOpenChange:p,...i,children:e.jsxs(Mt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Lt},side:t,children:[e.jsxs(Et,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(Rt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:r("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ft({className:t,onClick:a,...n}){const{toggleSidebar:s}=z();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(tt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",t),...a})}function Wt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function _({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",t),...a})}const Ut=Me("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function b({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...c}){const u=t?R:"button",{isMobile:f,state:p}=z(),g=e.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:r(Ut({variant:n,size:s}),i),...c});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(zt,{children:[e.jsx(At,{asChild:!0,children:g}),e.jsx(Dt,{side:"right",align:"center",hidden:p!=="collapsed"||f,...o})]})):g}function Qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Xt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=W(),{data:n}=ge();return a?e.jsx(e.Fragment,{children:Object.entries(a).filter(([,s])=>t?s.singleton:!s.singleton).map(([s,o])=>e.jsx(Qt,{children:e.jsx(ce,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:i,isPending:c})=>c?"pending":i?"active":"",children:({isActive:i})=>e.jsxs(Xt,{isActive:i,children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap w-full",children:o.displayName}),!t&&n&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1",children:Object.keys(n[s]).length})]})})},o.displayName))}):null}var A="Collapsible",[Zt,ba]=Re(A),[Yt,D]=Zt(A),oe=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:c,...u}=t,[f=!1,p]=Oe({prop:s,defaultProp:o,onChange:c});return e.jsx(Yt,{scope:n,disabled:i,contentId:ke(),open:f,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),children:e.jsx(k.div,{"data-state":I(f),"data-disabled":i?"":void 0,...u,ref:a})})});oe.displayName=A;var ie="CollapsibleTrigger",re=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=D(ie,n);return e.jsx(k.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":I(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:ze(t.onClick,o.onOpenToggle)})});re.displayName=ie;var P="CollapsibleContent",de=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=D(P,t.__scopeCollapsible);return e.jsx(Ae,{present:n||o.open,children:({present:i})=>e.jsx(Jt,{...s,ref:a,present:i})})});de.displayName=P;var Jt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,c=D(P,n),[u,f]=d.useState(s),p=d.useRef(null),g=Ee(a,p),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=c.open||u,S=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const l=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(l)},[]),De(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const T=l.getBoundingClientRect();C.current=T.height,j.current=T.width,S.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),f(s)}},[c.open,s]),e.jsx(k.div,{"data-state":I(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!y,...i,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:y&&o})});function I(t){return t?"open":"closed"}var ea=oe;function F({...t}){return e.jsx(ea,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(re,{"data-slot":"collapsible-trigger",...t})}function K({...t}){return e.jsx(de,{"data-slot":"collapsible-content",...t})}function ta(){const t=fe(),[a,n]=d.useState(!1),[s]=me(),[o]=je(),[i]=ve(),c=E(u=>u.auth.role);return e.jsxs(qt,{className:"z-50",children:[e.jsx(jt,{isOpen:a,setOpen:n}),e.jsx(Vt,{className:"h-14 justify-center",children:e.jsx(_,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:"WEkEO"})})}),e.jsxs(Wt,{children:[e.jsxs(_,{children:[e.jsx(B,{children:"Content"}),e.jsx(H,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(Qe,{}),e.jsx("span",{children:"Collections"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(K,{children:e.jsx(q,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(st,{}),e.jsx("span",{children:"Singles"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(K,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(We,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(He,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(_,{children:[e.jsx(B,{children:"Actions"}),e.jsx(H,{children:e.jsxs(G,{children:[c==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{onClick:()=>o(),children:[e.jsx(Te,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>i(),children:[e.jsx(Le,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>s(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(_,{})]}),e.jsxs(Kt,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:Pe.PREVIEW_URL,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(b,{onClick:()=>n(!0),children:"About"}),e.jsxs(b,{onClick:()=>t(be()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function aa({children:t}){const a=ue(),n=E(o=>o.auth.user),s=E(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/")},[s,a,n]),s||!n?null:t}function sa(){const{pathname:t}=he(),{data:a}=W(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(pe.Fragment,{children:[i.length>1&&o>=1&&e.jsx(qe,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsx("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:a[s]?a[s].displayName:s},s)]},o))}):null}const ga=le(function(){return e.jsx(aa,{children:e.jsxs(Gt,{className:"flex h-full",children:[e.jsx(ta,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ft,{}),e.jsx(Ct,{orientation:"vertical",className:"h-4"}),e.jsx(sa,{})]})}),e.jsx(xe,{})]})]})})});export{ga as default};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import{w as y}from"./react-redux-kbMjYGuQ.js";import{n as e,a as j,t as g}from"./chunk-KNED5TY2-DAA_sFzt.js";import{m as u,n as v}from"./editorialApi-fQchmMa9.js";import{c as N,f as k}from"./utils-DslUJpbf.js";import{c as o}from"./createLucideIcon-R2-3a7hN.js";import{C as w}from"./chevron-down-D_Gla76b.js";import{T as n}from"./trash-wq_ppIxP.js";/**
|
|
2
|
-
* @license lucide-react v0.487.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const b=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],r=o("copy",b);/**
|
|
7
|
-
* @license lucide-react v0.487.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const z=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],_=o("ellipsis",z);/**
|
|
12
|
-
* @license lucide-react v0.487.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const F=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],M=o("file-image",F);/**
|
|
17
|
-
* @license lucide-react v0.487.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const H=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],C=o("file-text",H);/**
|
|
22
|
-
* @license lucide-react v0.487.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const $=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],T=o("file",$);/**
|
|
27
|
-
* @license lucide-react v0.487.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const I=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],L=o("folder-open",I);/**
|
|
32
|
-
* @license lucide-react v0.487.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const q=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],D=o("folder",q),E=["txt","md","html","pdf"],S=["svg","webp","png","jpeg","jpg"],V=[{Icon:M,test:s=>S.some(i=>s.name.endsWith(i))},{Icon:C,test:s=>E.some(i=>s.name.endsWith(i))}],P={Icon:T},d=({node:s,level:i=0,onDelete:c})=>{const[a,p]=j.useState(!1),m=V.find(t=>t.test(s))??P,l=s.type==="directory",x=l?"div":g,h=()=>{l&&p(!a)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(x,{to:s.path,target:"_blank",className:"flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",style:{paddingLeft:`calc(0.5rem + ${i*20}px)`},onClick:h,children:[l?e.jsx(w,{size:16,className:N("transition-transform",{"rotate-180":a})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[l?a?e.jsx(L,{size:16,className:"text-yellow-500"}):e.jsx(D,{size:16,className:"text-yellow-500"}):e.jsx(m.Icon,{size:16,className:" text-gray-500"}),e.jsx("span",{className:"text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:s.name})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:l?"--":k(s.size)})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-20",children:[l?e.jsx(r,{className:"invisible",size:16}):e.jsxs("button",{className:"hover:text-yellow-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),navigator.clipboard.writeText(s.path)},children:[e.jsx(r,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),c(s.path)},children:[e.jsx(n,{size:16}),e.jsx("span",{className:"sr-only",children:"Delete this file"})]})]})]}),l&&a&&s.children&&e.jsx("div",{children:s.children.map((t,f)=>e.jsx(d,{node:t,level:i+1,onDelete:c},`${t.name}-${f}`))})]})};function Z(){const{data:s,isLoading:i}=u(),[c]=v();return!s||i?null:s.toSorted(a=>a.type==="directory"?-1:1).map(a=>e.jsx(d,{node:a,onDelete:c},a.name))}const B=y(function(){return e.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:e.jsx("div",{className:"flex flex-col flex-1 gap-8",children:e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),e.jsxs("div",{className:"flex items-center gap-1 invisible",children:[e.jsx(r,{size:14}),e.jsx(n,{size:14}),e.jsx(_,{size:14})]})]}),e.jsx(Z,{})]})})})});export{B as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as K,n as He,g as Ke,h as tt,j as Y,e as Ee,S as ee,f as B,p as X,k as ue,l as be,m as W,o as Te,q as nt,r as Se,s as fe,t as Re,v as We,x as rt,y as Be,z as st,A as we,B as it,C as ot,D as ut,d as ct,b as at,u as lt,E as te}from"./react-redux-kbMjYGuQ.js";import{a as C}from"./chunk-KNED5TY2-DAA_sFzt.js";function dt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ft(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function pt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(l=>typeof l=="function")){const l=e.map(m=>typeof m=="function"?`function ${m.name||"unnamed"}()`:typeof m).join(", ");throw new TypeError(`${t}[${l}]`)}}var Qe=e=>Array.isArray(e)?e:[e];function yt(e){const t=Array.isArray(e[0])?e[0]:e;return pt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function gt(e,t){const l=[],{length:m}=e;for(let p=0;p<m;p++)l.push(e[p].apply(null,t));return l}var ht=class{constructor(e){this.value=e}deref(){return this.value}},mt=typeof WeakRef<"u"?WeakRef:ht,vt=0,Ie=1;function se(){return{s:vt,v:void 0,o:null,p:null}}function ce(e,t={}){let l=se();const{resultEqualityCheck:m}=t;let p,R=0;function b(){var M;let A=l;const{length:Q}=arguments;for(let f=0,i=Q;f<i;f++){const a=arguments[f];if(typeof a=="function"||typeof a=="object"&&a!==null){let r=A.o;r===null&&(A.o=r=new WeakMap);const d=r.get(a);d===void 0?(A=se(),r.set(a,A)):A=d}else{let r=A.p;r===null&&(A.p=r=new Map);const d=r.get(a);d===void 0?(A=se(),r.set(a,A)):A=d}}const O=A;let T;if(A.s===Ie)T=A.v;else if(T=e.apply(null,arguments),R++,m){const f=((M=p==null?void 0:p.deref)==null?void 0:M.call(p))??p;f!=null&&m(f,T)&&(T=f,R!==0&&R--),p=typeof T=="object"&&T!==null||typeof T=="function"?new mt(T):T}return O.s=Ie,O.v=T,T}return b.clearCache=()=>{l=se(),b.resetResultsCount()},b.resultsCount=()=>R,b.resetResultsCount=()=>{R=0},b}function bt(e,...t){const l=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,m=(...p)=>{let R=0,b=0,A,Q={},O=p.pop();typeof O=="object"&&(Q=O,O=p.pop()),dt(O,`createSelector expects an output function after the inputs, but received: [${typeof O}]`);const T={...l,...Q},{memoize:M,memoizeOptions:f=[],argsMemoize:i=ce,argsMemoizeOptions:a=[]}=T,r=Qe(f),d=Qe(a),q=yt(p),n=M(function(){return R++,O.apply(null,arguments)},...r),s=i(function(){b++;const S=gt(q,arguments);return A=n.apply(null,S),A},...d);return Object.assign(s,{resultFunc:O,memoizedResultFunc:n,dependencies:q,dependencyRecomputations:()=>b,resetDependencyRecomputations:()=>{b=0},lastResult:()=>A,recomputations:()=>R,resetRecomputations:()=>{R=0},memoize:M,argsMemoize:i})};return Object.assign(m,{withTypes:()=>m}),m}var qe=bt(ce),St=Object.assign((e,t=qe)=>{ft(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const l=Object.keys(e),m=l.map(R=>e[R]);return t(m,(...R)=>R.reduce((b,A,Q)=>(b[l[Q]]=A,b),{}))},{withTypes:()=>St}),Ve=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ve||{});function Rt(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var De=K;function Je(e,t){if(e===t||!(De(e)&&De(t)||Array.isArray(e)&&Array.isArray(t)))return t;const l=Object.keys(t),m=Object.keys(e);let p=l.length===m.length;const R=Array.isArray(t)?[]:{};for(const b of l)R[b]=Je(e[b],t[b]),p&&(p=e[b]===R[b]);return p?e:R}function G(e){let t=0;for(const l in e)t++;return t}var Ce=e=>[].concat(...e);function qt(e){return new RegExp("(^|:)//").test(e)}function Ot(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function ae(e){return e!=null}function Mt(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var At=e=>e.replace(/\/$/,""),Et=e=>e.replace(/^\//,"");function Tt(e,t){if(!e)return t;if(!t)return e;if(qt(t))return t;const l=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=At(e),t=Et(t),`${e}${l}${t}`}function wt(e,t,l){return e.has(t)?e.get(t):e.set(t,l).get(t)}var je=(...e)=>fetch(...e),Qt=e=>e.status>=200&&e.status<=299,It=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function ke(e){if(!K(e))return e;const t={...e};for(const[l,m]of Object.entries(t))m===void 0&&delete t[l];return t}function Dt({baseUrl:e,prepareHeaders:t=M=>M,fetchFn:l=je,paramsSerializer:m,isJsonContentType:p=It,jsonContentType:R="application/json",jsonReplacer:b,timeout:A,responseHandler:Q,validateStatus:O,...T}={}){return typeof fetch>"u"&&l===je&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,i,a)=>{const{getState:r,extra:d,endpoint:q,forced:n,type:s}=i;let u,{url:S,headers:g=new Headers(T.headers),params:o=void 0,responseHandler:y=Q??"json",validateStatus:h=O??Qt,timeout:c=A,...v}=typeof f=="string"?{url:f}:f,E,w=i.signal;c&&(E=new AbortController,i.signal.addEventListener("abort",E.abort),w=E.signal);let I={...T,signal:w,...v};g=new Headers(ke(g)),I.headers=await t(g,{getState:r,arg:f,extra:d,endpoint:q,forced:n,type:s,extraOptions:a})||g;const D=U=>typeof U=="object"&&(K(U)||Array.isArray(U)||typeof U.toJSON=="function");if(!I.headers.has("content-type")&&D(I.body)&&I.headers.set("content-type",R),D(I.body)&&p(I.headers)&&(I.body=JSON.stringify(I.body,b)),o){const U=~S.indexOf("?")?"&":"?",H=m?m(o):new URLSearchParams(ke(o));S+=U+H}S=Tt(e,S);const P=new Request(S,I);u={request:new Request(S,I)};let j,z=!1,k=E&&setTimeout(()=>{z=!0,E.abort()},c);try{j=await l(P)}catch(U){return{error:{status:z?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:u}}finally{k&&clearTimeout(k),E==null||E.signal.removeEventListener("abort",E.abort)}const L=j.clone();u.response=L;let $,_="";try{let U;if(await Promise.all([M(j,y).then(H=>$=H,H=>U=H),L.text().then(H=>_=H,()=>{})]),U)throw U}catch(U){return{error:{status:"PARSING_ERROR",originalStatus:j.status,data:_,error:String(U)},meta:u}}return h(j,$)?{data:$,meta:u}:{error:{status:j.status,data:$},meta:u}};async function M(f,i){if(typeof i=="function")return i(f);if(i==="content-type"&&(i=p(f.headers)?"json":"text"),i==="json"){const a=await f.text();return a.length?JSON.parse(a):null}return f.text()}}var Pe=class{constructor(e,t=void 0){this.value=e,this.meta=t}},le=Y("__rtkq/focused"),Oe=Y("__rtkq/unfocused"),de=Y("__rtkq/online"),Me=Y("__rtkq/offline"),pe=!1;function gn(e,t){function l(){const m=()=>e(le()),p=()=>e(Oe()),R=()=>e(de()),b=()=>e(Me()),A=()=>{window.document.visibilityState==="visible"?m():p()};return pe||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",A,!1),window.addEventListener("focus",m,!1),window.addEventListener("online",R,!1),window.addEventListener("offline",b,!1),pe=!0),()=>{window.removeEventListener("focus",m),window.removeEventListener("visibilitychange",A),window.removeEventListener("online",R),window.removeEventListener("offline",b),pe=!1}}return l()}function Ge(e){return e.type==="query"}function Ct(e){return e.type==="mutation"}function Ae(e,t,l,m,p,R){return jt(e)?e(t,l,m,p).filter(ae).map(me).map(R):Array.isArray(e)?e.map(me).map(R):[]}function jt(e){return typeof e=="function"}function me(e){return typeof e=="string"?{type:e}:e}function kt(e,t){return e.catch(t)}var ne=Symbol("forceQueryFn"),ve=e=>typeof e[ne]=="function";function Pt({serializeQueryArgs:e,queryThunk:t,mutationThunk:l,api:m,context:p}){const R=new Map,b=new Map,{unsubscribeQueryResult:A,removeMutationResult:Q,updateSubscriptionOptions:O}=m.internalActions;return{buildInitiateQuery:a,buildInitiateMutation:r,getRunningQueryThunk:T,getRunningMutationThunk:M,getRunningQueriesThunk:f,getRunningMutationsThunk:i};function T(d,q){return n=>{var S;const s=p.endpointDefinitions[d],u=e({queryArgs:q,endpointDefinition:s,endpointName:d});return(S=R.get(n))==null?void 0:S[u]}}function M(d,q){return n=>{var s;return(s=b.get(n))==null?void 0:s[q]}}function f(){return d=>Object.values(R.get(d)||{}).filter(ae)}function i(){return d=>Object.values(b.get(d)||{}).filter(ae)}function a(d,q){const n=(s,{subscribe:u=!0,forceRefetch:S,subscriptionOptions:g,[ne]:o,...y}={})=>(h,c)=>{var $;const v=e({queryArgs:s,endpointDefinition:q,endpointName:d}),E=t({...y,type:"query",subscribe:u,forceRefetch:S,subscriptionOptions:g,endpointName:d,originalArgs:s,queryCacheKey:v,[ne]:o}),w=m.endpoints[d].select(s),I=h(E),D=w(c()),{requestId:P,abort:F}=I,j=D.requestId!==P,z=($=R.get(h))==null?void 0:$[v],k=()=>w(c()),L=Object.assign(o?I.then(k):j&&!z?Promise.resolve(D):Promise.all([z,I]).then(k),{arg:s,requestId:P,subscriptionOptions:g,queryCacheKey:v,abort:F,async unwrap(){const _=await L;if(_.isError)throw _.error;return _.data},refetch:()=>h(n(s,{subscribe:!1,forceRefetch:!0})),unsubscribe(){u&&h(A({queryCacheKey:v,requestId:P}))},updateSubscriptionOptions(_){L.subscriptionOptions=_,h(O({endpointName:d,requestId:P,queryCacheKey:v,options:_}))}});if(!z&&!j&&!o){const _=wt(R,h,{});_[v]=L,L.then(()=>{delete _[v],G(_)||R.delete(h)})}return L};return n}function r(d){return(q,{track:n=!0,fixedCacheKey:s}={})=>(u,S)=>{const g=l({type:"mutation",endpointName:d,originalArgs:q,track:n,fixedCacheKey:s}),o=u(g),{requestId:y,abort:h,unwrap:c}=o,v=kt(o.unwrap().then(D=>({data:D})),D=>({error:D})),E=()=>{u(Q({requestId:y,fixedCacheKey:s}))},w=Object.assign(v,{arg:o.arg,requestId:y,abort:h,unwrap:c,reset:E}),I=b.get(u)||{};return b.set(u,I),I[y]=w,w.then(()=>{delete I[y],G(I)||b.delete(u)}),s&&(I[s]=w,w.then(()=>{I[s]===w&&(delete I[s],G(I)||b.delete(u))})),w}}}function Fe(e){return e}function Ft({reducerPath:e,baseQuery:t,context:{endpointDefinitions:l},serializeQueryArgs:m,api:p,assertTagType:R}){const b=(n,s,u,S)=>(g,o)=>{const y=l[n],h=m({queryArgs:s,endpointDefinition:y,endpointName:n});if(g(p.internalActions.queryResultPatched({queryCacheKey:h,patches:u})),!S)return;const c=p.endpoints[n].select(s)(o()),v=Ae(y.providesTags,c.data,void 0,s,{},R);g(p.internalActions.updateProvidedBy({queryCacheKey:h,providedTags:v}))},A=(n,s,u,S=!0)=>(g,o)=>{const h=p.endpoints[n].select(s)(o()),c={patches:[],inversePatches:[],undo:()=>g(p.util.patchQueryData(n,s,c.inversePatches,S))};if(h.status==="uninitialized")return c;let v;if("data"in h)if(rt(h.data)){const[E,w,I]=Be(h.data,u);c.patches.push(...w),c.inversePatches.push(...I),v=E}else v=u(h.data),c.patches.push({op:"replace",path:[],value:v}),c.inversePatches.push({op:"replace",path:[],value:h.data});return c.patches.length===0||g(p.util.patchQueryData(n,s,c.patches,S)),c},Q=(n,s,u)=>S=>S(p.endpoints[n].initiate(s,{subscribe:!1,forceRefetch:!0,[ne]:()=>({data:u})})),O=async(n,{signal:s,abort:u,rejectWithValue:S,fulfillWithValue:g,dispatch:o,getState:y,extra:h})=>{const c=l[n.endpointName];try{let v=Fe,E;const w={signal:s,abort:u,dispatch:o,getState:y,extra:h,endpoint:n.endpointName,type:n.type,forced:n.type==="query"?T(n,y()):void 0,queryCacheKey:n.type==="query"?n.queryCacheKey:void 0},I=n.type==="query"?n[ne]:void 0;if(I?E=I():c.query?(E=await t(c.query(n.originalArgs),w,c.extraOptions),c.transformResponse&&(v=c.transformResponse)):E=await c.queryFn(n.originalArgs,w,c.extraOptions,D=>t(D,w,c.extraOptions)),typeof process<"u",E.error)throw new Pe(E.error,E.meta);return g(await v(E.data,E.meta,n.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:E.meta,[ee]:!0})}catch(v){let E=v;if(E instanceof Pe){let w=Fe;c.query&&c.transformErrorResponse&&(w=c.transformErrorResponse);try{return S(await w(E.value,E.meta,n.originalArgs),{baseQueryMeta:E.meta,[ee]:!0})}catch(I){E=I}}throw console.error(E),E}};function T(n,s){var y,h,c;const u=(h=(y=s[e])==null?void 0:y.queries)==null?void 0:h[n.queryCacheKey],S=(c=s[e])==null?void 0:c.config.refetchOnMountOrArgChange,g=u==null?void 0:u.fulfilledTimeStamp,o=n.forceRefetch??(n.subscribe&&S);return o?o===!0||(Number(new Date)-Number(g))/1e3>=o:!1}const M=Ee(`${e}/executeQuery`,O,{getPendingMeta(){return{startedTimeStamp:Date.now(),[ee]:!0}},condition(n,{getState:s}){var c,v,E;const u=s(),S=(v=(c=u[e])==null?void 0:c.queries)==null?void 0:v[n.queryCacheKey],g=S==null?void 0:S.fulfilledTimeStamp,o=n.originalArgs,y=S==null?void 0:S.originalArgs,h=l[n.endpointName];return ve(n)?!0:(S==null?void 0:S.status)==="pending"?!1:T(n,u)||Ge(h)&&((E=h==null?void 0:h.forceRefetch)!=null&&E.call(h,{currentArg:o,previousArg:y,endpointState:S,state:u}))?!0:!g},dispatchConditionRejection:!0}),f=Ee(`${e}/executeMutation`,O,{getPendingMeta(){return{startedTimeStamp:Date.now(),[ee]:!0}}}),i=n=>"force"in n,a=n=>"ifOlderThan"in n,r=(n,s,u)=>(S,g)=>{const o=i(u)&&u.force,y=a(u)&&u.ifOlderThan,h=(v=!0)=>{const E={forceRefetch:v,isPrefetch:!0};return p.endpoints[n].initiate(s,E)},c=p.endpoints[n].select(s)(g());if(o)S(h());else if(y){const v=c==null?void 0:c.fulfilledTimeStamp;if(!v){S(h());return}(Number(new Date)-Number(new Date(v)))/1e3>=y&&S(h())}else S(h(!1))};function d(n){return s=>{var u,S;return((S=(u=s==null?void 0:s.meta)==null?void 0:u.arg)==null?void 0:S.endpointName)===n}}function q(n,s){return{matchPending:fe(We(n),d(s)),matchFulfilled:fe(W(n),d(s)),matchRejected:fe(Re(n),d(s))}}return{queryThunk:M,mutationThunk:f,prefetch:r,updateQueryData:A,upsertQueryData:Q,patchQueryData:b,buildMatchThunkActions:q}}function Ye(e,t,l,m){return Ae(l[e.meta.arg.endpointName][t],W(e)?e.payload:void 0,be(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,m)}function ie(e,t,l){const m=e[t];m&&l(m)}function re(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ze(e,t,l){const m=e[re(t)];m&&l(m)}var Z={};function zt({reducerPath:e,queryThunk:t,mutationThunk:l,serializeQueryArgs:m,context:{endpointDefinitions:p,apiUid:R,extractRehydrationInfo:b,hasRehydrationInfo:A},assertTagType:Q,config:O}){const T=Y(`${e}/resetApiState`);function M(g,o,y,h){var c;g[c=o.queryCacheKey]??(g[c]={status:"uninitialized",endpointName:o.endpointName}),ie(g,o.queryCacheKey,v=>{v.status="pending",v.requestId=y&&v.requestId?v.requestId:h.requestId,o.originalArgs!==void 0&&(v.originalArgs=o.originalArgs),v.startedTimeStamp=h.startedTimeStamp})}function f(g,o,y,h){ie(g,o.arg.queryCacheKey,c=>{if(c.requestId!==o.requestId&&!h)return;const{merge:v}=p[o.arg.endpointName];if(c.status="fulfilled",v)if(c.data!==void 0){const{fulfilledTimeStamp:E,arg:w,baseQueryMeta:I,requestId:D}=o;let P=Se(c.data,F=>v(F,y,{arg:w.originalArgs,baseQueryMeta:I,fulfilledTimeStamp:E,requestId:D}));c.data=P}else c.data=y;else c.data=p[o.arg.endpointName].structuralSharing??!0?Je(it(c.data)?ot(c.data):c.data,y):y;delete c.error,c.fulfilledTimeStamp=o.fulfilledTimeStamp})}const i=B({name:`${e}/queries`,initialState:Z,reducers:{removeQueryResult:{reducer(g,{payload:{queryCacheKey:o}}){delete g[o]},prepare:X()},cacheEntriesUpserted:{reducer(g,o){for(const y of o.payload){const{queryDescription:h,value:c}=y;M(g,h,!0,{requestId:o.meta.requestId,startedTimeStamp:o.meta.timestamp}),f(g,{arg:h,requestId:o.meta.requestId,fulfilledTimeStamp:o.meta.timestamp,baseQueryMeta:{}},c,!0)}},prepare:g=>({payload:g.map(h=>{const{endpointName:c,arg:v,value:E}=h,w=p[c];return{queryDescription:{type:"query",endpointName:c,originalArgs:h.arg,queryCacheKey:m({queryArgs:v,endpointDefinition:w,endpointName:c})},value:E}}),meta:{[ee]:!0,requestId:He(),timestamp:Date.now()}})},queryResultPatched:{reducer(g,{payload:{queryCacheKey:o,patches:y}}){ie(g,o,h=>{h.data=Te(h.data,y.concat())})},prepare:X()}},extraReducers(g){g.addCase(t.pending,(o,{meta:y,meta:{arg:h}})=>{const c=ve(h);M(o,h,c,y)}).addCase(t.fulfilled,(o,{meta:y,payload:h})=>{const c=ve(y.arg);f(o,y,h,c)}).addCase(t.rejected,(o,{meta:{condition:y,arg:h,requestId:c},error:v,payload:E})=>{ie(o,h.queryCacheKey,w=>{if(!y){if(w.requestId!==c)return;w.status="rejected",w.error=E??v}})}).addMatcher(A,(o,y)=>{const{queries:h}=b(y);for(const[c,v]of Object.entries(h))((v==null?void 0:v.status)==="fulfilled"||(v==null?void 0:v.status)==="rejected")&&(o[c]=v)})}}),a=B({name:`${e}/mutations`,initialState:Z,reducers:{removeMutationResult:{reducer(g,{payload:o}){const y=re(o);y in g&&delete g[y]},prepare:X()}},extraReducers(g){g.addCase(l.pending,(o,{meta:y,meta:{requestId:h,arg:c,startedTimeStamp:v}})=>{c.track&&(o[re(y)]={requestId:h,status:"pending",endpointName:c.endpointName,startedTimeStamp:v})}).addCase(l.fulfilled,(o,{payload:y,meta:h})=>{h.arg.track&&ze(o,h,c=>{c.requestId===h.requestId&&(c.status="fulfilled",c.data=y,c.fulfilledTimeStamp=h.fulfilledTimeStamp)})}).addCase(l.rejected,(o,{payload:y,error:h,meta:c})=>{c.arg.track&&ze(o,c,v=>{v.requestId===c.requestId&&(v.status="rejected",v.error=y??h)})}).addMatcher(A,(o,y)=>{const{mutations:h}=b(y);for(const[c,v]of Object.entries(h))((v==null?void 0:v.status)==="fulfilled"||(v==null?void 0:v.status)==="rejected")&&c!==(v==null?void 0:v.requestId)&&(o[c]=v)})}}),r=B({name:`${e}/invalidation`,initialState:Z,reducers:{updateProvidedBy:{reducer(g,o){var c,v;const{queryCacheKey:y,providedTags:h}=o.payload;for(const E of Object.values(g))for(const w of Object.values(E)){const I=w.indexOf(y);I!==-1&&w.splice(I,1)}for(const{type:E,id:w}of h){const I=(c=g[E]??(g[E]={}))[v=w||"__internal_without_id"]??(c[v]=[]);I.includes(y)||I.push(y)}},prepare:X()}},extraReducers(g){g.addCase(i.actions.removeQueryResult,(o,{payload:{queryCacheKey:y}})=>{for(const h of Object.values(o))for(const c of Object.values(h)){const v=c.indexOf(y);v!==-1&&c.splice(v,1)}}).addMatcher(A,(o,y)=>{var c,v;const{provided:h}=b(y);for(const[E,w]of Object.entries(h))for(const[I,D]of Object.entries(w)){const P=(c=o[E]??(o[E]={}))[v=I||"__internal_without_id"]??(c[v]=[]);for(const F of D)P.includes(F)||P.push(F)}}).addMatcher(ue(W(t),be(t)),(o,y)=>{const h=Ye(y,"providesTags",p,Q),{queryCacheKey:c}=y.meta.arg;r.caseReducers.updateProvidedBy(o,r.actions.updateProvidedBy({queryCacheKey:c,providedTags:h}))})}}),d=B({name:`${e}/subscriptions`,initialState:Z,reducers:{updateSubscriptionOptions(g,o){},unsubscribeQueryResult(g,o){},internal_getRTKQSubscriptions(){}}}),q=B({name:`${e}/internalSubscriptions`,initialState:Z,reducers:{subscriptionsUpdated:{reducer(g,o){return Te(g,o.payload)},prepare:X()}}}),n=B({name:`${e}/config`,initialState:{online:Mt(),focused:Ot(),middlewareRegistered:!1,...O},reducers:{middlewareRegistered(g,{payload:o}){g.middlewareRegistered=g.middlewareRegistered==="conflict"||R!==o?"conflict":!0}},extraReducers:g=>{g.addCase(de,o=>{o.online=!0}).addCase(Me,o=>{o.online=!1}).addCase(le,o=>{o.focused=!0}).addCase(Oe,o=>{o.focused=!1}).addMatcher(A,o=>({...o}))}}),s=nt({queries:i.reducer,mutations:a.reducer,provided:r.reducer,subscriptions:q.reducer,config:n.reducer}),u=(g,o)=>s(T.match(o)?void 0:g,o),S={...n.actions,...i.actions,...d.actions,...q.actions,...a.actions,...r.actions,resetApiState:T};return{reducer:u,actions:S}}var x=Symbol.for("RTKQ/skipToken"),Xe={status:"uninitialized"},Le=Se(Xe,()=>{}),_e=Se(Xe,()=>{});function Lt({serializeQueryArgs:e,reducerPath:t,createSelector:l}){const m=M=>Le,p=M=>_e;return{buildQuerySelector:A,buildMutationSelector:Q,selectInvalidatedBy:O,selectCachedArgsForQuery:T};function R(M){return{...M,...Rt(M.status)}}function b(M){return M[t]}function A(M,f){return i=>{if(i===x)return l(m,R);const a=e({queryArgs:i,endpointDefinition:f,endpointName:M});return l(d=>{var q,n;return((n=(q=b(d))==null?void 0:q.queries)==null?void 0:n[a])??Le},R)}}function Q(){return M=>{let f;return typeof M=="object"?f=re(M)??x:f=M,l(f===x?p:r=>{var d,q;return((q=(d=b(r))==null?void 0:d.mutations)==null?void 0:q[f])??_e},R)}}function O(M,f){const i=M[t],a=new Set;for(const r of f.filter(ae).map(me)){const d=i.provided[r.type];if(!d)continue;let q=(r.id!==void 0?d[r.id]:Ce(Object.values(d)))??[];for(const n of q)a.add(n)}return Ce(Array.from(a.values()).map(r=>{const d=i.queries[r];return d?[{queryCacheKey:r,endpointName:d.endpointName,originalArgs:d.originalArgs}]:[]}))}function T(M,f){return Object.values(M[t].queries).filter(i=>(i==null?void 0:i.endpointName)===f&&i.status!=="uninitialized").map(i=>i.originalArgs)}}var V=WeakMap?new WeakMap:void 0,Ue=({endpointName:e,queryArgs:t})=>{let l="";const m=V==null?void 0:V.get(t);if(typeof m=="string")l=m;else{const p=JSON.stringify(t,(R,b)=>(b=typeof b=="bigint"?{$bigint:b.toString()}:b,b=K(b)?Object.keys(b).sort().reduce((A,Q)=>(A[Q]=b[Q],A),{}):b,b));K(t)&&(V==null||V.set(t,p)),l=p}return`${e}(${l})`};function Ze(...e){return function(l){const m=ce(O=>{var T;return(T=l.extractRehydrationInfo)==null?void 0:T.call(l,O,{reducerPath:l.reducerPath??"api"})}),p={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...l,extractRehydrationInfo:m,serializeQueryArgs(O){let T=Ue;if("serializeQueryArgs"in O.endpointDefinition){const M=O.endpointDefinition.serializeQueryArgs;T=f=>{const i=M(f);return typeof i=="string"?i:Ue({...f,queryArgs:i})}}else l.serializeQueryArgs&&(T=l.serializeQueryArgs);return T(O)},tagTypes:[...l.tagTypes||[]]},R={endpointDefinitions:{},batch(O){O()},apiUid:He(),extractRehydrationInfo:m,hasRehydrationInfo:ce(O=>m(O)!=null)},b={injectEndpoints:Q,enhanceEndpoints({addTagTypes:O,endpoints:T}){if(O)for(const M of O)p.tagTypes.includes(M)||p.tagTypes.push(M);if(T)for(const[M,f]of Object.entries(T))typeof f=="function"?f(R.endpointDefinitions[M]):Object.assign(R.endpointDefinitions[M]||{},f);return b}},A=e.map(O=>O.init(b,p,R));function Q(O){const T=O.endpoints({query:M=>({...M,type:"query"}),mutation:M=>({...M,type:"mutation"})});for(const[M,f]of Object.entries(T)){if(O.overrideExisting!==!0&&M in R.endpointDefinitions){if(O.overrideExisting==="throw")throw new Error(Ke(39));continue}R.endpointDefinitions[M]=f;for(const i of A)i.injectEndpoint(M,f)}return b}return b.injectEndpoints({endpoints:l.endpoints})}}function N(e,...t){return Object.assign(e,...t)}var _t=({api:e,queryThunk:t,internalState:l})=>{const m=`${e.reducerPath}/subscriptions`;let p=null,R=null;const{updateSubscriptionOptions:b,unsubscribeQueryResult:A}=e.internalActions,Q=(i,a)=>{var d,q,n;if(b.match(a)){const{queryCacheKey:s,requestId:u,options:S}=a.payload;return(d=i==null?void 0:i[s])!=null&&d[u]&&(i[s][u]=S),!0}if(A.match(a)){const{queryCacheKey:s,requestId:u}=a.payload;return i[s]&&delete i[s][u],!0}if(e.internalActions.removeQueryResult.match(a))return delete i[a.payload.queryCacheKey],!0;if(t.pending.match(a)){const{meta:{arg:s,requestId:u}}=a,S=i[q=s.queryCacheKey]??(i[q]={});return S[`${u}_running`]={},s.subscribe&&(S[u]=s.subscriptionOptions??S[u]??{}),!0}let r=!1;if(t.fulfilled.match(a)||t.rejected.match(a)){const s=i[a.meta.arg.queryCacheKey]||{},u=`${a.meta.requestId}_running`;r||(r=!!s[u]),delete s[u]}if(t.rejected.match(a)){const{meta:{condition:s,arg:u,requestId:S}}=a;if(s&&u.subscribe){const g=i[n=u.queryCacheKey]??(i[n]={});g[S]=u.subscriptionOptions??g[S]??{},r=!0}}return r},O=()=>l.currentSubscriptions,f={getSubscriptions:O,getSubscriptionCount:i=>{const r=O()[i]??{};return G(r)},isRequestSubscribed:(i,a)=>{var d;const r=O();return!!((d=r==null?void 0:r[i])!=null&&d[a])}};return(i,a)=>{if(p||(p=JSON.parse(JSON.stringify(l.currentSubscriptions))),e.util.resetApiState.match(i))return p=l.currentSubscriptions={},R=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(i))return[!1,f];const r=Q(l.currentSubscriptions,i);let d=!0;if(r){R||(R=setTimeout(()=>{const s=JSON.parse(JSON.stringify(l.currentSubscriptions)),[,u]=Be(p,()=>s);a.next(e.internalActions.subscriptionsUpdated(u)),p=s,R=null},500));const q=typeof i.type=="string"&&!!i.type.startsWith(m),n=t.rejected.match(i)&&i.meta.condition&&!!i.meta.arg.subscribe;d=!q&&!n}return[d,!1]}};function Ut(e){for(const t in e)return!1;return!0}var $t=2147483647/1e3-1,Nt=({reducerPath:e,api:t,queryThunk:l,context:m,internalState:p})=>{const{removeQueryResult:R,unsubscribeQueryResult:b,cacheEntriesUpserted:A}=t.internalActions,Q=ue(b.match,l.fulfilled,l.rejected,A.match);function O(i){const a=p.currentSubscriptions[i];return!!a&&!Ut(a)}const T={},M=(i,a,r)=>{var d;if(Q(i)){const q=a.getState()[e];let n;if(A.match(i))n=i.payload.map(s=>s.queryDescription.queryCacheKey);else{const{queryCacheKey:s}=b.match(i)?i.payload:i.meta.arg;n=[s]}for(const s of n)f(s,(d=q.queries[s])==null?void 0:d.endpointName,a,q.config)}if(t.util.resetApiState.match(i))for(const[q,n]of Object.entries(T))n&&clearTimeout(n),delete T[q];if(m.hasRehydrationInfo(i)){const q=a.getState()[e],{queries:n}=m.extractRehydrationInfo(i);for(const[s,u]of Object.entries(n))f(s,u==null?void 0:u.endpointName,a,q.config)}};function f(i,a,r,d){const q=m.endpointDefinitions[a],n=(q==null?void 0:q.keepUnusedDataFor)??d.keepUnusedDataFor;if(n===1/0)return;const s=Math.max(0,Math.min(n,$t));if(!O(i)){const u=T[i];u&&clearTimeout(u),T[i]=setTimeout(()=>{O(i)||r.dispatch(R({queryCacheKey:i})),delete T[i]},s*1e3)}}return M},$e=new Error("Promise never resolved before cacheEntryRemoved."),xt=({api:e,reducerPath:t,context:l,queryThunk:m,mutationThunk:p,internalState:R})=>{const b=we(m),A=we(p),Q=W(m,p),O={};function T(r,d,q){const n=O[r];n!=null&&n.valueResolved&&(n.valueResolved({data:d,meta:q}),delete n.valueResolved)}function M(r){const d=O[r];d&&(delete O[r],d.cacheEntryRemoved())}const f=(r,d,q)=>{const n=i(r);function s(u,S,g,o){const y=q[t].queries[S],h=d.getState()[t].queries[S];!y&&h&&a(u,o,S,d,g)}if(m.pending.match(r))s(r.meta.arg.endpointName,n,r.meta.requestId,r.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(r))for(const{queryDescription:u,value:S}of r.payload){const{endpointName:g,originalArgs:o,queryCacheKey:y}=u;s(g,y,r.meta.requestId,o),T(y,S,{})}else if(p.pending.match(r))d.getState()[t].mutations[n]&&a(r.meta.arg.endpointName,r.meta.arg.originalArgs,n,d,r.meta.requestId);else if(Q(r))T(n,r.payload,r.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r))M(n);else if(e.util.resetApiState.match(r))for(const u of Object.keys(O))M(u)};function i(r){return b(r)?r.meta.arg.queryCacheKey:A(r)?r.meta.arg.fixedCacheKey??r.meta.requestId:e.internalActions.removeQueryResult.match(r)?r.payload.queryCacheKey:e.internalActions.removeMutationResult.match(r)?re(r.payload):""}function a(r,d,q,n,s){const u=l.endpointDefinitions[r],S=u==null?void 0:u.onCacheEntryAdded;if(!S)return;const g={},o=new Promise(w=>{g.cacheEntryRemoved=w}),y=Promise.race([new Promise(w=>{g.valueResolved=w}),o.then(()=>{throw $e})]);y.catch(()=>{}),O[q]=g;const h=e.endpoints[r].select(u.type==="query"?d:q),c=n.dispatch((w,I,D)=>D),v={...n,getCacheEntry:()=>h(n.getState()),requestId:s,extra:c,updateCachedData:u.type==="query"?w=>n.dispatch(e.util.updateQueryData(r,d,w)):void 0,cacheDataLoaded:y,cacheEntryRemoved:o},E=S(d,v);Promise.resolve(E).catch(w=>{if(w!==$e)throw w})}return f},Ht=({api:e,context:{apiUid:t},reducerPath:l})=>(m,p)=>{e.util.resetApiState.match(m)&&p.dispatch(e.internalActions.middlewareRegistered(t))},Kt=({reducerPath:e,context:t,context:{endpointDefinitions:l},mutationThunk:m,queryThunk:p,api:R,assertTagType:b,refetchQuery:A,internalState:Q})=>{const{removeQueryResult:O}=R.internalActions,T=ue(W(m),be(m)),M=ue(W(m,p),Re(m,p));let f=[];const i=(d,q)=>{T(d)?r(Ye(d,"invalidatesTags",l,b),q):M(d)?r([],q):R.util.invalidateTags.match(d)&&r(Ae(d.payload,void 0,void 0,void 0,void 0,b),q)};function a(d){var q,n;for(const s in d.queries)if(((q=d.queries[s])==null?void 0:q.status)==="pending")return!0;for(const s in d.mutations)if(((n=d.mutations[s])==null?void 0:n.status)==="pending")return!0;return!1}function r(d,q){const n=q.getState(),s=n[e];if(f.push(...d),s.config.invalidationBehavior==="delayed"&&a(s))return;const u=f;if(f=[],u.length===0)return;const S=R.util.selectInvalidatedBy(n,u);t.batch(()=>{const g=Array.from(S.values());for(const{queryCacheKey:o}of g){const y=s.queries[o],h=Q.currentSubscriptions[o]??{};y&&(G(h)===0?q.dispatch(O({queryCacheKey:o})):y.status!=="uninitialized"&&q.dispatch(A(y)))}})}return i},Wt=({reducerPath:e,queryThunk:t,api:l,refetchQuery:m,internalState:p})=>{const R={},b=(f,i)=>{(l.internalActions.updateSubscriptionOptions.match(f)||l.internalActions.unsubscribeQueryResult.match(f))&&Q(f.payload,i),(t.pending.match(f)||t.rejected.match(f)&&f.meta.condition)&&Q(f.meta.arg,i),(t.fulfilled.match(f)||t.rejected.match(f)&&!f.meta.condition)&&A(f.meta.arg,i),l.util.resetApiState.match(f)&&T()};function A({queryCacheKey:f},i){const a=i.getState()[e],r=a.queries[f],d=p.currentSubscriptions[f];if(!r||r.status==="uninitialized")return;const{lowestPollingInterval:q,skipPollingIfUnfocused:n}=M(d);if(!Number.isFinite(q))return;const s=R[f];s!=null&&s.timeout&&(clearTimeout(s.timeout),s.timeout=void 0);const u=Date.now()+q;R[f]={nextPollTimestamp:u,pollingInterval:q,timeout:setTimeout(()=>{(a.config.focused||!n)&&i.dispatch(m(r)),A({queryCacheKey:f},i)},q)}}function Q({queryCacheKey:f},i){const r=i.getState()[e].queries[f],d=p.currentSubscriptions[f];if(!r||r.status==="uninitialized")return;const{lowestPollingInterval:q}=M(d);if(!Number.isFinite(q)){O(f);return}const n=R[f],s=Date.now()+q;(!n||s<n.nextPollTimestamp)&&A({queryCacheKey:f},i)}function O(f){const i=R[f];i!=null&&i.timeout&&clearTimeout(i.timeout),delete R[f]}function T(){for(const f of Object.keys(R))O(f)}function M(f={}){let i=!1,a=Number.POSITIVE_INFINITY;for(let r in f)f[r].pollingInterval&&(a=Math.min(f[r].pollingInterval,a),i=f[r].skipPollingIfUnfocused||i);return{lowestPollingInterval:a,skipPollingIfUnfocused:i}}return b},Bt=({api:e,context:t,queryThunk:l,mutationThunk:m})=>{const p=We(l,m),R=Re(l,m),b=W(l,m),A={};return(O,T)=>{var M,f;if(p(O)){const{requestId:i,arg:{endpointName:a,originalArgs:r}}=O.meta,d=t.endpointDefinitions[a],q=d==null?void 0:d.onQueryStarted;if(q){const n={},s=new Promise((o,y)=>{n.resolve=o,n.reject=y});s.catch(()=>{}),A[i]=n;const u=e.endpoints[a].select(d.type==="query"?r:i),S=T.dispatch((o,y,h)=>h),g={...T,getCacheEntry:()=>u(T.getState()),requestId:i,extra:S,updateCachedData:d.type==="query"?o=>T.dispatch(e.util.updateQueryData(a,r,o)):void 0,queryFulfilled:s};q(r,g)}}else if(b(O)){const{requestId:i,baseQueryMeta:a}=O.meta;(M=A[i])==null||M.resolve({data:O.payload,meta:a}),delete A[i]}else if(R(O)){const{requestId:i,rejectedWithValue:a,baseQueryMeta:r}=O.meta;(f=A[i])==null||f.reject({error:O.payload??O.error,isUnhandledError:!a,meta:r}),delete A[i]}}},Vt=({reducerPath:e,context:t,api:l,refetchQuery:m,internalState:p})=>{const{removeQueryResult:R}=l.internalActions,b=(Q,O)=>{le.match(Q)&&A(O,"refetchOnFocus"),de.match(Q)&&A(O,"refetchOnReconnect")};function A(Q,O){const T=Q.getState()[e],M=T.queries,f=p.currentSubscriptions;t.batch(()=>{for(const i of Object.keys(f)){const a=M[i],r=f[i];if(!r||!a)continue;(Object.values(r).some(q=>q[O]===!0)||Object.values(r).every(q=>q[O]===void 0)&&T.config[O])&&(G(r)===0?Q.dispatch(R({queryCacheKey:i})):a.status!=="uninitialized"&&Q.dispatch(m(a)))}})}return b};function Jt(e){const{reducerPath:t,queryThunk:l,api:m,context:p}=e,{apiUid:R}=p,b={invalidateTags:Y(`${t}/invalidateTags`)},A=M=>M.type.startsWith(`${t}/`),Q=[Ht,Nt,Kt,Wt,xt,Bt];return{middleware:M=>{let f=!1;const a={...e,internalState:{currentSubscriptions:{}},refetchQuery:T,isThisApiSliceAction:A},r=Q.map(n=>n(a)),d=_t(a),q=Vt(a);return n=>s=>{if(!st(s))return n(s);f||(f=!0,M.dispatch(m.internalActions.middlewareRegistered(R)));const u={...M,next:n},S=M.getState(),[g,o]=d(s,u,S);let y;if(g?y=n(s):y=o,M.getState()[t]&&(q(s,u,S),A(s)||p.hasRehydrationInfo(s)))for(const h of r)h(s,u,S);return y}},actions:b};function T(M){return e.api.endpoints[M.endpointName].initiate(M.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Ne=Symbol(),et=({createSelector:e=qe}={})=>({name:Ne,init(t,{baseQuery:l,tagTypes:m,reducerPath:p,serializeQueryArgs:R,keepUnusedDataFor:b,refetchOnMountOrArgChange:A,refetchOnFocus:Q,refetchOnReconnect:O,invalidationBehavior:T},M){tt();const f=j=>j;Object.assign(t,{reducerPath:p,endpoints:{},internalActions:{onOnline:de,onOffline:Me,onFocus:le,onFocusLost:Oe},util:{}});const{queryThunk:i,mutationThunk:a,patchQueryData:r,updateQueryData:d,upsertQueryData:q,prefetch:n,buildMatchThunkActions:s}=Ft({baseQuery:l,reducerPath:p,context:M,api:t,serializeQueryArgs:R,assertTagType:f}),{reducer:u,actions:S}=zt({context:M,queryThunk:i,mutationThunk:a,serializeQueryArgs:R,reducerPath:p,assertTagType:f,config:{refetchOnFocus:Q,refetchOnReconnect:O,refetchOnMountOrArgChange:A,keepUnusedDataFor:b,reducerPath:p,invalidationBehavior:T}});N(t.util,{patchQueryData:r,updateQueryData:d,upsertQueryData:q,prefetch:n,resetApiState:S.resetApiState,upsertQueryEntries:S.cacheEntriesUpserted}),N(t.internalActions,S);const{middleware:g,actions:o}=Jt({reducerPath:p,context:M,queryThunk:i,mutationThunk:a,api:t,assertTagType:f});N(t.util,o),N(t,{reducer:u,middleware:g});const{buildQuerySelector:y,buildMutationSelector:h,selectInvalidatedBy:c,selectCachedArgsForQuery:v}=Lt({serializeQueryArgs:R,reducerPath:p,createSelector:e});N(t.util,{selectInvalidatedBy:c,selectCachedArgsForQuery:v});const{buildInitiateQuery:E,buildInitiateMutation:w,getRunningMutationThunk:I,getRunningMutationsThunk:D,getRunningQueriesThunk:P,getRunningQueryThunk:F}=Pt({queryThunk:i,mutationThunk:a,api:t,serializeQueryArgs:R,context:M});return N(t.util,{getRunningMutationThunk:I,getRunningMutationsThunk:D,getRunningQueryThunk:F,getRunningQueriesThunk:P}),{name:Ne,injectEndpoint(j,z){var L;const k=t;(L=k.endpoints)[j]??(L[j]={}),Ge(z)?N(k.endpoints[j],{name:j,select:y(j,z),initiate:E(j,z)},s(i,j)):Ct(z)&&N(k.endpoints[j],{name:j,select:h(),initiate:w(j)},s(a,j))}}}});et();function ye(e){return e.replace(e[0],e[0].toUpperCase())}function Gt(e){return e.type==="query"}function Yt(e){return e.type==="mutation"}function oe(e,...t){return Object.assign(e,...t)}var J=WeakMap?new WeakMap:void 0,Xt=({endpointName:e,queryArgs:t})=>{let l="";const m=J==null?void 0:J.get(t);if(typeof m=="string")l=m;else{const p=JSON.stringify(t,(R,b)=>(b=typeof b=="bigint"?{$bigint:b.toString()}:b,b=K(b)?Object.keys(b).sort().reduce((A,Q)=>(A[Q]=b[Q],A),{}):b,b));K(t)&&(J==null||J.set(t,p)),l=p}return`${e}(${l})`},ge=Symbol();function xe(e,t,l,m){const p=C.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:l,endpointName:m}):e}),[e,t,l,m]),R=C.useRef(p);return C.useEffect(()=>{R.current.serialized!==p.serialized&&(R.current=p)},[p]),R.current.serialized===p.serialized?R.current.queryArgs:e}function he(e){const t=C.useRef(e);return C.useEffect(()=>{te(t.current,e)||(t.current=e)},[e]),te(t.current,e)?t.current:e}var Zt=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",en=Zt(),tn=()=>typeof navigator<"u"&&navigator.product==="ReactNative",nn=tn(),rn=()=>en||nn?C.useLayoutEffect:C.useEffect,sn=rn(),on=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Ve.pending}:e;function un({api:e,moduleOptions:{batch:t,hooks:{useDispatch:l,useSelector:m,useStore:p},unstable__sideEffectsInRender:R,createSelector:b},serializeQueryArgs:A,context:Q}){const O=R?a=>a():C.useEffect;return{buildQueryHooks:f,buildMutationHook:i,usePrefetch:M};function T(a,r,d){if(r!=null&&r.endpointName&&a.isUninitialized){const{endpointName:g}=r,o=Q.endpointDefinitions[g];d!==x&&A({queryArgs:r.originalArgs,endpointDefinition:o,endpointName:g})===A({queryArgs:d,endpointDefinition:o,endpointName:g})&&(r=void 0)}let q=a.isSuccess?a.data:r==null?void 0:r.data;q===void 0&&(q=a.data);const n=q!==void 0,s=a.isLoading,u=(!r||r.isLoading||r.isUninitialized)&&!n&&s,S=a.isSuccess||n&&(s&&!(r!=null&&r.isError)||a.isUninitialized);return{...a,data:q,currentData:a.data,isFetching:s,isLoading:u,isSuccess:S}}function M(a,r){const d=l(),q=he(r);return C.useCallback((n,s)=>d(e.util.prefetch(a,n,{...q,...s})),[a,d,q])}function f(a){const r=(n,{refetchOnReconnect:s,refetchOnFocus:u,refetchOnMountOrArgChange:S,skip:g=!1,pollingInterval:o=0,skipPollingIfUnfocused:y=!1}={})=>{const{initiate:h}=e.endpoints[a],c=l(),v=C.useRef(void 0);if(!v.current){const k=c(e.internalActions.internal_getRTKQSubscriptions());v.current=k}const E=xe(g?x:n,Xt,Q.endpointDefinitions[a],a),w=he({refetchOnReconnect:s,refetchOnFocus:u,pollingInterval:o,skipPollingIfUnfocused:y}),I=C.useRef(!1),D=C.useRef(void 0);let{queryCacheKey:P,requestId:F}=D.current||{},j=!1;P&&F&&(j=v.current.isRequestSubscribed(P,F));const z=!j&&I.current;return O(()=>{I.current=j}),O(()=>{z&&(D.current=void 0)},[z]),O(()=>{var $;const k=D.current;if(E===x){k==null||k.unsubscribe(),D.current=void 0;return}const L=($=D.current)==null?void 0:$.subscriptionOptions;if(!k||k.arg!==E){k==null||k.unsubscribe();const _=c(h(E,{subscriptionOptions:w,forceRefetch:S}));D.current=_}else w!==L&&k.updateSubscriptionOptions(w)},[c,h,S,E,w,z]),C.useEffect(()=>()=>{var k;(k=D.current)==null||k.unsubscribe(),D.current=void 0},[]),C.useMemo(()=>({refetch:()=>{var k;if(!D.current)throw new Error(Ke(38));return(k=D.current)==null?void 0:k.refetch()}}),[])},d=({refetchOnReconnect:n,refetchOnFocus:s,pollingInterval:u=0,skipPollingIfUnfocused:S=!1}={})=>{const{initiate:g}=e.endpoints[a],o=l(),[y,h]=C.useState(ge),c=C.useRef(void 0),v=he({refetchOnReconnect:n,refetchOnFocus:s,pollingInterval:u,skipPollingIfUnfocused:S});O(()=>{var P,F;const D=(P=c.current)==null?void 0:P.subscriptionOptions;v!==D&&((F=c.current)==null||F.updateSubscriptionOptions(v))},[v]);const E=C.useRef(v);O(()=>{E.current=v},[v]);const w=C.useCallback(function(D,P=!1){let F;return t(()=>{var j;(j=c.current)==null||j.unsubscribe(),c.current=F=o(g(D,{subscriptionOptions:E.current,forceRefetch:!P})),h(D)}),F},[o,g]),I=C.useCallback(()=>{var D,P;(D=c.current)!=null&&D.queryCacheKey&&o(e.internalActions.removeQueryResult({queryCacheKey:(P=c.current)==null?void 0:P.queryCacheKey}))},[o]);return C.useEffect(()=>()=>{var D;(D=c==null?void 0:c.current)==null||D.unsubscribe()},[]),C.useEffect(()=>{y!==ge&&!c.current&&w(y,!0)},[y,w]),C.useMemo(()=>[w,y,{reset:I}],[w,y,I])},q=(n,{skip:s=!1,selectFromResult:u}={})=>{const{select:S}=e.endpoints[a],g=xe(s?x:n,A,Q.endpointDefinitions[a],a),o=C.useRef(void 0),y=C.useMemo(()=>b([S(g),(w,I)=>I,w=>g],T,{memoizeOptions:{resultEqualityCheck:te}}),[S,g]),h=C.useMemo(()=>u?b([y],u,{devModeChecks:{identityFunctionCheck:"never"}}):y,[y,u]),c=m(w=>h(w,o.current),te),v=p(),E=y(v.getState(),o.current);return sn(()=>{o.current=E},[E]),c};return{useQueryState:q,useQuerySubscription:r,useLazyQuerySubscription:d,useLazyQuery(n){const[s,u,{reset:S}]=d(n),g=q(u,{...n,skip:u===ge}),o=C.useMemo(()=>({lastArg:u}),[u]);return C.useMemo(()=>[s,{...g,reset:S},o],[s,g,S,o])},useQuery(n,s){const u=r(n,s),S=q(n,{selectFromResult:n===x||s!=null&&s.skip?void 0:on,...s}),{data:g,status:o,isLoading:y,isSuccess:h,isError:c,error:v}=S;return C.useDebugValue({data:g,status:o,isLoading:y,isSuccess:h,isError:c,error:v}),C.useMemo(()=>({...S,...u}),[S,u])}}}function i(a){return({selectFromResult:r,fixedCacheKey:d}={})=>{const{select:q,initiate:n}=e.endpoints[a],s=l(),[u,S]=C.useState();C.useEffect(()=>()=>{u!=null&&u.arg.fixedCacheKey||u==null||u.reset()},[u]);const g=C.useCallback(function(L){const $=s(n(L,{fixedCacheKey:d}));return S($),$},[s,n,d]),{requestId:o}=u||{},y=C.useMemo(()=>q({fixedCacheKey:d,requestId:u==null?void 0:u.requestId}),[d,u,q]),h=C.useMemo(()=>r?b([y],r):y,[r,y]),c=m(h,te),v=d==null?u==null?void 0:u.arg.originalArgs:void 0,E=C.useCallback(()=>{t(()=>{u&&S(void 0),d&&s(e.internalActions.removeMutationResult({requestId:o,fixedCacheKey:d}))})},[s,d,u,o]),{endpointName:w,data:I,status:D,isLoading:P,isSuccess:F,isError:j,error:z}=c;C.useDebugValue({endpointName:w,data:I,status:D,isLoading:P,isSuccess:F,isError:j,error:z});const k=C.useMemo(()=>({...c,originalArgs:v,reset:E}),[c,v,E]);return C.useMemo(()=>[g,k],[g,k])}}}var cn=Symbol(),an=({batch:e=ut,hooks:t={useDispatch:lt,useSelector:at,useStore:ct},createSelector:l=qe,unstable__sideEffectsInRender:m=!1,...p}={})=>({name:cn,init(R,{serializeQueryArgs:b},A){const Q=R,{buildQueryHooks:O,buildMutationHook:T,usePrefetch:M}=un({api:R,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:m,createSelector:l},serializeQueryArgs:b,context:A});return oe(Q,{usePrefetch:M}),oe(A,{batch:e}),{injectEndpoint(f,i){if(Gt(i)){const{useQuery:a,useLazyQuery:r,useLazyQuerySubscription:d,useQueryState:q,useQuerySubscription:n}=O(f);oe(Q.endpoints[f],{useQuery:a,useLazyQuery:r,useLazyQuerySubscription:d,useQueryState:q,useQuerySubscription:n}),R[`use${ye(f)}Query`]=a,R[`useLazy${ye(f)}Query`]=r}else if(Yt(i)){const a=T(f);oe(Q.endpoints[f],{useMutation:a}),R[`use${ye(f)}Mutation`]=a}}}}}),ln=Ze(et(),an());const dn=Dt({baseUrl:"/api/v1"}),fn=ln({reducerPath:"editorialApi",baseQuery:dn,tagTypes:["schema","data","files"],endpoints:e=>({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,l,m)=>t[m]||null,providesTags:[{type:"schema"}]}),getData:e.query({query:()=>"/data",providesTags:()=>[{type:"data"}]}),getDataCount:e.query({query:()=>"/data",transformResponse(t){return Object.values(t).reduce((m,p)=>m+Object.keys(p).length,0)}}),getDataObject:e.query({query:()=>"/data",transformResponse:(t,l,{itemType:m,id:p})=>t[m][p]||null,providesTags:()=>[{type:"data"}]}),getFiles:e.query({query:()=>"/files",providesTags:()=>[{type:"files"}]}),getFileCount:e.query({query:()=>"/files",transformResponse:t=>{function l(p){let R=p.type==="file"?1:0;return p.children&&p.children.length>0&&(R+=p.children.reduce((b,A)=>b+l(A),0)),R}function m(p){return p.reduce((R,b)=>R+l(b),0)}return m(t)}}),deleteFile:e.mutation({query:t=>({url:"/files",method:"DELETE",body:{path:t}}),invalidatesTags:()=>[{type:"files"}]}),updateObject:e.mutation({query:({id:t,type:l,...m})=>({url:`/data/${l}/${t}`,method:"PATCH",body:{id:t,type:l,...m}}),invalidatesTags:()=>[{type:"data"}]}),createObject:e.mutation({query:({id:t,type:l,...m})=>({url:`/data/${l}/${t}`,method:"PUT",body:{id:t,type:l,...m}}),invalidatesTags:()=>[{type:"data"}]}),deleteObject:e.mutation({query:({id:t,type:l})=>({url:`/data/${l}/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"data"}]})})}),{useCreateObjectMutation:hn,useDeleteFileMutation:mn,useDeleteObjectMutation:vn,useGetDataCountQuery:bn,useGetDataObjectQuery:Sn,useGetDataQuery:Rn,useGetFileCountQuery:qn,useGetFilesQuery:On,useGetSchemaQuery:Mn,useGetSchemaTypeQuery:An,usePublishMutation:En,usePullMutation:Tn,usePushMutation:wn,useUpdateObjectMutation:Qn}=fn;export{Rn as a,En as b,Tn as c,wn as d,fn as e,bn as f,qn as g,An as h,vn as i,Sn as j,hn as k,Qn as l,On as m,mn as n,gn as s,Mn as u};
|