@edifice.io/collect-frontend 1.0.0 → 1.0.2
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/lib/components/AppActionHeader.d.ts +1 -0
- package/lib/components/AppActionHeaderContext.d.ts +11 -0
- package/lib/components/AppHeaderCollection.d.ts +12 -0
- package/lib/components/CollectApp/CollectApp.d.ts +26 -0
- package/lib/components/CollectApp/CollectAppContext.d.ts +13 -0
- package/lib/components/CollectAppActionHeader.d.ts +4 -0
- package/lib/components/InstructionCard.d.ts +5 -0
- package/lib/components/SearchBarCollect.d.ts +3 -0
- package/lib/components/SubmissionCard.d.ts +7 -0
- package/lib/config/constants.d.ts +6 -0
- package/lib/features/collect-form/components/CollectForm.d.ts +24 -0
- package/lib/features/collect-form/components/index.d.ts +3 -0
- package/lib/features/collect-form/hooks/index.d.ts +2 -0
- package/lib/features/collect-form/hooks/useCreateCollectionForm.d.ts +20 -0
- package/lib/features/collect-form/index.d.ts +3 -0
- package/lib/features/collection-actions/components/CollectionActions.d.ts +4 -0
- package/lib/features/collection-list/components/CollectionListTable.d.ts +1 -0
- package/lib/features/collection-list/components/CollectionListTableBody.d.ts +4 -0
- package/lib/features/collection-list/components/CollectionListTableFooter.d.ts +12 -0
- package/lib/features/collection-list/components/CollectionListTableHead.d.ts +1 -0
- package/lib/features/collection-list/hooks/useCollectionListTableBody.d.ts +7 -0
- package/lib/features/collection-list/hooks/useCollectionListTableHead.d.ts +12 -0
- package/lib/features/collection-list/hooks/useCollectionPagination.d.ts +11 -0
- package/lib/features/collection-list/store/collectionListStore.d.ts +26 -0
- package/lib/features/collection-submissions-list/components/CollectionSubmissionsList.d.ts +4 -0
- package/lib/features/collection-submissions-list/components/CollectionSubmissionsListMobile.d.ts +4 -0
- package/lib/features/collection-submissions-list/components/CollectionSubmissionsListTr.d.ts +4 -0
- package/lib/features/collection-submissions-list/components/CollectionSubmissionsListView.d.ts +4 -0
- package/lib/features/collection-submissions-list/components/CollectionSubmissionsRender.d.ts +3 -0
- package/lib/features/collection-submissions-list/hooks/useCollectionSubmissionsList.d.ts +10 -0
- package/lib/features/collection-submissions-list/store/collectionSubmissionListStore.d.ts +16 -0
- package/lib/features/creation-wizard/CreationWizard.d.ts +2 -0
- package/lib/features/creation-wizard/components/FormCreate.d.ts +7 -0
- package/lib/features/creation-wizard/components/Members.d.ts +9 -0
- package/lib/features/creation-wizard/components/WizardContext.d.ts +8 -0
- package/lib/features/creation-wizard/components/WizardHeader.d.ts +3 -0
- package/lib/features/creation-wizard/components/WizardLayout.d.ts +3 -0
- package/lib/features/creation-wizard/hooks/useAddMember.d.ts +15 -0
- package/lib/features/creation-wizard/sharing.utils.d.ts +12 -0
- package/lib/features/creation-wizard/store/wizardStore.d.ts +15 -0
- package/lib/features/dropdown-actions/components/DropdownActionTable.d.ts +7 -0
- package/lib/features/dropdown-actions/hooks/useDropdownActionTable.d.ts +13 -0
- package/lib/features/menu/components/CollectMenu.d.ts +5 -0
- package/lib/features/menu/components/DesktopMenu.d.ts +1 -0
- package/lib/features/menu/components/MenuContext.d.ts +13 -0
- package/lib/features/menu/components/MobileMenu.d.ts +1 -0
- package/lib/features/menu/store/menuStore.d.ts +20 -0
- package/lib/features/modal/components/DeleteCollectionModal.d.ts +3 -0
- package/lib/features/modal/components/InstructionModal.d.ts +4 -0
- package/lib/features/modal/components/UpdateSubmissionModal.d.ts +9 -0
- package/lib/features/modal/hooks/useDeleteCollectionModal.d.ts +5 -0
- package/lib/features/submission/components/SubmissionEdit.d.ts +4 -0
- package/lib/features/submission/components/SubmissionView.d.ts +5 -0
- package/lib/features/submission-actions/components/SubmissionActions.d.ts +6 -0
- package/lib/features/submission-list/components/SubmissionFilter.d.ts +1 -0
- package/lib/features/submission-list/components/SubmissionsListView.d.ts +1 -0
- package/lib/features/submission-list/hooks/useSubmissionPagination.d.ts +7 -0
- package/lib/features/submission-list/store/submissionListStore.d.ts +24 -0
- package/lib/hooks/useGetStatusSubmission.d.ts +12 -0
- package/lib/hooks/useSearch.d.ts +18 -0
- package/lib/hooks/useStepNavigations.d.ts +5 -0
- package/lib/hooks/useSubmissionForm.d.ts +12 -0
- package/lib/hooks/useWizard.d.ts +13 -0
- package/lib/i18n.d.ts +2 -0
- package/lib/index.d.ts +14 -1
- package/lib/index.js +14676 -15
- package/lib/main.d.ts +0 -0
- package/lib/models/collect.d.ts +12 -0
- package/lib/models/menu.d.ts +5 -0
- package/lib/pages/Collection.d.ts +4 -0
- package/lib/pages/CollectionsLayout.d.ts +2 -0
- package/lib/pages/CollectionsList.d.ts +3 -0
- package/lib/pages/FormEdit.d.ts +4 -0
- package/lib/pages/MembersEdit.d.ts +4 -0
- package/lib/pages/MineSubmission.d.ts +6 -0
- package/lib/pages/NotFound.d.ts +1 -0
- package/lib/pages/PageError.d.ts +1 -0
- package/lib/pages/Root.d.ts +2 -0
- package/lib/pages/Submission.d.ts +4 -0
- package/lib/pages/SubmissionList.d.ts +3 -0
- package/lib/providers/index.d.ts +6 -0
- package/lib/routes/wizard/wizard.d.ts +2 -0
- package/lib/services/api/collection.service.d.ts +14 -0
- package/lib/services/api/submission.services.d.ts +8 -0
- package/lib/services/api/user.service.d.ts +77 -0
- package/lib/services/queries/collection.queries.d.ts +76 -0
- package/lib/services/queries/index.d.ts +1 -0
- package/lib/services/queries/submission.queries.d.ts +36 -0
- package/lib/services/queries/user.queries.d.ts +76 -0
- package/lib/store/collectionActionStore.d.ts +29 -0
- package/lib/store/createSelectors.d.ts +10 -0
- package/lib/store/submissionActionStore.d.ts +32 -0
- package/lib/store/userActionStore.d.ts +26 -0
- package/lib/style.css +1 -1
- package/package.json +7 -6
- package/lib/AppHeaderCollection-CnQ2pqtl.js +0 -172
- package/lib/CXEL7IU7-Dei8UEaR.js +0 -42
- package/lib/Collection-BcJujQH9.js +0 -472
- package/lib/CollectionsLayout-BWau0fFT.js +0 -41
- package/lib/CollectionsList-DoYvRzYy.js +0 -324
- package/lib/DeleteCollectionModal-C8NPFHjI.js +0 -71
- package/lib/DropdownActionTable-CJA3djIr.js +0 -84
- package/lib/FormEdit-DrlhrKl6.js +0 -102
- package/lib/HASRA6WW-Lcj-6-Jg.js +0 -9093
- package/lib/I3HPI4QX-BiqSZkoI.js +0 -33
- package/lib/MembersEdit--SFUJ5dS.js +0 -77
- package/lib/Root-4Xv-j-fs.js +0 -20
- package/lib/SearchBarCollect-DBKaVVDV.js +0 -23
- package/lib/Submission-Bi1puhNG.js +0 -257
- package/lib/SubmissionList-BUexy8AF.js +0 -197
- package/lib/emptyscreen-list-collection-CWGxO4Ss.js +0 -4
- package/lib/index-DPvhGf6m.js +0 -3485
- package/lib/submission.queries-rlTI0q9h.js +0 -86
- package/lib/useGetStatusSubmission-DxHmLPxr.js +0 -57
package/lib/index-DPvhGf6m.js
DELETED
|
@@ -1,3485 +0,0 @@
|
|
|
1
|
-
var tn = (e) => {
|
|
2
|
-
throw TypeError(e);
|
|
3
|
-
};
|
|
4
|
-
var nn = (e, t, n) => t.has(e) || tn("Cannot " + n);
|
|
5
|
-
var g = (e, t, n) => (nn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), E = (e, t, n) => t.has(e) ? tn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), A = (e, t, n, r) => (nn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
6
|
-
import { jsx as d, jsxs as U, Fragment as Ir } from "react/jsx-runtime";
|
|
7
|
-
import { WORKFLOW_RIGHTS as Lt, SharingPermission as it, CollectionClient as Ar, MediaType as Or } from "@edifice.io/collect-client-rest";
|
|
8
|
-
import { useEdificeClient as xe, useHasWorkflow as _t, Button as Z, EdificeClientProvider as Sn, Heading as Wt, Layout as Tr, Stepper as wn, Grid as K, FormControl as et, Label as It, Input as Er, DatePicker as Nr, AddAttachments as Rr, useIsAdmlcOrAdmc as Cn, useUser as In, useDebounce as xr, Flex as lt, Combobox as Pr, Alert as kr, UserRightsList as Mr, useToast as Lr, useBreakpoint as _r, EdificeThemeProvider as Ur, LoadingScreen as Vr, Menu as At, Tree as Fr } from "@edifice.io/react";
|
|
9
|
-
import { IconPlus as Br, IconLabel as $r, IconFlag as qr, IconTextPage as Dr, IconBookmark as Gr, IconGroupAvatar as Kr, IconArrowLeft as jr, IconArrowRight as rn, IconSubmission as Qr, IconCollect as Hr } from "@edifice.io/react/icons";
|
|
10
|
-
import { useTranslation as Pe, Trans as Wr } from "react-i18next";
|
|
11
|
-
import { useNavigate as ke, useRouteError as An, useLocation as On, Form as Xr, Routes as Yr, Route as sn, createBrowserRouter as zr, createMemoryRouter as Zr, RouterProvider as Jr } from "react-router-dom";
|
|
12
|
-
import * as q from "react";
|
|
13
|
-
import { createContext as pt, useContext as gt, useState as yt, useEffect as j, useMemo as Xt, useRef as ne, useReducer as es, useLayoutEffect as ts, Suspense as ns } from "react";
|
|
14
|
-
import { useQueryClient as ee, onlineManager as Tn, QueryClient as rs, QueryCache as ss, QueryClientProvider as En, queryOptions as Ot, useQuery as os, useMutation as vt, useInfiniteQuery as Nn } from "@tanstack/react-query";
|
|
15
|
-
import { createRoot as is } from "react-dom/client";
|
|
16
|
-
import { ERROR_CODE as ls, odeServices as _e } from "@edifice.io/client";
|
|
17
|
-
import { t as Tt } from "i18next";
|
|
18
|
-
import { Editor as cs } from "@edifice.io/react/editor";
|
|
19
|
-
import { useForm as as, Controller as Et } from "react-hook-form";
|
|
20
|
-
import { create as Yt } from "zustand";
|
|
21
|
-
const Rn = pt(
|
|
22
|
-
{
|
|
23
|
-
basePath: ""
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
function us({
|
|
27
|
-
basePath: e = "",
|
|
28
|
-
children: t
|
|
29
|
-
}) {
|
|
30
|
-
return /* @__PURE__ */ d(Rn.Provider, { value: { basePath: e }, children: t });
|
|
31
|
-
}
|
|
32
|
-
const fs = () => gt(Rn), ds = (e, t) => {
|
|
33
|
-
const n = e.endsWith("/") ? e.slice(0, -1) : e, r = t.startsWith("/") ? t : `/${t}`;
|
|
34
|
-
return `${n}${r}`;
|
|
35
|
-
};
|
|
36
|
-
function hs() {
|
|
37
|
-
const { appCode: e } = xe(), { t } = Pe(e), { basePath: n } = fs(), r = ke();
|
|
38
|
-
return _t(Lt.COLLECTION_CREATE) && /* @__PURE__ */ d(
|
|
39
|
-
Z,
|
|
40
|
-
{
|
|
41
|
-
"data-testid": "collect-collection-app-header-create-collection-button",
|
|
42
|
-
type: "button",
|
|
43
|
-
color: "primary",
|
|
44
|
-
leftIcon: /* @__PURE__ */ d(Br, {}),
|
|
45
|
-
onClick: () => r(ds(n, "/create/form")),
|
|
46
|
-
children: t("collection.appHeaderAction.button.newCollection")
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
var y = {
|
|
51
|
-
context: void 0,
|
|
52
|
-
registry: void 0,
|
|
53
|
-
effects: void 0,
|
|
54
|
-
done: !1,
|
|
55
|
-
getContextId() {
|
|
56
|
-
return on(this.context.count);
|
|
57
|
-
},
|
|
58
|
-
getNextContextId() {
|
|
59
|
-
return on(this.context.count++);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
function on(e) {
|
|
63
|
-
const t = String(e), n = t.length - 1;
|
|
64
|
-
return y.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
65
|
-
}
|
|
66
|
-
function Le(e) {
|
|
67
|
-
y.context = e;
|
|
68
|
-
}
|
|
69
|
-
var xn = !1, ms = (e, t) => e === t, at = Symbol("solid-proxy"), Pn = typeof Proxy == "function", kn = Symbol("solid-track"), ut = {
|
|
70
|
-
equals: ms
|
|
71
|
-
}, Mn = Bn, Y = 1, ft = 2, Ln = {
|
|
72
|
-
owned: null,
|
|
73
|
-
cleanups: null,
|
|
74
|
-
context: null,
|
|
75
|
-
owner: null
|
|
76
|
-
}, Nt = {}, w = null, Rt = null, ps = null, N = null, $ = null, X = null, bt = 0;
|
|
77
|
-
function oe(e, t) {
|
|
78
|
-
const n = N, r = w, s = e.length === 0, o = t === void 0 ? r : t, i = s ? Ln : {
|
|
79
|
-
owned: null,
|
|
80
|
-
cleanups: null,
|
|
81
|
-
context: o ? o.context : null,
|
|
82
|
-
owner: o
|
|
83
|
-
}, l = s ? e : () => e(() => B(() => Be(i)));
|
|
84
|
-
w = i, N = null;
|
|
85
|
-
try {
|
|
86
|
-
return Q(l, !0);
|
|
87
|
-
} finally {
|
|
88
|
-
N = n, w = r;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function L(e, t) {
|
|
92
|
-
t = t ? Object.assign({}, ut, t) : ut;
|
|
93
|
-
const n = {
|
|
94
|
-
value: e,
|
|
95
|
-
observers: null,
|
|
96
|
-
observerSlots: null,
|
|
97
|
-
comparator: t.equals || void 0
|
|
98
|
-
}, r = (s) => (typeof s == "function" && (s = s(n.value)), Fn(n, s));
|
|
99
|
-
return [Vn.bind(n), r];
|
|
100
|
-
}
|
|
101
|
-
function gs(e, t, n) {
|
|
102
|
-
const r = St(e, t, !0, Y);
|
|
103
|
-
Me(r);
|
|
104
|
-
}
|
|
105
|
-
function ie(e, t, n) {
|
|
106
|
-
const r = St(e, t, !1, Y);
|
|
107
|
-
Me(r);
|
|
108
|
-
}
|
|
109
|
-
function _n(e, t, n) {
|
|
110
|
-
Mn = Ts;
|
|
111
|
-
const r = St(e, t, !1, Y);
|
|
112
|
-
(!n || !n.render) && (r.user = !0), X ? X.push(r) : Me(r);
|
|
113
|
-
}
|
|
114
|
-
function F(e, t, n) {
|
|
115
|
-
n = n ? Object.assign({}, ut, n) : ut;
|
|
116
|
-
const r = St(e, t, !0, 0);
|
|
117
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Me(r), Vn.bind(r);
|
|
118
|
-
}
|
|
119
|
-
function ys(e) {
|
|
120
|
-
return e && typeof e == "object" && "then" in e;
|
|
121
|
-
}
|
|
122
|
-
function vs(e, t, n) {
|
|
123
|
-
let r, s, o;
|
|
124
|
-
r = !0, s = e, o = {};
|
|
125
|
-
let i = null, l = Nt, c = null, a = !1, f = "initialValue" in o, u = typeof r == "function" && F(r);
|
|
126
|
-
const m = /* @__PURE__ */ new Set(), [h, p] = (o.storage || L)(o.initialValue), [v, O] = L(void 0), [_, C] = L(void 0, {
|
|
127
|
-
equals: !1
|
|
128
|
-
}), [M, V] = L(f ? "ready" : "unresolved");
|
|
129
|
-
y.context && (c = y.getNextContextId(), o.ssrLoadFrom === "initial" ? l = o.initialValue : y.load && y.has(c) && (l = y.load(c)));
|
|
130
|
-
function S(I, T, k, P) {
|
|
131
|
-
return i === I && (i = null, P !== void 0 && (f = !0), (I === l || T === l) && o.onHydrated && queueMicrotask(
|
|
132
|
-
() => o.onHydrated(P, {
|
|
133
|
-
value: T
|
|
134
|
-
})
|
|
135
|
-
), l = Nt, D(T, k)), T;
|
|
136
|
-
}
|
|
137
|
-
function D(I, T) {
|
|
138
|
-
Q(() => {
|
|
139
|
-
T === void 0 && p(() => I), V(T !== void 0 ? "errored" : f ? "ready" : "unresolved"), O(T);
|
|
140
|
-
for (const k of m.keys()) k.decrement();
|
|
141
|
-
m.clear();
|
|
142
|
-
}, !1);
|
|
143
|
-
}
|
|
144
|
-
function b() {
|
|
145
|
-
const I = Is, T = h(), k = v();
|
|
146
|
-
if (k !== void 0 && !i) throw k;
|
|
147
|
-
return N && N.user, T;
|
|
148
|
-
}
|
|
149
|
-
function x(I = !0) {
|
|
150
|
-
if (I !== !1 && a) return;
|
|
151
|
-
a = !1;
|
|
152
|
-
const T = u ? u() : r;
|
|
153
|
-
if (T == null || T === !1) {
|
|
154
|
-
S(i, B(h));
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
const k = l !== Nt ? l : B(
|
|
158
|
-
() => s(T, {
|
|
159
|
-
value: h(),
|
|
160
|
-
refetching: I
|
|
161
|
-
})
|
|
162
|
-
);
|
|
163
|
-
return ys(k) ? (i = k, "value" in k ? (k.status === "success" ? S(i, k.value, void 0, T) : S(i, void 0, Ut(k.value), T), k) : (a = !0, queueMicrotask(() => a = !1), Q(() => {
|
|
164
|
-
V(f ? "refreshing" : "pending"), C();
|
|
165
|
-
}, !1), k.then(
|
|
166
|
-
(P) => S(k, P, void 0, T),
|
|
167
|
-
(P) => S(k, void 0, Ut(P), T)
|
|
168
|
-
))) : (S(i, k, void 0, T), k);
|
|
169
|
-
}
|
|
170
|
-
return Object.defineProperties(b, {
|
|
171
|
-
state: {
|
|
172
|
-
get: () => M()
|
|
173
|
-
},
|
|
174
|
-
error: {
|
|
175
|
-
get: () => v()
|
|
176
|
-
},
|
|
177
|
-
loading: {
|
|
178
|
-
get() {
|
|
179
|
-
const I = M();
|
|
180
|
-
return I === "pending" || I === "refreshing";
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
latest: {
|
|
184
|
-
get() {
|
|
185
|
-
if (!f) return b();
|
|
186
|
-
const I = v();
|
|
187
|
-
if (I && !i) throw I;
|
|
188
|
-
return h();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}), u ? gs(() => x(!1)) : x(!1), [
|
|
192
|
-
b,
|
|
193
|
-
{
|
|
194
|
-
refetch: x,
|
|
195
|
-
mutate: p
|
|
196
|
-
}
|
|
197
|
-
];
|
|
198
|
-
}
|
|
199
|
-
function Fi(e) {
|
|
200
|
-
return Q(e, !1);
|
|
201
|
-
}
|
|
202
|
-
function B(e) {
|
|
203
|
-
if (N === null) return e();
|
|
204
|
-
const t = N;
|
|
205
|
-
N = null;
|
|
206
|
-
try {
|
|
207
|
-
return e();
|
|
208
|
-
} finally {
|
|
209
|
-
N = t;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
function Bi(e, t, n) {
|
|
213
|
-
const r = Array.isArray(e);
|
|
214
|
-
let s, o = n && n.defer;
|
|
215
|
-
return (i) => {
|
|
216
|
-
let l;
|
|
217
|
-
if (r) {
|
|
218
|
-
l = Array(e.length);
|
|
219
|
-
for (let a = 0; a < e.length; a++) l[a] = e[a]();
|
|
220
|
-
} else l = e();
|
|
221
|
-
if (o)
|
|
222
|
-
return o = !1, i;
|
|
223
|
-
const c = B(() => t(l, s, i));
|
|
224
|
-
return s = l, c;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
function bs(e) {
|
|
228
|
-
_n(() => B(e));
|
|
229
|
-
}
|
|
230
|
-
function Fe(e) {
|
|
231
|
-
return w === null || (w.cleanups === null ? w.cleanups = [e] : w.cleanups.push(e)), e;
|
|
232
|
-
}
|
|
233
|
-
function ln() {
|
|
234
|
-
return w;
|
|
235
|
-
}
|
|
236
|
-
function Ss(e, t) {
|
|
237
|
-
const n = w, r = N;
|
|
238
|
-
w = e, N = null;
|
|
239
|
-
try {
|
|
240
|
-
return Q(t, !0);
|
|
241
|
-
} catch (s) {
|
|
242
|
-
zt(s);
|
|
243
|
-
} finally {
|
|
244
|
-
w = n, N = r;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
function ws(e) {
|
|
248
|
-
const t = N, n = w;
|
|
249
|
-
return Promise.resolve().then(() => {
|
|
250
|
-
N = t, w = n;
|
|
251
|
-
let r;
|
|
252
|
-
return Q(e, !1), N = w = null, r ? r.done : void 0;
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
var [Cs, $i] = /* @__PURE__ */ L(!1);
|
|
256
|
-
function qi() {
|
|
257
|
-
return [Cs, ws];
|
|
258
|
-
}
|
|
259
|
-
function Di(e, t) {
|
|
260
|
-
const n = Symbol("context");
|
|
261
|
-
return {
|
|
262
|
-
id: n,
|
|
263
|
-
Provider: Es(n),
|
|
264
|
-
defaultValue: e
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
function Gi(e) {
|
|
268
|
-
let t;
|
|
269
|
-
return w && w.context && (t = w.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
270
|
-
}
|
|
271
|
-
function Un(e) {
|
|
272
|
-
const t = F(e), n = F(() => Vt(t()));
|
|
273
|
-
return n.toArray = () => {
|
|
274
|
-
const r = n();
|
|
275
|
-
return Array.isArray(r) ? r : r != null ? [r] : [];
|
|
276
|
-
}, n;
|
|
277
|
-
}
|
|
278
|
-
var Is;
|
|
279
|
-
function Vn() {
|
|
280
|
-
if (this.sources && this.state)
|
|
281
|
-
if (this.state === Y) Me(this);
|
|
282
|
-
else {
|
|
283
|
-
const e = $;
|
|
284
|
-
$ = null, Q(() => ht(this), !1), $ = e;
|
|
285
|
-
}
|
|
286
|
-
if (N) {
|
|
287
|
-
const e = this.observers ? this.observers.length : 0;
|
|
288
|
-
N.sources ? (N.sources.push(this), N.sourceSlots.push(e)) : (N.sources = [this], N.sourceSlots = [e]), this.observers ? (this.observers.push(N), this.observerSlots.push(N.sources.length - 1)) : (this.observers = [N], this.observerSlots = [N.sources.length - 1]);
|
|
289
|
-
}
|
|
290
|
-
return this.value;
|
|
291
|
-
}
|
|
292
|
-
function Fn(e, t, n) {
|
|
293
|
-
let r = e.value;
|
|
294
|
-
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Q(() => {
|
|
295
|
-
for (let s = 0; s < e.observers.length; s += 1) {
|
|
296
|
-
const o = e.observers[s], i = Rt && Rt.running;
|
|
297
|
-
i && Rt.disposed.has(o), (i ? !o.tState : !o.state) && (o.pure ? $.push(o) : X.push(o), o.observers && $n(o)), i || (o.state = Y);
|
|
298
|
-
}
|
|
299
|
-
if ($.length > 1e6)
|
|
300
|
-
throw $ = [], new Error();
|
|
301
|
-
}, !1)), t;
|
|
302
|
-
}
|
|
303
|
-
function Me(e) {
|
|
304
|
-
if (!e.fn) return;
|
|
305
|
-
Be(e);
|
|
306
|
-
const t = bt;
|
|
307
|
-
As(
|
|
308
|
-
e,
|
|
309
|
-
e.value,
|
|
310
|
-
t
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
function As(e, t, n) {
|
|
314
|
-
let r;
|
|
315
|
-
const s = w, o = N;
|
|
316
|
-
N = w = e;
|
|
317
|
-
try {
|
|
318
|
-
r = e.fn(t);
|
|
319
|
-
} catch (i) {
|
|
320
|
-
return e.pure && (e.state = Y, e.owned && e.owned.forEach(Be), e.owned = null), e.updatedAt = n + 1, zt(i);
|
|
321
|
-
} finally {
|
|
322
|
-
N = o, w = s;
|
|
323
|
-
}
|
|
324
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Fn(e, r) : e.value = r, e.updatedAt = n);
|
|
325
|
-
}
|
|
326
|
-
function St(e, t, n, r = Y, s) {
|
|
327
|
-
const o = {
|
|
328
|
-
fn: e,
|
|
329
|
-
state: r,
|
|
330
|
-
updatedAt: null,
|
|
331
|
-
owned: null,
|
|
332
|
-
sources: null,
|
|
333
|
-
sourceSlots: null,
|
|
334
|
-
cleanups: null,
|
|
335
|
-
value: t,
|
|
336
|
-
owner: w,
|
|
337
|
-
context: w ? w.context : null,
|
|
338
|
-
pure: n
|
|
339
|
-
};
|
|
340
|
-
return w === null || w !== Ln && (w.owned ? w.owned.push(o) : w.owned = [o]), o;
|
|
341
|
-
}
|
|
342
|
-
function dt(e) {
|
|
343
|
-
if (e.state === 0) return;
|
|
344
|
-
if (e.state === ft) return ht(e);
|
|
345
|
-
if (e.suspense && B(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
346
|
-
const t = [e];
|
|
347
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < bt); )
|
|
348
|
-
e.state && t.push(e);
|
|
349
|
-
for (let n = t.length - 1; n >= 0; n--)
|
|
350
|
-
if (e = t[n], e.state === Y)
|
|
351
|
-
Me(e);
|
|
352
|
-
else if (e.state === ft) {
|
|
353
|
-
const r = $;
|
|
354
|
-
$ = null, Q(() => ht(e, t[0]), !1), $ = r;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
function Q(e, t) {
|
|
358
|
-
if ($) return e();
|
|
359
|
-
let n = !1;
|
|
360
|
-
t || ($ = []), X ? n = !0 : X = [], bt++;
|
|
361
|
-
try {
|
|
362
|
-
const r = e();
|
|
363
|
-
return Os(n), r;
|
|
364
|
-
} catch (r) {
|
|
365
|
-
n || (X = null), $ = null, zt(r);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
function Os(e) {
|
|
369
|
-
if ($ && (Bn($), $ = null), e) return;
|
|
370
|
-
const t = X;
|
|
371
|
-
X = null, t.length && Q(() => Mn(t), !1);
|
|
372
|
-
}
|
|
373
|
-
function Bn(e) {
|
|
374
|
-
for (let t = 0; t < e.length; t++) dt(e[t]);
|
|
375
|
-
}
|
|
376
|
-
function Ts(e) {
|
|
377
|
-
let t, n = 0;
|
|
378
|
-
for (t = 0; t < e.length; t++) {
|
|
379
|
-
const r = e[t];
|
|
380
|
-
r.user ? e[n++] = r : dt(r);
|
|
381
|
-
}
|
|
382
|
-
if (y.context) {
|
|
383
|
-
if (y.count) {
|
|
384
|
-
y.effects || (y.effects = []), y.effects.push(...e.slice(0, n));
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
Le();
|
|
388
|
-
}
|
|
389
|
-
for (y.effects && (y.done || !y.count) && (e = [...y.effects, ...e], n += y.effects.length, delete y.effects), t = 0; t < n; t++) dt(e[t]);
|
|
390
|
-
}
|
|
391
|
-
function ht(e, t) {
|
|
392
|
-
e.state = 0;
|
|
393
|
-
for (let n = 0; n < e.sources.length; n += 1) {
|
|
394
|
-
const r = e.sources[n];
|
|
395
|
-
if (r.sources) {
|
|
396
|
-
const s = r.state;
|
|
397
|
-
s === Y ? r !== t && (!r.updatedAt || r.updatedAt < bt) && dt(r) : s === ft && ht(r, t);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
function $n(e) {
|
|
402
|
-
for (let t = 0; t < e.observers.length; t += 1) {
|
|
403
|
-
const n = e.observers[t];
|
|
404
|
-
n.state || (n.state = ft, n.pure ? $.push(n) : X.push(n), n.observers && $n(n));
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
function Be(e) {
|
|
408
|
-
let t;
|
|
409
|
-
if (e.sources)
|
|
410
|
-
for (; e.sources.length; ) {
|
|
411
|
-
const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
|
|
412
|
-
if (s && s.length) {
|
|
413
|
-
const o = s.pop(), i = n.observerSlots.pop();
|
|
414
|
-
r < s.length && (o.sourceSlots[i] = r, s[r] = o, n.observerSlots[r] = i);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
if (e.tOwned) {
|
|
418
|
-
for (t = e.tOwned.length - 1; t >= 0; t--) Be(e.tOwned[t]);
|
|
419
|
-
delete e.tOwned;
|
|
420
|
-
}
|
|
421
|
-
if (e.owned) {
|
|
422
|
-
for (t = e.owned.length - 1; t >= 0; t--) Be(e.owned[t]);
|
|
423
|
-
e.owned = null;
|
|
424
|
-
}
|
|
425
|
-
if (e.cleanups) {
|
|
426
|
-
for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
|
|
427
|
-
e.cleanups = null;
|
|
428
|
-
}
|
|
429
|
-
e.state = 0;
|
|
430
|
-
}
|
|
431
|
-
function Ut(e) {
|
|
432
|
-
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
433
|
-
cause: e
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
function zt(e, t = w) {
|
|
437
|
-
throw Ut(e);
|
|
438
|
-
}
|
|
439
|
-
function Vt(e) {
|
|
440
|
-
if (typeof e == "function" && !e.length) return Vt(e());
|
|
441
|
-
if (Array.isArray(e)) {
|
|
442
|
-
const t = [];
|
|
443
|
-
for (let n = 0; n < e.length; n++) {
|
|
444
|
-
const r = Vt(e[n]);
|
|
445
|
-
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
446
|
-
}
|
|
447
|
-
return t;
|
|
448
|
-
}
|
|
449
|
-
return e;
|
|
450
|
-
}
|
|
451
|
-
function Es(e, t) {
|
|
452
|
-
return function(r) {
|
|
453
|
-
let s;
|
|
454
|
-
return ie(
|
|
455
|
-
() => s = B(() => (w.context = {
|
|
456
|
-
...w.context,
|
|
457
|
-
[e]: r.value
|
|
458
|
-
}, Un(() => r.children))),
|
|
459
|
-
void 0
|
|
460
|
-
), s;
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
var Ft = Symbol("fallback");
|
|
464
|
-
function mt(e) {
|
|
465
|
-
for (let t = 0; t < e.length; t++) e[t]();
|
|
466
|
-
}
|
|
467
|
-
function Ns(e, t, n = {}) {
|
|
468
|
-
let r = [], s = [], o = [], i = 0, l = t.length > 1 ? [] : null;
|
|
469
|
-
return Fe(() => mt(o)), () => {
|
|
470
|
-
let c = e() || [], a = c.length, f, u;
|
|
471
|
-
return c[kn], B(() => {
|
|
472
|
-
let h, p, v, O, _, C, M, V, S;
|
|
473
|
-
if (a === 0)
|
|
474
|
-
i !== 0 && (mt(o), o = [], r = [], s = [], i = 0, l && (l = [])), n.fallback && (r = [Ft], s[0] = oe((D) => (o[0] = D, n.fallback())), i = 1);
|
|
475
|
-
else if (i === 0) {
|
|
476
|
-
for (s = new Array(a), u = 0; u < a; u++)
|
|
477
|
-
r[u] = c[u], s[u] = oe(m);
|
|
478
|
-
i = a;
|
|
479
|
-
} else {
|
|
480
|
-
for (v = new Array(a), O = new Array(a), l && (_ = new Array(a)), C = 0, M = Math.min(i, a); C < M && r[C] === c[C]; C++) ;
|
|
481
|
-
for (M = i - 1, V = a - 1; M >= C && V >= C && r[M] === c[V]; M--, V--)
|
|
482
|
-
v[V] = s[M], O[V] = o[M], l && (_[V] = l[M]);
|
|
483
|
-
for (h = /* @__PURE__ */ new Map(), p = new Array(V + 1), u = V; u >= C; u--)
|
|
484
|
-
S = c[u], f = h.get(S), p[u] = f === void 0 ? -1 : f, h.set(S, u);
|
|
485
|
-
for (f = C; f <= M; f++)
|
|
486
|
-
S = r[f], u = h.get(S), u !== void 0 && u !== -1 ? (v[u] = s[f], O[u] = o[f], l && (_[u] = l[f]), u = p[u], h.set(S, u)) : o[f]();
|
|
487
|
-
for (u = C; u < a; u++)
|
|
488
|
-
u in v ? (s[u] = v[u], o[u] = O[u], l && (l[u] = _[u], l[u](u))) : s[u] = oe(m);
|
|
489
|
-
s = s.slice(0, i = a), r = c.slice(0);
|
|
490
|
-
}
|
|
491
|
-
return s;
|
|
492
|
-
});
|
|
493
|
-
function m(h) {
|
|
494
|
-
if (o[u] = h, l) {
|
|
495
|
-
const [p, v] = L(u);
|
|
496
|
-
return l[u] = v, t(c[u], p);
|
|
497
|
-
}
|
|
498
|
-
return t(c[u]);
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
function Rs(e, t, n = {}) {
|
|
503
|
-
let r = [], s = [], o = [], i = [], l = 0, c;
|
|
504
|
-
return Fe(() => mt(o)), () => {
|
|
505
|
-
const a = e() || [], f = a.length;
|
|
506
|
-
return a[kn], B(() => {
|
|
507
|
-
if (f === 0)
|
|
508
|
-
return l !== 0 && (mt(o), o = [], r = [], s = [], l = 0, i = []), n.fallback && (r = [Ft], s[0] = oe((m) => (o[0] = m, n.fallback())), l = 1), s;
|
|
509
|
-
for (r[0] === Ft && (o[0](), o = [], r = [], s = [], l = 0), c = 0; c < f; c++)
|
|
510
|
-
c < r.length && r[c] !== a[c] ? i[c](() => a[c]) : c >= r.length && (s[c] = oe(u));
|
|
511
|
-
for (; c < r.length; c++)
|
|
512
|
-
o[c]();
|
|
513
|
-
return l = i.length = o.length = f, r = a.slice(0), s = s.slice(0, l);
|
|
514
|
-
});
|
|
515
|
-
function u(m) {
|
|
516
|
-
o[c] = m;
|
|
517
|
-
const [h, p] = L(a[c]);
|
|
518
|
-
return i[c] = p, t(h, c);
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
function qn(e, t) {
|
|
523
|
-
return B(() => e(t || {}));
|
|
524
|
-
}
|
|
525
|
-
function tt() {
|
|
526
|
-
return !0;
|
|
527
|
-
}
|
|
528
|
-
var Bt = {
|
|
529
|
-
get(e, t, n) {
|
|
530
|
-
return t === at ? n : e.get(t);
|
|
531
|
-
},
|
|
532
|
-
has(e, t) {
|
|
533
|
-
return t === at ? !0 : e.has(t);
|
|
534
|
-
},
|
|
535
|
-
set: tt,
|
|
536
|
-
deleteProperty: tt,
|
|
537
|
-
getOwnPropertyDescriptor(e, t) {
|
|
538
|
-
return {
|
|
539
|
-
configurable: !0,
|
|
540
|
-
enumerable: !0,
|
|
541
|
-
get() {
|
|
542
|
-
return e.get(t);
|
|
543
|
-
},
|
|
544
|
-
set: tt,
|
|
545
|
-
deleteProperty: tt
|
|
546
|
-
};
|
|
547
|
-
},
|
|
548
|
-
ownKeys(e) {
|
|
549
|
-
return e.keys();
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
function xt(e) {
|
|
553
|
-
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
554
|
-
}
|
|
555
|
-
function xs() {
|
|
556
|
-
for (let e = 0, t = this.length; e < t; ++e) {
|
|
557
|
-
const n = this[e]();
|
|
558
|
-
if (n !== void 0) return n;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
function Dn(...e) {
|
|
562
|
-
let t = !1;
|
|
563
|
-
for (let i = 0; i < e.length; i++) {
|
|
564
|
-
const l = e[i];
|
|
565
|
-
t = t || !!l && at in l, e[i] = typeof l == "function" ? (t = !0, F(l)) : l;
|
|
566
|
-
}
|
|
567
|
-
if (Pn && t)
|
|
568
|
-
return new Proxy(
|
|
569
|
-
{
|
|
570
|
-
get(i) {
|
|
571
|
-
for (let l = e.length - 1; l >= 0; l--) {
|
|
572
|
-
const c = xt(e[l])[i];
|
|
573
|
-
if (c !== void 0) return c;
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
has(i) {
|
|
577
|
-
for (let l = e.length - 1; l >= 0; l--)
|
|
578
|
-
if (i in xt(e[l])) return !0;
|
|
579
|
-
return !1;
|
|
580
|
-
},
|
|
581
|
-
keys() {
|
|
582
|
-
const i = [];
|
|
583
|
-
for (let l = 0; l < e.length; l++)
|
|
584
|
-
i.push(...Object.keys(xt(e[l])));
|
|
585
|
-
return [...new Set(i)];
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
Bt
|
|
589
|
-
);
|
|
590
|
-
const n = {}, r = /* @__PURE__ */ Object.create(null);
|
|
591
|
-
for (let i = e.length - 1; i >= 0; i--) {
|
|
592
|
-
const l = e[i];
|
|
593
|
-
if (!l) continue;
|
|
594
|
-
const c = Object.getOwnPropertyNames(l);
|
|
595
|
-
for (let a = c.length - 1; a >= 0; a--) {
|
|
596
|
-
const f = c[a];
|
|
597
|
-
if (f === "__proto__" || f === "constructor") continue;
|
|
598
|
-
const u = Object.getOwnPropertyDescriptor(l, f);
|
|
599
|
-
if (!r[f])
|
|
600
|
-
r[f] = u.get ? {
|
|
601
|
-
enumerable: !0,
|
|
602
|
-
configurable: !0,
|
|
603
|
-
get: xs.bind(n[f] = [u.get.bind(l)])
|
|
604
|
-
} : u.value !== void 0 ? u : void 0;
|
|
605
|
-
else {
|
|
606
|
-
const m = n[f];
|
|
607
|
-
m && (u.get ? m.push(u.get.bind(l)) : u.value !== void 0 && m.push(() => u.value));
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
const s = {}, o = Object.keys(r);
|
|
612
|
-
for (let i = o.length - 1; i >= 0; i--) {
|
|
613
|
-
const l = o[i], c = r[l];
|
|
614
|
-
c && c.get ? Object.defineProperty(s, l, c) : s[l] = c ? c.value : void 0;
|
|
615
|
-
}
|
|
616
|
-
return s;
|
|
617
|
-
}
|
|
618
|
-
function Ps(e, ...t) {
|
|
619
|
-
if (Pn && at in e) {
|
|
620
|
-
const s = new Set(t.length > 1 ? t.flat() : t[0]), o = t.map((i) => new Proxy(
|
|
621
|
-
{
|
|
622
|
-
get(l) {
|
|
623
|
-
return i.includes(l) ? e[l] : void 0;
|
|
624
|
-
},
|
|
625
|
-
has(l) {
|
|
626
|
-
return i.includes(l) && l in e;
|
|
627
|
-
},
|
|
628
|
-
keys() {
|
|
629
|
-
return i.filter((l) => l in e);
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
Bt
|
|
633
|
-
));
|
|
634
|
-
return o.push(
|
|
635
|
-
new Proxy(
|
|
636
|
-
{
|
|
637
|
-
get(i) {
|
|
638
|
-
return s.has(i) ? void 0 : e[i];
|
|
639
|
-
},
|
|
640
|
-
has(i) {
|
|
641
|
-
return s.has(i) ? !1 : i in e;
|
|
642
|
-
},
|
|
643
|
-
keys() {
|
|
644
|
-
return Object.keys(e).filter((i) => !s.has(i));
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
Bt
|
|
648
|
-
)
|
|
649
|
-
), o;
|
|
650
|
-
}
|
|
651
|
-
const n = {}, r = t.map(() => ({}));
|
|
652
|
-
for (const s of Object.getOwnPropertyNames(e)) {
|
|
653
|
-
const o = Object.getOwnPropertyDescriptor(e, s), i = !o.get && !o.set && o.enumerable && o.writable && o.configurable;
|
|
654
|
-
let l = !1, c = 0;
|
|
655
|
-
for (const a of t)
|
|
656
|
-
a.includes(s) && (l = !0, i ? r[c][s] = o.value : Object.defineProperty(r[c], s, o)), ++c;
|
|
657
|
-
l || (i ? n[s] = o.value : Object.defineProperty(n, s, o));
|
|
658
|
-
}
|
|
659
|
-
return [...r, n];
|
|
660
|
-
}
|
|
661
|
-
function Gn(e) {
|
|
662
|
-
let t, n;
|
|
663
|
-
const r = (s) => {
|
|
664
|
-
const o = y.context;
|
|
665
|
-
if (o) {
|
|
666
|
-
const [l, c] = L();
|
|
667
|
-
y.count || (y.count = 0), y.count++, (n || (n = e())).then((a) => {
|
|
668
|
-
!y.done && Le(o), y.count--, c(() => a.default), Le();
|
|
669
|
-
}), t = l;
|
|
670
|
-
} else if (!t) {
|
|
671
|
-
const [l] = vs(() => (n || (n = e())).then((c) => c.default));
|
|
672
|
-
t = l;
|
|
673
|
-
}
|
|
674
|
-
let i;
|
|
675
|
-
return F(
|
|
676
|
-
() => (i = t()) ? B(() => {
|
|
677
|
-
if (!o || y.done) return i(s);
|
|
678
|
-
const l = y.context;
|
|
679
|
-
Le(o);
|
|
680
|
-
const c = i(s);
|
|
681
|
-
return Le(l), c;
|
|
682
|
-
}) : ""
|
|
683
|
-
);
|
|
684
|
-
};
|
|
685
|
-
return r.preload = () => n || ((n = e()).then((s) => t = () => s.default), n), r;
|
|
686
|
-
}
|
|
687
|
-
var ks = 0;
|
|
688
|
-
function Ki() {
|
|
689
|
-
return y.context ? y.getNextContextId() : `cl-${ks++}`;
|
|
690
|
-
}
|
|
691
|
-
var Kn = (e) => `Stale read from <${e}>.`;
|
|
692
|
-
function ji(e) {
|
|
693
|
-
const t = "fallback" in e && {
|
|
694
|
-
fallback: () => e.fallback
|
|
695
|
-
};
|
|
696
|
-
return F(Ns(() => e.each, e.children, t || void 0));
|
|
697
|
-
}
|
|
698
|
-
function Qi(e) {
|
|
699
|
-
const t = "fallback" in e && {
|
|
700
|
-
fallback: () => e.fallback
|
|
701
|
-
};
|
|
702
|
-
return F(Rs(() => e.each, e.children, t || void 0));
|
|
703
|
-
}
|
|
704
|
-
function Hi(e) {
|
|
705
|
-
const t = e.keyed, n = F(() => e.when, void 0, void 0), r = t ? n : F(n, void 0, {
|
|
706
|
-
equals: (s, o) => !s == !o
|
|
707
|
-
});
|
|
708
|
-
return F(
|
|
709
|
-
() => {
|
|
710
|
-
const s = r();
|
|
711
|
-
if (s) {
|
|
712
|
-
const o = e.children;
|
|
713
|
-
return typeof o == "function" && o.length > 0 ? B(
|
|
714
|
-
() => o(
|
|
715
|
-
t ? s : () => {
|
|
716
|
-
if (!B(r)) throw Kn("Show");
|
|
717
|
-
return n();
|
|
718
|
-
}
|
|
719
|
-
)
|
|
720
|
-
) : o;
|
|
721
|
-
}
|
|
722
|
-
return e.fallback;
|
|
723
|
-
},
|
|
724
|
-
void 0,
|
|
725
|
-
void 0
|
|
726
|
-
);
|
|
727
|
-
}
|
|
728
|
-
function Wi(e) {
|
|
729
|
-
const t = Un(() => e.children), n = F(() => {
|
|
730
|
-
const r = t(), s = Array.isArray(r) ? r : [r];
|
|
731
|
-
let o = () => {
|
|
732
|
-
};
|
|
733
|
-
for (let i = 0; i < s.length; i++) {
|
|
734
|
-
const l = i, c = s[i], a = o, f = F(
|
|
735
|
-
() => a() ? void 0 : c.when,
|
|
736
|
-
void 0,
|
|
737
|
-
void 0
|
|
738
|
-
), u = c.keyed ? f : F(f, void 0, {
|
|
739
|
-
equals: (m, h) => !m == !h
|
|
740
|
-
});
|
|
741
|
-
o = () => a() || (u() ? [l, f, c] : void 0);
|
|
742
|
-
}
|
|
743
|
-
return o;
|
|
744
|
-
});
|
|
745
|
-
return F(
|
|
746
|
-
() => {
|
|
747
|
-
const r = n()();
|
|
748
|
-
if (!r) return e.fallback;
|
|
749
|
-
const [s, o, i] = r, l = i.children;
|
|
750
|
-
return typeof l == "function" && l.length > 0 ? B(
|
|
751
|
-
() => l(
|
|
752
|
-
i.keyed ? o() : () => {
|
|
753
|
-
var a;
|
|
754
|
-
if (((a = B(n)()) == null ? void 0 : a[0]) !== s) throw Kn("Match");
|
|
755
|
-
return o();
|
|
756
|
-
}
|
|
757
|
-
)
|
|
758
|
-
) : l;
|
|
759
|
-
},
|
|
760
|
-
void 0,
|
|
761
|
-
void 0
|
|
762
|
-
);
|
|
763
|
-
}
|
|
764
|
-
function Xi(e) {
|
|
765
|
-
return e;
|
|
766
|
-
}
|
|
767
|
-
var Ms = [
|
|
768
|
-
"allowfullscreen",
|
|
769
|
-
"async",
|
|
770
|
-
"autofocus",
|
|
771
|
-
"autoplay",
|
|
772
|
-
"checked",
|
|
773
|
-
"controls",
|
|
774
|
-
"default",
|
|
775
|
-
"disabled",
|
|
776
|
-
"formnovalidate",
|
|
777
|
-
"hidden",
|
|
778
|
-
"indeterminate",
|
|
779
|
-
"inert",
|
|
780
|
-
"ismap",
|
|
781
|
-
"loop",
|
|
782
|
-
"multiple",
|
|
783
|
-
"muted",
|
|
784
|
-
"nomodule",
|
|
785
|
-
"novalidate",
|
|
786
|
-
"open",
|
|
787
|
-
"playsinline",
|
|
788
|
-
"readonly",
|
|
789
|
-
"required",
|
|
790
|
-
"reversed",
|
|
791
|
-
"seamless",
|
|
792
|
-
"selected"
|
|
793
|
-
], Ls = /* @__PURE__ */ new Set([
|
|
794
|
-
"className",
|
|
795
|
-
"value",
|
|
796
|
-
"readOnly",
|
|
797
|
-
"formNoValidate",
|
|
798
|
-
"isMap",
|
|
799
|
-
"noModule",
|
|
800
|
-
"playsInline",
|
|
801
|
-
...Ms
|
|
802
|
-
]), _s = /* @__PURE__ */ new Set([
|
|
803
|
-
"innerHTML",
|
|
804
|
-
"textContent",
|
|
805
|
-
"innerText",
|
|
806
|
-
"children"
|
|
807
|
-
]), Us = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
808
|
-
className: "class",
|
|
809
|
-
htmlFor: "for"
|
|
810
|
-
}), Vs = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
811
|
-
class: "className",
|
|
812
|
-
formnovalidate: {
|
|
813
|
-
$: "formNoValidate",
|
|
814
|
-
BUTTON: 1,
|
|
815
|
-
INPUT: 1
|
|
816
|
-
},
|
|
817
|
-
ismap: {
|
|
818
|
-
$: "isMap",
|
|
819
|
-
IMG: 1
|
|
820
|
-
},
|
|
821
|
-
nomodule: {
|
|
822
|
-
$: "noModule",
|
|
823
|
-
SCRIPT: 1
|
|
824
|
-
},
|
|
825
|
-
playsinline: {
|
|
826
|
-
$: "playsInline",
|
|
827
|
-
VIDEO: 1
|
|
828
|
-
},
|
|
829
|
-
readonly: {
|
|
830
|
-
$: "readOnly",
|
|
831
|
-
INPUT: 1,
|
|
832
|
-
TEXTAREA: 1
|
|
833
|
-
}
|
|
834
|
-
});
|
|
835
|
-
function Fs(e, t) {
|
|
836
|
-
const n = Vs[e];
|
|
837
|
-
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
838
|
-
}
|
|
839
|
-
var Bs = /* @__PURE__ */ new Set([
|
|
840
|
-
"beforeinput",
|
|
841
|
-
"click",
|
|
842
|
-
"dblclick",
|
|
843
|
-
"contextmenu",
|
|
844
|
-
"focusin",
|
|
845
|
-
"focusout",
|
|
846
|
-
"input",
|
|
847
|
-
"keydown",
|
|
848
|
-
"keyup",
|
|
849
|
-
"mousedown",
|
|
850
|
-
"mousemove",
|
|
851
|
-
"mouseout",
|
|
852
|
-
"mouseover",
|
|
853
|
-
"mouseup",
|
|
854
|
-
"pointerdown",
|
|
855
|
-
"pointermove",
|
|
856
|
-
"pointerout",
|
|
857
|
-
"pointerover",
|
|
858
|
-
"pointerup",
|
|
859
|
-
"touchend",
|
|
860
|
-
"touchmove",
|
|
861
|
-
"touchstart"
|
|
862
|
-
]), $s = /* @__PURE__ */ new Set([
|
|
863
|
-
"altGlyph",
|
|
864
|
-
"altGlyphDef",
|
|
865
|
-
"altGlyphItem",
|
|
866
|
-
"animate",
|
|
867
|
-
"animateColor",
|
|
868
|
-
"animateMotion",
|
|
869
|
-
"animateTransform",
|
|
870
|
-
"circle",
|
|
871
|
-
"clipPath",
|
|
872
|
-
"color-profile",
|
|
873
|
-
"cursor",
|
|
874
|
-
"defs",
|
|
875
|
-
"desc",
|
|
876
|
-
"ellipse",
|
|
877
|
-
"feBlend",
|
|
878
|
-
"feColorMatrix",
|
|
879
|
-
"feComponentTransfer",
|
|
880
|
-
"feComposite",
|
|
881
|
-
"feConvolveMatrix",
|
|
882
|
-
"feDiffuseLighting",
|
|
883
|
-
"feDisplacementMap",
|
|
884
|
-
"feDistantLight",
|
|
885
|
-
"feDropShadow",
|
|
886
|
-
"feFlood",
|
|
887
|
-
"feFuncA",
|
|
888
|
-
"feFuncB",
|
|
889
|
-
"feFuncG",
|
|
890
|
-
"feFuncR",
|
|
891
|
-
"feGaussianBlur",
|
|
892
|
-
"feImage",
|
|
893
|
-
"feMerge",
|
|
894
|
-
"feMergeNode",
|
|
895
|
-
"feMorphology",
|
|
896
|
-
"feOffset",
|
|
897
|
-
"fePointLight",
|
|
898
|
-
"feSpecularLighting",
|
|
899
|
-
"feSpotLight",
|
|
900
|
-
"feTile",
|
|
901
|
-
"feTurbulence",
|
|
902
|
-
"filter",
|
|
903
|
-
"font",
|
|
904
|
-
"font-face",
|
|
905
|
-
"font-face-format",
|
|
906
|
-
"font-face-name",
|
|
907
|
-
"font-face-src",
|
|
908
|
-
"font-face-uri",
|
|
909
|
-
"foreignObject",
|
|
910
|
-
"g",
|
|
911
|
-
"glyph",
|
|
912
|
-
"glyphRef",
|
|
913
|
-
"hkern",
|
|
914
|
-
"image",
|
|
915
|
-
"line",
|
|
916
|
-
"linearGradient",
|
|
917
|
-
"marker",
|
|
918
|
-
"mask",
|
|
919
|
-
"metadata",
|
|
920
|
-
"missing-glyph",
|
|
921
|
-
"mpath",
|
|
922
|
-
"path",
|
|
923
|
-
"pattern",
|
|
924
|
-
"polygon",
|
|
925
|
-
"polyline",
|
|
926
|
-
"radialGradient",
|
|
927
|
-
"rect",
|
|
928
|
-
"set",
|
|
929
|
-
"stop",
|
|
930
|
-
"svg",
|
|
931
|
-
"switch",
|
|
932
|
-
"symbol",
|
|
933
|
-
"text",
|
|
934
|
-
"textPath",
|
|
935
|
-
"tref",
|
|
936
|
-
"tspan",
|
|
937
|
-
"use",
|
|
938
|
-
"view",
|
|
939
|
-
"vkern"
|
|
940
|
-
]), qs = {
|
|
941
|
-
xlink: "http://www.w3.org/1999/xlink",
|
|
942
|
-
xml: "http://www.w3.org/XML/1998/namespace"
|
|
943
|
-
};
|
|
944
|
-
function Ds(e, t, n) {
|
|
945
|
-
let r = n.length, s = t.length, o = r, i = 0, l = 0, c = t[s - 1].nextSibling, a = null;
|
|
946
|
-
for (; i < s || l < o; ) {
|
|
947
|
-
if (t[i] === n[l]) {
|
|
948
|
-
i++, l++;
|
|
949
|
-
continue;
|
|
950
|
-
}
|
|
951
|
-
for (; t[s - 1] === n[o - 1]; )
|
|
952
|
-
s--, o--;
|
|
953
|
-
if (s === i) {
|
|
954
|
-
const f = o < r ? l ? n[l - 1].nextSibling : n[o - l] : c;
|
|
955
|
-
for (; l < o; ) e.insertBefore(n[l++], f);
|
|
956
|
-
} else if (o === l)
|
|
957
|
-
for (; i < s; )
|
|
958
|
-
(!a || !a.has(t[i])) && t[i].remove(), i++;
|
|
959
|
-
else if (t[i] === n[o - 1] && n[l] === t[s - 1]) {
|
|
960
|
-
const f = t[--s].nextSibling;
|
|
961
|
-
e.insertBefore(n[l++], t[i++].nextSibling), e.insertBefore(n[--o], f), t[s] = n[o];
|
|
962
|
-
} else {
|
|
963
|
-
if (!a) {
|
|
964
|
-
a = /* @__PURE__ */ new Map();
|
|
965
|
-
let u = l;
|
|
966
|
-
for (; u < o; ) a.set(n[u], u++);
|
|
967
|
-
}
|
|
968
|
-
const f = a.get(t[i]);
|
|
969
|
-
if (f != null)
|
|
970
|
-
if (l < f && f < o) {
|
|
971
|
-
let u = i, m = 1, h;
|
|
972
|
-
for (; ++u < s && u < o && !((h = a.get(t[u])) == null || h !== f + m); )
|
|
973
|
-
m++;
|
|
974
|
-
if (m > f - l) {
|
|
975
|
-
const p = t[i];
|
|
976
|
-
for (; l < f; ) e.insertBefore(n[l++], p);
|
|
977
|
-
} else e.replaceChild(n[l++], t[i++]);
|
|
978
|
-
} else i++;
|
|
979
|
-
else t[i++].remove();
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
var Ue = "_$DX_DELEGATE";
|
|
984
|
-
function jn(e, t, n, r = {}) {
|
|
985
|
-
let s;
|
|
986
|
-
return oe((o) => {
|
|
987
|
-
s = o, t === document ? e() : qt(t, e(), t.firstChild ? null : void 0, n);
|
|
988
|
-
}, r.owner), () => {
|
|
989
|
-
s(), t.textContent = "";
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
function Yi(e, t, n, r) {
|
|
993
|
-
let s;
|
|
994
|
-
const o = () => {
|
|
995
|
-
const l = document.createElement("template");
|
|
996
|
-
return l.innerHTML = e, l.content.firstChild;
|
|
997
|
-
}, i = () => (s || (s = o())).cloneNode(!0);
|
|
998
|
-
return i.cloneNode = i, i;
|
|
999
|
-
}
|
|
1000
|
-
function Gs(e, t = window.document) {
|
|
1001
|
-
const n = t[Ue] || (t[Ue] = /* @__PURE__ */ new Set());
|
|
1002
|
-
for (let r = 0, s = e.length; r < s; r++) {
|
|
1003
|
-
const o = e[r];
|
|
1004
|
-
n.has(o) || (n.add(o), t.addEventListener(o, Qn));
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
function zi(e = window.document) {
|
|
1008
|
-
if (e[Ue]) {
|
|
1009
|
-
for (let t of e[Ue].keys()) e.removeEventListener(t, Qn);
|
|
1010
|
-
delete e[Ue];
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
function $t(e, t, n) {
|
|
1014
|
-
le(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
1015
|
-
}
|
|
1016
|
-
function Ks(e, t, n, r) {
|
|
1017
|
-
le(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
|
|
1018
|
-
}
|
|
1019
|
-
function js(e, t, n) {
|
|
1020
|
-
le(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
1021
|
-
}
|
|
1022
|
-
function Qs(e, t) {
|
|
1023
|
-
le(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
1024
|
-
}
|
|
1025
|
-
function Hs(e, t, n, r) {
|
|
1026
|
-
if (r)
|
|
1027
|
-
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
1028
|
-
else if (Array.isArray(n)) {
|
|
1029
|
-
const s = n[0];
|
|
1030
|
-
e.addEventListener(t, n[0] = (o) => s.call(e, n[1], o));
|
|
1031
|
-
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
1032
|
-
}
|
|
1033
|
-
function Ws(e, t, n = {}) {
|
|
1034
|
-
const r = Object.keys(t || {}), s = Object.keys(n);
|
|
1035
|
-
let o, i;
|
|
1036
|
-
for (o = 0, i = s.length; o < i; o++) {
|
|
1037
|
-
const l = s[o];
|
|
1038
|
-
!l || l === "undefined" || t[l] || (cn(e, l, !1), delete n[l]);
|
|
1039
|
-
}
|
|
1040
|
-
for (o = 0, i = r.length; o < i; o++) {
|
|
1041
|
-
const l = r[o], c = !!t[l];
|
|
1042
|
-
!l || l === "undefined" || n[l] === c || !c || (cn(e, l, !0), n[l] = c);
|
|
1043
|
-
}
|
|
1044
|
-
return n;
|
|
1045
|
-
}
|
|
1046
|
-
function Xs(e, t, n) {
|
|
1047
|
-
if (!t) return n ? $t(e, "style") : t;
|
|
1048
|
-
const r = e.style;
|
|
1049
|
-
if (typeof t == "string") return r.cssText = t;
|
|
1050
|
-
typeof n == "string" && (r.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
1051
|
-
let s, o;
|
|
1052
|
-
for (o in n)
|
|
1053
|
-
t[o] == null && r.removeProperty(o), delete n[o];
|
|
1054
|
-
for (o in t)
|
|
1055
|
-
s = t[o], s !== n[o] && (r.setProperty(o, s), n[o] = s);
|
|
1056
|
-
return n;
|
|
1057
|
-
}
|
|
1058
|
-
function Ys(e, t = {}, n, r) {
|
|
1059
|
-
const s = {};
|
|
1060
|
-
return r || ie(
|
|
1061
|
-
() => s.children = $e(e, t.children, s.children)
|
|
1062
|
-
), ie(() => typeof t.ref == "function" && zs(t.ref, e)), ie(() => Zs(e, t, n, !0, s, !0)), s;
|
|
1063
|
-
}
|
|
1064
|
-
function zs(e, t, n) {
|
|
1065
|
-
return B(() => e(t, n));
|
|
1066
|
-
}
|
|
1067
|
-
function qt(e, t, n, r) {
|
|
1068
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function") return $e(e, t, r, n);
|
|
1069
|
-
ie((s) => $e(e, t(), s, n), r);
|
|
1070
|
-
}
|
|
1071
|
-
function Zs(e, t, n, r, s = {}, o = !1) {
|
|
1072
|
-
t || (t = {});
|
|
1073
|
-
for (const i in s)
|
|
1074
|
-
if (!(i in t)) {
|
|
1075
|
-
if (i === "children") continue;
|
|
1076
|
-
s[i] = an(e, i, null, s[i], n, o, t);
|
|
1077
|
-
}
|
|
1078
|
-
for (const i in t) {
|
|
1079
|
-
if (i === "children")
|
|
1080
|
-
continue;
|
|
1081
|
-
const l = t[i];
|
|
1082
|
-
s[i] = an(e, i, l, s[i], n, o, t);
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
function Js(e) {
|
|
1086
|
-
let t, n;
|
|
1087
|
-
return !le() || !(t = y.registry.get(n = to())) ? e() : (y.completed && y.completed.add(t), y.registry.delete(n), t);
|
|
1088
|
-
}
|
|
1089
|
-
function le(e) {
|
|
1090
|
-
return !!y.context && !y.done && (!e || e.isConnected);
|
|
1091
|
-
}
|
|
1092
|
-
function eo(e) {
|
|
1093
|
-
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
1094
|
-
}
|
|
1095
|
-
function cn(e, t, n) {
|
|
1096
|
-
const r = t.trim().split(/\s+/);
|
|
1097
|
-
for (let s = 0, o = r.length; s < o; s++)
|
|
1098
|
-
e.classList.toggle(r[s], n);
|
|
1099
|
-
}
|
|
1100
|
-
function an(e, t, n, r, s, o, i) {
|
|
1101
|
-
let l, c, a, f, u;
|
|
1102
|
-
if (t === "style") return Xs(e, n, r);
|
|
1103
|
-
if (t === "classList") return Ws(e, n, r);
|
|
1104
|
-
if (n === r) return r;
|
|
1105
|
-
if (t === "ref")
|
|
1106
|
-
o || n(e);
|
|
1107
|
-
else if (t.slice(0, 3) === "on:") {
|
|
1108
|
-
const m = t.slice(3);
|
|
1109
|
-
r && e.removeEventListener(m, r, typeof r != "function" && r), n && e.addEventListener(m, n, typeof n != "function" && n);
|
|
1110
|
-
} else if (t.slice(0, 10) === "oncapture:") {
|
|
1111
|
-
const m = t.slice(10);
|
|
1112
|
-
r && e.removeEventListener(m, r, !0), n && e.addEventListener(m, n, !0);
|
|
1113
|
-
} else if (t.slice(0, 2) === "on") {
|
|
1114
|
-
const m = t.slice(2).toLowerCase(), h = Bs.has(m);
|
|
1115
|
-
if (!h && r) {
|
|
1116
|
-
const p = Array.isArray(r) ? r[0] : r;
|
|
1117
|
-
e.removeEventListener(m, p);
|
|
1118
|
-
}
|
|
1119
|
-
(h || n) && (Hs(e, m, n, h), h && Gs([m]));
|
|
1120
|
-
} else if (t.slice(0, 5) === "attr:")
|
|
1121
|
-
$t(e, t.slice(5), n);
|
|
1122
|
-
else if (t.slice(0, 5) === "bool:")
|
|
1123
|
-
js(e, t.slice(5), n);
|
|
1124
|
-
else if ((u = t.slice(0, 5) === "prop:") || (a = _s.has(t)) || !s && ((f = Fs(t, e.tagName)) || (c = Ls.has(t))) || (l = e.nodeName.includes("-") || "is" in i)) {
|
|
1125
|
-
if (u)
|
|
1126
|
-
t = t.slice(5), c = !0;
|
|
1127
|
-
else if (le(e)) return n;
|
|
1128
|
-
t === "class" || t === "className" ? Qs(e, n) : l && !c && !a ? e[eo(t)] = n : e[f || t] = n;
|
|
1129
|
-
} else {
|
|
1130
|
-
const m = s && t.indexOf(":") > -1 && qs[t.split(":")[0]];
|
|
1131
|
-
m ? Ks(e, m, t, n) : $t(e, Us[t] || t, n);
|
|
1132
|
-
}
|
|
1133
|
-
return n;
|
|
1134
|
-
}
|
|
1135
|
-
function Qn(e) {
|
|
1136
|
-
if (y.registry && y.events && y.events.find(([c, a]) => a === e))
|
|
1137
|
-
return;
|
|
1138
|
-
let t = e.target;
|
|
1139
|
-
const n = `$$${e.type}`, r = e.target, s = e.currentTarget, o = (c) => Object.defineProperty(e, "target", {
|
|
1140
|
-
configurable: !0,
|
|
1141
|
-
value: c
|
|
1142
|
-
}), i = () => {
|
|
1143
|
-
const c = t[n];
|
|
1144
|
-
if (c && !t.disabled) {
|
|
1145
|
-
const a = t[`${n}Data`];
|
|
1146
|
-
if (a !== void 0 ? c.call(t, a, e) : c.call(t, e), e.cancelBubble) return;
|
|
1147
|
-
}
|
|
1148
|
-
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && o(t.host), !0;
|
|
1149
|
-
}, l = () => {
|
|
1150
|
-
for (; i() && (t = t._$host || t.parentNode || t.host); ) ;
|
|
1151
|
-
};
|
|
1152
|
-
if (Object.defineProperty(e, "currentTarget", {
|
|
1153
|
-
configurable: !0,
|
|
1154
|
-
get() {
|
|
1155
|
-
return t || document;
|
|
1156
|
-
}
|
|
1157
|
-
}), y.registry && !y.done && (y.done = _$HY.done = !0), e.composedPath) {
|
|
1158
|
-
const c = e.composedPath();
|
|
1159
|
-
o(c[0]);
|
|
1160
|
-
for (let a = 0; a < c.length - 2 && (t = c[a], !!i()); a++) {
|
|
1161
|
-
if (t._$host) {
|
|
1162
|
-
t = t._$host, l();
|
|
1163
|
-
break;
|
|
1164
|
-
}
|
|
1165
|
-
if (t.parentNode === s)
|
|
1166
|
-
break;
|
|
1167
|
-
}
|
|
1168
|
-
} else l();
|
|
1169
|
-
o(r);
|
|
1170
|
-
}
|
|
1171
|
-
function $e(e, t, n, r, s) {
|
|
1172
|
-
const o = le(e);
|
|
1173
|
-
if (o) {
|
|
1174
|
-
!n && (n = [...e.childNodes]);
|
|
1175
|
-
let c = [];
|
|
1176
|
-
for (let a = 0; a < n.length; a++) {
|
|
1177
|
-
const f = n[a];
|
|
1178
|
-
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : c.push(f);
|
|
1179
|
-
}
|
|
1180
|
-
n = c;
|
|
1181
|
-
}
|
|
1182
|
-
for (; typeof n == "function"; ) n = n();
|
|
1183
|
-
if (t === n) return n;
|
|
1184
|
-
const i = typeof t, l = r !== void 0;
|
|
1185
|
-
if (e = l && n[0] && n[0].parentNode || e, i === "string" || i === "number") {
|
|
1186
|
-
if (o || i === "number" && (t = t.toString(), t === n))
|
|
1187
|
-
return n;
|
|
1188
|
-
if (l) {
|
|
1189
|
-
let c = n[0];
|
|
1190
|
-
c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = ae(e, n, r, c);
|
|
1191
|
-
} else
|
|
1192
|
-
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
1193
|
-
} else if (t == null || i === "boolean") {
|
|
1194
|
-
if (o) return n;
|
|
1195
|
-
n = ae(e, n, r);
|
|
1196
|
-
} else {
|
|
1197
|
-
if (i === "function")
|
|
1198
|
-
return ie(() => {
|
|
1199
|
-
let c = t();
|
|
1200
|
-
for (; typeof c == "function"; ) c = c();
|
|
1201
|
-
n = $e(e, c, n, r);
|
|
1202
|
-
}), () => n;
|
|
1203
|
-
if (Array.isArray(t)) {
|
|
1204
|
-
const c = [], a = n && Array.isArray(n);
|
|
1205
|
-
if (Dt(c, t, n, s))
|
|
1206
|
-
return ie(() => n = $e(e, c, n, r, !0)), () => n;
|
|
1207
|
-
if (o) {
|
|
1208
|
-
if (!c.length) return n;
|
|
1209
|
-
if (r === void 0) return n = [...e.childNodes];
|
|
1210
|
-
let f = c[0];
|
|
1211
|
-
if (f.parentNode !== e) return n;
|
|
1212
|
-
const u = [f];
|
|
1213
|
-
for (; (f = f.nextSibling) !== r; ) u.push(f);
|
|
1214
|
-
return n = u;
|
|
1215
|
-
}
|
|
1216
|
-
if (c.length === 0) {
|
|
1217
|
-
if (n = ae(e, n, r), l) return n;
|
|
1218
|
-
} else a ? n.length === 0 ? un(e, c, r) : Ds(e, n, c) : (n && ae(e), un(e, c));
|
|
1219
|
-
n = c;
|
|
1220
|
-
} else if (t.nodeType) {
|
|
1221
|
-
if (o && t.parentNode) return n = l ? [t] : t;
|
|
1222
|
-
if (Array.isArray(n)) {
|
|
1223
|
-
if (l) return n = ae(e, n, r, t);
|
|
1224
|
-
ae(e, n, null, t);
|
|
1225
|
-
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
1226
|
-
n = t;
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
return n;
|
|
1230
|
-
}
|
|
1231
|
-
function Dt(e, t, n, r) {
|
|
1232
|
-
let s = !1;
|
|
1233
|
-
for (let o = 0, i = t.length; o < i; o++) {
|
|
1234
|
-
let l = t[o], c = n && n[e.length], a;
|
|
1235
|
-
if (!(l == null || l === !0 || l === !1)) if ((a = typeof l) == "object" && l.nodeType)
|
|
1236
|
-
e.push(l);
|
|
1237
|
-
else if (Array.isArray(l))
|
|
1238
|
-
s = Dt(e, l, c) || s;
|
|
1239
|
-
else if (a === "function")
|
|
1240
|
-
if (r) {
|
|
1241
|
-
for (; typeof l == "function"; ) l = l();
|
|
1242
|
-
s = Dt(
|
|
1243
|
-
e,
|
|
1244
|
-
Array.isArray(l) ? l : [l],
|
|
1245
|
-
Array.isArray(c) ? c : [c]
|
|
1246
|
-
) || s;
|
|
1247
|
-
} else
|
|
1248
|
-
e.push(l), s = !0;
|
|
1249
|
-
else {
|
|
1250
|
-
const f = String(l);
|
|
1251
|
-
c && c.nodeType === 3 && c.data === f ? e.push(c) : e.push(document.createTextNode(f));
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
return s;
|
|
1255
|
-
}
|
|
1256
|
-
function un(e, t, n = null) {
|
|
1257
|
-
for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
|
|
1258
|
-
}
|
|
1259
|
-
function ae(e, t, n, r) {
|
|
1260
|
-
if (n === void 0) return e.textContent = "";
|
|
1261
|
-
const s = r || document.createTextNode("");
|
|
1262
|
-
if (t.length) {
|
|
1263
|
-
let o = !1;
|
|
1264
|
-
for (let i = t.length - 1; i >= 0; i--) {
|
|
1265
|
-
const l = t[i];
|
|
1266
|
-
if (s !== l) {
|
|
1267
|
-
const c = l.parentNode === e;
|
|
1268
|
-
!o && !i ? c ? e.replaceChild(s, l) : e.insertBefore(s, n) : c && l.remove();
|
|
1269
|
-
} else o = !0;
|
|
1270
|
-
}
|
|
1271
|
-
} else e.insertBefore(s, n);
|
|
1272
|
-
return [s];
|
|
1273
|
-
}
|
|
1274
|
-
function to() {
|
|
1275
|
-
return y.getNextContextId();
|
|
1276
|
-
}
|
|
1277
|
-
var no = "http://www.w3.org/2000/svg";
|
|
1278
|
-
function Hn(e, t = !1) {
|
|
1279
|
-
return t ? document.createElementNS(no, e) : document.createElement(e);
|
|
1280
|
-
}
|
|
1281
|
-
function Zi(e) {
|
|
1282
|
-
const { useShadow: t } = e, n = document.createTextNode(""), r = () => e.mount || document.body, s = ln();
|
|
1283
|
-
let o, i = !!y.context;
|
|
1284
|
-
return _n(
|
|
1285
|
-
() => {
|
|
1286
|
-
i && (ln().user = i = !1), o || (o = Ss(s, () => F(() => e.children)));
|
|
1287
|
-
const l = r();
|
|
1288
|
-
if (l instanceof HTMLHeadElement) {
|
|
1289
|
-
const [c, a] = L(!1), f = () => a(!0);
|
|
1290
|
-
oe((u) => qt(l, () => c() ? u() : o(), null)), Fe(f);
|
|
1291
|
-
} else {
|
|
1292
|
-
const c = Hn(e.isSVG ? "g" : "div", e.isSVG), a = t && c.attachShadow ? c.attachShadow({
|
|
1293
|
-
mode: "open"
|
|
1294
|
-
}) : c;
|
|
1295
|
-
Object.defineProperty(c, "_$host", {
|
|
1296
|
-
get() {
|
|
1297
|
-
return n.parentNode;
|
|
1298
|
-
},
|
|
1299
|
-
configurable: !0
|
|
1300
|
-
}), qt(a, o), l.appendChild(c), e.ref && e.ref(c), Fe(() => l.removeChild(c));
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
void 0,
|
|
1304
|
-
{
|
|
1305
|
-
render: !i
|
|
1306
|
-
}
|
|
1307
|
-
), n;
|
|
1308
|
-
}
|
|
1309
|
-
function ro(e, t) {
|
|
1310
|
-
const n = F(e);
|
|
1311
|
-
return F(() => {
|
|
1312
|
-
const r = n();
|
|
1313
|
-
switch (typeof r) {
|
|
1314
|
-
case "function":
|
|
1315
|
-
return B(() => r(t));
|
|
1316
|
-
case "string":
|
|
1317
|
-
const s = $s.has(r), o = y.context ? Js() : Hn(r, s);
|
|
1318
|
-
return Ys(o, t, s), o;
|
|
1319
|
-
}
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
function Ji(e) {
|
|
1323
|
-
const [, t] = Ps(e, ["component"]);
|
|
1324
|
-
return ro(() => e.component, t);
|
|
1325
|
-
}
|
|
1326
|
-
var so = class {
|
|
1327
|
-
constructor() {
|
|
1328
|
-
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1329
|
-
}
|
|
1330
|
-
set(e, t) {
|
|
1331
|
-
this.keyToValue.set(e, t), this.valueToKey.set(t, e);
|
|
1332
|
-
}
|
|
1333
|
-
getByKey(e) {
|
|
1334
|
-
return this.keyToValue.get(e);
|
|
1335
|
-
}
|
|
1336
|
-
getByValue(e) {
|
|
1337
|
-
return this.valueToKey.get(e);
|
|
1338
|
-
}
|
|
1339
|
-
clear() {
|
|
1340
|
-
this.keyToValue.clear(), this.valueToKey.clear();
|
|
1341
|
-
}
|
|
1342
|
-
}, Wn = class {
|
|
1343
|
-
constructor(e) {
|
|
1344
|
-
this.generateIdentifier = e, this.kv = new so();
|
|
1345
|
-
}
|
|
1346
|
-
register(e, t) {
|
|
1347
|
-
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
1348
|
-
}
|
|
1349
|
-
clear() {
|
|
1350
|
-
this.kv.clear();
|
|
1351
|
-
}
|
|
1352
|
-
getIdentifier(e) {
|
|
1353
|
-
return this.kv.getByValue(e);
|
|
1354
|
-
}
|
|
1355
|
-
getValue(e) {
|
|
1356
|
-
return this.kv.getByKey(e);
|
|
1357
|
-
}
|
|
1358
|
-
}, oo = class extends Wn {
|
|
1359
|
-
constructor() {
|
|
1360
|
-
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1361
|
-
}
|
|
1362
|
-
register(e, t) {
|
|
1363
|
-
typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(e, t.allowProps), super.register(e, t.identifier)) : super.register(e, t);
|
|
1364
|
-
}
|
|
1365
|
-
getAllowedProps(e) {
|
|
1366
|
-
return this.classToAllowedProps.get(e);
|
|
1367
|
-
}
|
|
1368
|
-
};
|
|
1369
|
-
function io(e) {
|
|
1370
|
-
if ("values" in Object)
|
|
1371
|
-
return Object.values(e);
|
|
1372
|
-
const t = [];
|
|
1373
|
-
for (const n in e)
|
|
1374
|
-
e.hasOwnProperty(n) && t.push(e[n]);
|
|
1375
|
-
return t;
|
|
1376
|
-
}
|
|
1377
|
-
function lo(e, t) {
|
|
1378
|
-
const n = io(e);
|
|
1379
|
-
if ("find" in n)
|
|
1380
|
-
return n.find(t);
|
|
1381
|
-
const r = n;
|
|
1382
|
-
for (let s = 0; s < r.length; s++) {
|
|
1383
|
-
const o = r[s];
|
|
1384
|
-
if (t(o))
|
|
1385
|
-
return o;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
function Re(e, t) {
|
|
1389
|
-
Object.entries(e).forEach(([n, r]) => t(r, n));
|
|
1390
|
-
}
|
|
1391
|
-
function ct(e, t) {
|
|
1392
|
-
return e.indexOf(t) !== -1;
|
|
1393
|
-
}
|
|
1394
|
-
function fn(e, t) {
|
|
1395
|
-
for (let n = 0; n < e.length; n++) {
|
|
1396
|
-
const r = e[n];
|
|
1397
|
-
if (t(r))
|
|
1398
|
-
return r;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
var co = class {
|
|
1402
|
-
constructor() {
|
|
1403
|
-
this.transfomers = {};
|
|
1404
|
-
}
|
|
1405
|
-
register(e) {
|
|
1406
|
-
this.transfomers[e.name] = e;
|
|
1407
|
-
}
|
|
1408
|
-
findApplicable(e) {
|
|
1409
|
-
return lo(this.transfomers, (t) => t.isApplicable(e));
|
|
1410
|
-
}
|
|
1411
|
-
findByName(e) {
|
|
1412
|
-
return this.transfomers[e];
|
|
1413
|
-
}
|
|
1414
|
-
}, ao = (e) => Object.prototype.toString.call(e).slice(8, -1), Xn = (e) => typeof e > "u", uo = (e) => e === null, qe = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Gt = (e) => qe(e) && Object.keys(e).length === 0, J = (e) => Array.isArray(e), fo = (e) => typeof e == "string", ho = (e) => typeof e == "number" && !isNaN(e), mo = (e) => typeof e == "boolean", po = (e) => e instanceof RegExp, De = (e) => e instanceof Map, Ge = (e) => e instanceof Set, Yn = (e) => ao(e) === "Symbol", go = (e) => e instanceof Date && !isNaN(e.valueOf()), yo = (e) => e instanceof Error, dn = (e) => typeof e == "number" && isNaN(e), vo = (e) => mo(e) || uo(e) || Xn(e) || ho(e) || fo(e) || Yn(e), bo = (e) => typeof e == "bigint", So = (e) => e === 1 / 0 || e === -1 / 0, wo = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Co = (e) => e instanceof URL, zn = (e) => e.replace(/\./g, "\\."), Pt = (e) => e.map(String).map(zn).join("."), Ve = (e) => {
|
|
1415
|
-
const t = [];
|
|
1416
|
-
let n = "";
|
|
1417
|
-
for (let s = 0; s < e.length; s++) {
|
|
1418
|
-
let o = e.charAt(s);
|
|
1419
|
-
if (o === "\\" && e.charAt(s + 1) === ".") {
|
|
1420
|
-
n += ".", s++;
|
|
1421
|
-
continue;
|
|
1422
|
-
}
|
|
1423
|
-
if (o === ".") {
|
|
1424
|
-
t.push(n), n = "";
|
|
1425
|
-
continue;
|
|
1426
|
-
}
|
|
1427
|
-
n += o;
|
|
1428
|
-
}
|
|
1429
|
-
const r = n;
|
|
1430
|
-
return t.push(r), t;
|
|
1431
|
-
};
|
|
1432
|
-
function G(e, t, n, r) {
|
|
1433
|
-
return {
|
|
1434
|
-
isApplicable: e,
|
|
1435
|
-
annotation: t,
|
|
1436
|
-
transform: n,
|
|
1437
|
-
untransform: r
|
|
1438
|
-
};
|
|
1439
|
-
}
|
|
1440
|
-
var Zn = [
|
|
1441
|
-
G(Xn, "undefined", () => null, () => {
|
|
1442
|
-
}),
|
|
1443
|
-
G(bo, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
1444
|
-
G(go, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1445
|
-
G(yo, "Error", (e, t) => {
|
|
1446
|
-
const n = {
|
|
1447
|
-
name: e.name,
|
|
1448
|
-
message: e.message
|
|
1449
|
-
};
|
|
1450
|
-
return t.allowedErrorProps.forEach((r) => {
|
|
1451
|
-
n[r] = e[r];
|
|
1452
|
-
}), n;
|
|
1453
|
-
}, (e, t) => {
|
|
1454
|
-
const n = new Error(e.message);
|
|
1455
|
-
return n.name = e.name, n.stack = e.stack, t.allowedErrorProps.forEach((r) => {
|
|
1456
|
-
n[r] = e[r];
|
|
1457
|
-
}), n;
|
|
1458
|
-
}),
|
|
1459
|
-
G(po, "regexp", (e) => "" + e, (e) => {
|
|
1460
|
-
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
1461
|
-
return new RegExp(t, n);
|
|
1462
|
-
}),
|
|
1463
|
-
G(
|
|
1464
|
-
Ge,
|
|
1465
|
-
"set",
|
|
1466
|
-
// (sets only exist in es6+)
|
|
1467
|
-
// eslint-disable-next-line es5/no-es6-methods
|
|
1468
|
-
(e) => [...e.values()],
|
|
1469
|
-
(e) => new Set(e)
|
|
1470
|
-
),
|
|
1471
|
-
G(De, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1472
|
-
G((e) => dn(e) || So(e), "number", (e) => dn(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1473
|
-
G((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1474
|
-
G(Co, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1475
|
-
];
|
|
1476
|
-
function wt(e, t, n, r) {
|
|
1477
|
-
return {
|
|
1478
|
-
isApplicable: e,
|
|
1479
|
-
annotation: t,
|
|
1480
|
-
transform: n,
|
|
1481
|
-
untransform: r
|
|
1482
|
-
};
|
|
1483
|
-
}
|
|
1484
|
-
var Jn = wt((e, t) => Yn(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
1485
|
-
const r = n.symbolRegistry.getValue(t[1]);
|
|
1486
|
-
if (!r)
|
|
1487
|
-
throw new Error("Trying to deserialize unknown symbol");
|
|
1488
|
-
return r;
|
|
1489
|
-
}), Io = [
|
|
1490
|
-
Int8Array,
|
|
1491
|
-
Uint8Array,
|
|
1492
|
-
Int16Array,
|
|
1493
|
-
Uint16Array,
|
|
1494
|
-
Int32Array,
|
|
1495
|
-
Uint32Array,
|
|
1496
|
-
Float32Array,
|
|
1497
|
-
Float64Array,
|
|
1498
|
-
Uint8ClampedArray
|
|
1499
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), er = wt(wo, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
1500
|
-
const n = Io[t[1]];
|
|
1501
|
-
if (!n)
|
|
1502
|
-
throw new Error("Trying to deserialize unknown typed array");
|
|
1503
|
-
return new n(e);
|
|
1504
|
-
});
|
|
1505
|
-
function tr(e, t) {
|
|
1506
|
-
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
1507
|
-
}
|
|
1508
|
-
var nr = wt(tr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
1509
|
-
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
1510
|
-
if (!n)
|
|
1511
|
-
return { ...e };
|
|
1512
|
-
const r = {};
|
|
1513
|
-
return n.forEach((s) => {
|
|
1514
|
-
r[s] = e[s];
|
|
1515
|
-
}), r;
|
|
1516
|
-
}, (e, t, n) => {
|
|
1517
|
-
const r = n.classRegistry.getValue(t[1]);
|
|
1518
|
-
if (!r)
|
|
1519
|
-
throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
|
|
1520
|
-
return Object.assign(Object.create(r.prototype), e);
|
|
1521
|
-
}), rr = wt((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
1522
|
-
const r = n.customTransformerRegistry.findByName(t[1]);
|
|
1523
|
-
if (!r)
|
|
1524
|
-
throw new Error("Trying to deserialize unknown custom value");
|
|
1525
|
-
return r.deserialize(e);
|
|
1526
|
-
}), Ao = [nr, Jn, rr, er], hn = (e, t) => {
|
|
1527
|
-
const n = fn(Ao, (s) => s.isApplicable(e, t));
|
|
1528
|
-
if (n)
|
|
1529
|
-
return {
|
|
1530
|
-
value: n.transform(e, t),
|
|
1531
|
-
type: n.annotation(e, t)
|
|
1532
|
-
};
|
|
1533
|
-
const r = fn(Zn, (s) => s.isApplicable(e, t));
|
|
1534
|
-
if (r)
|
|
1535
|
-
return {
|
|
1536
|
-
value: r.transform(e, t),
|
|
1537
|
-
type: r.annotation
|
|
1538
|
-
};
|
|
1539
|
-
}, sr = {};
|
|
1540
|
-
Zn.forEach((e) => {
|
|
1541
|
-
sr[e.annotation] = e;
|
|
1542
|
-
});
|
|
1543
|
-
var Oo = (e, t, n) => {
|
|
1544
|
-
if (J(t))
|
|
1545
|
-
switch (t[0]) {
|
|
1546
|
-
case "symbol":
|
|
1547
|
-
return Jn.untransform(e, t, n);
|
|
1548
|
-
case "class":
|
|
1549
|
-
return nr.untransform(e, t, n);
|
|
1550
|
-
case "custom":
|
|
1551
|
-
return rr.untransform(e, t, n);
|
|
1552
|
-
case "typed-array":
|
|
1553
|
-
return er.untransform(e, t, n);
|
|
1554
|
-
default:
|
|
1555
|
-
throw new Error("Unknown transformation: " + t);
|
|
1556
|
-
}
|
|
1557
|
-
else {
|
|
1558
|
-
const r = sr[t];
|
|
1559
|
-
if (!r)
|
|
1560
|
-
throw new Error("Unknown transformation: " + t);
|
|
1561
|
-
return r.untransform(e, n);
|
|
1562
|
-
}
|
|
1563
|
-
}, fe = (e, t) => {
|
|
1564
|
-
const n = e.keys();
|
|
1565
|
-
for (; t > 0; )
|
|
1566
|
-
n.next(), t--;
|
|
1567
|
-
return n.next().value;
|
|
1568
|
-
};
|
|
1569
|
-
function or(e) {
|
|
1570
|
-
if (ct(e, "__proto__"))
|
|
1571
|
-
throw new Error("__proto__ is not allowed as a property");
|
|
1572
|
-
if (ct(e, "prototype"))
|
|
1573
|
-
throw new Error("prototype is not allowed as a property");
|
|
1574
|
-
if (ct(e, "constructor"))
|
|
1575
|
-
throw new Error("constructor is not allowed as a property");
|
|
1576
|
-
}
|
|
1577
|
-
var To = (e, t) => {
|
|
1578
|
-
or(t);
|
|
1579
|
-
for (let n = 0; n < t.length; n++) {
|
|
1580
|
-
const r = t[n];
|
|
1581
|
-
if (Ge(e))
|
|
1582
|
-
e = fe(e, +r);
|
|
1583
|
-
else if (De(e)) {
|
|
1584
|
-
const s = +r, o = +t[++n] == 0 ? "key" : "value", i = fe(e, s);
|
|
1585
|
-
switch (o) {
|
|
1586
|
-
case "key":
|
|
1587
|
-
e = i;
|
|
1588
|
-
break;
|
|
1589
|
-
case "value":
|
|
1590
|
-
e = e.get(i);
|
|
1591
|
-
break;
|
|
1592
|
-
}
|
|
1593
|
-
} else
|
|
1594
|
-
e = e[r];
|
|
1595
|
-
}
|
|
1596
|
-
return e;
|
|
1597
|
-
}, Kt = (e, t, n) => {
|
|
1598
|
-
if (or(t), t.length === 0)
|
|
1599
|
-
return n(e);
|
|
1600
|
-
let r = e;
|
|
1601
|
-
for (let o = 0; o < t.length - 1; o++) {
|
|
1602
|
-
const i = t[o];
|
|
1603
|
-
if (J(r)) {
|
|
1604
|
-
const l = +i;
|
|
1605
|
-
r = r[l];
|
|
1606
|
-
} else if (qe(r))
|
|
1607
|
-
r = r[i];
|
|
1608
|
-
else if (Ge(r)) {
|
|
1609
|
-
const l = +i;
|
|
1610
|
-
r = fe(r, l);
|
|
1611
|
-
} else if (De(r)) {
|
|
1612
|
-
if (o === t.length - 2)
|
|
1613
|
-
break;
|
|
1614
|
-
const c = +i, a = +t[++o] == 0 ? "key" : "value", f = fe(r, c);
|
|
1615
|
-
switch (a) {
|
|
1616
|
-
case "key":
|
|
1617
|
-
r = f;
|
|
1618
|
-
break;
|
|
1619
|
-
case "value":
|
|
1620
|
-
r = r.get(f);
|
|
1621
|
-
break;
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
const s = t[t.length - 1];
|
|
1626
|
-
if (J(r) ? r[+s] = n(r[+s]) : qe(r) && (r[s] = n(r[s])), Ge(r)) {
|
|
1627
|
-
const o = fe(r, +s), i = n(o);
|
|
1628
|
-
o !== i && (r.delete(o), r.add(i));
|
|
1629
|
-
}
|
|
1630
|
-
if (De(r)) {
|
|
1631
|
-
const o = +t[t.length - 2], i = fe(r, o);
|
|
1632
|
-
switch (+s == 0 ? "key" : "value") {
|
|
1633
|
-
case "key": {
|
|
1634
|
-
const c = n(i);
|
|
1635
|
-
r.set(c, r.get(i)), c !== i && r.delete(i);
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
case "value": {
|
|
1639
|
-
r.set(i, n(r.get(i)));
|
|
1640
|
-
break;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
return e;
|
|
1645
|
-
};
|
|
1646
|
-
function jt(e, t, n = []) {
|
|
1647
|
-
if (!e)
|
|
1648
|
-
return;
|
|
1649
|
-
if (!J(e)) {
|
|
1650
|
-
Re(e, (o, i) => jt(o, t, [...n, ...Ve(i)]));
|
|
1651
|
-
return;
|
|
1652
|
-
}
|
|
1653
|
-
const [r, s] = e;
|
|
1654
|
-
s && Re(s, (o, i) => {
|
|
1655
|
-
jt(o, t, [...n, ...Ve(i)]);
|
|
1656
|
-
}), t(r, n);
|
|
1657
|
-
}
|
|
1658
|
-
function Eo(e, t, n) {
|
|
1659
|
-
return jt(t, (r, s) => {
|
|
1660
|
-
e = Kt(e, s, (o) => Oo(o, r, n));
|
|
1661
|
-
}), e;
|
|
1662
|
-
}
|
|
1663
|
-
function No(e, t) {
|
|
1664
|
-
function n(r, s) {
|
|
1665
|
-
const o = To(e, Ve(s));
|
|
1666
|
-
r.map(Ve).forEach((i) => {
|
|
1667
|
-
e = Kt(e, i, () => o);
|
|
1668
|
-
});
|
|
1669
|
-
}
|
|
1670
|
-
if (J(t)) {
|
|
1671
|
-
const [r, s] = t;
|
|
1672
|
-
r.forEach((o) => {
|
|
1673
|
-
e = Kt(e, Ve(o), () => e);
|
|
1674
|
-
}), s && Re(s, n);
|
|
1675
|
-
} else
|
|
1676
|
-
Re(t, n);
|
|
1677
|
-
return e;
|
|
1678
|
-
}
|
|
1679
|
-
var Ro = (e, t) => qe(e) || J(e) || De(e) || Ge(e) || tr(e, t);
|
|
1680
|
-
function xo(e, t, n) {
|
|
1681
|
-
const r = n.get(e);
|
|
1682
|
-
r ? r.push(t) : n.set(e, [t]);
|
|
1683
|
-
}
|
|
1684
|
-
function Po(e, t) {
|
|
1685
|
-
const n = {};
|
|
1686
|
-
let r;
|
|
1687
|
-
return e.forEach((s) => {
|
|
1688
|
-
if (s.length <= 1)
|
|
1689
|
-
return;
|
|
1690
|
-
t || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
|
|
1691
|
-
const [o, ...i] = s;
|
|
1692
|
-
o.length === 0 ? r = i.map(Pt) : n[Pt(o)] = i.map(Pt);
|
|
1693
|
-
}), r ? Gt(n) ? [r] : [r, n] : Gt(n) ? void 0 : n;
|
|
1694
|
-
}
|
|
1695
|
-
var ir = (e, t, n, r, s = [], o = [], i = /* @__PURE__ */ new Map()) => {
|
|
1696
|
-
const l = vo(e);
|
|
1697
|
-
if (!l) {
|
|
1698
|
-
xo(e, s, t);
|
|
1699
|
-
const h = i.get(e);
|
|
1700
|
-
if (h)
|
|
1701
|
-
return r ? {
|
|
1702
|
-
transformedValue: null
|
|
1703
|
-
} : h;
|
|
1704
|
-
}
|
|
1705
|
-
if (!Ro(e, n)) {
|
|
1706
|
-
const h = hn(e, n), p = h ? {
|
|
1707
|
-
transformedValue: h.value,
|
|
1708
|
-
annotations: [h.type]
|
|
1709
|
-
} : {
|
|
1710
|
-
transformedValue: e
|
|
1711
|
-
};
|
|
1712
|
-
return l || i.set(e, p), p;
|
|
1713
|
-
}
|
|
1714
|
-
if (ct(o, e))
|
|
1715
|
-
return {
|
|
1716
|
-
transformedValue: null
|
|
1717
|
-
};
|
|
1718
|
-
const c = hn(e, n), a = (c == null ? void 0 : c.value) ?? e, f = J(a) ? [] : {}, u = {};
|
|
1719
|
-
Re(a, (h, p) => {
|
|
1720
|
-
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
1721
|
-
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
1722
|
-
const v = ir(h, t, n, r, [...s, p], [...o, e], i);
|
|
1723
|
-
f[p] = v.transformedValue, J(v.annotations) ? u[p] = v.annotations : qe(v.annotations) && Re(v.annotations, (O, _) => {
|
|
1724
|
-
u[zn(p) + "." + _] = O;
|
|
1725
|
-
});
|
|
1726
|
-
});
|
|
1727
|
-
const m = Gt(u) ? {
|
|
1728
|
-
transformedValue: f,
|
|
1729
|
-
annotations: c ? [c.type] : void 0
|
|
1730
|
-
} : {
|
|
1731
|
-
transformedValue: f,
|
|
1732
|
-
annotations: c ? [c.type, u] : u
|
|
1733
|
-
};
|
|
1734
|
-
return l || i.set(e, m), m;
|
|
1735
|
-
};
|
|
1736
|
-
function lr(e) {
|
|
1737
|
-
return Object.prototype.toString.call(e).slice(8, -1);
|
|
1738
|
-
}
|
|
1739
|
-
function mn(e) {
|
|
1740
|
-
return lr(e) === "Array";
|
|
1741
|
-
}
|
|
1742
|
-
function ko(e) {
|
|
1743
|
-
if (lr(e) !== "Object")
|
|
1744
|
-
return !1;
|
|
1745
|
-
const t = Object.getPrototypeOf(e);
|
|
1746
|
-
return !!t && t.constructor === Object && t === Object.prototype;
|
|
1747
|
-
}
|
|
1748
|
-
function Mo(e, t, n, r, s) {
|
|
1749
|
-
const o = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
|
|
1750
|
-
o === "enumerable" && (e[t] = n), s && o === "nonenumerable" && Object.defineProperty(e, t, {
|
|
1751
|
-
value: n,
|
|
1752
|
-
enumerable: !1,
|
|
1753
|
-
writable: !0,
|
|
1754
|
-
configurable: !0
|
|
1755
|
-
});
|
|
1756
|
-
}
|
|
1757
|
-
function Qt(e, t = {}) {
|
|
1758
|
-
if (mn(e))
|
|
1759
|
-
return e.map((s) => Qt(s, t));
|
|
1760
|
-
if (!ko(e))
|
|
1761
|
-
return e;
|
|
1762
|
-
const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
|
|
1763
|
-
return [...n, ...r].reduce((s, o) => {
|
|
1764
|
-
if (mn(t.props) && !t.props.includes(o))
|
|
1765
|
-
return s;
|
|
1766
|
-
const i = e[o], l = Qt(i, t);
|
|
1767
|
-
return Mo(s, o, l, e, t.nonenumerable), s;
|
|
1768
|
-
}, {});
|
|
1769
|
-
}
|
|
1770
|
-
var R = class {
|
|
1771
|
-
/**
|
|
1772
|
-
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
1773
|
-
*/
|
|
1774
|
-
constructor({ dedupe: e = !1 } = {}) {
|
|
1775
|
-
this.classRegistry = new oo(), this.symbolRegistry = new Wn((t) => t.description ?? ""), this.customTransformerRegistry = new co(), this.allowedErrorProps = [], this.dedupe = e;
|
|
1776
|
-
}
|
|
1777
|
-
serialize(e) {
|
|
1778
|
-
const t = /* @__PURE__ */ new Map(), n = ir(e, t, this, this.dedupe), r = {
|
|
1779
|
-
json: n.transformedValue
|
|
1780
|
-
};
|
|
1781
|
-
n.annotations && (r.meta = {
|
|
1782
|
-
...r.meta,
|
|
1783
|
-
values: n.annotations
|
|
1784
|
-
});
|
|
1785
|
-
const s = Po(t, this.dedupe);
|
|
1786
|
-
return s && (r.meta = {
|
|
1787
|
-
...r.meta,
|
|
1788
|
-
referentialEqualities: s
|
|
1789
|
-
}), r;
|
|
1790
|
-
}
|
|
1791
|
-
deserialize(e) {
|
|
1792
|
-
const { json: t, meta: n } = e;
|
|
1793
|
-
let r = Qt(t);
|
|
1794
|
-
return n != null && n.values && (r = Eo(r, n.values, this)), n != null && n.referentialEqualities && (r = No(r, n.referentialEqualities)), r;
|
|
1795
|
-
}
|
|
1796
|
-
stringify(e) {
|
|
1797
|
-
return JSON.stringify(this.serialize(e));
|
|
1798
|
-
}
|
|
1799
|
-
parse(e) {
|
|
1800
|
-
return this.deserialize(JSON.parse(e));
|
|
1801
|
-
}
|
|
1802
|
-
registerClass(e, t) {
|
|
1803
|
-
this.classRegistry.register(e, t);
|
|
1804
|
-
}
|
|
1805
|
-
registerSymbol(e, t) {
|
|
1806
|
-
this.symbolRegistry.register(e, t);
|
|
1807
|
-
}
|
|
1808
|
-
registerCustom(e, t) {
|
|
1809
|
-
this.customTransformerRegistry.register({
|
|
1810
|
-
name: t,
|
|
1811
|
-
...e
|
|
1812
|
-
});
|
|
1813
|
-
}
|
|
1814
|
-
allowErrorProps(...e) {
|
|
1815
|
-
this.allowedErrorProps.push(...e);
|
|
1816
|
-
}
|
|
1817
|
-
};
|
|
1818
|
-
R.defaultInstance = new R();
|
|
1819
|
-
R.serialize = R.defaultInstance.serialize.bind(R.defaultInstance);
|
|
1820
|
-
R.deserialize = R.defaultInstance.deserialize.bind(R.defaultInstance);
|
|
1821
|
-
R.stringify = R.defaultInstance.stringify.bind(R.defaultInstance);
|
|
1822
|
-
R.parse = R.defaultInstance.parse.bind(R.defaultInstance);
|
|
1823
|
-
R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
|
|
1824
|
-
R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
|
|
1825
|
-
R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
|
|
1826
|
-
R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
|
|
1827
|
-
var Lo = R.serialize, el = R.stringify;
|
|
1828
|
-
function tl(e) {
|
|
1829
|
-
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
1830
|
-
}
|
|
1831
|
-
function nl(e, t) {
|
|
1832
|
-
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
1833
|
-
}
|
|
1834
|
-
function rl({
|
|
1835
|
-
queryState: e,
|
|
1836
|
-
observerCount: t,
|
|
1837
|
-
isStale: n
|
|
1838
|
-
}) {
|
|
1839
|
-
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
1840
|
-
}
|
|
1841
|
-
function sl({
|
|
1842
|
-
status: e,
|
|
1843
|
-
isPaused: t
|
|
1844
|
-
}) {
|
|
1845
|
-
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
1846
|
-
}
|
|
1847
|
-
function ol(e) {
|
|
1848
|
-
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
1849
|
-
}
|
|
1850
|
-
var il = (e, t = !1) => {
|
|
1851
|
-
const {
|
|
1852
|
-
json: n
|
|
1853
|
-
} = Lo(e);
|
|
1854
|
-
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
1855
|
-
}, nt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, _o = (e, t) => e.queryHash.localeCompare(t.queryHash), cr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Uo = (e, t) => nt(e) === nt(t) ? cr(e, t) : nt(e) > nt(t) ? 1 : -1, ll = {
|
|
1856
|
-
status: Uo,
|
|
1857
|
-
"query hash": _o,
|
|
1858
|
-
"last updated": cr
|
|
1859
|
-
}, rt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, ar = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Vo = (e, t) => rt(e) === rt(t) ? ar(e, t) : rt(e) > rt(t) ? 1 : -1, cl = {
|
|
1860
|
-
status: Vo,
|
|
1861
|
-
"last updated": ar
|
|
1862
|
-
}, al = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), ul = () => {
|
|
1863
|
-
const [e, t] = L("dark");
|
|
1864
|
-
return bs(() => {
|
|
1865
|
-
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1866
|
-
t(n.matches ? "dark" : "light");
|
|
1867
|
-
const r = (s) => {
|
|
1868
|
-
t(s.matches ? "dark" : "light");
|
|
1869
|
-
};
|
|
1870
|
-
n.addEventListener("change", r), Fe(() => n.removeEventListener("change", r));
|
|
1871
|
-
}), e;
|
|
1872
|
-
}, st = (e, t, n) => {
|
|
1873
|
-
if (t.length === 0)
|
|
1874
|
-
return n;
|
|
1875
|
-
if (e instanceof Map) {
|
|
1876
|
-
const r = new Map(e);
|
|
1877
|
-
if (t.length === 1)
|
|
1878
|
-
return r.set(t[0], n), r;
|
|
1879
|
-
const [s, ...o] = t;
|
|
1880
|
-
return r.set(s, st(r.get(s), o, n)), r;
|
|
1881
|
-
}
|
|
1882
|
-
if (e instanceof Set) {
|
|
1883
|
-
const r = st(Array.from(e), t, n);
|
|
1884
|
-
return new Set(r);
|
|
1885
|
-
}
|
|
1886
|
-
if (Array.isArray(e)) {
|
|
1887
|
-
const r = [...e];
|
|
1888
|
-
if (t.length === 1)
|
|
1889
|
-
return r[t[0]] = n, r;
|
|
1890
|
-
const [s, ...o] = t;
|
|
1891
|
-
return r[s] = st(r[s], o, n), r;
|
|
1892
|
-
}
|
|
1893
|
-
if (e instanceof Object) {
|
|
1894
|
-
const r = {
|
|
1895
|
-
...e
|
|
1896
|
-
};
|
|
1897
|
-
if (t.length === 1)
|
|
1898
|
-
return r[t[0]] = n, r;
|
|
1899
|
-
const [s, ...o] = t;
|
|
1900
|
-
return r[s] = st(r[s], o, n), r;
|
|
1901
|
-
}
|
|
1902
|
-
return e;
|
|
1903
|
-
}, ot = (e, t) => {
|
|
1904
|
-
if (e instanceof Map) {
|
|
1905
|
-
const n = new Map(e);
|
|
1906
|
-
if (t.length === 1)
|
|
1907
|
-
return n.delete(t[0]), n;
|
|
1908
|
-
const [r, ...s] = t;
|
|
1909
|
-
return n.set(r, ot(n.get(r), s)), n;
|
|
1910
|
-
}
|
|
1911
|
-
if (e instanceof Set) {
|
|
1912
|
-
const n = ot(Array.from(e), t);
|
|
1913
|
-
return new Set(n);
|
|
1914
|
-
}
|
|
1915
|
-
if (Array.isArray(e)) {
|
|
1916
|
-
const n = [...e];
|
|
1917
|
-
if (t.length === 1)
|
|
1918
|
-
return n.filter((o, i) => i.toString() !== t[0]);
|
|
1919
|
-
const [r, ...s] = t;
|
|
1920
|
-
return n[r] = ot(n[r], s), n;
|
|
1921
|
-
}
|
|
1922
|
-
if (e instanceof Object) {
|
|
1923
|
-
const n = {
|
|
1924
|
-
...e
|
|
1925
|
-
};
|
|
1926
|
-
if (t.length === 1)
|
|
1927
|
-
return delete n[t[0]], n;
|
|
1928
|
-
const [r, ...s] = t;
|
|
1929
|
-
return n[r] = ot(n[r], s), n;
|
|
1930
|
-
}
|
|
1931
|
-
return e;
|
|
1932
|
-
}, ur = (e, t) => {
|
|
1933
|
-
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
1934
|
-
const r = document.createElement("style"), s = document.createTextNode("");
|
|
1935
|
-
r.appendChild(s), r.id = "_goober", r.setAttribute("nonce", e), t ? t.appendChild(r) : document.head.appendChild(r);
|
|
1936
|
-
}, me, Ke, je, Qe, re, He, pe, ge, ye, ve, be, Se, We, vn, Fo = (vn = class {
|
|
1937
|
-
constructor(e) {
|
|
1938
|
-
E(this, me);
|
|
1939
|
-
E(this, Ke);
|
|
1940
|
-
E(this, je);
|
|
1941
|
-
E(this, Qe);
|
|
1942
|
-
E(this, re, !1);
|
|
1943
|
-
E(this, He);
|
|
1944
|
-
E(this, pe);
|
|
1945
|
-
E(this, ge);
|
|
1946
|
-
E(this, ye);
|
|
1947
|
-
E(this, ve);
|
|
1948
|
-
E(this, be);
|
|
1949
|
-
E(this, Se);
|
|
1950
|
-
E(this, We);
|
|
1951
|
-
const {
|
|
1952
|
-
client: t,
|
|
1953
|
-
queryFlavor: n,
|
|
1954
|
-
version: r,
|
|
1955
|
-
onlineManager: s,
|
|
1956
|
-
buttonPosition: o,
|
|
1957
|
-
position: i,
|
|
1958
|
-
initialIsOpen: l,
|
|
1959
|
-
errorTypes: c,
|
|
1960
|
-
styleNonce: a,
|
|
1961
|
-
shadowDOMTarget: f
|
|
1962
|
-
} = e;
|
|
1963
|
-
A(this, me, L(t)), A(this, je, n), A(this, Qe, r), A(this, Ke, s), A(this, He, a), A(this, pe, f), A(this, ge, L(o)), A(this, ye, L(i)), A(this, ve, L(l)), A(this, be, L(c));
|
|
1964
|
-
}
|
|
1965
|
-
setButtonPosition(e) {
|
|
1966
|
-
g(this, ge)[1](e);
|
|
1967
|
-
}
|
|
1968
|
-
setPosition(e) {
|
|
1969
|
-
g(this, ye)[1](e);
|
|
1970
|
-
}
|
|
1971
|
-
setInitialIsOpen(e) {
|
|
1972
|
-
g(this, ve)[1](e);
|
|
1973
|
-
}
|
|
1974
|
-
setErrorTypes(e) {
|
|
1975
|
-
g(this, be)[1](e);
|
|
1976
|
-
}
|
|
1977
|
-
setClient(e) {
|
|
1978
|
-
g(this, me)[1](e);
|
|
1979
|
-
}
|
|
1980
|
-
mount(e) {
|
|
1981
|
-
if (g(this, re))
|
|
1982
|
-
throw new Error("Devtools is already mounted");
|
|
1983
|
-
const t = jn(() => {
|
|
1984
|
-
const n = this, [r] = g(this, ge), [s] = g(this, ye), [o] = g(this, ve), [i] = g(this, be), [l] = g(this, me);
|
|
1985
|
-
let c;
|
|
1986
|
-
return g(this, Se) ? c = g(this, Se) : (c = Gn(() => import("./I3HPI4QX-BiqSZkoI.js")), A(this, Se, c)), ur(g(this, He), g(this, pe)), qn(c, Dn({
|
|
1987
|
-
get queryFlavor() {
|
|
1988
|
-
return g(n, je);
|
|
1989
|
-
},
|
|
1990
|
-
get version() {
|
|
1991
|
-
return g(n, Qe);
|
|
1992
|
-
},
|
|
1993
|
-
get onlineManager() {
|
|
1994
|
-
return g(n, Ke);
|
|
1995
|
-
},
|
|
1996
|
-
get shadowDOMTarget() {
|
|
1997
|
-
return g(n, pe);
|
|
1998
|
-
}
|
|
1999
|
-
}, {
|
|
2000
|
-
get client() {
|
|
2001
|
-
return l();
|
|
2002
|
-
},
|
|
2003
|
-
get buttonPosition() {
|
|
2004
|
-
return r();
|
|
2005
|
-
},
|
|
2006
|
-
get position() {
|
|
2007
|
-
return s();
|
|
2008
|
-
},
|
|
2009
|
-
get initialIsOpen() {
|
|
2010
|
-
return o();
|
|
2011
|
-
},
|
|
2012
|
-
get errorTypes() {
|
|
2013
|
-
return i();
|
|
2014
|
-
}
|
|
2015
|
-
}));
|
|
2016
|
-
}, e);
|
|
2017
|
-
A(this, re, !0), A(this, We, t);
|
|
2018
|
-
}
|
|
2019
|
-
unmount() {
|
|
2020
|
-
var e;
|
|
2021
|
-
if (!g(this, re))
|
|
2022
|
-
throw new Error("Devtools is not mounted");
|
|
2023
|
-
(e = g(this, We)) == null || e.call(this), A(this, re, !1);
|
|
2024
|
-
}
|
|
2025
|
-
}, me = new WeakMap(), Ke = new WeakMap(), je = new WeakMap(), Qe = new WeakMap(), re = new WeakMap(), He = new WeakMap(), pe = new WeakMap(), ge = new WeakMap(), ye = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), Se = new WeakMap(), We = new WeakMap(), vn), we, Xe, Ye, ze, se, Ze, Ce, Ie, Ae, Oe, Te, Ee, Ne, Je, bn, Bo = (bn = class {
|
|
2026
|
-
constructor(e) {
|
|
2027
|
-
E(this, we);
|
|
2028
|
-
E(this, Xe);
|
|
2029
|
-
E(this, Ye);
|
|
2030
|
-
E(this, ze);
|
|
2031
|
-
E(this, se, !1);
|
|
2032
|
-
E(this, Ze);
|
|
2033
|
-
E(this, Ce);
|
|
2034
|
-
E(this, Ie);
|
|
2035
|
-
E(this, Ae);
|
|
2036
|
-
E(this, Oe);
|
|
2037
|
-
E(this, Te);
|
|
2038
|
-
E(this, Ee);
|
|
2039
|
-
E(this, Ne);
|
|
2040
|
-
E(this, Je);
|
|
2041
|
-
const {
|
|
2042
|
-
client: t,
|
|
2043
|
-
queryFlavor: n,
|
|
2044
|
-
version: r,
|
|
2045
|
-
onlineManager: s,
|
|
2046
|
-
buttonPosition: o,
|
|
2047
|
-
position: i,
|
|
2048
|
-
initialIsOpen: l,
|
|
2049
|
-
errorTypes: c,
|
|
2050
|
-
styleNonce: a,
|
|
2051
|
-
shadowDOMTarget: f,
|
|
2052
|
-
onClose: u
|
|
2053
|
-
} = e;
|
|
2054
|
-
A(this, we, L(t)), A(this, Ye, n), A(this, ze, r), A(this, Xe, s), A(this, Ze, a), A(this, Ce, f), A(this, Ie, L(o)), A(this, Ae, L(i)), A(this, Oe, L(l)), A(this, Te, L(c)), A(this, Ee, L(u));
|
|
2055
|
-
}
|
|
2056
|
-
setButtonPosition(e) {
|
|
2057
|
-
g(this, Ie)[1](e);
|
|
2058
|
-
}
|
|
2059
|
-
setPosition(e) {
|
|
2060
|
-
g(this, Ae)[1](e);
|
|
2061
|
-
}
|
|
2062
|
-
setInitialIsOpen(e) {
|
|
2063
|
-
g(this, Oe)[1](e);
|
|
2064
|
-
}
|
|
2065
|
-
setErrorTypes(e) {
|
|
2066
|
-
g(this, Te)[1](e);
|
|
2067
|
-
}
|
|
2068
|
-
setClient(e) {
|
|
2069
|
-
g(this, we)[1](e);
|
|
2070
|
-
}
|
|
2071
|
-
setOnClose(e) {
|
|
2072
|
-
g(this, Ee)[1](() => e);
|
|
2073
|
-
}
|
|
2074
|
-
mount(e) {
|
|
2075
|
-
if (g(this, se))
|
|
2076
|
-
throw new Error("Devtools is already mounted");
|
|
2077
|
-
const t = jn(() => {
|
|
2078
|
-
const n = this, [r] = g(this, Ie), [s] = g(this, Ae), [o] = g(this, Oe), [i] = g(this, Te), [l] = g(this, we), [c] = g(this, Ee);
|
|
2079
|
-
let a;
|
|
2080
|
-
return g(this, Ne) ? a = g(this, Ne) : (a = Gn(() => import("./CXEL7IU7-Dei8UEaR.js")), A(this, Ne, a)), ur(g(this, Ze), g(this, Ce)), qn(a, Dn({
|
|
2081
|
-
get queryFlavor() {
|
|
2082
|
-
return g(n, Ye);
|
|
2083
|
-
},
|
|
2084
|
-
get version() {
|
|
2085
|
-
return g(n, ze);
|
|
2086
|
-
},
|
|
2087
|
-
get onlineManager() {
|
|
2088
|
-
return g(n, Xe);
|
|
2089
|
-
},
|
|
2090
|
-
get shadowDOMTarget() {
|
|
2091
|
-
return g(n, Ce);
|
|
2092
|
-
}
|
|
2093
|
-
}, {
|
|
2094
|
-
get client() {
|
|
2095
|
-
return l();
|
|
2096
|
-
},
|
|
2097
|
-
get buttonPosition() {
|
|
2098
|
-
return r();
|
|
2099
|
-
},
|
|
2100
|
-
get position() {
|
|
2101
|
-
return s();
|
|
2102
|
-
},
|
|
2103
|
-
get initialIsOpen() {
|
|
2104
|
-
return o();
|
|
2105
|
-
},
|
|
2106
|
-
get errorTypes() {
|
|
2107
|
-
return i();
|
|
2108
|
-
},
|
|
2109
|
-
get onClose() {
|
|
2110
|
-
return c();
|
|
2111
|
-
}
|
|
2112
|
-
}));
|
|
2113
|
-
}, e);
|
|
2114
|
-
A(this, se, !0), A(this, Je, t);
|
|
2115
|
-
}
|
|
2116
|
-
unmount() {
|
|
2117
|
-
var e;
|
|
2118
|
-
if (!g(this, se))
|
|
2119
|
-
throw new Error("Devtools is not mounted");
|
|
2120
|
-
(e = g(this, Je)) == null || e.call(this), A(this, se, !1);
|
|
2121
|
-
}
|
|
2122
|
-
}, we = new WeakMap(), Xe = new WeakMap(), Ye = new WeakMap(), ze = new WeakMap(), se = new WeakMap(), Ze = new WeakMap(), Ce = new WeakMap(), Ie = new WeakMap(), Ae = new WeakMap(), Oe = new WeakMap(), Te = new WeakMap(), Ee = new WeakMap(), Ne = new WeakMap(), Je = new WeakMap(), bn);
|
|
2123
|
-
function $o(e) {
|
|
2124
|
-
const t = ee(e.client), n = q.useRef(null), {
|
|
2125
|
-
buttonPosition: r,
|
|
2126
|
-
position: s,
|
|
2127
|
-
initialIsOpen: o,
|
|
2128
|
-
errorTypes: i,
|
|
2129
|
-
styleNonce: l,
|
|
2130
|
-
shadowDOMTarget: c
|
|
2131
|
-
} = e, [a] = q.useState(
|
|
2132
|
-
new Fo({
|
|
2133
|
-
client: t,
|
|
2134
|
-
queryFlavor: "React Query",
|
|
2135
|
-
version: "5",
|
|
2136
|
-
onlineManager: Tn,
|
|
2137
|
-
buttonPosition: r,
|
|
2138
|
-
position: s,
|
|
2139
|
-
initialIsOpen: o,
|
|
2140
|
-
errorTypes: i,
|
|
2141
|
-
styleNonce: l,
|
|
2142
|
-
shadowDOMTarget: c
|
|
2143
|
-
})
|
|
2144
|
-
);
|
|
2145
|
-
return q.useEffect(() => {
|
|
2146
|
-
a.setClient(t);
|
|
2147
|
-
}, [t, a]), q.useEffect(() => {
|
|
2148
|
-
r && a.setButtonPosition(r);
|
|
2149
|
-
}, [r, a]), q.useEffect(() => {
|
|
2150
|
-
s && a.setPosition(s);
|
|
2151
|
-
}, [s, a]), q.useEffect(() => {
|
|
2152
|
-
a.setInitialIsOpen(o || !1);
|
|
2153
|
-
}, [o, a]), q.useEffect(() => {
|
|
2154
|
-
a.setErrorTypes(i || []);
|
|
2155
|
-
}, [i, a]), q.useEffect(() => (n.current && a.mount(n.current), () => {
|
|
2156
|
-
a.unmount();
|
|
2157
|
-
}), [a]), /* @__PURE__ */ d("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
2158
|
-
}
|
|
2159
|
-
function qo(e) {
|
|
2160
|
-
const t = ee(e.client), n = q.useRef(null), { errorTypes: r, styleNonce: s, shadowDOMTarget: o } = e, [i] = q.useState(
|
|
2161
|
-
new Bo({
|
|
2162
|
-
client: t,
|
|
2163
|
-
queryFlavor: "React Query",
|
|
2164
|
-
version: "5",
|
|
2165
|
-
onlineManager: Tn,
|
|
2166
|
-
buttonPosition: "bottom-left",
|
|
2167
|
-
position: "bottom",
|
|
2168
|
-
initialIsOpen: !0,
|
|
2169
|
-
errorTypes: r,
|
|
2170
|
-
styleNonce: s,
|
|
2171
|
-
shadowDOMTarget: o,
|
|
2172
|
-
onClose: e.onClose
|
|
2173
|
-
})
|
|
2174
|
-
);
|
|
2175
|
-
return q.useEffect(() => {
|
|
2176
|
-
i.setClient(t);
|
|
2177
|
-
}, [t, i]), q.useEffect(() => {
|
|
2178
|
-
i.setOnClose(e.onClose ?? (() => {
|
|
2179
|
-
}));
|
|
2180
|
-
}, [e.onClose, i]), q.useEffect(() => {
|
|
2181
|
-
i.setErrorTypes(r || []);
|
|
2182
|
-
}, [r, i]), q.useEffect(() => (n.current && i.mount(n.current), () => {
|
|
2183
|
-
i.unmount();
|
|
2184
|
-
}), [i]), /* @__PURE__ */ d(
|
|
2185
|
-
"div",
|
|
2186
|
-
{
|
|
2187
|
-
style: { height: "500px", ...e.style },
|
|
2188
|
-
className: "tsqd-parent-container",
|
|
2189
|
-
ref: n
|
|
2190
|
-
}
|
|
2191
|
-
);
|
|
2192
|
-
}
|
|
2193
|
-
var fr = process.env.NODE_ENV !== "development" ? function() {
|
|
2194
|
-
return null;
|
|
2195
|
-
} : $o;
|
|
2196
|
-
process.env.NODE_ENV;
|
|
2197
|
-
const Ht = new rs({
|
|
2198
|
-
queryCache: new ss({
|
|
2199
|
-
onError: (e) => {
|
|
2200
|
-
typeof e == "string" && e === ls.NOT_LOGGED_IN && window.location.replace("/auth/login");
|
|
2201
|
-
}
|
|
2202
|
-
}),
|
|
2203
|
-
defaultOptions: {
|
|
2204
|
-
queries: {
|
|
2205
|
-
retry: !1,
|
|
2206
|
-
refetchOnWindowFocus: !1,
|
|
2207
|
-
staleTime: 1e3 * 60 * 2
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
}), fl = ({ children: e }) => /* @__PURE__ */ U(En, { client: Ht, children: [
|
|
2211
|
-
/* @__PURE__ */ d(
|
|
2212
|
-
Sn,
|
|
2213
|
-
{
|
|
2214
|
-
params: {
|
|
2215
|
-
app: "collect"
|
|
2216
|
-
},
|
|
2217
|
-
children: e
|
|
2218
|
-
}
|
|
2219
|
-
),
|
|
2220
|
-
/* @__PURE__ */ d(fr, { initialIsOpen: !1 })
|
|
2221
|
-
] }), Do = () => {
|
|
2222
|
-
const e = An(), t = ke(), { appCode: n } = xe(), { t: r } = Pe(n);
|
|
2223
|
-
return console.error(e), /* @__PURE__ */ U("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
|
|
2224
|
-
/* @__PURE__ */ d(Wt, { level: "h2", headingStyle: "h2", className: "text-secondary", children: r("oops") }),
|
|
2225
|
-
/* @__PURE__ */ d("div", { className: "text", children: r("notfound.or.unauthorized") }),
|
|
2226
|
-
/* @__PURE__ */ d(Z, { color: "primary", onClick: () => t(-1), children: r("back") })
|
|
2227
|
-
] });
|
|
2228
|
-
}, Go = () => {
|
|
2229
|
-
const e = An(), t = ke();
|
|
2230
|
-
return console.error(e), /* @__PURE__ */ d(Tr, { children: /* @__PURE__ */ U("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
|
|
2231
|
-
/* @__PURE__ */ d(Wt, { level: "h2", headingStyle: "h2", className: "text-secondary", children: Tt("oops") }),
|
|
2232
|
-
/* @__PURE__ */ d("div", { className: "text", children: Tt("e404.page") }),
|
|
2233
|
-
/* @__PURE__ */ d(Z, { color: "primary", onClick: () => t(-1), children: Tt("back") })
|
|
2234
|
-
] }) });
|
|
2235
|
-
}, Ko = 100, dl = 100, pn = 80, kt = "collect-wizard-data", de = ["form", "members"], gn = {
|
|
2236
|
-
title: "",
|
|
2237
|
-
description: "",
|
|
2238
|
-
deadline: void 0,
|
|
2239
|
-
attachments: [],
|
|
2240
|
-
sharings: []
|
|
2241
|
-
}, jo = () => {
|
|
2242
|
-
const [e, t] = yt(() => {
|
|
2243
|
-
const s = localStorage.getItem(kt);
|
|
2244
|
-
return s ? JSON.parse(s) : gn;
|
|
2245
|
-
});
|
|
2246
|
-
return j(() => {
|
|
2247
|
-
localStorage.setItem(kt, JSON.stringify(e));
|
|
2248
|
-
}, [e]), {
|
|
2249
|
-
wizardData: e,
|
|
2250
|
-
setWizardData: t,
|
|
2251
|
-
updateWizardData: (s) => {
|
|
2252
|
-
t((o) => ({
|
|
2253
|
-
...o,
|
|
2254
|
-
...s
|
|
2255
|
-
}));
|
|
2256
|
-
},
|
|
2257
|
-
resetWizardData: () => {
|
|
2258
|
-
localStorage.removeItem(kt), t(gn);
|
|
2259
|
-
}
|
|
2260
|
-
};
|
|
2261
|
-
};
|
|
2262
|
-
function Zt() {
|
|
2263
|
-
const e = ke(), n = On().pathname, r = de.findIndex(
|
|
2264
|
-
(i) => n.includes(i)
|
|
2265
|
-
);
|
|
2266
|
-
return {
|
|
2267
|
-
currentStep: r,
|
|
2268
|
-
nextStep: () => {
|
|
2269
|
-
const i = r + 1;
|
|
2270
|
-
i < de.length && e(`/create/${de[i]}`);
|
|
2271
|
-
},
|
|
2272
|
-
backStep: () => {
|
|
2273
|
-
const i = r - 1;
|
|
2274
|
-
i >= 0 ? e(`/create/${de[i]}`) : e("/");
|
|
2275
|
-
}
|
|
2276
|
-
};
|
|
2277
|
-
}
|
|
2278
|
-
const Jt = (e) => {
|
|
2279
|
-
const t = e;
|
|
2280
|
-
t.use = {};
|
|
2281
|
-
for (const n of Object.keys(t.getState()))
|
|
2282
|
-
t.use[n] = () => t((r) => r[n]);
|
|
2283
|
-
return t;
|
|
2284
|
-
}, Qo = Yt((e) => ({
|
|
2285
|
-
isFormValid: !1,
|
|
2286
|
-
setIsFormValid: (t) => e({ isFormValid: t })
|
|
2287
|
-
})), dr = Jt(Qo);
|
|
2288
|
-
function hr({ title: e }) {
|
|
2289
|
-
return /* @__PURE__ */ d("div", { className: "mb-24", children: /* @__PURE__ */ d(Wt, { className: "text-truncate", children: e }) });
|
|
2290
|
-
}
|
|
2291
|
-
const Ho = ({
|
|
2292
|
-
wizardData: e,
|
|
2293
|
-
updateWizardData: t,
|
|
2294
|
-
collection: n
|
|
2295
|
-
}) => {
|
|
2296
|
-
const { appCode: r } = xe(), { t: s } = Pe(r), { currentStep: o, nextStep: i } = Zt(), l = dr.use.setIsFormValid(), c = Xt(
|
|
2297
|
-
() => ({
|
|
2298
|
-
title: (e == null ? void 0 : e.title) ?? (n == null ? void 0 : n.name) ?? "",
|
|
2299
|
-
description: (e == null ? void 0 : e.description) ?? (n != null && n.content ? n.content : ""),
|
|
2300
|
-
deadline: (e == null ? void 0 : e.deadline) ?? (n != null && n.deadline ? new Date(n.deadline) : void 0),
|
|
2301
|
-
attachments: (e == null ? void 0 : e.attachments) ?? [],
|
|
2302
|
-
sharings: (e == null ? void 0 : e.sharings) ?? []
|
|
2303
|
-
}),
|
|
2304
|
-
[e, n]
|
|
2305
|
-
), a = ne(c.description), [f, u] = yt(
|
|
2306
|
-
(e == null ? void 0 : e.attachments) ?? []
|
|
2307
|
-
), {
|
|
2308
|
-
control: m,
|
|
2309
|
-
watch: h,
|
|
2310
|
-
register: p,
|
|
2311
|
-
handleSubmit: v,
|
|
2312
|
-
setValue: O,
|
|
2313
|
-
formState: { isValid: _ }
|
|
2314
|
-
} = as({
|
|
2315
|
-
defaultValues: c
|
|
2316
|
-
});
|
|
2317
|
-
j(() => {
|
|
2318
|
-
const S = h((D) => {
|
|
2319
|
-
t == null || t(D);
|
|
2320
|
-
});
|
|
2321
|
-
return () => S.unsubscribe();
|
|
2322
|
-
}, [h]), j(() => {
|
|
2323
|
-
l(_);
|
|
2324
|
-
}, [_]);
|
|
2325
|
-
const C = (S) => {
|
|
2326
|
-
t == null || t(S), i();
|
|
2327
|
-
}, M = ({ editor: S }) => {
|
|
2328
|
-
O("description", S.isEmpty ? "" : S.getHTML());
|
|
2329
|
-
}, V = (S) => {
|
|
2330
|
-
u(S), O("attachments", S);
|
|
2331
|
-
};
|
|
2332
|
-
return /* @__PURE__ */ U(Ir, { children: [
|
|
2333
|
-
/* @__PURE__ */ d(wn, { currentStep: o, nbSteps: 2 }),
|
|
2334
|
-
/* @__PURE__ */ d(hr, { title: s("collection.wizard.form.title") }),
|
|
2335
|
-
/* @__PURE__ */ d(
|
|
2336
|
-
Xr,
|
|
2337
|
-
{
|
|
2338
|
-
id: "formCreateCollection",
|
|
2339
|
-
role: "form",
|
|
2340
|
-
onSubmit: v(C),
|
|
2341
|
-
children: /* @__PURE__ */ U(K, { children: [
|
|
2342
|
-
/* @__PURE__ */ d(K.Col, { sm: "4", md: "5", xl: "8", children: /* @__PURE__ */ U(et, { id: "collectionTitle", isRequired: !0, children: [
|
|
2343
|
-
/* @__PURE__ */ d(It, { leftIcon: /* @__PURE__ */ d($r, {}), children: s("collection.wizard.create.form.title") }),
|
|
2344
|
-
/* @__PURE__ */ d(
|
|
2345
|
-
Er,
|
|
2346
|
-
{
|
|
2347
|
-
"data-testid": "collect-create-collection-input-title",
|
|
2348
|
-
type: "text",
|
|
2349
|
-
...p("title", {
|
|
2350
|
-
required: !0,
|
|
2351
|
-
maxLength: pn,
|
|
2352
|
-
pattern: {
|
|
2353
|
-
value: /[^ ]/,
|
|
2354
|
-
message: "invalid title"
|
|
2355
|
-
}
|
|
2356
|
-
}),
|
|
2357
|
-
size: "md",
|
|
2358
|
-
maxLength: pn,
|
|
2359
|
-
placeholder: s(
|
|
2360
|
-
"collection.wizard.create.form.title.placeholder"
|
|
2361
|
-
),
|
|
2362
|
-
showCounter: !0
|
|
2363
|
-
}
|
|
2364
|
-
)
|
|
2365
|
-
] }) }),
|
|
2366
|
-
/* @__PURE__ */ d(K.Col, { sm: "4", md: "3", xl: "4", children: /* @__PURE__ */ U(et, { id: "collectionDeadline", isRequired: !0, children: [
|
|
2367
|
-
/* @__PURE__ */ d(It, { leftIcon: /* @__PURE__ */ d(qr, {}), children: s("collection.wizard.create.form.deadline") }),
|
|
2368
|
-
/* @__PURE__ */ d(
|
|
2369
|
-
Et,
|
|
2370
|
-
{
|
|
2371
|
-
name: "deadline",
|
|
2372
|
-
control: m,
|
|
2373
|
-
rules: { required: !0 },
|
|
2374
|
-
render: ({ field: S }) => /* @__PURE__ */ d(
|
|
2375
|
-
Nr,
|
|
2376
|
-
{
|
|
2377
|
-
"data-testid": "collect-create-collection-input-deadline",
|
|
2378
|
-
value: S.value,
|
|
2379
|
-
onChange: S.onChange,
|
|
2380
|
-
onBlur: S.onBlur,
|
|
2381
|
-
className: "w-full form-control"
|
|
2382
|
-
}
|
|
2383
|
-
)
|
|
2384
|
-
}
|
|
2385
|
-
)
|
|
2386
|
-
] }) }),
|
|
2387
|
-
/* @__PURE__ */ d(K.Col, { sm: "4", md: "8", xl: "12", children: /* @__PURE__ */ U(
|
|
2388
|
-
et,
|
|
2389
|
-
{
|
|
2390
|
-
id: "collectionDescription",
|
|
2391
|
-
isOptional: !0,
|
|
2392
|
-
className: "collectionDescription",
|
|
2393
|
-
children: [
|
|
2394
|
-
/* @__PURE__ */ d(It, { leftIcon: /* @__PURE__ */ d(Dr, {}), children: s("collection.wizard.create.form.description") }),
|
|
2395
|
-
/* @__PURE__ */ d(
|
|
2396
|
-
Et,
|
|
2397
|
-
{
|
|
2398
|
-
name: "description",
|
|
2399
|
-
control: m,
|
|
2400
|
-
render: () => /* @__PURE__ */ d(
|
|
2401
|
-
cs,
|
|
2402
|
-
{
|
|
2403
|
-
"data-testid": "collect-create-collection-input-description",
|
|
2404
|
-
id: "collectionDescription",
|
|
2405
|
-
content: a.current,
|
|
2406
|
-
placeholder: s(
|
|
2407
|
-
"collection.wizard.create.form.description.placeholder"
|
|
2408
|
-
),
|
|
2409
|
-
onContentChange: M,
|
|
2410
|
-
mode: "edit"
|
|
2411
|
-
}
|
|
2412
|
-
)
|
|
2413
|
-
}
|
|
2414
|
-
)
|
|
2415
|
-
]
|
|
2416
|
-
}
|
|
2417
|
-
) }),
|
|
2418
|
-
/* @__PURE__ */ d(K.Col, { sm: "4", md: "5", children: /* @__PURE__ */ d(et, { id: "collectionAttachments", isOptional: !0, children: /* @__PURE__ */ d(
|
|
2419
|
-
Et,
|
|
2420
|
-
{
|
|
2421
|
-
name: "attachments",
|
|
2422
|
-
control: m,
|
|
2423
|
-
render: () => /* @__PURE__ */ d(
|
|
2424
|
-
Rr,
|
|
2425
|
-
{
|
|
2426
|
-
"data-testid": "collect-create-collection-input-attachments",
|
|
2427
|
-
attachments: f,
|
|
2428
|
-
editMode: !0,
|
|
2429
|
-
onChange: V
|
|
2430
|
-
}
|
|
2431
|
-
)
|
|
2432
|
-
}
|
|
2433
|
-
) }) })
|
|
2434
|
-
] })
|
|
2435
|
-
}
|
|
2436
|
-
)
|
|
2437
|
-
] });
|
|
2438
|
-
}, Wo = (e) => e === it.MANAGE ? ["manager"] : [e], Xo = (e) => e.includes("manager") ? it.MANAGE : e.includes("contrib") ? it.CONTRIB : it.VIEW, Yo = (e) => ({
|
|
2439
|
-
recipientId: e.recipient.entId,
|
|
2440
|
-
recipientType: e.recipient.type,
|
|
2441
|
-
permission: Wo(e.permission),
|
|
2442
|
-
displayName: e.recipient.displayName ?? ""
|
|
2443
|
-
}), mr = (e) => ({
|
|
2444
|
-
recipientId: e.recipientId,
|
|
2445
|
-
recipientType: e.recipientType,
|
|
2446
|
-
permission: Xo(e.permission)
|
|
2447
|
-
}), zo = (e) => ({
|
|
2448
|
-
recipientId: e.recipientId,
|
|
2449
|
-
recipientType: e.recipientType
|
|
2450
|
-
}), hl = (e, t) => ({
|
|
2451
|
-
deleteSharings: e.map(zo),
|
|
2452
|
-
newSharings: t.map(mr)
|
|
2453
|
-
}), Zo = async (e, t) => {
|
|
2454
|
-
if (e.filter(
|
|
2455
|
-
(o) => o.recipientType === "group" && !o.displayName
|
|
2456
|
-
).length === 0)
|
|
2457
|
-
return e;
|
|
2458
|
-
const r = await t(""), s = new Map(
|
|
2459
|
-
r.map((o) => [o.id, o.displayName])
|
|
2460
|
-
);
|
|
2461
|
-
return e.map(
|
|
2462
|
-
(o) => o.recipientType === "group" && !o.displayName ? {
|
|
2463
|
-
...o,
|
|
2464
|
-
displayName: s.get(o.recipientId) || o.displayName
|
|
2465
|
-
} : o
|
|
2466
|
-
);
|
|
2467
|
-
};
|
|
2468
|
-
var W = /* @__PURE__ */ ((e) => (e.USER = "User", e.GROUP = "Group", e.BROADCAST_GROUP = "BroadcastGroup", e.SHAREBOOKMARK = "ShareBookmark", e))(W || {});
|
|
2469
|
-
const Jo = () => ({
|
|
2470
|
-
async searchVisibles(e) {
|
|
2471
|
-
return (await _e.http().get(
|
|
2472
|
-
"/communication/visible/search",
|
|
2473
|
-
e !== void 0 ? { queryParams: { query: e, mode: "excludeFamily" } } : void 0
|
|
2474
|
-
)).filter(
|
|
2475
|
-
(n) => n.type !== "BroadcastGroup"
|
|
2476
|
-
/* BROADCAST_GROUP */
|
|
2477
|
-
);
|
|
2478
|
-
},
|
|
2479
|
-
fetchUsersByGroup(e) {
|
|
2480
|
-
return _e.http().get(`/communication/visible/group/${e}`);
|
|
2481
|
-
},
|
|
2482
|
-
fetchSharebookmark(e) {
|
|
2483
|
-
return _e.http().get(`/directory/sharebookmark/${e}`);
|
|
2484
|
-
}
|
|
2485
|
-
}), Mt = Jo(), he = {
|
|
2486
|
-
base: ["user"],
|
|
2487
|
-
/**
|
|
2488
|
-
* Get a filtered list of visible users. Filtering is done by the *backend*.
|
|
2489
|
-
* @param search The search string to filter the users
|
|
2490
|
-
* @returns The query options for the search visible users
|
|
2491
|
-
*/
|
|
2492
|
-
searchVisibles(e) {
|
|
2493
|
-
return Ot({
|
|
2494
|
-
queryKey: [
|
|
2495
|
-
...he.base,
|
|
2496
|
-
"search",
|
|
2497
|
-
e ? { search: e } : void 0
|
|
2498
|
-
],
|
|
2499
|
-
queryFn: () => Mt.searchVisibles(e),
|
|
2500
|
-
staleTime: 1 / 0
|
|
2501
|
-
// This data will never change during user's session.
|
|
2502
|
-
});
|
|
2503
|
-
},
|
|
2504
|
-
/**
|
|
2505
|
-
* Get users belonging to a specific group
|
|
2506
|
-
* @param groupId The ID of the group to fetch users from
|
|
2507
|
-
* @returns The query options for fetching users by group
|
|
2508
|
-
*/
|
|
2509
|
-
fetchUsersByGroup(e) {
|
|
2510
|
-
return Ot({
|
|
2511
|
-
queryKey: [...he.base, "group", e],
|
|
2512
|
-
queryFn: () => Mt.fetchUsersByGroup(e),
|
|
2513
|
-
staleTime: 5 * 60 * 1e3,
|
|
2514
|
-
// 5 minutes - group membership changes less frequently
|
|
2515
|
-
enabled: !!e
|
|
2516
|
-
});
|
|
2517
|
-
},
|
|
2518
|
-
fetchSharebookmark(e) {
|
|
2519
|
-
return Ot({
|
|
2520
|
-
queryKey: [
|
|
2521
|
-
...he.base,
|
|
2522
|
-
"sharebookmark",
|
|
2523
|
-
e
|
|
2524
|
-
],
|
|
2525
|
-
queryFn: () => Mt.fetchSharebookmark(e),
|
|
2526
|
-
staleTime: 5 * 60 * 1e3,
|
|
2527
|
-
// 5 minutes - share bookmarks change less frequently
|
|
2528
|
-
enabled: !!e
|
|
2529
|
-
});
|
|
2530
|
-
}
|
|
2531
|
-
};
|
|
2532
|
-
function ei(e, t, n) {
|
|
2533
|
-
if (e && (!n || n.length < 3))
|
|
2534
|
-
return { triggerSearch: !1 };
|
|
2535
|
-
const s = t === "all-at-once" ? n.substring(0, 3) : void 0, o = n.length > 3;
|
|
2536
|
-
function i() {
|
|
2537
|
-
const l = _e.idiom().removeAccents, c = l(n).toLowerCase();
|
|
2538
|
-
return o ? (a) => {
|
|
2539
|
-
let f = "", u = "";
|
|
2540
|
-
const m = a.displayName ?? void 0;
|
|
2541
|
-
if (m) {
|
|
2542
|
-
f = l(m).toLowerCase();
|
|
2543
|
-
const h = f.split(" ");
|
|
2544
|
-
u = h.length > 1 ? h[1] + " " + h[0] : f;
|
|
2545
|
-
}
|
|
2546
|
-
return f.indexOf(c) !== -1 || u.indexOf(c) !== -1;
|
|
2547
|
-
} : void 0;
|
|
2548
|
-
}
|
|
2549
|
-
return {
|
|
2550
|
-
triggerSearch: !0,
|
|
2551
|
-
backendFilter: s,
|
|
2552
|
-
frontendFilter: i()
|
|
2553
|
-
};
|
|
2554
|
-
}
|
|
2555
|
-
const pr = () => {
|
|
2556
|
-
const e = ee(), t = "all-at-once", { isAdmlcOrAdmc: n } = Cn();
|
|
2557
|
-
return { searchVisible: async (s) => {
|
|
2558
|
-
const { triggerSearch: o, backendFilter: i, frontendFilter: l } = ei(
|
|
2559
|
-
n,
|
|
2560
|
-
t,
|
|
2561
|
-
s
|
|
2562
|
-
);
|
|
2563
|
-
if (!o) return Promise.resolve([]);
|
|
2564
|
-
const c = await e.ensureQueryData(
|
|
2565
|
-
he.searchVisibles(i)
|
|
2566
|
-
);
|
|
2567
|
-
return l ? c.filter(l) : c;
|
|
2568
|
-
} };
|
|
2569
|
-
}, ti = Yt(
|
|
2570
|
-
(e) => ({
|
|
2571
|
-
usersCollection: [],
|
|
2572
|
-
usersToAdd: [],
|
|
2573
|
-
usersToDelete: [],
|
|
2574
|
-
setUsersCollection: (t) => e({ usersCollection: t }),
|
|
2575
|
-
addUsersToAdd: (t) => e((n) => {
|
|
2576
|
-
const r = new Set(t.map((s) => s.recipientId));
|
|
2577
|
-
return {
|
|
2578
|
-
usersToAdd: [
|
|
2579
|
-
...n.usersToAdd.filter((s) => !r.has(s.recipientId)),
|
|
2580
|
-
...t
|
|
2581
|
-
],
|
|
2582
|
-
usersToDelete: n.usersToDelete.filter(
|
|
2583
|
-
(s) => !r.has(s.recipientId)
|
|
2584
|
-
)
|
|
2585
|
-
};
|
|
2586
|
-
}),
|
|
2587
|
-
addUsersToDelete: (t) => e((n) => {
|
|
2588
|
-
const r = new Set(t.map((s) => s.recipientId));
|
|
2589
|
-
return {
|
|
2590
|
-
usersToDelete: [
|
|
2591
|
-
...n.usersToDelete.filter(
|
|
2592
|
-
(s) => !r.has(s.recipientId)
|
|
2593
|
-
),
|
|
2594
|
-
...t
|
|
2595
|
-
],
|
|
2596
|
-
usersToAdd: n.usersToAdd.filter(
|
|
2597
|
-
(s) => !r.has(s.recipientId)
|
|
2598
|
-
)
|
|
2599
|
-
};
|
|
2600
|
-
}),
|
|
2601
|
-
resetUsersDiff: () => e({ usersToAdd: [], usersToDelete: [] })
|
|
2602
|
-
})
|
|
2603
|
-
), ue = Jt(
|
|
2604
|
-
ti
|
|
2605
|
-
), ni = {
|
|
2606
|
-
searchInputValue: "",
|
|
2607
|
-
searchResults: [],
|
|
2608
|
-
searchAPIResults: [],
|
|
2609
|
-
isSearching: !1,
|
|
2610
|
-
isAddingMembers: !1
|
|
2611
|
-
};
|
|
2612
|
-
function ri(e, t) {
|
|
2613
|
-
switch (t.type) {
|
|
2614
|
-
case "onChange":
|
|
2615
|
-
return { ...e, searchInputValue: t.payload };
|
|
2616
|
-
case "isSearching":
|
|
2617
|
-
return { ...e, isSearching: t.payload };
|
|
2618
|
-
case "isAddingMembers":
|
|
2619
|
-
return { ...e, isAddingMembers: t.payload };
|
|
2620
|
-
case "addResult":
|
|
2621
|
-
return { ...e, searchResults: t.payload };
|
|
2622
|
-
case "addApiResult":
|
|
2623
|
-
return { ...e, searchAPIResults: t.payload };
|
|
2624
|
-
case "emptyResult":
|
|
2625
|
-
return { ...e, searchResults: t.payload };
|
|
2626
|
-
default:
|
|
2627
|
-
throw new Error("Unhandled action type");
|
|
2628
|
-
}
|
|
2629
|
-
}
|
|
2630
|
-
const si = () => {
|
|
2631
|
-
var S, D;
|
|
2632
|
-
const [e, t] = es(ri, ni), { usersCollection: n } = ue(), r = In(), s = xr(
|
|
2633
|
-
e.searchInputValue,
|
|
2634
|
-
500
|
|
2635
|
-
), { searchVisible: o } = pr(), { isAdmlcOrAdmc: i } = Cn(), l = ee(), c = (b) => {
|
|
2636
|
-
switch (b.type) {
|
|
2637
|
-
case W.USER:
|
|
2638
|
-
return null;
|
|
2639
|
-
case W.GROUP:
|
|
2640
|
-
case W.BROADCAST_GROUP:
|
|
2641
|
-
return /* @__PURE__ */ d(Kr, {});
|
|
2642
|
-
case W.SHAREBOOKMARK:
|
|
2643
|
-
return /* @__PURE__ */ d(Gr, {});
|
|
2644
|
-
default:
|
|
2645
|
-
return null;
|
|
2646
|
-
}
|
|
2647
|
-
};
|
|
2648
|
-
j(() => {
|
|
2649
|
-
M(s);
|
|
2650
|
-
}, [s]);
|
|
2651
|
-
const a = (b) => b.filter(
|
|
2652
|
-
(x) => {
|
|
2653
|
-
var I;
|
|
2654
|
-
return !n.some((T) => T.recipientId === x.id) && x.id !== ((I = r == null ? void 0 : r.user) == null ? void 0 : I.userId);
|
|
2655
|
-
}
|
|
2656
|
-
), f = (b) => b.map((x) => ({
|
|
2657
|
-
value: x.id,
|
|
2658
|
-
label: x.displayName,
|
|
2659
|
-
icon: c(x)
|
|
2660
|
-
})), u = (b) => f(a(b)), m = (b, x) => ({
|
|
2661
|
-
displayName: b.displayName,
|
|
2662
|
-
permission: ["contrib"],
|
|
2663
|
-
recipientId: b.id,
|
|
2664
|
-
recipientType: x
|
|
2665
|
-
}), h = (b) => b.map((x) => ({
|
|
2666
|
-
id: x.id,
|
|
2667
|
-
displayName: x.name
|
|
2668
|
-
})), p = (b, x) => ({
|
|
2669
|
-
name: b.name,
|
|
2670
|
-
id: b.id,
|
|
2671
|
-
groups: h(b.groups),
|
|
2672
|
-
users: x
|
|
2673
|
-
});
|
|
2674
|
-
j(() => {
|
|
2675
|
-
t({
|
|
2676
|
-
type: "addResult",
|
|
2677
|
-
payload: u(e.searchAPIResults)
|
|
2678
|
-
});
|
|
2679
|
-
}, [e.searchAPIResults, n, (S = r == null ? void 0 : r.user) == null ? void 0 : S.userId]);
|
|
2680
|
-
const v = (b) => {
|
|
2681
|
-
t({
|
|
2682
|
-
type: "addApiResult",
|
|
2683
|
-
payload: b
|
|
2684
|
-
}), t({
|
|
2685
|
-
type: "addResult",
|
|
2686
|
-
payload: u(b)
|
|
2687
|
-
});
|
|
2688
|
-
}, O = async (b) => {
|
|
2689
|
-
var T, k;
|
|
2690
|
-
t({ type: "isAddingMembers", payload: !0 });
|
|
2691
|
-
const x = b[0];
|
|
2692
|
-
if (!x)
|
|
2693
|
-
return t({ type: "isAddingMembers", payload: !1 }), [];
|
|
2694
|
-
const I = e.searchAPIResults.find(
|
|
2695
|
-
(P) => P.id === x
|
|
2696
|
-
);
|
|
2697
|
-
if (!I)
|
|
2698
|
-
return t({ type: "isAddingMembers", payload: !1 }), [];
|
|
2699
|
-
try {
|
|
2700
|
-
if (I.type === W.USER)
|
|
2701
|
-
return [m(I, "user")];
|
|
2702
|
-
if (I.type === W.GROUP || I.type === W.BROADCAST_GROUP)
|
|
2703
|
-
return [m(I, "group")];
|
|
2704
|
-
if (I.type === W.SHAREBOOKMARK) {
|
|
2705
|
-
const P = await l.fetchQuery(
|
|
2706
|
-
he.fetchSharebookmark(I.id)
|
|
2707
|
-
);
|
|
2708
|
-
let z = [];
|
|
2709
|
-
if (((T = P == null ? void 0 : P.users) == null ? void 0 : T.length) > 0 && (z = [
|
|
2710
|
-
p(P, P.users)
|
|
2711
|
-
]), ((k = P == null ? void 0 : P.groups) == null ? void 0 : k.length) > 0) {
|
|
2712
|
-
const wr = P.groups.map(
|
|
2713
|
-
(Ct) => l.fetchQuery(
|
|
2714
|
-
he.fetchUsersByGroup(Ct.id)
|
|
2715
|
-
)
|
|
2716
|
-
), Cr = await Promise.all(
|
|
2717
|
-
wr
|
|
2718
|
-
);
|
|
2719
|
-
z = [
|
|
2720
|
-
p(
|
|
2721
|
-
P,
|
|
2722
|
-
Cr.flatMap(
|
|
2723
|
-
(Ct) => Ct.map((en) => ({
|
|
2724
|
-
id: en.id,
|
|
2725
|
-
displayName: en.displayName
|
|
2726
|
-
}))
|
|
2727
|
-
)
|
|
2728
|
-
)
|
|
2729
|
-
];
|
|
2730
|
-
}
|
|
2731
|
-
return z;
|
|
2732
|
-
}
|
|
2733
|
-
return [];
|
|
2734
|
-
} finally {
|
|
2735
|
-
t({ type: "isAddingMembers", payload: !1 });
|
|
2736
|
-
}
|
|
2737
|
-
}, _ = (b) => {
|
|
2738
|
-
const x = b.target.value;
|
|
2739
|
-
t({
|
|
2740
|
-
type: "onChange",
|
|
2741
|
-
payload: x
|
|
2742
|
-
}), t({
|
|
2743
|
-
type: "addResult",
|
|
2744
|
-
payload: u(e.searchAPIResults)
|
|
2745
|
-
});
|
|
2746
|
-
}, C = i ? 3 : 1, M = async (b, x = !1) => {
|
|
2747
|
-
if (t({
|
|
2748
|
-
type: "isSearching",
|
|
2749
|
-
payload: !0
|
|
2750
|
-
}), b.length >= C || x) {
|
|
2751
|
-
const T = b.length >= C || x && b.length > 0 ? await o(b) : [];
|
|
2752
|
-
v(T);
|
|
2753
|
-
} else
|
|
2754
|
-
t({
|
|
2755
|
-
type: "emptyResult",
|
|
2756
|
-
payload: []
|
|
2757
|
-
});
|
|
2758
|
-
t({
|
|
2759
|
-
type: "isSearching",
|
|
2760
|
-
payload: !1
|
|
2761
|
-
});
|
|
2762
|
-
}, V = !e.isSearching && s.length >= C && ((D = e.searchResults) == null ? void 0 : D.length) === 0;
|
|
2763
|
-
return {
|
|
2764
|
-
state: e,
|
|
2765
|
-
searchMinLength: C,
|
|
2766
|
-
isSearchLoading: e.isSearching,
|
|
2767
|
-
isAddingMembers: e.isAddingMembers,
|
|
2768
|
-
hasSearchNoResults: V,
|
|
2769
|
-
handleSearchInputChange: _,
|
|
2770
|
-
handleSearchSubmit: O
|
|
2771
|
-
};
|
|
2772
|
-
}, oi = ({
|
|
2773
|
-
handleSearchSubmit: e,
|
|
2774
|
-
initialSharings: t,
|
|
2775
|
-
onSharingsChange: n
|
|
2776
|
-
}) => {
|
|
2777
|
-
const r = ue.use.usersCollection(), s = ue.use.setUsersCollection(), o = ue.use.addUsersToAdd(), i = ue.use.addUsersToDelete(), l = ue.use.resetUsersDiff(), c = ne(null), a = (h) => {
|
|
2778
|
-
if (h.length === 0) return;
|
|
2779
|
-
const p = [...r, ...h].filter(
|
|
2780
|
-
(v, O, _) => _.findIndex((C) => C.recipientId === v.recipientId) === O
|
|
2781
|
-
);
|
|
2782
|
-
s(p), o(h), n == null || n(p);
|
|
2783
|
-
}, f = (h) => {
|
|
2784
|
-
if (h.length === 0) return;
|
|
2785
|
-
const p = new Set(h.map((O) => O.recipientId)), v = r.filter(
|
|
2786
|
-
(O) => !p.has(O.recipientId)
|
|
2787
|
-
);
|
|
2788
|
-
s(v), i(h), n == null || n(v);
|
|
2789
|
-
}, u = (h) => {
|
|
2790
|
-
h.length !== 0 && (s(h), n == null || n(h));
|
|
2791
|
-
}, m = async (h) => {
|
|
2792
|
-
(await e(h)).forEach((v) => {
|
|
2793
|
-
var O;
|
|
2794
|
-
(O = c.current) == null || O.addItem(v);
|
|
2795
|
-
});
|
|
2796
|
-
};
|
|
2797
|
-
return j(() => {
|
|
2798
|
-
s(t ?? []);
|
|
2799
|
-
}, [t, s]), j(() => () => {
|
|
2800
|
-
l();
|
|
2801
|
-
}, [l]), {
|
|
2802
|
-
handleAddItems: a,
|
|
2803
|
-
handleDeleteItems: f,
|
|
2804
|
-
handleUpdateItems: u,
|
|
2805
|
-
handleSearchResultsChange: m,
|
|
2806
|
-
setUsersCollection: s,
|
|
2807
|
-
addUsersToAdd: o,
|
|
2808
|
-
addUsersToDelete: i,
|
|
2809
|
-
userRightsListRef: c
|
|
2810
|
-
};
|
|
2811
|
-
};
|
|
2812
|
-
function ii({
|
|
2813
|
-
wizardData: e,
|
|
2814
|
-
updateWizardData: t,
|
|
2815
|
-
collection: n,
|
|
2816
|
-
onSharingsChange: r
|
|
2817
|
-
}) {
|
|
2818
|
-
var k;
|
|
2819
|
-
const { appCode: s } = xe(), { t: o } = Pe(s), { currentStep: i } = Zt(), l = i < 0 ? 0 : i, c = In(), { searchVisible: a } = pr(), [f, u] = yt([]), m = Xt(() => {
|
|
2820
|
-
var P, z;
|
|
2821
|
-
return (P = e == null ? void 0 : e.sharings) != null && P.length ? e.sharings : (z = n == null ? void 0 : n.sharings) != null && z.length ? n.sharings.map(Yo) : [];
|
|
2822
|
-
}, [n == null ? void 0 : n.sharings, e == null ? void 0 : e.sharings]);
|
|
2823
|
-
j(() => {
|
|
2824
|
-
(async () => {
|
|
2825
|
-
const z = await Zo(
|
|
2826
|
-
m,
|
|
2827
|
-
a
|
|
2828
|
-
);
|
|
2829
|
-
u(z);
|
|
2830
|
-
})();
|
|
2831
|
-
}, []);
|
|
2832
|
-
const {
|
|
2833
|
-
state: { searchResults: h, searchInputValue: p },
|
|
2834
|
-
isSearchLoading: v,
|
|
2835
|
-
isAddingMembers: O,
|
|
2836
|
-
hasSearchNoResults: _,
|
|
2837
|
-
searchMinLength: C,
|
|
2838
|
-
handleSearchInputChange: M,
|
|
2839
|
-
handleSearchSubmit: V
|
|
2840
|
-
} = si(), {
|
|
2841
|
-
handleAddItems: S,
|
|
2842
|
-
handleDeleteItems: D,
|
|
2843
|
-
handleUpdateItems: b,
|
|
2844
|
-
handleSearchResultsChange: x,
|
|
2845
|
-
userRightsListRef: I
|
|
2846
|
-
} = oi({
|
|
2847
|
-
handleSearchSubmit: V,
|
|
2848
|
-
initialSharings: f,
|
|
2849
|
-
onSharingsChange: (P) => {
|
|
2850
|
-
t == null || t({ sharings: P }), r == null || r(P);
|
|
2851
|
-
}
|
|
2852
|
-
}), T = O ? [
|
|
2853
|
-
{
|
|
2854
|
-
value: "loading",
|
|
2855
|
-
label: o("community.search.addingMembers"),
|
|
2856
|
-
disabled: !0
|
|
2857
|
-
}
|
|
2858
|
-
] : h ?? [];
|
|
2859
|
-
return /* @__PURE__ */ U(K, { className: "m-16 gap-24", children: [
|
|
2860
|
-
/* @__PURE__ */ U(K.Col, { sm: "4", md: "8", lg: "3", xl: "5", children: [
|
|
2861
|
-
/* @__PURE__ */ U(lt, { gap: "16", direction: "column", children: [
|
|
2862
|
-
/* @__PURE__ */ d(wn, { currentStep: l, nbSteps: 2 }),
|
|
2863
|
-
/* @__PURE__ */ d(hr, { title: o("collection.wizard.members.title") })
|
|
2864
|
-
] }),
|
|
2865
|
-
/* @__PURE__ */ d(
|
|
2866
|
-
Pr,
|
|
2867
|
-
{
|
|
2868
|
-
"data-testid": "collect-create-add-user-input-search",
|
|
2869
|
-
value: p,
|
|
2870
|
-
placeholder: o("collection.user.search.placeholder"),
|
|
2871
|
-
isLoading: v,
|
|
2872
|
-
noResult: _,
|
|
2873
|
-
options: T,
|
|
2874
|
-
searchMinLength: C,
|
|
2875
|
-
onSearchInputChange: M,
|
|
2876
|
-
onSearchResultsChange: x
|
|
2877
|
-
}
|
|
2878
|
-
),
|
|
2879
|
-
/* @__PURE__ */ d(kr, { type: "info", className: "mt-24", children: /* @__PURE__ */ d(
|
|
2880
|
-
Wr,
|
|
2881
|
-
{
|
|
2882
|
-
t: o,
|
|
2883
|
-
i18nKey: "collection.wizard.members.alert.message",
|
|
2884
|
-
components: {
|
|
2885
|
-
strong: /* @__PURE__ */ d("strong", {})
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2888
|
-
) })
|
|
2889
|
-
] }),
|
|
2890
|
-
/* @__PURE__ */ d(K.Col, { sm: "4", md: "8", lg: "5", xl: "7", children: /* @__PURE__ */ d(
|
|
2891
|
-
Mr,
|
|
2892
|
-
{
|
|
2893
|
-
"data-testid": "collect-create-add-user-table",
|
|
2894
|
-
ref: I,
|
|
2895
|
-
initialSharings: f,
|
|
2896
|
-
isCreating: !!e,
|
|
2897
|
-
isLoading: !1,
|
|
2898
|
-
isReadOnly: !1,
|
|
2899
|
-
onAddItems: S,
|
|
2900
|
-
onChange: b,
|
|
2901
|
-
onDeleteItems: D,
|
|
2902
|
-
ownerId: ((k = c.user) == null ? void 0 : k.userId) ?? "",
|
|
2903
|
-
resourceRights: {
|
|
2904
|
-
contrib: {
|
|
2905
|
-
default: !0,
|
|
2906
|
-
excludes: [],
|
|
2907
|
-
priority: 2,
|
|
2908
|
-
requires: ["contrib"],
|
|
2909
|
-
displayName: o("collection.members.right.displayName.recipient"),
|
|
2910
|
-
isReadOnlyCheckbox: !0
|
|
2911
|
-
},
|
|
2912
|
-
manager: {
|
|
2913
|
-
default: !1,
|
|
2914
|
-
excludes: [],
|
|
2915
|
-
priority: 4,
|
|
2916
|
-
requires: ["contrib", "manager"],
|
|
2917
|
-
displayName: o("collection.members.right.displayName.manager")
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2920
|
-
},
|
|
2921
|
-
`sharing-${f.length}`
|
|
2922
|
-
) })
|
|
2923
|
-
] });
|
|
2924
|
-
}
|
|
2925
|
-
const gr = pt(null), li = () => {
|
|
2926
|
-
const e = gt(gr);
|
|
2927
|
-
if (!e)
|
|
2928
|
-
throw new Error("Cannot be rendered outside the Wizard Layout");
|
|
2929
|
-
return e;
|
|
2930
|
-
}, ci = "/collect/api", te = new Ar({
|
|
2931
|
-
httpService: _e.http(),
|
|
2932
|
-
baseUrl: ci
|
|
2933
|
-
}), ce = {
|
|
2934
|
-
getCollections: (e) => te.getCollections(e),
|
|
2935
|
-
getCollectionsToSubmit: (e) => te.getCollectionsToSubmit(e),
|
|
2936
|
-
getCollection: (e) => te.getCollection(e),
|
|
2937
|
-
createCollection: (e) => te.createCollection(e),
|
|
2938
|
-
updateCollection: (e, t) => te.updateCollection(e, t),
|
|
2939
|
-
deleteCollection: (e) => te.deleteCollection(e),
|
|
2940
|
-
updateSharingCollection: (e, t) => te.updateCollectionSharings(e, t)
|
|
2941
|
-
}, yr = {
|
|
2942
|
-
base: ["collections"]
|
|
2943
|
-
}, ai = (e) => ({
|
|
2944
|
-
queryKey: [...yr.base, "collections", e],
|
|
2945
|
-
queryFn: ({ pageParam: t = 1 }) => ce.getCollections({
|
|
2946
|
-
...e,
|
|
2947
|
-
size: Ko,
|
|
2948
|
-
page: t
|
|
2949
|
-
}),
|
|
2950
|
-
staleTime: 5e3,
|
|
2951
|
-
initialPageParam: 1,
|
|
2952
|
-
refetchOnMount: !0,
|
|
2953
|
-
getNextPageParam: (t) => {
|
|
2954
|
-
const { currentPage: n, totalPages: r } = t.meta || {};
|
|
2955
|
-
return n < r ? n + 1 : void 0;
|
|
2956
|
-
}
|
|
2957
|
-
}), ml = (e) => Nn(ai(e)), ui = (e) => ({
|
|
2958
|
-
queryKey: [...yr.base, "collectionsToSubmit", e],
|
|
2959
|
-
queryFn: ({ pageParam: t = 1 }) => ce.getCollectionsToSubmit({ ...e, page: t }),
|
|
2960
|
-
staleTime: 5e3,
|
|
2961
|
-
initialPageParam: 1,
|
|
2962
|
-
refetchOnMount: !0,
|
|
2963
|
-
getNextPageParam: (t) => {
|
|
2964
|
-
const { currentPage: n, totalPages: r } = t.meta || {};
|
|
2965
|
-
return n < r ? n + 1 : void 0;
|
|
2966
|
-
}
|
|
2967
|
-
}), pl = (e) => Nn(ui(e)), fi = (e) => ({
|
|
2968
|
-
queryKey: ["collection", e],
|
|
2969
|
-
queryFn: () => ce.getCollection(e)
|
|
2970
|
-
}), gl = (e) => os({
|
|
2971
|
-
...fi(e),
|
|
2972
|
-
enabled: !!e
|
|
2973
|
-
}), di = () => {
|
|
2974
|
-
const e = ee();
|
|
2975
|
-
return vt({
|
|
2976
|
-
mutationFn: (t) => ce.createCollection(t),
|
|
2977
|
-
onSuccess: () => {
|
|
2978
|
-
e.invalidateQueries({ queryKey: ["collections"] });
|
|
2979
|
-
}
|
|
2980
|
-
});
|
|
2981
|
-
}, yl = () => {
|
|
2982
|
-
const e = ee();
|
|
2983
|
-
return vt({
|
|
2984
|
-
mutationFn: ({ id: t, data: n }) => ce.updateCollection(t, n),
|
|
2985
|
-
onSuccess: (t, n) => {
|
|
2986
|
-
e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
|
|
2987
|
-
}
|
|
2988
|
-
});
|
|
2989
|
-
}, vl = () => {
|
|
2990
|
-
const e = ee();
|
|
2991
|
-
return vt({
|
|
2992
|
-
mutationFn: (t) => ce.deleteCollection(t),
|
|
2993
|
-
onSuccess: () => {
|
|
2994
|
-
e.invalidateQueries({ queryKey: ["collections"] });
|
|
2995
|
-
}
|
|
2996
|
-
});
|
|
2997
|
-
}, bl = () => {
|
|
2998
|
-
const e = ee();
|
|
2999
|
-
return vt({
|
|
3000
|
-
mutationFn: ({
|
|
3001
|
-
id: t,
|
|
3002
|
-
data: n
|
|
3003
|
-
}) => ce.updateSharingCollection(t, n),
|
|
3004
|
-
onSuccess: (t, n) => {
|
|
3005
|
-
e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
|
|
3006
|
-
}
|
|
3007
|
-
});
|
|
3008
|
-
}, yn = ({
|
|
3009
|
-
children: e
|
|
3010
|
-
}) => {
|
|
3011
|
-
const t = ne(null), { appCode: n } = xe(), { t: r } = Pe(n), s = Lr(), { currentStep: o, backStep: i, nextStep: l } = Zt(), { lg: c } = _r(), { wizardData: a, resetWizardData: f } = li(), u = di(), m = dr.use.isFormValid(), h = ke(), [p, v] = yt(!1);
|
|
3012
|
-
ts(() => {
|
|
3013
|
-
var C;
|
|
3014
|
-
(C = t.current) == null || C.scrollIntoView({
|
|
3015
|
-
behavior: "smooth",
|
|
3016
|
-
block: "center"
|
|
3017
|
-
});
|
|
3018
|
-
}, [o]);
|
|
3019
|
-
const O = () => {
|
|
3020
|
-
f == null || f(), h("/");
|
|
3021
|
-
}, _ = async () => {
|
|
3022
|
-
try {
|
|
3023
|
-
v(!0);
|
|
3024
|
-
const C = await u.mutateAsync({
|
|
3025
|
-
name: a.title,
|
|
3026
|
-
content: a.description,
|
|
3027
|
-
deadline: a.deadline ?? /* @__PURE__ */ new Date(),
|
|
3028
|
-
// FIXME: faire une vraie traduction dans le format attendu par le backend avant envoi
|
|
3029
|
-
attachments: a.attachments.map((M) => ({
|
|
3030
|
-
name: M.name,
|
|
3031
|
-
type: Or.ATTACHMENT,
|
|
3032
|
-
uri: M.filename,
|
|
3033
|
-
mimeType: M.contentType
|
|
3034
|
-
})),
|
|
3035
|
-
sharings: a.sharings.map(mr)
|
|
3036
|
-
});
|
|
3037
|
-
s.success(r("collection.toast.success.collection.create"), {
|
|
3038
|
-
duration: 1e4,
|
|
3039
|
-
isDismissible: !0
|
|
3040
|
-
}), h(`/list-collections/id/${C.id}`), f();
|
|
3041
|
-
} catch (C) {
|
|
3042
|
-
s.error(r("collection.toast.error.collection.create"), {
|
|
3043
|
-
duration: 1e4,
|
|
3044
|
-
isDismissible: !0
|
|
3045
|
-
}), console.log(C);
|
|
3046
|
-
} finally {
|
|
3047
|
-
v(!1);
|
|
3048
|
-
}
|
|
3049
|
-
};
|
|
3050
|
-
return /* @__PURE__ */ U("div", { className: "w-100", children: [
|
|
3051
|
-
/* @__PURE__ */ d(K, { className: "flex-grow-1 gap-64 px-md-8 px-lg-48 position-relative", children: /* @__PURE__ */ d(K.Col, { sm: "4", md: "8", xl: "12", className: `${c && "ms-64"}`, children: /* @__PURE__ */ d(
|
|
3052
|
-
lt,
|
|
3053
|
-
{
|
|
3054
|
-
ref: t,
|
|
3055
|
-
direction: "column",
|
|
3056
|
-
gap: "16",
|
|
3057
|
-
className: "h-100 py-24 pb-lg-48 pt-lg-32",
|
|
3058
|
-
children: e
|
|
3059
|
-
}
|
|
3060
|
-
) }) }),
|
|
3061
|
-
o === 1 ? /* @__PURE__ */ U(lt, { justify: "end", className: "mt-auto px-48 pb-64 gap-16", children: [
|
|
3062
|
-
/* @__PURE__ */ d(
|
|
3063
|
-
Z,
|
|
3064
|
-
{
|
|
3065
|
-
"data-testid": "collect-add-attachments-button-previous",
|
|
3066
|
-
variant: "ghost",
|
|
3067
|
-
color: "tertiary",
|
|
3068
|
-
leftIcon: /* @__PURE__ */ d(jr, {}),
|
|
3069
|
-
onClick: i,
|
|
3070
|
-
children: r("collection.previous")
|
|
3071
|
-
}
|
|
3072
|
-
),
|
|
3073
|
-
/* @__PURE__ */ d(
|
|
3074
|
-
Z,
|
|
3075
|
-
{
|
|
3076
|
-
"data-testid": "collect-add-attachments-button-create-ignore-share",
|
|
3077
|
-
variant: "outline",
|
|
3078
|
-
color: "primary",
|
|
3079
|
-
isLoading: p,
|
|
3080
|
-
loadingPosition: "right",
|
|
3081
|
-
onClick: () => _(),
|
|
3082
|
-
children: r("collection.wizard.button.create.ignore.share")
|
|
3083
|
-
}
|
|
3084
|
-
),
|
|
3085
|
-
/* @__PURE__ */ d(
|
|
3086
|
-
Z,
|
|
3087
|
-
{
|
|
3088
|
-
"data-testid": "collect-add-attachments-button-create-collect",
|
|
3089
|
-
variant: "filled",
|
|
3090
|
-
color: "primary",
|
|
3091
|
-
isLoading: p,
|
|
3092
|
-
loadingPosition: "right",
|
|
3093
|
-
rightIcon: /* @__PURE__ */ d(rn, {}),
|
|
3094
|
-
onClick: () => _(),
|
|
3095
|
-
children: r("collection.wizard.button.create.collect")
|
|
3096
|
-
}
|
|
3097
|
-
)
|
|
3098
|
-
] }) : /* @__PURE__ */ U(lt, { justify: "end", className: "mt-auto pb-64 gap-16", children: [
|
|
3099
|
-
/* @__PURE__ */ d(
|
|
3100
|
-
Z,
|
|
3101
|
-
{
|
|
3102
|
-
"data-testid": "collect-add-attachments-button-cancel",
|
|
3103
|
-
variant: "ghost",
|
|
3104
|
-
color: "tertiary",
|
|
3105
|
-
onClick: O,
|
|
3106
|
-
children: r("collection.cancel")
|
|
3107
|
-
}
|
|
3108
|
-
),
|
|
3109
|
-
/* @__PURE__ */ d(
|
|
3110
|
-
Z,
|
|
3111
|
-
{
|
|
3112
|
-
"data-testid": "collect-add-attachments-button-next",
|
|
3113
|
-
variant: "filled",
|
|
3114
|
-
color: "primary",
|
|
3115
|
-
rightIcon: /* @__PURE__ */ d(rn, {}),
|
|
3116
|
-
onClick: l,
|
|
3117
|
-
type: "submit",
|
|
3118
|
-
form: "formCreateCollection",
|
|
3119
|
-
disabled: !m,
|
|
3120
|
-
children: r("collection.next")
|
|
3121
|
-
}
|
|
3122
|
-
)
|
|
3123
|
-
] })
|
|
3124
|
-
] });
|
|
3125
|
-
};
|
|
3126
|
-
function hi() {
|
|
3127
|
-
const { wizardData: e, updateWizardData: t, resetWizardData: n } = jo(), r = Xt(
|
|
3128
|
-
() => ({
|
|
3129
|
-
wizardData: e,
|
|
3130
|
-
updateWizardData: t,
|
|
3131
|
-
resetWizardData: n
|
|
3132
|
-
}),
|
|
3133
|
-
[e, t, n]
|
|
3134
|
-
);
|
|
3135
|
-
return /* @__PURE__ */ d(gr.Provider, { value: r, children: /* @__PURE__ */ U(Yr, { children: [
|
|
3136
|
-
/* @__PURE__ */ d(
|
|
3137
|
-
sn,
|
|
3138
|
-
{
|
|
3139
|
-
path: de[0],
|
|
3140
|
-
element: /* @__PURE__ */ d(yn, { children: /* @__PURE__ */ d(
|
|
3141
|
-
Ho,
|
|
3142
|
-
{
|
|
3143
|
-
wizardData: e,
|
|
3144
|
-
updateWizardData: t
|
|
3145
|
-
}
|
|
3146
|
-
) })
|
|
3147
|
-
}
|
|
3148
|
-
),
|
|
3149
|
-
/* @__PURE__ */ d(
|
|
3150
|
-
sn,
|
|
3151
|
-
{
|
|
3152
|
-
path: de[1],
|
|
3153
|
-
element: /* @__PURE__ */ d(yn, { children: /* @__PURE__ */ d(
|
|
3154
|
-
ii,
|
|
3155
|
-
{
|
|
3156
|
-
wizardData: e,
|
|
3157
|
-
updateWizardData: t
|
|
3158
|
-
}
|
|
3159
|
-
) })
|
|
3160
|
-
}
|
|
3161
|
-
)
|
|
3162
|
-
] }) });
|
|
3163
|
-
}
|
|
3164
|
-
function mi() {
|
|
3165
|
-
return /* @__PURE__ */ d(hi, {});
|
|
3166
|
-
}
|
|
3167
|
-
const vr = (e, t) => {
|
|
3168
|
-
const { header: n = !0 } = t ?? {}, r = async () => ({ header: n });
|
|
3169
|
-
return [
|
|
3170
|
-
{
|
|
3171
|
-
path: "/",
|
|
3172
|
-
loader: r,
|
|
3173
|
-
async lazy() {
|
|
3174
|
-
const { loader: s, Root: o } = await import("./Root-4Xv-j-fs.js");
|
|
3175
|
-
return {
|
|
3176
|
-
loader: async () => {
|
|
3177
|
-
const i = await r(), l = await s() ?? {};
|
|
3178
|
-
return { ...i, ...l };
|
|
3179
|
-
},
|
|
3180
|
-
Component: o
|
|
3181
|
-
};
|
|
3182
|
-
},
|
|
3183
|
-
children: [
|
|
3184
|
-
{
|
|
3185
|
-
async lazy() {
|
|
3186
|
-
const { loader: s, Component: o } = await import("./CollectionsLayout-BWau0fFT.js");
|
|
3187
|
-
return { loader: s, Component: o };
|
|
3188
|
-
},
|
|
3189
|
-
children: [
|
|
3190
|
-
{
|
|
3191
|
-
index: !0,
|
|
3192
|
-
async lazy() {
|
|
3193
|
-
const { loader: s, CollectionsList: o } = await import("./CollectionsList-DoYvRzYy.js");
|
|
3194
|
-
return {
|
|
3195
|
-
loader: () => s(e),
|
|
3196
|
-
Component: o
|
|
3197
|
-
};
|
|
3198
|
-
}
|
|
3199
|
-
},
|
|
3200
|
-
{
|
|
3201
|
-
path: "list-collections",
|
|
3202
|
-
async lazy() {
|
|
3203
|
-
const { loader: s, CollectionsList: o } = await import("./CollectionsList-DoYvRzYy.js");
|
|
3204
|
-
return {
|
|
3205
|
-
loader: () => s(e),
|
|
3206
|
-
Component: o
|
|
3207
|
-
};
|
|
3208
|
-
}
|
|
3209
|
-
},
|
|
3210
|
-
{
|
|
3211
|
-
path: "list-submissions",
|
|
3212
|
-
async lazy() {
|
|
3213
|
-
const { loader: s, SubmissionsList: o } = await import("./SubmissionList-BUexy8AF.js");
|
|
3214
|
-
return {
|
|
3215
|
-
loader: () => s(e),
|
|
3216
|
-
Component: o
|
|
3217
|
-
};
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
]
|
|
3221
|
-
},
|
|
3222
|
-
{
|
|
3223
|
-
path: "create/*",
|
|
3224
|
-
element: /* @__PURE__ */ d(mi, {})
|
|
3225
|
-
},
|
|
3226
|
-
{
|
|
3227
|
-
path: "list-collections/id/:collectionId",
|
|
3228
|
-
async lazy() {
|
|
3229
|
-
const { loader: s, Collection: o } = await import("./Collection-BcJujQH9.js");
|
|
3230
|
-
return { loader: () => s(e), Component: o };
|
|
3231
|
-
}
|
|
3232
|
-
},
|
|
3233
|
-
{
|
|
3234
|
-
path: "list-collections/id/:collectionId/submission/:submissionId",
|
|
3235
|
-
async lazy() {
|
|
3236
|
-
const { loader: s, Submission: o } = await import("./Submission-Bi1puhNG.js");
|
|
3237
|
-
return { loader: () => s(e), Component: o };
|
|
3238
|
-
}
|
|
3239
|
-
},
|
|
3240
|
-
{
|
|
3241
|
-
path: "id/:collectionId/members",
|
|
3242
|
-
async lazy() {
|
|
3243
|
-
const { loader: s, MembersEdit: o } = await import("./MembersEdit--SFUJ5dS.js");
|
|
3244
|
-
return {
|
|
3245
|
-
loader: () => s(e),
|
|
3246
|
-
Component: o
|
|
3247
|
-
};
|
|
3248
|
-
}
|
|
3249
|
-
},
|
|
3250
|
-
{
|
|
3251
|
-
path: "id/:collectionId/form",
|
|
3252
|
-
async lazy() {
|
|
3253
|
-
const { loader: s, FormEdit: o } = await import("./FormEdit-DrlhrKl6.js");
|
|
3254
|
-
return { loader: () => s(e), Component: o };
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
],
|
|
3258
|
-
errorElement: /* @__PURE__ */ d(Do, {})
|
|
3259
|
-
},
|
|
3260
|
-
{ path: "*", element: /* @__PURE__ */ d(Go, {}) }
|
|
3261
|
-
];
|
|
3262
|
-
}, pi = "./", Sl = (e, t) => zr(vr(e, t), {
|
|
3263
|
-
basename: pi
|
|
3264
|
-
}), br = pt({
|
|
3265
|
-
header: !0,
|
|
3266
|
-
showMenu: !0
|
|
3267
|
-
});
|
|
3268
|
-
function gi({
|
|
3269
|
-
header: e = !0,
|
|
3270
|
-
showMenu: t = !0,
|
|
3271
|
-
children: n
|
|
3272
|
-
}) {
|
|
3273
|
-
return /* @__PURE__ */ d(br.Provider, { value: { header: e, showMenu: t }, children: n });
|
|
3274
|
-
}
|
|
3275
|
-
const wl = () => gt(br), yi = "collect:route-change", Cl = ({
|
|
3276
|
-
header: e,
|
|
3277
|
-
showMenu: t,
|
|
3278
|
-
currentPath: n,
|
|
3279
|
-
className: r
|
|
3280
|
-
}) => {
|
|
3281
|
-
const s = ne(null), o = ne(null), i = ne(null), l = ne(process.env.NODE_ENV === "development"), c = (u) => u ? u.startsWith("/") ? u : `/${u}` : "/", a = (u) => {
|
|
3282
|
-
window.dispatchEvent(
|
|
3283
|
-
new CustomEvent(yi, {
|
|
3284
|
-
detail: { path: u }
|
|
3285
|
-
})
|
|
3286
|
-
);
|
|
3287
|
-
}, f = (u, m = "collect") => u.map((h, p) => {
|
|
3288
|
-
const v = h.id ?? `${m}-${h.path ?? "root"}-${p}`, O = {
|
|
3289
|
-
...h,
|
|
3290
|
-
id: v
|
|
3291
|
-
};
|
|
3292
|
-
return h.children && (O.children = f(h.children, v)), O;
|
|
3293
|
-
});
|
|
3294
|
-
return j(() => {
|
|
3295
|
-
if (!s.current)
|
|
3296
|
-
return;
|
|
3297
|
-
o.current || (o.current = is(s.current)), i.current || (i.current = Zr(
|
|
3298
|
-
f(vr(Ht, { header: e })),
|
|
3299
|
-
{ initialEntries: [c(n)] }
|
|
3300
|
-
)), a(i.current.state.location.pathname);
|
|
3301
|
-
const u = i.current.subscribe((m) => {
|
|
3302
|
-
a(m.location.pathname);
|
|
3303
|
-
});
|
|
3304
|
-
return o.current.render(
|
|
3305
|
-
/* @__PURE__ */ U(En, { client: Ht, children: [
|
|
3306
|
-
/* @__PURE__ */ d(Sn, { params: { app: "collect" }, children: /* @__PURE__ */ d(Ur, { children: /* @__PURE__ */ d(gi, { header: e, showMenu: t, children: /* @__PURE__ */ d(ns, { fallback: /* @__PURE__ */ d(Vr, {}), children: /* @__PURE__ */ d(Jr, { router: i.current }) }) }) }) }),
|
|
3307
|
-
/* @__PURE__ */ d(fr, { initialIsOpen: !1 })
|
|
3308
|
-
] })
|
|
3309
|
-
), () => {
|
|
3310
|
-
if (u(), l.current) {
|
|
3311
|
-
l.current = !1;
|
|
3312
|
-
return;
|
|
3313
|
-
}
|
|
3314
|
-
const m = o.current;
|
|
3315
|
-
o.current = null, i.current = null, m && setTimeout(() => m.unmount(), 0);
|
|
3316
|
-
};
|
|
3317
|
-
}, []), j(() => {
|
|
3318
|
-
if (!i.current || !n)
|
|
3319
|
-
return;
|
|
3320
|
-
const u = c(n);
|
|
3321
|
-
`${i.current.state.location.pathname}${i.current.state.location.search}${i.current.state.location.hash}` !== u && i.current.navigate(u);
|
|
3322
|
-
}, [n]), /* @__PURE__ */ d("div", { ref: s, className: r });
|
|
3323
|
-
}, Il = ({
|
|
3324
|
-
basePath: e
|
|
3325
|
-
}) => /* @__PURE__ */ d(us, { basePath: e, children: /* @__PURE__ */ d(hs, {}) }), H = {
|
|
3326
|
-
LIST_COLLECTIONS: "list-collections",
|
|
3327
|
-
LIST_SUBMISSIONS: "list-submissions"
|
|
3328
|
-
}, vi = Yt((e) => ({
|
|
3329
|
-
mobileMenuOpen: !1,
|
|
3330
|
-
selectedMenu: "list-collections",
|
|
3331
|
-
setMobileMenuOpen: (t) => e({ mobileMenuOpen: t }),
|
|
3332
|
-
setSelectedMenu: (t) => e({ selectedMenu: t })
|
|
3333
|
-
})), bi = Jt(vi), Sr = pt({
|
|
3334
|
-
showMenu: !0,
|
|
3335
|
-
basePath: ""
|
|
3336
|
-
});
|
|
3337
|
-
function Si({
|
|
3338
|
-
showMenu: e = !0,
|
|
3339
|
-
basePath: t = "",
|
|
3340
|
-
children: n
|
|
3341
|
-
}) {
|
|
3342
|
-
return /* @__PURE__ */ d(Sr.Provider, { value: { showMenu: e, basePath: t }, children: n });
|
|
3343
|
-
}
|
|
3344
|
-
const wi = () => gt(Sr), Ci = () => {
|
|
3345
|
-
const e = ke(), { pathname: t } = On(), { appCode: n } = xe(), { t: r } = Pe(n), s = bi.use.setSelectedMenu(), { showMenu: o, basePath: i } = wi(), l = o !== !1, c = _t(Lt.COLLECTION_CREATE), a = _t(Lt.COLLECTION_ACCESS), f = [
|
|
3346
|
-
...c ? [
|
|
3347
|
-
{
|
|
3348
|
-
id: H.LIST_COLLECTIONS,
|
|
3349
|
-
name: r("collection.collection")
|
|
3350
|
-
}
|
|
3351
|
-
] : [],
|
|
3352
|
-
{
|
|
3353
|
-
id: H.LIST_SUBMISSIONS,
|
|
3354
|
-
name: r("collection.submission")
|
|
3355
|
-
}
|
|
3356
|
-
], u = (p) => {
|
|
3357
|
-
switch (p) {
|
|
3358
|
-
case H.LIST_COLLECTIONS:
|
|
3359
|
-
return /* @__PURE__ */ d(Hr, {});
|
|
3360
|
-
case H.LIST_SUBMISSIONS:
|
|
3361
|
-
return /* @__PURE__ */ d(Qr, {});
|
|
3362
|
-
default:
|
|
3363
|
-
return null;
|
|
3364
|
-
}
|
|
3365
|
-
}, m = (p) => {
|
|
3366
|
-
s(p), e(`${i}/${p}`);
|
|
3367
|
-
}, h = () => {
|
|
3368
|
-
const v = {
|
|
3369
|
-
"/": H.LIST_COLLECTIONS,
|
|
3370
|
-
"/list-collections": H.LIST_COLLECTIONS,
|
|
3371
|
-
"/list-submissions": H.LIST_SUBMISSIONS
|
|
3372
|
-
}[t] || null;
|
|
3373
|
-
return !c && v === H.LIST_COLLECTIONS ? H.LIST_SUBMISSIONS : v;
|
|
3374
|
-
};
|
|
3375
|
-
return a && /* @__PURE__ */ U(
|
|
3376
|
-
"div",
|
|
3377
|
-
{
|
|
3378
|
-
className: `border-end pt-16 pe-16 ps-0 ${l ? " h-100 pb-16" : ""}`,
|
|
3379
|
-
style: l ? void 0 : { marginBottom: "-10px" },
|
|
3380
|
-
children: [
|
|
3381
|
-
/* @__PURE__ */ d("p", { className: "caption text-uppercase fw-semibold text-gray-700", children: r("collection.title") }),
|
|
3382
|
-
/* @__PURE__ */ U(At, { label: r("collection.title"), children: [
|
|
3383
|
-
/* @__PURE__ */ d(At.Item, { children: /* @__PURE__ */ d("div", { className: "treeview ps-16 pt-16", children: /* @__PURE__ */ d(
|
|
3384
|
-
Fr,
|
|
3385
|
-
{
|
|
3386
|
-
nodes: f,
|
|
3387
|
-
selectedNodeId: h(),
|
|
3388
|
-
showIcon: !1,
|
|
3389
|
-
renderNode: ({ node: p }) => /* @__PURE__ */ U("div", { className: "d-flex align-items-center gap-8", children: [
|
|
3390
|
-
u(p.id),
|
|
3391
|
-
/* @__PURE__ */ d("span", { children: p.name })
|
|
3392
|
-
] }),
|
|
3393
|
-
onTreeItemClick: m
|
|
3394
|
-
}
|
|
3395
|
-
) }) }),
|
|
3396
|
-
/* @__PURE__ */ d(At.Item, { children: /* @__PURE__ */ d("div", { className: "separator-dashed w-100 mt-12 my-12" }) })
|
|
3397
|
-
] })
|
|
3398
|
-
]
|
|
3399
|
-
}
|
|
3400
|
-
);
|
|
3401
|
-
}, Al = ({ showMenu: e, basePath: t }) => /* @__PURE__ */ d(Si, { showMenu: e, basePath: t, children: /* @__PURE__ */ d(Ci, {}) });
|
|
3402
|
-
export {
|
|
3403
|
-
kn as $,
|
|
3404
|
-
hs as A,
|
|
3405
|
-
_n as B,
|
|
3406
|
-
Cl as C,
|
|
3407
|
-
Ji as D,
|
|
3408
|
-
F as E,
|
|
3409
|
-
ji as F,
|
|
3410
|
-
ie as G,
|
|
3411
|
-
oe as H,
|
|
3412
|
-
Qi as I,
|
|
3413
|
-
Jt as J,
|
|
3414
|
-
L as K,
|
|
3415
|
-
Ki as L,
|
|
3416
|
-
H as M,
|
|
3417
|
-
Gs as N,
|
|
3418
|
-
ot as O,
|
|
3419
|
-
Do as P,
|
|
3420
|
-
il as Q,
|
|
3421
|
-
sl as R,
|
|
3422
|
-
dl as S,
|
|
3423
|
-
ul as T,
|
|
3424
|
-
rl as U,
|
|
3425
|
-
ol as V,
|
|
3426
|
-
kt as W,
|
|
3427
|
-
tl as X,
|
|
3428
|
-
nl as Y,
|
|
3429
|
-
qt as Z,
|
|
3430
|
-
Dn as _,
|
|
3431
|
-
Rn as a,
|
|
3432
|
-
cl as a0,
|
|
3433
|
-
Bi as a1,
|
|
3434
|
-
Fe as a2,
|
|
3435
|
-
bs as a3,
|
|
3436
|
-
Ht as a4,
|
|
3437
|
-
Sl as a5,
|
|
3438
|
-
Lo as a6,
|
|
3439
|
-
$t as a7,
|
|
3440
|
-
ll as a8,
|
|
3441
|
-
Ps as a9,
|
|
3442
|
-
Ys as aa,
|
|
3443
|
-
el as ab,
|
|
3444
|
-
Yi as ac,
|
|
3445
|
-
B as ad,
|
|
3446
|
-
st as ae,
|
|
3447
|
-
zs as af,
|
|
3448
|
-
fs as ag,
|
|
3449
|
-
wl as ah,
|
|
3450
|
-
gl as ai,
|
|
3451
|
-
ml as aj,
|
|
3452
|
-
Gi as ak,
|
|
3453
|
-
vl as al,
|
|
3454
|
-
pl as am,
|
|
3455
|
-
wi as an,
|
|
3456
|
-
qi as ao,
|
|
3457
|
-
yl as ap,
|
|
3458
|
-
bl as aq,
|
|
3459
|
-
ue as ar,
|
|
3460
|
-
us as b,
|
|
3461
|
-
Il as c,
|
|
3462
|
-
Al as d,
|
|
3463
|
-
Ho as e,
|
|
3464
|
-
Xi as f,
|
|
3465
|
-
ii as g,
|
|
3466
|
-
Sr as h,
|
|
3467
|
-
Si as i,
|
|
3468
|
-
Zi as j,
|
|
3469
|
-
fl as k,
|
|
3470
|
-
Hi as l,
|
|
3471
|
-
Wi as m,
|
|
3472
|
-
Hs as n,
|
|
3473
|
-
pi as o,
|
|
3474
|
-
Fi as p,
|
|
3475
|
-
hl as q,
|
|
3476
|
-
Qs as r,
|
|
3477
|
-
zi as s,
|
|
3478
|
-
fi as t,
|
|
3479
|
-
ai as u,
|
|
3480
|
-
ui as v,
|
|
3481
|
-
al as w,
|
|
3482
|
-
qn as x,
|
|
3483
|
-
gs as y,
|
|
3484
|
-
Di as z
|
|
3485
|
-
};
|