@llmnative/react 1.7.1 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +797 -587
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/I18n.d.ts +9 -0
- package/dist/types/src/components/widgets/grid-core/types.d.ts +60 -10
- package/dist/types/src/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13,12 +13,12 @@ import { addDoc as ie, collection as ae, deleteDoc as oe, doc as se, getCountFro
|
|
|
13
13
|
import { createClient as ye } from "@supabase/supabase-js";
|
|
14
14
|
import { deleteObject as be, getDownloadURL as xe, getMetadata as Se, getStorage as Ce, listAll as we, ref as Te, uploadBytesResumable as Ee, uploadString as De } from "firebase/storage";
|
|
15
15
|
import Oe from "papaparse";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { endAt as
|
|
16
|
+
import ke from "react-markdown";
|
|
17
|
+
import Ae from "remark-gfm";
|
|
18
|
+
import je from "rehype-slug";
|
|
19
|
+
import Me from "rehype-autolink-headings";
|
|
20
|
+
import Ne from "rehype-sanitize";
|
|
21
|
+
import { endAt as Pe, equalTo as Fe, get as J, getDatabase as Ie, onValue as Le, orderByChild as Re, orderByKey as ze, orderByValue as Be, query as Ve, ref as He, remove as Ue, set as We, startAt as Ge, update as Ke } from "firebase/database";
|
|
22
22
|
import "react-dom/server";
|
|
23
23
|
//#region \0rolldown/runtime.js
|
|
24
24
|
var qe = Object.defineProperty, Je = (e, t) => {
|
|
@@ -2437,7 +2437,16 @@ var vn = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10
|
|
|
2437
2437
|
grid: {
|
|
2438
2438
|
buttonAdd: "Add",
|
|
2439
2439
|
deleteConfirm: "Delete record",
|
|
2440
|
-
emptyState: "No records found"
|
|
2440
|
+
emptyState: "No records found",
|
|
2441
|
+
filtersButton: "Filters",
|
|
2442
|
+
filtersPanelTitle: "Filters",
|
|
2443
|
+
filtersClearAll: "Clear all",
|
|
2444
|
+
filtersSelectPlaceholder: "All",
|
|
2445
|
+
filtersRangeFrom: "From",
|
|
2446
|
+
filtersRangeTo: "To",
|
|
2447
|
+
filtersRangeMin: "Min",
|
|
2448
|
+
filtersRangeMax: "Max",
|
|
2449
|
+
filtersSelectedCountTemplate: "{count} selected"
|
|
2441
2450
|
},
|
|
2442
2451
|
select: {
|
|
2443
2452
|
placeholder: "Select...",
|
|
@@ -3716,7 +3725,7 @@ var Ti = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3716
3725
|
}))
|
|
3717
3726
|
}, e);
|
|
3718
3727
|
}, Pi = ({ menuKey: e, as: n = "ul", badges: r = {}, before: i = void 0, after: a = void 0, wrapperClassName: o = void 0, className: s = void 0, headerClassName: c = void 0, itemClassName: u = void 0, linkClassName: d = void 0, iconClassName: f = void 0, textClassName: p = void 0, badgeClassName: m = void 0, arrowClassName: g = void 0, submenuClassName: _ = void 0 }) => {
|
|
3719
|
-
let y =
|
|
3728
|
+
let y = Vh(e), b = Y("menu"), x = ({ item: e, index: i }) => {
|
|
3720
3729
|
let [a, o] = h(e.active);
|
|
3721
3730
|
l(() => {
|
|
3722
3731
|
o(e.active);
|
|
@@ -10872,28 +10881,28 @@ var cd = (e) => {
|
|
|
10872
10881
|
type: t,
|
|
10873
10882
|
message: e
|
|
10874
10883
|
});
|
|
10875
|
-
}, [b]), [ye, be] = h({}), xe = m({}), Se = m(null), Ce = m(L), we = m(c), Te = m(g), Ee = m(_), De = m(v), Oe = m(o),
|
|
10884
|
+
}, [b]), [ye, be] = h({}), xe = m({}), Se = m(null), Ce = m(L), we = m(c), Te = m(g), Ee = m(_), De = m(v), Oe = m(o), ke = m(y), Ae = s(() => {
|
|
10876
10885
|
pe(), he(), ne(null);
|
|
10877
|
-
}, [pe, he]),
|
|
10886
|
+
}, [pe, he]), je = s(() => {
|
|
10878
10887
|
let e = me();
|
|
10879
10888
|
if (!e) {
|
|
10880
10889
|
ne(null);
|
|
10881
10890
|
return;
|
|
10882
10891
|
}
|
|
10883
10892
|
R(wt(e)), ne("restored");
|
|
10884
|
-
}, [me]),
|
|
10893
|
+
}, [me]), Me = s(() => {
|
|
10885
10894
|
be({}), _e(void 0), ne(null), he();
|
|
10886
|
-
}, [he]),
|
|
10895
|
+
}, [he]), Ne = s((e, t) => {
|
|
10887
10896
|
xe.current[e] = t;
|
|
10888
|
-
}, []), Ne = s((e) => {
|
|
10889
|
-
delete xe.current[e];
|
|
10890
10897
|
}, []), Pe = s((e) => {
|
|
10898
|
+
delete xe.current[e];
|
|
10899
|
+
}, []), Fe = s((e) => {
|
|
10891
10900
|
be((t) => {
|
|
10892
10901
|
if (!t[e]) return t;
|
|
10893
10902
|
let { [e]: n, ...r } = t;
|
|
10894
10903
|
return r;
|
|
10895
10904
|
});
|
|
10896
|
-
}, []),
|
|
10905
|
+
}, []), J = s(async () => {
|
|
10897
10906
|
let e = {};
|
|
10898
10907
|
for (let [t, n] of Object.entries(xe.current)) {
|
|
10899
10908
|
let { required: r, label: i, validator: a } = n.current, o = t.split(".").reduce((e, t) => {
|
|
@@ -10931,7 +10940,7 @@ var cd = (e) => {
|
|
|
10931
10940
|
u,
|
|
10932
10941
|
U
|
|
10933
10942
|
]), Le = s(async (e) => {
|
|
10934
|
-
if (
|
|
10943
|
+
if (ke.current && Oe.current && P) {
|
|
10935
10944
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = Yr("user");
|
|
10936
10945
|
P.set(`/log/${Oe.current}/${ct(t)}`, {
|
|
10937
10946
|
user: n?.email ?? "unknown",
|
|
@@ -10958,7 +10967,7 @@ var cd = (e) => {
|
|
|
10958
10967
|
}), !1;
|
|
10959
10968
|
if (M(() => {
|
|
10960
10969
|
be({}), b && _e(void 0);
|
|
10961
|
-
}), !await
|
|
10970
|
+
}), !await J()) return b && _e({
|
|
10962
10971
|
message: N.noticeRequiredFields,
|
|
10963
10972
|
type: "warning"
|
|
10964
10973
|
}), !1;
|
|
@@ -10985,7 +10994,7 @@ var cd = (e) => {
|
|
|
10985
10994
|
U,
|
|
10986
10995
|
se,
|
|
10987
10996
|
b,
|
|
10988
|
-
|
|
10997
|
+
J
|
|
10989
10998
|
]), ze = s(async (e) => {
|
|
10990
10999
|
e?.preventDefault?.(), b && _e(void 0), H(!0);
|
|
10991
11000
|
try {
|
|
@@ -11021,7 +11030,7 @@ var cd = (e) => {
|
|
|
11021
11030
|
]), l(() => {
|
|
11022
11031
|
Ce.current = L, L !== void 0 && f?.(L);
|
|
11023
11032
|
}, [L, f]), l(() => {
|
|
11024
|
-
we.current = c, Te.current = g, Ee.current = _, De.current = v, Oe.current = o,
|
|
11033
|
+
we.current = c, Te.current = g, Ee.current = _, De.current = v, Oe.current = o, ke.current = y;
|
|
11025
11034
|
}, [
|
|
11026
11035
|
c,
|
|
11027
11036
|
y,
|
|
@@ -11064,17 +11073,17 @@ var cd = (e) => {
|
|
|
11064
11073
|
I.bindActions({
|
|
11065
11074
|
save: Re,
|
|
11066
11075
|
delete: ze,
|
|
11067
|
-
reset:
|
|
11068
|
-
restoreDraft:
|
|
11069
|
-
discardDraft:
|
|
11076
|
+
reset: Me,
|
|
11077
|
+
restoreDraft: je,
|
|
11078
|
+
discardDraft: Ae
|
|
11070
11079
|
});
|
|
11071
11080
|
}, [
|
|
11072
11081
|
I,
|
|
11073
|
-
|
|
11082
|
+
Ae,
|
|
11074
11083
|
ze,
|
|
11075
11084
|
Re,
|
|
11076
|
-
|
|
11077
|
-
|
|
11085
|
+
Me,
|
|
11086
|
+
je
|
|
11078
11087
|
]), l(() => {
|
|
11079
11088
|
I.setState({
|
|
11080
11089
|
record: Ce.current,
|
|
@@ -11106,14 +11115,14 @@ var cd = (e) => {
|
|
|
11106
11115
|
let Be = s((e) => {
|
|
11107
11116
|
e.defaultPrevented || !((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s") || F.saveDisabled || (e.preventDefault(), F.save());
|
|
11108
11117
|
}, [F]), Ve = p(() => ({
|
|
11109
|
-
registerField:
|
|
11110
|
-
unregisterField:
|
|
11111
|
-
clearFieldError:
|
|
11118
|
+
registerField: Ne,
|
|
11119
|
+
unregisterField: Pe,
|
|
11120
|
+
clearFieldError: Fe,
|
|
11112
11121
|
errors: ye
|
|
11113
11122
|
}), [
|
|
11114
|
-
Me,
|
|
11115
11123
|
Ne,
|
|
11116
11124
|
Pe,
|
|
11125
|
+
Fe,
|
|
11117
11126
|
ye
|
|
11118
11127
|
]), He = p(() => ({
|
|
11119
11128
|
record: L,
|
|
@@ -11142,18 +11151,18 @@ var cd = (e) => {
|
|
|
11142
11151
|
}, /* @__PURE__ */ t.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ t.createElement("div", { className: "font-medium" }, e), /* @__PURE__ */ t.createElement("div", { className: "text-sm opacity-90" }, n)), /* @__PURE__ */ t.createElement("div", { className: "flex shrink-0 items-center gap-2" }, G === "restore" ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Br, {
|
|
11143
11152
|
label: ue,
|
|
11144
11153
|
variant: "warning",
|
|
11145
|
-
onClick: () =>
|
|
11154
|
+
onClick: () => je()
|
|
11146
11155
|
}), /* @__PURE__ */ t.createElement(Br, {
|
|
11147
11156
|
label: de,
|
|
11148
11157
|
variant: "outline-secondary",
|
|
11149
|
-
onClick: () =>
|
|
11158
|
+
onClick: () => Ae()
|
|
11150
11159
|
})) : /* @__PURE__ */ t.createElement(Br, {
|
|
11151
11160
|
label: de,
|
|
11152
11161
|
variant: "outline-secondary",
|
|
11153
|
-
onClick: () =>
|
|
11162
|
+
onClick: () => Ae()
|
|
11154
11163
|
}))));
|
|
11155
11164
|
}, [
|
|
11156
|
-
|
|
11165
|
+
Ae,
|
|
11157
11166
|
de,
|
|
11158
11167
|
G,
|
|
11159
11168
|
ue,
|
|
@@ -11161,7 +11170,7 @@ var cd = (e) => {
|
|
|
11161
11170
|
ce,
|
|
11162
11171
|
q,
|
|
11163
11172
|
fe,
|
|
11164
|
-
|
|
11173
|
+
je
|
|
11165
11174
|
]), Ke = p(() => {
|
|
11166
11175
|
switch (n) {
|
|
11167
11176
|
case "empty": return /* @__PURE__ */ t.createElement(t.Fragment, null, Ge, Ue, We);
|
|
@@ -11576,7 +11585,7 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11576
11585
|
F.Table.scrollClassName,
|
|
11577
11586
|
j ? `${j} overflow-auto` : "",
|
|
11578
11587
|
M || ""
|
|
11579
|
-
].filter(Boolean).join(" "), Oe = !!j,
|
|
11588
|
+
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !K || K.key !== e || K.position !== n ? null : /* @__PURE__ */ t.createElement("tr", {
|
|
11580
11589
|
"aria-hidden": "true",
|
|
11581
11590
|
onDragOver: (t) => {
|
|
11582
11591
|
ue && (t.preventDefault(), ne !== e && re(e), ie({
|
|
@@ -11591,10 +11600,10 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11591
11600
|
}), Te(r, i));
|
|
11592
11601
|
}
|
|
11593
11602
|
}, /* @__PURE__ */ t.createElement("td", {
|
|
11594
|
-
colSpan:
|
|
11603
|
+
colSpan: ke,
|
|
11595
11604
|
className: "border-0 p-0"
|
|
11596
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "relative h-5 cursor-grab" }, /* @__PURE__ */ t.createElement("div", { className: "absolute inset-x-2 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ t.createElement("div", { className: "h-0 rounded-full border-t-2 border-primary/80" }), /* @__PURE__ */ t.createElement("div", { className: "absolute left-0 top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-primary shadow-sm" }))))),
|
|
11597
|
-
className: ["px-3 py-2 font-semibold text-muted-foreground",
|
|
11605
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "relative h-5 cursor-grab" }, /* @__PURE__ */ t.createElement("div", { className: "absolute inset-x-2 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ t.createElement("div", { className: "h-0 rounded-full border-t-2 border-primary/80" }), /* @__PURE__ */ t.createElement("div", { className: "absolute left-0 top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-primary shadow-sm" }))))), Me = /* @__PURE__ */ t.createElement("tr", null, ve && /* @__PURE__ */ t.createElement("th", {
|
|
11606
|
+
className: ["px-3 py-2 font-semibold text-muted-foreground", Ae].filter(Boolean).join(" "),
|
|
11598
11607
|
style: {
|
|
11599
11608
|
width: "1%",
|
|
11600
11609
|
whiteSpace: "nowrap"
|
|
@@ -11608,7 +11617,7 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11608
11617
|
ye(t);
|
|
11609
11618
|
}
|
|
11610
11619
|
}))), ue && /* @__PURE__ */ t.createElement("th", {
|
|
11611
|
-
className: ["px-3 py-2 font-semibold text-muted-foreground",
|
|
11620
|
+
className: ["px-3 py-2 font-semibold text-muted-foreground", Ae].filter(Boolean).join(" "),
|
|
11612
11621
|
style: {
|
|
11613
11622
|
width: "1%",
|
|
11614
11623
|
whiteSpace: "nowrap"
|
|
@@ -11619,7 +11628,7 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11619
11628
|
key: e.key,
|
|
11620
11629
|
className: [
|
|
11621
11630
|
"px-3 py-2 font-semibold text-muted-foreground",
|
|
11622
|
-
|
|
11631
|
+
Ae,
|
|
11623
11632
|
e.className || ""
|
|
11624
11633
|
].filter(Boolean).join(" "),
|
|
11625
11634
|
"aria-sort": i
|
|
@@ -11638,12 +11647,12 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11638
11647
|
}, r ? H?.dir === "desc" ? /* @__PURE__ */ t.createElement(E, { size: 14 }) : /* @__PURE__ */ t.createElement(D, { size: 14 }) : /* @__PURE__ */ t.createElement(O, { size: 14 })), /* @__PURE__ */ t.createElement("span", null, e.label)) : /* @__PURE__ */ t.createElement("div", { className: "th-inner py-1" }, e.label));
|
|
11639
11648
|
})() : /* @__PURE__ */ t.createElement("th", {
|
|
11640
11649
|
key: e.key,
|
|
11641
|
-
className: ["px-3 py-2 font-semibold text-muted-foreground",
|
|
11650
|
+
className: ["px-3 py-2 font-semibold text-muted-foreground", Ae].filter(Boolean).join(" "),
|
|
11642
11651
|
style: {
|
|
11643
11652
|
width: "1%",
|
|
11644
11653
|
whiteSpace: "nowrap"
|
|
11645
11654
|
}
|
|
11646
|
-
}))),
|
|
11655
|
+
}))), Ne = /* @__PURE__ */ t.createElement(Hp, {
|
|
11647
11656
|
records: be,
|
|
11648
11657
|
appendTo: W,
|
|
11649
11658
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -11655,9 +11664,9 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11655
11664
|
a = u;
|
|
11656
11665
|
let f = ge.includes(l), p = ne === l, m = te === l, h = L && (g === void 0 ? ae : g) === l;
|
|
11657
11666
|
return /* @__PURE__ */ t.createElement(t.Fragment, { key: l }, d && /* @__PURE__ */ t.createElement("tr", { "aria-hidden": "true" }, /* @__PURE__ */ t.createElement("td", {
|
|
11658
|
-
colSpan:
|
|
11667
|
+
colSpan: ke,
|
|
11659
11668
|
className: "bg-muted/40 px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground"
|
|
11660
|
-
}, u)),
|
|
11669
|
+
}, u)), je(l, "before", e, s), /* @__PURE__ */ t.createElement("tr", {
|
|
11661
11670
|
draggable: ue,
|
|
11662
11671
|
className: [
|
|
11663
11672
|
"odd:bg-muted/30 hover:bg-muted/20 transition-colors",
|
|
@@ -11734,13 +11743,13 @@ function Od({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
11734
11743
|
}, /* @__PURE__ */ t.createElement(k, { size: 14 }))), Ee.map((n) => /* @__PURE__ */ t.createElement("td", {
|
|
11735
11744
|
key: n.key,
|
|
11736
11745
|
className: "px-3 py-2 border-b border-border/50"
|
|
11737
|
-
}, Se(e, n.key, s)))),
|
|
11746
|
+
}, Se(e, n.key, s)))), je(l, "after", e, s));
|
|
11738
11747
|
});
|
|
11739
11748
|
});
|
|
11740
11749
|
return /* @__PURE__ */ t.createElement("div", { className: "flex items-stretch gap-3" }, b && /* @__PURE__ */ t.createElement("div", { className: "table-before flex shrink-0 items-center self-stretch" }, b), /* @__PURE__ */ t.createElement("div", {
|
|
11741
11750
|
ref: ce,
|
|
11742
11751
|
className: "min-w-0 flex-1 overflow-x-auto " + (S || F.Table.wrapperClassName)
|
|
11743
|
-
}, /* @__PURE__ */ t.createElement("div", { className: De }, /* @__PURE__ */ t.createElement("table", { className: "w-full text-left text-sm border-collapse " + (C || F.Table.className) }, /* @__PURE__ */ t.createElement("thead", { className: "border-b " + (w || F.Table.headerClassName) },
|
|
11752
|
+
}, /* @__PURE__ */ t.createElement("div", { className: De }, /* @__PURE__ */ t.createElement("table", { className: "w-full text-left text-sm border-collapse " + (C || F.Table.className) }, /* @__PURE__ */ t.createElement("thead", { className: "border-b " + (w || F.Table.headerClassName) }, Me), /* @__PURE__ */ t.createElement("tbody", { className: T || F.Table.bodyClassName }, Ne), r && /* @__PURE__ */ t.createElement("tfoot", { className: A || F.Table.footerClassName }, r)))), x && /* @__PURE__ */ t.createElement("div", { className: "table-after flex shrink-0 items-center self-stretch" }, x));
|
|
11744
11753
|
}
|
|
11745
11754
|
//#endregion
|
|
11746
11755
|
//#region src/components/ui/LayoutBuilder.tsx
|
|
@@ -13713,7 +13722,7 @@ function Ff({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
|
|
|
13713
13722
|
}))));
|
|
13714
13723
|
}
|
|
13715
13724
|
function If({ menuKey: e, items: n, defaultCollapsed: r = !1, showIcons: i = !0, showCollapseButton: a = !0, footer: o, header: c, embedded: u = !1 }) {
|
|
13716
|
-
let { pathname: d } = x(), f = Y("sideNav"), p =
|
|
13725
|
+
let { pathname: d } = x(), f = Y("sideNav"), p = Vh(e ?? ""), g = n ?? (e ? kf(p) : []), [_, v] = h(r), [y, b] = h(!1), [S, C] = h(/* @__PURE__ */ new Set()), w = m(null), T = !_ || y;
|
|
13717
13726
|
l(() => {
|
|
13718
13727
|
C((e) => {
|
|
13719
13728
|
let t = new Set(e);
|
|
@@ -13841,7 +13850,7 @@ function zf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
|
|
|
13841
13850
|
dir: n
|
|
13842
13851
|
};
|
|
13843
13852
|
}, [i]), f = s.sortable === void 0 || s.sortable === !0 ? d ?? s.sortable : s.sortable;
|
|
13844
|
-
return /* @__PURE__ */ t.createElement(
|
|
13853
|
+
return /* @__PURE__ */ t.createElement(nm, {
|
|
13845
13854
|
...s,
|
|
13846
13855
|
records: u,
|
|
13847
13856
|
recordId: o,
|
|
@@ -14469,12 +14478,12 @@ function Bp({ content: e, components: n, className: r, wrapperClassName: i, meta
|
|
|
14469
14478
|
title: a?.title ?? s
|
|
14470
14479
|
} : void 0);
|
|
14471
14480
|
let c = t.useMemo(() => zp(o), [o]);
|
|
14472
|
-
return /* @__PURE__ */ t.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", i, r) }, /* @__PURE__ */ t.createElement(
|
|
14473
|
-
remarkPlugins: [
|
|
14481
|
+
return /* @__PURE__ */ t.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", i, r) }, /* @__PURE__ */ t.createElement(ke, {
|
|
14482
|
+
remarkPlugins: [Ae],
|
|
14474
14483
|
rehypePlugins: [
|
|
14475
|
-
|
|
14476
|
-
[
|
|
14477
|
-
|
|
14484
|
+
je,
|
|
14485
|
+
[Me, { behavior: "wrap" }],
|
|
14486
|
+
Ne
|
|
14478
14487
|
],
|
|
14479
14488
|
components: {
|
|
14480
14489
|
...c,
|
|
@@ -15128,8 +15137,139 @@ function Jp({ selection: e }) {
|
|
|
15128
15137
|
}
|
|
15129
15138
|
//#endregion
|
|
15130
15139
|
//#region src/components/widgets/grid-core/GridCore.tsx
|
|
15131
|
-
var Yp = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || Xf(e, t, i) : Xf(e, t, i)
|
|
15132
|
-
|
|
15140
|
+
var Yp = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || Xf(e, t, i) : Xf(e, t, i), Xp = (e) => {
|
|
15141
|
+
switch (e.kind) {
|
|
15142
|
+
case "select": return "";
|
|
15143
|
+
case "multiselect": return [];
|
|
15144
|
+
case "dateRange": return {
|
|
15145
|
+
from: "",
|
|
15146
|
+
to: ""
|
|
15147
|
+
};
|
|
15148
|
+
case "numberRange": return {
|
|
15149
|
+
min: void 0,
|
|
15150
|
+
max: void 0
|
|
15151
|
+
};
|
|
15152
|
+
default: return e.defaultValue ?? !1;
|
|
15153
|
+
}
|
|
15154
|
+
}, Zp = (e, t) => {
|
|
15155
|
+
switch (e.kind) {
|
|
15156
|
+
case "select": return typeof t == "string" && t !== "";
|
|
15157
|
+
case "multiselect": return Array.isArray(t) && t.length > 0;
|
|
15158
|
+
case "dateRange": {
|
|
15159
|
+
let e = t;
|
|
15160
|
+
return !!e?.from || !!e?.to;
|
|
15161
|
+
}
|
|
15162
|
+
case "numberRange": {
|
|
15163
|
+
let e = t;
|
|
15164
|
+
return e?.min !== void 0 || e?.max !== void 0;
|
|
15165
|
+
}
|
|
15166
|
+
default: return !!t != !!(e.defaultValue ?? !1);
|
|
15167
|
+
}
|
|
15168
|
+
}, Qp = (e, t, n) => {
|
|
15169
|
+
switch (e.kind) {
|
|
15170
|
+
case "select": return e.predicate(t, n);
|
|
15171
|
+
case "multiselect": return e.predicate(t, n);
|
|
15172
|
+
case "dateRange": return e.predicate(t, n);
|
|
15173
|
+
case "numberRange": return e.predicate(t, n);
|
|
15174
|
+
default: return e.predicate(t, n);
|
|
15175
|
+
}
|
|
15176
|
+
}, $p = (e, t, n) => {
|
|
15177
|
+
switch (e.kind) {
|
|
15178
|
+
case "select": {
|
|
15179
|
+
let n = e.options.find((e) => e.value === t);
|
|
15180
|
+
return `${e.label}: ${n?.label ?? String(t)}`;
|
|
15181
|
+
}
|
|
15182
|
+
case "multiselect": {
|
|
15183
|
+
let r = t;
|
|
15184
|
+
if (r.length === 1) {
|
|
15185
|
+
let t = e.options.find((e) => e.value === r[0]);
|
|
15186
|
+
return `${e.label}: ${t?.label ?? r[0]}`;
|
|
15187
|
+
}
|
|
15188
|
+
return `${e.label}: ${n.filtersSelectedCountTemplate.replace("{count}", String(r.length))}`;
|
|
15189
|
+
}
|
|
15190
|
+
case "dateRange": {
|
|
15191
|
+
let r = t;
|
|
15192
|
+
return r.from && r.to ? `${e.label}: ${r.from} → ${r.to}` : r.from ? `${e.label}: ${n.filtersRangeFrom} ${r.from}` : `${e.label}: ${n.filtersRangeTo} ${r.to}`;
|
|
15193
|
+
}
|
|
15194
|
+
case "numberRange": {
|
|
15195
|
+
let r = t;
|
|
15196
|
+
return r.min !== void 0 && r.max !== void 0 ? `${e.label}: ${r.min}–${r.max}` : r.min === void 0 ? `${e.label}: ${n.filtersRangeMax} ${r.max}` : `${e.label}: ${n.filtersRangeMin} ${r.min}`;
|
|
15197
|
+
}
|
|
15198
|
+
default: return e.label;
|
|
15199
|
+
}
|
|
15200
|
+
}, em = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
|
|
15201
|
+
function tm({ filter: e, value: n, onChange: r, dict: i }) {
|
|
15202
|
+
if (e.kind === "select") return /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("select", {
|
|
15203
|
+
className: em,
|
|
15204
|
+
value: n,
|
|
15205
|
+
onChange: (e) => r(e.target.value)
|
|
15206
|
+
}, /* @__PURE__ */ t.createElement("option", { value: "" }, i.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ t.createElement("option", {
|
|
15207
|
+
key: e.value,
|
|
15208
|
+
value: e.value
|
|
15209
|
+
}, e.label))));
|
|
15210
|
+
if (e.kind === "multiselect") {
|
|
15211
|
+
let i = n, a = (e) => r(i.includes(e) ? i.filter((t) => t !== e) : [...i, e]);
|
|
15212
|
+
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1" }, e.options.map((e) => /* @__PURE__ */ t.createElement("label", {
|
|
15213
|
+
key: e.value,
|
|
15214
|
+
className: "flex cursor-pointer items-center gap-2 text-sm text-muted-foreground"
|
|
15215
|
+
}, /* @__PURE__ */ t.createElement("input", {
|
|
15216
|
+
type: "checkbox",
|
|
15217
|
+
checked: i.includes(e.value),
|
|
15218
|
+
onChange: () => a(e.value)
|
|
15219
|
+
}), e.label))));
|
|
15220
|
+
}
|
|
15221
|
+
if (e.kind === "dateRange") {
|
|
15222
|
+
let a = n;
|
|
15223
|
+
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeFrom), /* @__PURE__ */ t.createElement("input", {
|
|
15224
|
+
type: "date",
|
|
15225
|
+
className: em,
|
|
15226
|
+
value: a.from,
|
|
15227
|
+
onChange: (e) => r({
|
|
15228
|
+
...a,
|
|
15229
|
+
from: e.target.value
|
|
15230
|
+
})
|
|
15231
|
+
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
|
|
15232
|
+
type: "date",
|
|
15233
|
+
className: em,
|
|
15234
|
+
value: a.to,
|
|
15235
|
+
onChange: (e) => r({
|
|
15236
|
+
...a,
|
|
15237
|
+
to: e.target.value
|
|
15238
|
+
})
|
|
15239
|
+
}))));
|
|
15240
|
+
}
|
|
15241
|
+
if (e.kind === "numberRange") {
|
|
15242
|
+
let a = n;
|
|
15243
|
+
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMin), /* @__PURE__ */ t.createElement("input", {
|
|
15244
|
+
type: "number",
|
|
15245
|
+
className: em,
|
|
15246
|
+
value: a.min ?? "",
|
|
15247
|
+
onChange: (e) => r({
|
|
15248
|
+
...a,
|
|
15249
|
+
min: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15250
|
+
})
|
|
15251
|
+
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMax), /* @__PURE__ */ t.createElement("input", {
|
|
15252
|
+
type: "number",
|
|
15253
|
+
className: em,
|
|
15254
|
+
value: a.max ?? "",
|
|
15255
|
+
onChange: (e) => r({
|
|
15256
|
+
...a,
|
|
15257
|
+
max: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15258
|
+
})
|
|
15259
|
+
}))));
|
|
15260
|
+
}
|
|
15261
|
+
let a = n;
|
|
15262
|
+
return /* @__PURE__ */ t.createElement("label", { className: "inline-flex cursor-pointer items-center gap-2 select-none" }, /* @__PURE__ */ t.createElement("span", { className: "relative inline-flex h-5 w-9 shrink-0 items-center" }, /* @__PURE__ */ t.createElement("input", {
|
|
15263
|
+
type: "checkbox",
|
|
15264
|
+
checked: a,
|
|
15265
|
+
onChange: () => r(!a),
|
|
15266
|
+
className: "peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0"
|
|
15267
|
+
}), /* @__PURE__ */ t.createElement("span", {
|
|
15268
|
+
"aria-hidden": "true",
|
|
15269
|
+
className: X("pointer-events-none absolute inset-0 rounded-full transition-colors duration-200 ease-out peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2", a ? "bg-primary" : "bg-muted-foreground/35")
|
|
15270
|
+
}, /* @__PURE__ */ t.createElement("span", { className: X("pointer-events-none absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-background shadow-sm transition-transform duration-200 ease-out", a && "translate-x-4") }))), /* @__PURE__ */ t.createElement("span", { className: "text-sm text-foreground" }, e.label));
|
|
15271
|
+
}
|
|
15272
|
+
function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, form: o, editDeepLink: c, header: u, footer: d, view: f = "table", views: m, sticky: g, wrapperClassName: _, cardClassName: v, bodyClassName: y, loading: b = !1, title: x, before: S, after: C, sortable: w = !0, pagination: T, selection: E, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
|
|
15133
15273
|
let R = Y("grid"), z = Nn("grid"), B = Nn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ci(), { preparedRecords: U, loading: W } = qp({
|
|
15134
15274
|
records: e,
|
|
15135
15275
|
onLoad: L
|
|
@@ -15137,65 +15277,90 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15137
15277
|
columns: i,
|
|
15138
15278
|
records: U,
|
|
15139
15279
|
form: o
|
|
15140
|
-
}), [te, G] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, e
|
|
15280
|
+
}), [te, G] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, Xp(e)]))), [ne, re] = h(!1), K = s((e, t) => {
|
|
15281
|
+
G((n) => ({
|
|
15282
|
+
...n,
|
|
15283
|
+
[e]: t
|
|
15284
|
+
}));
|
|
15285
|
+
}, []), ie = s((e) => {
|
|
15141
15286
|
G((t) => ({
|
|
15142
15287
|
...t,
|
|
15143
|
-
[e]:
|
|
15288
|
+
[e.key]: Xp(e)
|
|
15144
15289
|
}));
|
|
15145
|
-
}, []),
|
|
15290
|
+
}, []), ae = (M ?? []).filter((e) => Zp(e, te[e.key] ?? Xp(e))), oe = p(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => Qp(t, e, te[t.key] ?? Xp(t)))), [
|
|
15146
15291
|
U,
|
|
15147
15292
|
M,
|
|
15148
15293
|
te
|
|
15149
|
-
]),
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15294
|
+
]), se = M && M.length > 0 ? /* @__PURE__ */ t.createElement(Br, {
|
|
15295
|
+
icon: "filter",
|
|
15296
|
+
ariaLabel: z.filtersButton,
|
|
15297
|
+
title: z.filtersButton,
|
|
15298
|
+
variant: "link",
|
|
15299
|
+
badge: ae.length > 0 ? ae.length : void 0,
|
|
15300
|
+
onClick: () => re(!0)
|
|
15301
|
+
}) : null, ce = (M ?? []).length > 0 && ae.length > 0 ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-1.5" }, ae.map((e) => /* @__PURE__ */ t.createElement(Xn, {
|
|
15302
|
+
key: e.key,
|
|
15303
|
+
variant: "info",
|
|
15304
|
+
className: "inline-flex items-center gap-1"
|
|
15305
|
+
}, $p(e, te[e.key] ?? Xp(e), z), /* @__PURE__ */ t.createElement(Br, {
|
|
15306
|
+
icon: "x",
|
|
15307
|
+
variant: "link",
|
|
15308
|
+
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
15309
|
+
title: `${z.filtersClearAll} ${e.label}`,
|
|
15310
|
+
onClick: () => ie(e)
|
|
15311
|
+
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue = ne && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Ai, {
|
|
15312
|
+
title: z.filtersPanelTitle,
|
|
15313
|
+
size: "md",
|
|
15314
|
+
position: "right",
|
|
15315
|
+
onClose: () => re(!1),
|
|
15316
|
+
footer: /* @__PURE__ */ t.createElement(Br, {
|
|
15317
|
+
label: z.filtersClearAll,
|
|
15318
|
+
variant: "link",
|
|
15319
|
+
disabled: ae.length === 0,
|
|
15320
|
+
onClick: () => G(Object.fromEntries(M.map((e) => [e.key, Xp(e)])))
|
|
15321
|
+
})
|
|
15322
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(tm, {
|
|
15323
|
+
key: e.key,
|
|
15324
|
+
filter: e,
|
|
15325
|
+
value: te[e.key] ?? Xp(e),
|
|
15326
|
+
onChange: (t) => K(e.key, t),
|
|
15327
|
+
dict: z
|
|
15328
|
+
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
15329
|
+
if (!de || !fe.trim()) return oe;
|
|
15330
|
+
let e = fe.trim().toLowerCase(), t = de.fields?.map(String);
|
|
15331
|
+
return oe.filter((n) => (t ?? Object.keys(n)).some((t) => {
|
|
15167
15332
|
let r = Mt(n, t);
|
|
15168
15333
|
return typeof r == "string" && r.toLowerCase().includes(e);
|
|
15169
15334
|
}));
|
|
15170
15335
|
}, [
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
]),
|
|
15336
|
+
oe,
|
|
15337
|
+
de,
|
|
15338
|
+
fe
|
|
15339
|
+
]), me = de ? /* @__PURE__ */ t.createElement("div", { className: "flex min-w-0 flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex min-w-0 items-center gap-1" }, /* @__PURE__ */ t.createElement("input", {
|
|
15175
15340
|
type: "search",
|
|
15176
|
-
value:
|
|
15177
|
-
onChange: (e) =>
|
|
15178
|
-
placeholder:
|
|
15341
|
+
value: fe,
|
|
15342
|
+
onChange: (e) => q(e.target.value),
|
|
15343
|
+
placeholder: de.placeholder ?? B.search,
|
|
15179
15344
|
className: "w-full max-w-xs rounded-md border border-input bg-background px-2 py-1 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
15180
|
-
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" },
|
|
15345
|
+
}), se), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" }, pe.length, " / ", oe.length), ce) : null, he = m ?? {}, ge = he.table ?? {}, _e = he.gallery ?? {}, [ve, ye] = h(f);
|
|
15181
15346
|
l(() => {
|
|
15182
|
-
|
|
15347
|
+
ye(f);
|
|
15183
15348
|
}, [f]);
|
|
15184
|
-
let [
|
|
15185
|
-
|
|
15349
|
+
let [be, xe] = h(() => new Set(ee.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), Se = s((e) => {
|
|
15350
|
+
xe((t) => {
|
|
15186
15351
|
let n = new Set(t);
|
|
15187
15352
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15188
15353
|
});
|
|
15189
|
-
}, []),
|
|
15190
|
-
|
|
15354
|
+
}, []), Ce = p(() => ee.filter((e) => !be.has(String(e.key))), [ee, be]), we = _e.fields ?? [], [Te, Ee] = h(() => new Set(we.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), De = s((e) => {
|
|
15355
|
+
Ee((t) => {
|
|
15191
15356
|
let n = new Set(t);
|
|
15192
15357
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15193
15358
|
});
|
|
15194
|
-
}, []),
|
|
15359
|
+
}, []), Oe = p(() => we.filter((e) => !Te.has(String(e.key))), [we, Te]), ke = p(() => {
|
|
15195
15360
|
let e = [];
|
|
15196
|
-
if (
|
|
15361
|
+
if (Oe.length) {
|
|
15197
15362
|
let n = /* @__PURE__ */ new Map();
|
|
15198
|
-
|
|
15363
|
+
Oe.forEach((e) => {
|
|
15199
15364
|
let t = e.position ?? "bottomLeft";
|
|
15200
15365
|
n.has(t) || n.set(t, []), n.get(t).push(e);
|
|
15201
15366
|
}), e.push(...Array.from(n.entries()).map(([e, n]) => ({
|
|
@@ -15209,9 +15374,9 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15209
15374
|
}))
|
|
15210
15375
|
})));
|
|
15211
15376
|
}
|
|
15212
|
-
let n = [...
|
|
15377
|
+
let n = [..._e.overlays ?? [], ...e];
|
|
15213
15378
|
return n.length ? n : void 0;
|
|
15214
|
-
}, [
|
|
15379
|
+
}, [_e.overlays, Oe]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Jp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Gp({
|
|
15215
15380
|
actions: a,
|
|
15216
15381
|
form: o,
|
|
15217
15382
|
editDeepLink: c,
|
|
@@ -15223,66 +15388,66 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15223
15388
|
onDelete: P,
|
|
15224
15389
|
onComplete: F,
|
|
15225
15390
|
audit: I
|
|
15226
|
-
}),
|
|
15227
|
-
if (D?.(e), !
|
|
15228
|
-
let t =
|
|
15229
|
-
if (
|
|
15230
|
-
|
|
15391
|
+
}), We = Pe.edit, Ge = !!We && (We.kind !== "modal" || !!o), Ke = s((e) => {
|
|
15392
|
+
if (D?.(e), !Ge) return;
|
|
15393
|
+
let t = He(e);
|
|
15394
|
+
if (Fe?.actionKey === "edit" && Fe.record && He(Fe.record) === t) {
|
|
15395
|
+
ze();
|
|
15231
15396
|
return;
|
|
15232
15397
|
}
|
|
15233
|
-
|
|
15398
|
+
Re("edit", e);
|
|
15234
15399
|
}, [
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15400
|
+
Fe?.actionKey,
|
|
15401
|
+
Fe?.record,
|
|
15402
|
+
Ge,
|
|
15403
|
+
ze,
|
|
15404
|
+
He,
|
|
15240
15405
|
D,
|
|
15241
|
-
|
|
15242
|
-
]),
|
|
15243
|
-
let i =
|
|
15406
|
+
Re
|
|
15407
|
+
]), qe = D || Ge ? Ke : void 0, Je = s((e, n, r) => {
|
|
15408
|
+
let i = Pe[e];
|
|
15244
15409
|
return !i || !Jf(i, n) ? null : /* @__PURE__ */ t.createElement(Br, {
|
|
15245
15410
|
className: r || (e === "add" ? "btn-primary" : void 0),
|
|
15246
15411
|
icon: i.icon,
|
|
15247
15412
|
label: Xf(e, i, V),
|
|
15248
15413
|
disabled: Yf(i, n),
|
|
15249
|
-
onClick: () =>
|
|
15414
|
+
onClick: () => Re(e, n)
|
|
15250
15415
|
});
|
|
15251
15416
|
}, [
|
|
15252
|
-
|
|
15253
|
-
|
|
15417
|
+
Pe,
|
|
15418
|
+
Re,
|
|
15254
15419
|
V
|
|
15255
|
-
]),
|
|
15420
|
+
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Jf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
|
|
15256
15421
|
title: x,
|
|
15257
15422
|
records: U,
|
|
15258
|
-
selection:
|
|
15259
|
-
runAction:
|
|
15423
|
+
selection: Me,
|
|
15424
|
+
runAction: Re
|
|
15260
15425
|
}), [
|
|
15261
15426
|
U,
|
|
15262
|
-
|
|
15263
|
-
|
|
15427
|
+
Re,
|
|
15428
|
+
Me,
|
|
15264
15429
|
x
|
|
15265
|
-
]),
|
|
15430
|
+
]), Ze = p(() => ({
|
|
15266
15431
|
records: U,
|
|
15267
|
-
selection:
|
|
15268
|
-
runAction:
|
|
15432
|
+
selection: Me,
|
|
15433
|
+
runAction: Re
|
|
15269
15434
|
}), [
|
|
15270
15435
|
U,
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
]),
|
|
15436
|
+
Re,
|
|
15437
|
+
Me
|
|
15438
|
+
]), Qe = he.toggle ? /* @__PURE__ */ t.createElement("span", { className: "inline-flex rounded-md border border-border overflow-hidden" }, /* @__PURE__ */ t.createElement(Br, {
|
|
15274
15439
|
icon: "list",
|
|
15275
15440
|
ariaLabel: "Table view",
|
|
15276
15441
|
title: "Table view",
|
|
15277
|
-
className: "rounded-none border-0 " + (
|
|
15278
|
-
onClick: () =>
|
|
15442
|
+
className: "rounded-none border-0 " + (ve === "table" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15443
|
+
onClick: () => ye("table")
|
|
15279
15444
|
}), /* @__PURE__ */ t.createElement(Br, {
|
|
15280
15445
|
icon: "layout-grid",
|
|
15281
15446
|
ariaLabel: "Gallery view",
|
|
15282
15447
|
title: "Gallery view",
|
|
15283
|
-
className: "rounded-none border-0 border-l border-border " + (
|
|
15284
|
-
onClick: () =>
|
|
15285
|
-
})) : null,
|
|
15448
|
+
className: "rounded-none border-0 border-l border-border " + (ve === "gallery" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15449
|
+
onClick: () => ye("gallery")
|
|
15450
|
+
})) : null, $e = ge.columnPicker && ve === "table" ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15286
15451
|
trigger: {
|
|
15287
15452
|
icon: "columns",
|
|
15288
15453
|
title: "Columns"
|
|
@@ -15296,122 +15461,122 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15296
15461
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15297
15462
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15298
15463
|
type: "checkbox",
|
|
15299
|
-
checked: !
|
|
15300
|
-
onChange: () =>
|
|
15464
|
+
checked: !be.has(n),
|
|
15465
|
+
onChange: () => Se(n)
|
|
15301
15466
|
}), e.label);
|
|
15302
|
-
})) : null,
|
|
15467
|
+
})) : null, et = _e.fieldPicker && ve === "gallery" && we.length ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15303
15468
|
trigger: {
|
|
15304
15469
|
icon: "sliders-horizontal",
|
|
15305
15470
|
title: "Fields"
|
|
15306
15471
|
},
|
|
15307
15472
|
triggerClassName: "btn btn-outline-secondary",
|
|
15308
15473
|
position: "end"
|
|
15309
|
-
},
|
|
15474
|
+
}, we.map((e) => {
|
|
15310
15475
|
let n = String(e.key);
|
|
15311
15476
|
return /* @__PURE__ */ t.createElement("label", {
|
|
15312
15477
|
key: n,
|
|
15313
15478
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15314
15479
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15315
15480
|
type: "checkbox",
|
|
15316
|
-
checked: !
|
|
15317
|
-
onChange: () =>
|
|
15481
|
+
checked: !Te.has(n),
|
|
15482
|
+
onChange: () => De(n)
|
|
15318
15483
|
}), e.label);
|
|
15319
|
-
})) : null,
|
|
15320
|
-
if (u !== void 0) return typeof u == "function" ? u(
|
|
15321
|
-
if (!(!x && !
|
|
15484
|
+
})) : null, tt = p(() => {
|
|
15485
|
+
if (u !== void 0) return typeof u == "function" ? u(Xe) : u;
|
|
15486
|
+
if (!(!x && !me && !le && !Ye.length && !Qe && !$e && !et)) return /* @__PURE__ */ t.createElement(t.Fragment, null, me || le ? /* @__PURE__ */ t.createElement("span", { className: "flex min-w-0 flex-1 items-center gap-3" }, x, me, le) : x || /* @__PURE__ */ t.createElement("span", null), Ye.length || Qe || $e || et ? /* @__PURE__ */ t.createElement("span", { className: "flex flex-wrap items-center gap-2" }, $e, et, Qe, Ye.map((e) => /* @__PURE__ */ t.createElement(t.Fragment, { key: e }, Je(e)))) : null);
|
|
15322
15487
|
}, [
|
|
15323
|
-
|
|
15488
|
+
Je,
|
|
15324
15489
|
u,
|
|
15325
|
-
|
|
15326
|
-
|
|
15490
|
+
Ye,
|
|
15491
|
+
Xe,
|
|
15327
15492
|
x,
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
]),
|
|
15334
|
-
if (d !== void 0) return typeof d == "function" ? d(
|
|
15335
|
-
}, [d,
|
|
15336
|
-
if (!(!
|
|
15493
|
+
Qe,
|
|
15494
|
+
$e,
|
|
15495
|
+
et,
|
|
15496
|
+
me,
|
|
15497
|
+
le
|
|
15498
|
+
]), nt = p(() => {
|
|
15499
|
+
if (d !== void 0) return typeof d == "function" ? d(Ze) : d;
|
|
15500
|
+
}, [d, Ze]), rt = p(() => {
|
|
15501
|
+
if (!(!Fe || !J || J.kind !== "modal" && J.kind !== "delete")) return Ve(Fe.actionKey, Fe.record);
|
|
15337
15502
|
}, [
|
|
15338
|
-
|
|
15503
|
+
Fe,
|
|
15339
15504
|
J,
|
|
15340
|
-
|
|
15341
|
-
]),
|
|
15342
|
-
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !
|
|
15343
|
-
}, [J,
|
|
15505
|
+
Ve
|
|
15506
|
+
]), it = p(() => {
|
|
15507
|
+
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !rt)) return typeof J.header == "function" ? J.header(rt) : J.header;
|
|
15508
|
+
}, [J, rt]), at = p(() => {
|
|
15344
15509
|
if (!(!J || J.kind !== "modal" && J.kind !== "delete")) {
|
|
15345
15510
|
if (J.footer === !1) return !1;
|
|
15346
|
-
if (!(J.footer === void 0 || !
|
|
15511
|
+
if (!(J.footer === void 0 || !rt)) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
|
|
15347
15512
|
}
|
|
15348
|
-
}, [J,
|
|
15513
|
+
}, [J, rt]), ot = Zf(w);
|
|
15349
15514
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ki, {
|
|
15350
15515
|
wrapperClassName: _,
|
|
15351
|
-
header:
|
|
15352
|
-
footer:
|
|
15516
|
+
header: tt,
|
|
15517
|
+
footer: nt,
|
|
15353
15518
|
className: X(R.Grid.Card.className, g ? `sticky-${g}` : "", v),
|
|
15354
15519
|
headerClassName: R.Grid.Card.headerClassName,
|
|
15355
15520
|
bodyClassName: X(R.Grid.Card.bodyClassName, y),
|
|
15356
15521
|
footerClassName: R.Grid.Card.footerClassName,
|
|
15357
15522
|
loading: b || W
|
|
15358
|
-
},
|
|
15359
|
-
records:
|
|
15523
|
+
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(Wp, {
|
|
15524
|
+
records: pe,
|
|
15360
15525
|
recordId: n,
|
|
15361
|
-
sortable:
|
|
15526
|
+
sortable: ot || w,
|
|
15362
15527
|
pagination: T,
|
|
15363
|
-
selection:
|
|
15364
|
-
selectedKeys:
|
|
15365
|
-
onSelectionChange:
|
|
15366
|
-
onRowClick:
|
|
15528
|
+
selection: Ae,
|
|
15529
|
+
selectedKeys: je,
|
|
15530
|
+
onSelectionChange: Ae ? Ne : void 0,
|
|
15531
|
+
onRowClick: qe,
|
|
15367
15532
|
groupBy: A,
|
|
15368
15533
|
wrapperClassName: R.Grid.Gallery.wrapperClassName,
|
|
15369
15534
|
before: S,
|
|
15370
15535
|
after: C,
|
|
15371
|
-
columns:
|
|
15372
|
-
overlays:
|
|
15536
|
+
columns: _e.columns,
|
|
15537
|
+
overlays: ke
|
|
15373
15538
|
}) : /* @__PURE__ */ t.createElement(Qf, {
|
|
15374
|
-
records:
|
|
15539
|
+
records: pe,
|
|
15375
15540
|
recordId: n,
|
|
15376
|
-
columns:
|
|
15377
|
-
runAction:
|
|
15378
|
-
sortable:
|
|
15541
|
+
columns: Ce,
|
|
15542
|
+
runAction: Re,
|
|
15543
|
+
sortable: ot || w,
|
|
15379
15544
|
pagination: T,
|
|
15380
|
-
selection:
|
|
15381
|
-
selectedKeys:
|
|
15382
|
-
onSelectionChange:
|
|
15383
|
-
onRowClick:
|
|
15545
|
+
selection: Ae,
|
|
15546
|
+
selectedKeys: je,
|
|
15547
|
+
onSelectionChange: Ae ? Ne : void 0,
|
|
15548
|
+
onRowClick: qe,
|
|
15384
15549
|
reorderable: O,
|
|
15385
15550
|
onReorder: k,
|
|
15386
|
-
activeKey:
|
|
15551
|
+
activeKey: Le,
|
|
15387
15552
|
groupBy: A,
|
|
15388
15553
|
wrapperClassName: R.Grid.Table.wrapperClassName,
|
|
15389
|
-
className:
|
|
15390
|
-
heightClassName:
|
|
15391
|
-
scrollClassName:
|
|
15392
|
-
headerClassName:
|
|
15554
|
+
className: ge.className,
|
|
15555
|
+
heightClassName: ge.heightClassName,
|
|
15556
|
+
scrollClassName: ge.scrollClassName,
|
|
15557
|
+
headerClassName: ge.headerClassName,
|
|
15393
15558
|
before: S,
|
|
15394
15559
|
after: C
|
|
15395
|
-
})),
|
|
15560
|
+
})), ue, Fe && J && (J.kind === "modal" || J.kind === "delete") && /* @__PURE__ */ t.createElement(Ai, {
|
|
15396
15561
|
size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
|
|
15397
15562
|
position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
|
|
15398
|
-
header:
|
|
15399
|
-
title: Yp(
|
|
15400
|
-
onClose:
|
|
15401
|
-
onSave: J.kind === "modal" && J.footer === void 0 && (
|
|
15563
|
+
header: it,
|
|
15564
|
+
title: Yp(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
|
|
15565
|
+
onClose: ze,
|
|
15566
|
+
onSave: J.kind === "modal" && J.footer === void 0 && (Fe.actionKey === "add" || Fe.actionKey === "edit") ? (e) => Ue.save(e) : void 0,
|
|
15402
15567
|
onDelete: J.kind === "delete" ? async () => {
|
|
15403
|
-
let e =
|
|
15568
|
+
let e = Fe.record;
|
|
15404
15569
|
if (!e) return !1;
|
|
15405
|
-
let t = P ? await P({ record: e }) : r ? `${r}/${
|
|
15570
|
+
let t = P ? await P({ record: e }) : r ? `${r}/${He(e)}` : void 0;
|
|
15406
15571
|
if (!t && !P) return !1;
|
|
15407
15572
|
t && await H.remove(t);
|
|
15408
15573
|
let n = await F?.({
|
|
15409
15574
|
record: e,
|
|
15410
15575
|
action: "delete"
|
|
15411
15576
|
}) ?? !0;
|
|
15412
|
-
return n &&
|
|
15413
|
-
} : J.kind === "modal" && J.footer === void 0 &&
|
|
15414
|
-
footer:
|
|
15577
|
+
return n && ze(), n;
|
|
15578
|
+
} : J.kind === "modal" && J.footer === void 0 && Fe.actionKey === "edit" && Fe.record && Pe.delete ? async () => (await Ve(Fe.actionKey, Fe.record).runAction("remove"), !1) : void 0,
|
|
15579
|
+
footer: at,
|
|
15415
15580
|
showCancel: J.kind === "modal" || J.kind === "delete" ? J.footer === void 0 : !0,
|
|
15416
15581
|
allowFullscreen: J.kind === "modal" || J.kind === "delete" ? J.allowFullscreen : !0,
|
|
15417
15582
|
wrapperClassName: R.Grid.Modal.wrapperClassName,
|
|
@@ -15420,22 +15585,22 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15420
15585
|
titleClassName: R.Grid.Modal.titleClassName,
|
|
15421
15586
|
bodyClassName: R.Grid.Modal.bodyClassName,
|
|
15422
15587
|
footerClassName: R.Grid.Modal.footerClassName
|
|
15423
|
-
},
|
|
15588
|
+
}, Ie));
|
|
15424
15589
|
}
|
|
15425
15590
|
//#endregion
|
|
15426
15591
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
15427
|
-
function
|
|
15428
|
-
return /* @__PURE__ */ t.createElement(
|
|
15592
|
+
function rm(e) {
|
|
15593
|
+
return /* @__PURE__ */ t.createElement(nm, e);
|
|
15429
15594
|
}
|
|
15430
15595
|
//#endregion
|
|
15431
15596
|
//#region src/components/widgets/Grid.tsx
|
|
15432
|
-
function
|
|
15433
|
-
return "records" in e ? /* @__PURE__ */ t.createElement(
|
|
15597
|
+
function im(e) {
|
|
15598
|
+
return "records" in e ? /* @__PURE__ */ t.createElement(rm, e) : /* @__PURE__ */ t.createElement(zf, e);
|
|
15434
15599
|
}
|
|
15435
15600
|
//#endregion
|
|
15436
15601
|
//#region src/pages/Users.tsx
|
|
15437
|
-
function
|
|
15438
|
-
return /* @__PURE__ */ t.createElement(
|
|
15602
|
+
function am() {
|
|
15603
|
+
return /* @__PURE__ */ t.createElement(im, {
|
|
15439
15604
|
path: "/users",
|
|
15440
15605
|
recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
|
|
15441
15606
|
form: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(gs, {
|
|
@@ -15462,10 +15627,10 @@ function $p() {
|
|
|
15462
15627
|
}
|
|
15463
15628
|
//#endregion
|
|
15464
15629
|
//#region src/pages/NotFound.tsx
|
|
15465
|
-
var
|
|
15630
|
+
var om = () => {
|
|
15466
15631
|
let e = Nn("common");
|
|
15467
15632
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ t.createElement("h1", null, "404"), /* @__PURE__ */ t.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ t.createElement(v, { to: "/" }, /* @__PURE__ */ t.createElement(Q, { name: "house-door" }), " ", e.goHome));
|
|
15468
|
-
},
|
|
15633
|
+
}, sm = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15469
15634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15470
15635
|
width: e,
|
|
15471
15636
|
height: e,
|
|
@@ -15485,7 +15650,7 @@ var em = () => {
|
|
|
15485
15650
|
x2: "12.01",
|
|
15486
15651
|
y1: "17",
|
|
15487
15652
|
y2: "17"
|
|
15488
|
-
})),
|
|
15653
|
+
})), cm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15489
15654
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15490
15655
|
width: "13",
|
|
15491
15656
|
height: "13",
|
|
@@ -15500,7 +15665,7 @@ var em = () => {
|
|
|
15500
15665
|
transform: e ? "rotate(180deg)" : "none",
|
|
15501
15666
|
flexShrink: 0
|
|
15502
15667
|
}
|
|
15503
|
-
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })),
|
|
15668
|
+
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), lm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15504
15669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15505
15670
|
width: "13",
|
|
15506
15671
|
height: "13",
|
|
@@ -15517,7 +15682,7 @@ var em = () => {
|
|
|
15517
15682
|
y: "8",
|
|
15518
15683
|
rx: "2",
|
|
15519
15684
|
ry: "2"
|
|
15520
|
-
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })),
|
|
15685
|
+
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), um = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15521
15686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15522
15687
|
width: "13",
|
|
15523
15688
|
height: "13",
|
|
@@ -15527,7 +15692,7 @@ var em = () => {
|
|
|
15527
15692
|
strokeWidth: "2",
|
|
15528
15693
|
strokeLinecap: "round",
|
|
15529
15694
|
strokeLinejoin: "round"
|
|
15530
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })),
|
|
15695
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })), dm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15531
15696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15532
15697
|
width: "14",
|
|
15533
15698
|
height: "14",
|
|
@@ -15537,7 +15702,7 @@ var em = () => {
|
|
|
15537
15702
|
strokeWidth: "2",
|
|
15538
15703
|
strokeLinecap: "round",
|
|
15539
15704
|
strokeLinejoin: "round"
|
|
15540
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })),
|
|
15705
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), fm = (e, t) => ({
|
|
15541
15706
|
error: {
|
|
15542
15707
|
message: e.message,
|
|
15543
15708
|
stack: e.stack ?? ""
|
|
@@ -15548,8 +15713,8 @@ var em = () => {
|
|
|
15548
15713
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
15549
15714
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
15550
15715
|
}
|
|
15551
|
-
}),
|
|
15552
|
-
let n =
|
|
15716
|
+
}), pm = (e, t) => {
|
|
15717
|
+
let n = fm(e, t);
|
|
15553
15718
|
return [
|
|
15554
15719
|
`Error: ${n.error.message}`,
|
|
15555
15720
|
"",
|
|
@@ -15564,7 +15729,7 @@ var em = () => {
|
|
|
15564
15729
|
`Timestamp: ${n.context.timestamp}`,
|
|
15565
15730
|
`Agent: ${n.context.userAgent}`
|
|
15566
15731
|
].join("\n");
|
|
15567
|
-
},
|
|
15732
|
+
}, mm = class extends t.Component {
|
|
15568
15733
|
constructor(e) {
|
|
15569
15734
|
super(e), this.state = {
|
|
15570
15735
|
error: null,
|
|
@@ -15586,7 +15751,7 @@ var em = () => {
|
|
|
15586
15751
|
};
|
|
15587
15752
|
copy = () => {
|
|
15588
15753
|
let { error: e, errorInfo: t } = this.state;
|
|
15589
|
-
e && navigator.clipboard?.writeText(
|
|
15754
|
+
e && navigator.clipboard?.writeText(pm(e, t)).then(() => {
|
|
15590
15755
|
this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
|
|
15591
15756
|
});
|
|
15592
15757
|
};
|
|
@@ -15595,7 +15760,7 @@ var em = () => {
|
|
|
15595
15760
|
!e || !n || (this.setState({ reportState: "sending" }), fetch(n, {
|
|
15596
15761
|
method: "POST",
|
|
15597
15762
|
headers: { "Content-Type": "application/json" },
|
|
15598
|
-
body: JSON.stringify(
|
|
15763
|
+
body: JSON.stringify(fm(e, t))
|
|
15599
15764
|
}).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
|
|
15600
15765
|
};
|
|
15601
15766
|
render() {
|
|
@@ -15605,16 +15770,16 @@ var em = () => {
|
|
|
15605
15770
|
if (typeof s == "function") return s(e, this.reset);
|
|
15606
15771
|
if (s != null) return s;
|
|
15607
15772
|
let d = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), f = (n?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = l ? "flex min-h-screen flex-col items-center justify-center bg-background p-8" : "flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center p-8";
|
|
15608
|
-
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(
|
|
15773
|
+
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(sm, { size: 22 })), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-semibold text-foreground" }, "This page ran into a problem"), /* @__PURE__ */ t.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, "An unexpected error occurred while rendering this content."))), /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ t.createElement("button", {
|
|
15609
15774
|
onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
|
|
15610
15775
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
|
|
15611
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15776
|
+
}, /* @__PURE__ */ t.createElement(cm, { open: r }), "Technical details", /* @__PURE__ */ t.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), r && /* @__PURE__ */ t.createElement("div", { className: "border-t" }, /* @__PURE__ */ t.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, d.join("\n")))), u && /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ t.createElement("button", {
|
|
15612
15777
|
onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
|
|
15613
15778
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-amber-700 dark:text-amber-400 transition-colors hover:opacity-80"
|
|
15614
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15779
|
+
}, /* @__PURE__ */ t.createElement(dm, null), /* @__PURE__ */ t.createElement(cm, { open: i }), "Debug information", /* @__PURE__ */ t.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), i && /* @__PURE__ */ t.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Context"), /* @__PURE__ */ t.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Time"), /* @__PURE__ */ t.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Agent"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Component tree"), /* @__PURE__ */ t.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, f.join("\n"))), /* @__PURE__ */ t.createElement("button", {
|
|
15615
15780
|
onClick: this.copy,
|
|
15616
15781
|
className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
|
|
15617
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15782
|
+
}, /* @__PURE__ */ t.createElement(lm, null), a ? "Copied!" : "Copy debug info"))), /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("button", {
|
|
15618
15783
|
onClick: this.reset,
|
|
15619
15784
|
className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
|
|
15620
15785
|
}, "Try again"), /* @__PURE__ */ t.createElement("a", {
|
|
@@ -15624,15 +15789,15 @@ var em = () => {
|
|
|
15624
15789
|
onClick: this.sendReport,
|
|
15625
15790
|
disabled: o === "sending" || o === "sent",
|
|
15626
15791
|
className: "ml-auto flex items-center gap-1.5 rounded-md border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-accent disabled:opacity-50"
|
|
15627
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15792
|
+
}, /* @__PURE__ */ t.createElement(um, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
|
|
15628
15793
|
}
|
|
15629
|
-
},
|
|
15794
|
+
}, hm = async () => {
|
|
15630
15795
|
window.google?.accounts?.id || (vt([{
|
|
15631
15796
|
src: "https://accounts.google.com/gsi/client",
|
|
15632
15797
|
async: !0,
|
|
15633
15798
|
clean: !0
|
|
15634
15799
|
}]), await new Promise((e) => setTimeout(e, 0)));
|
|
15635
|
-
},
|
|
15800
|
+
}, gm = class {
|
|
15636
15801
|
getConfigurationState() {
|
|
15637
15802
|
return ii("GoogleAuthProvider", ri(Ea("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
15638
15803
|
}
|
|
@@ -15655,7 +15820,7 @@ var em = () => {
|
|
|
15655
15820
|
async signIn(e = {}) {
|
|
15656
15821
|
let t = Ea("oAuth2");
|
|
15657
15822
|
if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
|
|
15658
|
-
return await
|
|
15823
|
+
return await hm(), new Promise((n, r) => {
|
|
15659
15824
|
if (!window.google?.accounts?.id) {
|
|
15660
15825
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
|
|
15661
15826
|
return;
|
|
@@ -15736,41 +15901,41 @@ var em = () => {
|
|
|
15736
15901
|
isAuthenticated() {
|
|
15737
15902
|
return !!this.getUser();
|
|
15738
15903
|
}
|
|
15739
|
-
},
|
|
15904
|
+
}, _m = a(null), vm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15740
15905
|
let i = p(() => ({
|
|
15741
15906
|
registry: e,
|
|
15742
15907
|
defaultKey: n
|
|
15743
15908
|
}), [e, n]);
|
|
15744
|
-
return /* @__PURE__ */ t.createElement(
|
|
15745
|
-
},
|
|
15746
|
-
let t = c(
|
|
15909
|
+
return /* @__PURE__ */ t.createElement(_m.Provider, { value: i }, r);
|
|
15910
|
+
}, ym = (e) => {
|
|
15911
|
+
let t = c(_m);
|
|
15747
15912
|
if (!t) return null;
|
|
15748
15913
|
let n = e ?? t.defaultKey;
|
|
15749
15914
|
return t.registry[n] ?? null;
|
|
15750
|
-
},
|
|
15915
|
+
}, bm = a(null), xm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15751
15916
|
let i = p(() => ({
|
|
15752
15917
|
registry: e,
|
|
15753
15918
|
defaultKey: n
|
|
15754
15919
|
}), [e, n]);
|
|
15755
|
-
return /* @__PURE__ */ t.createElement(
|
|
15756
|
-
},
|
|
15757
|
-
let t = c(
|
|
15920
|
+
return /* @__PURE__ */ t.createElement(bm.Provider, { value: i }, r);
|
|
15921
|
+
}, Sm = (e) => {
|
|
15922
|
+
let t = c(bm);
|
|
15758
15923
|
if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
|
|
15759
15924
|
let n = e ?? t.defaultKey, r = t.registry[n];
|
|
15760
15925
|
if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
|
|
15761
15926
|
return r;
|
|
15762
|
-
},
|
|
15927
|
+
}, Cm = {
|
|
15763
15928
|
key: "@key",
|
|
15764
15929
|
value: "@value"
|
|
15765
|
-
},
|
|
15930
|
+
}, wm = () => Ie(), Tm = (e, t, n) => {
|
|
15766
15931
|
let r = `Error during ${e}: ${String(t)}`;
|
|
15767
15932
|
if (n) throw Error(r);
|
|
15768
15933
|
console.error(r);
|
|
15769
|
-
},
|
|
15934
|
+
}, Em = (e, t) => {
|
|
15770
15935
|
if (!e || !(t in e)) return e;
|
|
15771
15936
|
let { [t]: n, ...r } = e;
|
|
15772
15937
|
return Object.keys(r).length ? r : void 0;
|
|
15773
|
-
},
|
|
15938
|
+
}, Dm = (e) => {
|
|
15774
15939
|
let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
|
|
15775
15940
|
return t.gt !== void 0 && (n = {
|
|
15776
15941
|
...n,
|
|
@@ -15788,40 +15953,40 @@ var em = () => {
|
|
|
15788
15953
|
condition: t,
|
|
15789
15954
|
clientCondition: n
|
|
15790
15955
|
};
|
|
15791
|
-
},
|
|
15956
|
+
}, Om = (e, t) => {
|
|
15792
15957
|
switch (t) {
|
|
15793
|
-
case
|
|
15794
|
-
case
|
|
15958
|
+
case Cm.key: return Ve(e, ze());
|
|
15959
|
+
case Cm.value: return Ve(e, Be());
|
|
15795
15960
|
default: return Ve(e, Re(t));
|
|
15796
15961
|
}
|
|
15797
|
-
},
|
|
15962
|
+
}, km = (e, t, n) => {
|
|
15798
15963
|
let [r] = Object.entries(t || {});
|
|
15799
15964
|
if (!r) return {
|
|
15800
15965
|
dbRef: e,
|
|
15801
15966
|
clientWhere: n
|
|
15802
15967
|
};
|
|
15803
|
-
let [i] = r, a =
|
|
15968
|
+
let [i] = r, a = Om(e, i), o = n?.[i];
|
|
15804
15969
|
if (o == null) return {
|
|
15805
15970
|
dbRef: a,
|
|
15806
15971
|
clientWhere: n
|
|
15807
15972
|
};
|
|
15808
|
-
let { condition: s, clientCondition: c } =
|
|
15973
|
+
let { condition: s, clientCondition: c } = Dm(o);
|
|
15809
15974
|
switch (!0) {
|
|
15810
15975
|
case s.eq !== void 0: return {
|
|
15811
|
-
dbRef: Ve(a,
|
|
15812
|
-
clientWhere:
|
|
15976
|
+
dbRef: Ve(a, Fe(s.eq)),
|
|
15977
|
+
clientWhere: Em(n, i)
|
|
15813
15978
|
};
|
|
15814
15979
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
15815
|
-
a = Ve(a, Ge(s.gte),
|
|
15980
|
+
a = Ve(a, Ge(s.gte), Pe(s.lte));
|
|
15816
15981
|
break;
|
|
15817
15982
|
case s.gte !== void 0 && s.lt !== void 0:
|
|
15818
|
-
a = Ve(a, Ge(s.gte),
|
|
15983
|
+
a = Ve(a, Ge(s.gte), Pe(s.lt));
|
|
15819
15984
|
break;
|
|
15820
15985
|
case s.gt !== void 0 && s.lte !== void 0:
|
|
15821
|
-
a = Ve(a, Ge(s.gt),
|
|
15986
|
+
a = Ve(a, Ge(s.gt), Pe(s.lte));
|
|
15822
15987
|
break;
|
|
15823
15988
|
case s.gt !== void 0 && s.lt !== void 0:
|
|
15824
|
-
a = Ve(a, Ge(s.gt),
|
|
15989
|
+
a = Ve(a, Ge(s.gt), Pe(s.lt));
|
|
15825
15990
|
break;
|
|
15826
15991
|
case s.gte !== void 0:
|
|
15827
15992
|
a = Ve(a, Ge(s.gte));
|
|
@@ -15830,20 +15995,20 @@ var em = () => {
|
|
|
15830
15995
|
a = Ve(a, Ge(s.gt));
|
|
15831
15996
|
break;
|
|
15832
15997
|
case s.lte !== void 0:
|
|
15833
|
-
a = Ve(a,
|
|
15998
|
+
a = Ve(a, Pe(s.lte));
|
|
15834
15999
|
break;
|
|
15835
16000
|
case s.lt !== void 0:
|
|
15836
|
-
a = Ve(a,
|
|
16001
|
+
a = Ve(a, Pe(s.lt));
|
|
15837
16002
|
break;
|
|
15838
16003
|
}
|
|
15839
16004
|
return {
|
|
15840
16005
|
dbRef: a,
|
|
15841
16006
|
clientWhere: c ? {
|
|
15842
|
-
...
|
|
16007
|
+
...Em(n, i) || {},
|
|
15843
16008
|
[i]: c
|
|
15844
|
-
} :
|
|
16009
|
+
} : Em(n, i)
|
|
15845
16010
|
};
|
|
15846
|
-
},
|
|
16011
|
+
}, Am = (e, t) => {
|
|
15847
16012
|
if (!t) return e;
|
|
15848
16013
|
let n = t.split("."), r = e;
|
|
15849
16014
|
for (let e of n) {
|
|
@@ -15851,10 +16016,10 @@ var em = () => {
|
|
|
15851
16016
|
r = r[e];
|
|
15852
16017
|
}
|
|
15853
16018
|
return r;
|
|
15854
|
-
},
|
|
16019
|
+
}, jm = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
|
|
15855
16020
|
numeric: !0,
|
|
15856
16021
|
sensitivity: "base"
|
|
15857
|
-
}),
|
|
16022
|
+
}), Mm = (e, t) => {
|
|
15858
16023
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
|
|
15859
16024
|
for (let [t, r] of Object.entries(n)) switch (t) {
|
|
15860
16025
|
case "eq":
|
|
@@ -15881,23 +16046,23 @@ var em = () => {
|
|
|
15881
16046
|
default: return !1;
|
|
15882
16047
|
}
|
|
15883
16048
|
return !0;
|
|
15884
|
-
},
|
|
16049
|
+
}, Nm = (e, t, n) => {
|
|
15885
16050
|
let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
|
|
15886
|
-
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) =>
|
|
16051
|
+
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Mm(Am(e, t), n)))), r) {
|
|
15887
16052
|
let e = [r, ...i];
|
|
15888
16053
|
o.sort((t, n) => {
|
|
15889
16054
|
for (let [r, i] of e) {
|
|
15890
|
-
let e =
|
|
16055
|
+
let e = jm(Am(t[1], r), Am(n[1], r));
|
|
15891
16056
|
if (e) return i === "desc" ? -e : e;
|
|
15892
16057
|
}
|
|
15893
16058
|
return 0;
|
|
15894
16059
|
});
|
|
15895
16060
|
}
|
|
15896
16061
|
return Object.fromEntries(o);
|
|
15897
|
-
},
|
|
15898
|
-
let t = await Na()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(
|
|
16062
|
+
}, Pm = async (e) => {
|
|
16063
|
+
let t = await Na()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(wm()).toString());
|
|
15899
16064
|
return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
|
|
15900
|
-
},
|
|
16065
|
+
}, Fm = class e {
|
|
15901
16066
|
static listenerRegistered = !1;
|
|
15902
16067
|
constructor() {
|
|
15903
16068
|
!e.listenerRegistered && typeof Sa == "function" && (e.listenerRegistered = !0, Sa((e) => {
|
|
@@ -15912,43 +16077,43 @@ var em = () => {
|
|
|
15912
16077
|
}
|
|
15913
16078
|
readShallow = async (e, t = !1) => {
|
|
15914
16079
|
try {
|
|
15915
|
-
let t = await
|
|
16080
|
+
let t = await Pm(e), n = await fetch(t);
|
|
15916
16081
|
if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
|
|
15917
16082
|
let r = await n.json();
|
|
15918
16083
|
return r ? Object.keys(r) : [];
|
|
15919
16084
|
} catch (n) {
|
|
15920
|
-
return
|
|
16085
|
+
return Tm(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
|
|
15921
16086
|
}
|
|
15922
16087
|
};
|
|
15923
16088
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
15924
|
-
let { dbRef: a, clientWhere: o } =
|
|
16089
|
+
let { dbRef: a, clientWhere: o } = km(He(wm(), e), n, t);
|
|
15925
16090
|
try {
|
|
15926
|
-
let t = await
|
|
16091
|
+
let t = await J(a);
|
|
15927
16092
|
if (t.exists()) {
|
|
15928
16093
|
`${e}`;
|
|
15929
|
-
let i =
|
|
16094
|
+
let i = Nm(t.val(), o, n);
|
|
15930
16095
|
return r ? Object.values(i) : i;
|
|
15931
|
-
} else i &&
|
|
16096
|
+
} else i && Tm(`Data not found in Firebase for path ${e}`, null, i);
|
|
15932
16097
|
} catch (t) {
|
|
15933
|
-
|
|
16098
|
+
Tm(`reading data in Firebase for ${e}`, t, i);
|
|
15934
16099
|
}
|
|
15935
16100
|
};
|
|
15936
16101
|
update = async (e, t, n = !1) => {
|
|
15937
16102
|
try {
|
|
15938
|
-
await Ke(He(
|
|
16103
|
+
await Ke(He(wm(), e), t), `${e}`;
|
|
15939
16104
|
} catch (t) {
|
|
15940
|
-
|
|
16105
|
+
Tm(`updating data in Firebase for ${e}`, t, n);
|
|
15941
16106
|
}
|
|
15942
16107
|
};
|
|
15943
16108
|
set = async (e, t, n = !1) => {
|
|
15944
16109
|
try {
|
|
15945
|
-
await We(He(
|
|
16110
|
+
await We(He(wm(), e), t), `${e}`;
|
|
15946
16111
|
} catch (t) {
|
|
15947
|
-
|
|
16112
|
+
Tm(`updating data in Firebase for ${e}`, t, n);
|
|
15948
16113
|
}
|
|
15949
16114
|
};
|
|
15950
16115
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
15951
|
-
let a = He(
|
|
16116
|
+
let a = He(wm(), e);
|
|
15952
16117
|
try {
|
|
15953
16118
|
r && (await Ue(a), i?.(0, 0, `Purging existing data at ${e}`));
|
|
15954
16119
|
let o = Object.entries(Nt(t)), s = Math.ceil(o.length / n);
|
|
@@ -15958,14 +16123,14 @@ var em = () => {
|
|
|
15958
16123
|
i?.(t, s, `Saving chunk ${t}/${s}`);
|
|
15959
16124
|
}
|
|
15960
16125
|
} catch (t) {
|
|
15961
|
-
|
|
16126
|
+
Tm(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
15962
16127
|
}
|
|
15963
16128
|
};
|
|
15964
16129
|
remove = async (e, t = !1) => {
|
|
15965
16130
|
try {
|
|
15966
|
-
await Ue(He(
|
|
16131
|
+
await Ue(He(wm(), e)), `${e}`;
|
|
15967
16132
|
} catch (n) {
|
|
15968
|
-
|
|
16133
|
+
Tm(`removing data from Firebase for ${e}`, n, t);
|
|
15969
16134
|
}
|
|
15970
16135
|
};
|
|
15971
16136
|
count = async (e) => (await this.readShallow(e)).length;
|
|
@@ -15973,14 +16138,14 @@ var em = () => {
|
|
|
15973
16138
|
let o = Na();
|
|
15974
16139
|
if (!o || !e) return () => void 0;
|
|
15975
16140
|
let s = () => {
|
|
15976
|
-
let { dbRef: o, clientWhere: s } =
|
|
16141
|
+
let { dbRef: o, clientWhere: s } = km(He(wm(), e), r, n);
|
|
15977
16142
|
return Le(o, (e) => {
|
|
15978
16143
|
let n = e.val();
|
|
15979
16144
|
if (!n) {
|
|
15980
16145
|
t([]);
|
|
15981
16146
|
return;
|
|
15982
16147
|
}
|
|
15983
|
-
let o = a ? a(
|
|
16148
|
+
let o = a ? a(Nm(n, s, r)) : Nm(n, s, r), c = Object.entries(o);
|
|
15984
16149
|
if (!i) {
|
|
15985
16150
|
t(c.map(([e, t], n) => typeof t == "object" && t ? {
|
|
15986
16151
|
_index: n,
|
|
@@ -15989,22 +16154,22 @@ var em = () => {
|
|
|
15989
16154
|
} : {
|
|
15990
16155
|
_index: n,
|
|
15991
16156
|
[La]: e,
|
|
15992
|
-
[
|
|
16157
|
+
[Cm.value]: t
|
|
15993
16158
|
}));
|
|
15994
16159
|
return;
|
|
15995
16160
|
}
|
|
15996
16161
|
let l = Object.keys(i);
|
|
15997
16162
|
t(c.map(([e, t], n) => {
|
|
15998
16163
|
let r = typeof t == "object" && t ? {
|
|
15999
|
-
[
|
|
16164
|
+
[Cm.key]: e,
|
|
16000
16165
|
...t
|
|
16001
16166
|
} : {
|
|
16002
|
-
[
|
|
16003
|
-
[
|
|
16167
|
+
[Cm.key]: e,
|
|
16168
|
+
[Cm.value]: t
|
|
16004
16169
|
}, a = {};
|
|
16005
16170
|
for (let n of l) {
|
|
16006
16171
|
let o = i[n];
|
|
16007
|
-
a[n] = o.includes("{") ? et.parse(r, o) : o ===
|
|
16172
|
+
a[n] = o.includes("{") ? et.parse(r, o) : o === Cm.key ? e : o === Cm.value ? t : r[o];
|
|
16008
16173
|
}
|
|
16009
16174
|
return {
|
|
16010
16175
|
[La]: e,
|
|
@@ -16021,10 +16186,10 @@ var em = () => {
|
|
|
16021
16186
|
};
|
|
16022
16187
|
};
|
|
16023
16188
|
};
|
|
16024
|
-
new
|
|
16189
|
+
new Fm();
|
|
16025
16190
|
//#endregion
|
|
16026
16191
|
//#region src/providers/auth/firebase/FirebaseAuthProvider.ts
|
|
16027
|
-
var
|
|
16192
|
+
var Im = {
|
|
16028
16193
|
github: "github.com",
|
|
16029
16194
|
apple: "apple.com",
|
|
16030
16195
|
microsoft: "microsoft.com",
|
|
@@ -16032,10 +16197,10 @@ var Am = {
|
|
|
16032
16197
|
twitter: "twitter.com",
|
|
16033
16198
|
facebook: "facebook.com"
|
|
16034
16199
|
};
|
|
16035
|
-
function
|
|
16036
|
-
return new R(
|
|
16200
|
+
function Lm(e) {
|
|
16201
|
+
return new R(Im[e] ?? e);
|
|
16037
16202
|
}
|
|
16038
|
-
function
|
|
16203
|
+
function Rm(e) {
|
|
16039
16204
|
return e ? {
|
|
16040
16205
|
uid: e.uid,
|
|
16041
16206
|
email: e.email ?? void 0,
|
|
@@ -16044,7 +16209,7 @@ function Mm(e) {
|
|
|
16044
16209
|
isAnonymous: e.isAnonymous
|
|
16045
16210
|
} : null;
|
|
16046
16211
|
}
|
|
16047
|
-
var
|
|
16212
|
+
var zm = class {
|
|
16048
16213
|
options;
|
|
16049
16214
|
appName;
|
|
16050
16215
|
initPromise;
|
|
@@ -16058,7 +16223,7 @@ var Nm = class {
|
|
|
16058
16223
|
return this.getConfigurationState().configured;
|
|
16059
16224
|
}
|
|
16060
16225
|
getUser() {
|
|
16061
|
-
return
|
|
16226
|
+
return Rm(Na(this.appName)?.currentUser ?? null);
|
|
16062
16227
|
}
|
|
16063
16228
|
isAuthenticated() {
|
|
16064
16229
|
return !!this.getUser();
|
|
@@ -16070,18 +16235,18 @@ var Nm = class {
|
|
|
16070
16235
|
let n = e.method ?? "password";
|
|
16071
16236
|
if (n === "anonymous") {
|
|
16072
16237
|
let { user: e } = await ee(t);
|
|
16073
|
-
return
|
|
16238
|
+
return Rm(e);
|
|
16074
16239
|
}
|
|
16075
16240
|
if (n === "oauth") {
|
|
16076
16241
|
let { provider: n } = e;
|
|
16077
16242
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16078
|
-
let { user: r } = await re(t,
|
|
16079
|
-
return
|
|
16243
|
+
let { user: r } = await re(t, Lm(n));
|
|
16244
|
+
return Rm(r);
|
|
16080
16245
|
}
|
|
16081
16246
|
let { email: r, password: i } = e;
|
|
16082
16247
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16083
16248
|
let { user: a } = await ne(t, r, i);
|
|
16084
|
-
return
|
|
16249
|
+
return Rm(a);
|
|
16085
16250
|
}
|
|
16086
16251
|
async signOut() {
|
|
16087
16252
|
await this.initPromise;
|
|
@@ -16092,7 +16257,7 @@ var Nm = class {
|
|
|
16092
16257
|
onAuthChange(e) {
|
|
16093
16258
|
if (!this.options.config) {
|
|
16094
16259
|
let t = Na(this.appName);
|
|
16095
|
-
return t ? H(t, (t) => e(
|
|
16260
|
+
return t ? H(t, (t) => e(Rm(t))) : (e(null), () => {});
|
|
16096
16261
|
}
|
|
16097
16262
|
let t = () => {}, n = !1;
|
|
16098
16263
|
return this.initPromise.then(() => {
|
|
@@ -16102,7 +16267,7 @@ var Nm = class {
|
|
|
16102
16267
|
e(null);
|
|
16103
16268
|
return;
|
|
16104
16269
|
}
|
|
16105
|
-
t = H(r, (t) => e(
|
|
16270
|
+
t = H(r, (t) => e(Rm(t)));
|
|
16106
16271
|
}), () => {
|
|
16107
16272
|
n = !0, t();
|
|
16108
16273
|
};
|
|
@@ -16120,26 +16285,26 @@ var Nm = class {
|
|
|
16120
16285
|
let { claims: n } = await t.currentUser.getIdTokenResult(e);
|
|
16121
16286
|
return n;
|
|
16122
16287
|
}
|
|
16123
|
-
},
|
|
16124
|
-
function
|
|
16288
|
+
}, Bm = "https://oauth2.googleapis.com/token";
|
|
16289
|
+
function Vm(e) {
|
|
16125
16290
|
let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
|
|
16126
16291
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
16127
16292
|
return r.buffer;
|
|
16128
16293
|
}
|
|
16129
|
-
function
|
|
16294
|
+
function Hm(e) {
|
|
16130
16295
|
return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
16131
16296
|
}
|
|
16132
|
-
async function
|
|
16133
|
-
let n = `${
|
|
16297
|
+
async function Um(e, t) {
|
|
16298
|
+
let n = `${Hm(JSON.stringify({
|
|
16134
16299
|
alg: "RS256",
|
|
16135
16300
|
typ: "JWT"
|
|
16136
|
-
}))}.${
|
|
16301
|
+
}))}.${Hm(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Vm(t), {
|
|
16137
16302
|
name: "RSASSA-PKCS1-v1_5",
|
|
16138
16303
|
hash: "SHA-256"
|
|
16139
16304
|
}, !1, ["sign"]);
|
|
16140
|
-
return `${n}.${
|
|
16305
|
+
return `${n}.${Hm(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
|
|
16141
16306
|
}
|
|
16142
|
-
var
|
|
16307
|
+
var Wm = class {
|
|
16143
16308
|
config;
|
|
16144
16309
|
cache = /* @__PURE__ */ new Map();
|
|
16145
16310
|
constructor(e) {
|
|
@@ -16148,13 +16313,13 @@ var Rm = class {
|
|
|
16148
16313
|
async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
|
|
16149
16314
|
let t = this.cache.get(e);
|
|
16150
16315
|
if (t && t.expiresAt > Date.now() + 6e4) return t.token;
|
|
16151
|
-
let n = Math.floor(Date.now() / 1e3), r = await
|
|
16316
|
+
let n = Math.floor(Date.now() / 1e3), r = await Um({
|
|
16152
16317
|
iss: this.config.client_email,
|
|
16153
16318
|
scope: e,
|
|
16154
|
-
aud:
|
|
16319
|
+
aud: Bm,
|
|
16155
16320
|
iat: n,
|
|
16156
16321
|
exp: n + 3600
|
|
16157
|
-
}, this.config.private_key), i = await fetch(
|
|
16322
|
+
}, this.config.private_key), i = await fetch(Bm, {
|
|
16158
16323
|
method: "POST",
|
|
16159
16324
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
16160
16325
|
body: new URLSearchParams({
|
|
@@ -16172,7 +16337,7 @@ var Rm = class {
|
|
|
16172
16337
|
expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
|
|
16173
16338
|
}), a.access_token;
|
|
16174
16339
|
}
|
|
16175
|
-
},
|
|
16340
|
+
}, Gm = "www.dropbox.com/oauth2", Km = class {
|
|
16176
16341
|
config;
|
|
16177
16342
|
constructor(e) {
|
|
16178
16343
|
this.config = e;
|
|
@@ -16196,7 +16361,7 @@ var Rm = class {
|
|
|
16196
16361
|
async signIn(e = {}) {
|
|
16197
16362
|
if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
|
|
16198
16363
|
return di({
|
|
16199
|
-
authServer:
|
|
16364
|
+
authServer: Gm,
|
|
16200
16365
|
clientID: this.config.clientId,
|
|
16201
16366
|
scopes: e.scopes,
|
|
16202
16367
|
refreshParamName: "token_access_type"
|
|
@@ -16217,7 +16382,7 @@ var Rm = class {
|
|
|
16217
16382
|
isAuthenticated() {
|
|
16218
16383
|
return this.isConfigured() ? !!gi(this.config.clientId)?.access_token : !1;
|
|
16219
16384
|
}
|
|
16220
|
-
},
|
|
16385
|
+
}, qm = (e) => {
|
|
16221
16386
|
let t = Ea("oAuth2");
|
|
16222
16387
|
if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
|
|
16223
16388
|
let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
|
|
@@ -16234,8 +16399,8 @@ var Rm = class {
|
|
|
16234
16399
|
};
|
|
16235
16400
|
//#endregion
|
|
16236
16401
|
//#region src/providers/email/google/email.ts
|
|
16237
|
-
async function
|
|
16238
|
-
let i = await
|
|
16402
|
+
async function Jm({ to: e, bcc: t, subject: n, message: r }) {
|
|
16403
|
+
let i = await qm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
|
|
16239
16404
|
t && t.length && a.push(`Bcc: ${t.join(", ")}`);
|
|
16240
16405
|
let o = [
|
|
16241
16406
|
...a,
|
|
@@ -16260,7 +16425,7 @@ async function Hm({ to: e, bcc: t, subject: n, message: r }) {
|
|
|
16260
16425
|
}
|
|
16261
16426
|
//#endregion
|
|
16262
16427
|
//#region src/providers/email/google/GmailEmailProvider.ts
|
|
16263
|
-
var
|
|
16428
|
+
var Ym = class {
|
|
16264
16429
|
getConfigurationState() {
|
|
16265
16430
|
return ii("GmailEmailProvider", ri(Ea("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
16266
16431
|
}
|
|
@@ -16269,7 +16434,7 @@ var Um = class {
|
|
|
16269
16434
|
}
|
|
16270
16435
|
async send(e) {
|
|
16271
16436
|
if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
|
|
16272
|
-
await
|
|
16437
|
+
await Jm({
|
|
16273
16438
|
to: Array.isArray(e.to) ? e.to : [e.to],
|
|
16274
16439
|
bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
|
|
16275
16440
|
subject: e.subject,
|
|
@@ -16279,7 +16444,7 @@ var Um = class {
|
|
|
16279
16444
|
};
|
|
16280
16445
|
//#endregion
|
|
16281
16446
|
//#region src/providers/auth/supabase/SupabaseAuthProvider.ts
|
|
16282
|
-
function
|
|
16447
|
+
function Xm(e) {
|
|
16283
16448
|
return e ? {
|
|
16284
16449
|
uid: e.id,
|
|
16285
16450
|
email: e.email ?? void 0,
|
|
@@ -16288,7 +16453,7 @@ function Wm(e) {
|
|
|
16288
16453
|
raw: e
|
|
16289
16454
|
} : null;
|
|
16290
16455
|
}
|
|
16291
|
-
var
|
|
16456
|
+
var Zm = class {
|
|
16292
16457
|
config;
|
|
16293
16458
|
get client() {
|
|
16294
16459
|
return Ya(this.config.url, this.config.anonKey);
|
|
@@ -16303,7 +16468,7 @@ var Gm = class {
|
|
|
16303
16468
|
return this.getConfigurationState().configured;
|
|
16304
16469
|
}
|
|
16305
16470
|
getUser() {
|
|
16306
|
-
return
|
|
16471
|
+
return Xm((this.client.auth?._session ?? null)?.user ?? null);
|
|
16307
16472
|
}
|
|
16308
16473
|
isAuthenticated() {
|
|
16309
16474
|
return !!this.getUser();
|
|
@@ -16313,7 +16478,7 @@ var Gm = class {
|
|
|
16313
16478
|
if (t === "anonymous") {
|
|
16314
16479
|
let { data: e, error: t } = await this.client.auth.signInAnonymously();
|
|
16315
16480
|
if (t) throw t;
|
|
16316
|
-
return
|
|
16481
|
+
return Xm(e.user);
|
|
16317
16482
|
}
|
|
16318
16483
|
if (t === "magic_link") {
|
|
16319
16484
|
let t = e.email;
|
|
@@ -16342,7 +16507,7 @@ var Gm = class {
|
|
|
16342
16507
|
password: r
|
|
16343
16508
|
});
|
|
16344
16509
|
if (a) throw a;
|
|
16345
|
-
return
|
|
16510
|
+
return Xm(i.user);
|
|
16346
16511
|
}
|
|
16347
16512
|
async signOut() {
|
|
16348
16513
|
let { error: e } = await this.client.auth.signOut();
|
|
@@ -16350,10 +16515,10 @@ var Gm = class {
|
|
|
16350
16515
|
}
|
|
16351
16516
|
onAuthChange(e) {
|
|
16352
16517
|
this.client.auth.getSession().then(({ data: t }) => {
|
|
16353
|
-
e(
|
|
16518
|
+
e(Xm(t.session?.user ?? null));
|
|
16354
16519
|
});
|
|
16355
16520
|
let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
|
|
16356
|
-
e(
|
|
16521
|
+
e(Xm(n?.user ?? null));
|
|
16357
16522
|
});
|
|
16358
16523
|
return () => t.unsubscribe();
|
|
16359
16524
|
}
|
|
@@ -16364,15 +16529,15 @@ var Gm = class {
|
|
|
16364
16529
|
if (!n) throw Error("SupabaseAuthProvider: no active session");
|
|
16365
16530
|
return n;
|
|
16366
16531
|
}
|
|
16367
|
-
},
|
|
16368
|
-
function
|
|
16532
|
+
}, Qm = "https://api.anthropic.com/v1/models", $m = "https://api.anthropic.com/v1/messages";
|
|
16533
|
+
function eh(e) {
|
|
16369
16534
|
return {
|
|
16370
16535
|
name: e.name,
|
|
16371
16536
|
description: e.description,
|
|
16372
16537
|
input_schema: e.inputSchema
|
|
16373
16538
|
};
|
|
16374
16539
|
}
|
|
16375
|
-
function
|
|
16540
|
+
function th(e) {
|
|
16376
16541
|
if (e.role === "user") return {
|
|
16377
16542
|
role: "user",
|
|
16378
16543
|
content: e.content
|
|
@@ -16404,7 +16569,7 @@ function Ym(e) {
|
|
|
16404
16569
|
}))
|
|
16405
16570
|
};
|
|
16406
16571
|
}
|
|
16407
|
-
function
|
|
16572
|
+
function nh(e) {
|
|
16408
16573
|
let t = e?.content;
|
|
16409
16574
|
if (!Array.isArray(t)) return null;
|
|
16410
16575
|
let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
|
|
@@ -16423,7 +16588,7 @@ function Xm(e) {
|
|
|
16423
16588
|
text: i
|
|
16424
16589
|
} : null;
|
|
16425
16590
|
}
|
|
16426
|
-
var
|
|
16591
|
+
var rh = {
|
|
16427
16592
|
id: "anthropic",
|
|
16428
16593
|
label: "Anthropic",
|
|
16429
16594
|
description: "Claude models via the Anthropic API.",
|
|
@@ -16447,7 +16612,7 @@ var Zm = {
|
|
|
16447
16612
|
supportsDocuments: !0
|
|
16448
16613
|
},
|
|
16449
16614
|
discoverModels: async (e) => {
|
|
16450
|
-
let t = await Ht(
|
|
16615
|
+
let t = await Ht(Qm, { headers: {
|
|
16451
16616
|
"x-api-key": e,
|
|
16452
16617
|
"anthropic-version": "2023-06-01"
|
|
16453
16618
|
} }, rl);
|
|
@@ -16475,7 +16640,7 @@ var Zm = {
|
|
|
16475
16640
|
type: "text",
|
|
16476
16641
|
text: n.prompt
|
|
16477
16642
|
}] : n.prompt;
|
|
16478
|
-
return
|
|
16643
|
+
return nh(await Ht($m, {
|
|
16479
16644
|
method: "POST",
|
|
16480
16645
|
headers: {
|
|
16481
16646
|
"x-api-key": t,
|
|
@@ -16486,18 +16651,18 @@ var Zm = {
|
|
|
16486
16651
|
model: n.model,
|
|
16487
16652
|
max_tokens: 4096,
|
|
16488
16653
|
...n.role ? { system: Kc.parseRole(n.role, n) } : {},
|
|
16489
|
-
messages: [...(n.history ?? []).map(
|
|
16654
|
+
messages: [...(n.history ?? []).map(th), ...n.prompt ? [{
|
|
16490
16655
|
role: "user",
|
|
16491
16656
|
content: i
|
|
16492
16657
|
}] : []],
|
|
16493
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
16658
|
+
...n.tools?.length ? { tools: n.tools.map(eh) } : {},
|
|
16494
16659
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16495
16660
|
},
|
|
16496
16661
|
signal: n.signal
|
|
16497
16662
|
}, rl));
|
|
16498
16663
|
}
|
|
16499
|
-
},
|
|
16500
|
-
function
|
|
16664
|
+
}, ih = (e) => e.replace(/\/+$/, "");
|
|
16665
|
+
function ah(e) {
|
|
16501
16666
|
return {
|
|
16502
16667
|
type: "function",
|
|
16503
16668
|
function: {
|
|
@@ -16507,7 +16672,7 @@ function $m(e) {
|
|
|
16507
16672
|
}
|
|
16508
16673
|
};
|
|
16509
16674
|
}
|
|
16510
|
-
function
|
|
16675
|
+
function oh(e) {
|
|
16511
16676
|
if (typeof e != "string") return {};
|
|
16512
16677
|
try {
|
|
16513
16678
|
return JSON.parse(e);
|
|
@@ -16515,7 +16680,7 @@ function eh(e) {
|
|
|
16515
16680
|
return {};
|
|
16516
16681
|
}
|
|
16517
16682
|
}
|
|
16518
|
-
function
|
|
16683
|
+
function sh(e) {
|
|
16519
16684
|
return e.role === "user" ? [{
|
|
16520
16685
|
role: "user",
|
|
16521
16686
|
content: e.content
|
|
@@ -16536,7 +16701,7 @@ function th(e) {
|
|
|
16536
16701
|
content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
|
|
16537
16702
|
}));
|
|
16538
16703
|
}
|
|
16539
|
-
function
|
|
16704
|
+
function ch(e) {
|
|
16540
16705
|
let t = e?.choices?.[0]?.message;
|
|
16541
16706
|
if (!t) return null;
|
|
16542
16707
|
let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
|
|
@@ -16549,7 +16714,7 @@ function nh(e) {
|
|
|
16549
16714
|
return {
|
|
16550
16715
|
id: String(e.id),
|
|
16551
16716
|
name: String(t.name ?? ""),
|
|
16552
|
-
input:
|
|
16717
|
+
input: oh(t.arguments)
|
|
16553
16718
|
};
|
|
16554
16719
|
}),
|
|
16555
16720
|
text: e || void 0
|
|
@@ -16561,8 +16726,8 @@ function nh(e) {
|
|
|
16561
16726
|
text: r
|
|
16562
16727
|
} : null;
|
|
16563
16728
|
}
|
|
16564
|
-
var
|
|
16565
|
-
let m =
|
|
16729
|
+
var lh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a, defaultModel: o, fallbackModels: s, baseUrl: c, modelsUrl: l, chatCompletionsUrl: u, dashboardUrl: d, credentialsHint: f, validateApiKey: p }) => {
|
|
16730
|
+
let m = ih(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
|
|
16566
16731
|
return {
|
|
16567
16732
|
id: t,
|
|
16568
16733
|
label: n,
|
|
@@ -16639,22 +16804,22 @@ var rh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16639
16804
|
role: "system",
|
|
16640
16805
|
content: Kc.parseRole(r.role, r)
|
|
16641
16806
|
}] : [],
|
|
16642
|
-
...(r.history ?? []).flatMap(
|
|
16807
|
+
...(r.history ?? []).flatMap(sh),
|
|
16643
16808
|
...r.prompt ? [{
|
|
16644
16809
|
role: "user",
|
|
16645
16810
|
content: a
|
|
16646
16811
|
}] : []
|
|
16647
16812
|
],
|
|
16648
|
-
...r.tools?.length ? { tools: r.tools.map(
|
|
16813
|
+
...r.tools?.length ? { tools: r.tools.map(ah) } : {},
|
|
16649
16814
|
...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
|
|
16650
16815
|
},
|
|
16651
16816
|
signal: r.signal
|
|
16652
16817
|
}, rl);
|
|
16653
16818
|
if (!o) throw ll(n);
|
|
16654
|
-
return
|
|
16819
|
+
return ch(o);
|
|
16655
16820
|
}
|
|
16656
16821
|
};
|
|
16657
|
-
},
|
|
16822
|
+
}, uh = lh({
|
|
16658
16823
|
id: "deepseek",
|
|
16659
16824
|
label: "DeepSeek",
|
|
16660
16825
|
description: "Cost-efficient reasoning and chat models.",
|
|
@@ -16664,15 +16829,15 @@ var rh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16664
16829
|
baseUrl: "https://api.deepseek.com",
|
|
16665
16830
|
dashboardUrl: "https://platform.deepseek.com/api_keys",
|
|
16666
16831
|
credentialsHint: "DeepSeek platform → API Keys → Create new API key."
|
|
16667
|
-
}),
|
|
16668
|
-
function
|
|
16832
|
+
}), dh = "https://generativelanguage.googleapis.com/v1beta/models", fh = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
16833
|
+
function ph(e) {
|
|
16669
16834
|
return [{ function_declarations: e.map((e) => ({
|
|
16670
16835
|
name: e.name,
|
|
16671
16836
|
description: e.description,
|
|
16672
16837
|
parameters: e.inputSchema
|
|
16673
16838
|
})) }];
|
|
16674
16839
|
}
|
|
16675
|
-
function
|
|
16840
|
+
function mh(e) {
|
|
16676
16841
|
if (e.role === "user") return {
|
|
16677
16842
|
role: "user",
|
|
16678
16843
|
parts: [{ text: e.content }]
|
|
@@ -16697,7 +16862,7 @@ function ch(e) {
|
|
|
16697
16862
|
} }))
|
|
16698
16863
|
};
|
|
16699
16864
|
}
|
|
16700
|
-
function
|
|
16865
|
+
function hh(e) {
|
|
16701
16866
|
let t = e?.candidates?.[0]?.content?.parts;
|
|
16702
16867
|
if (!Array.isArray(t)) return null;
|
|
16703
16868
|
let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
|
|
@@ -16716,7 +16881,7 @@ function lh(e) {
|
|
|
16716
16881
|
text: i
|
|
16717
16882
|
} : null;
|
|
16718
16883
|
}
|
|
16719
|
-
var
|
|
16884
|
+
var gh = {
|
|
16720
16885
|
id: "gemini",
|
|
16721
16886
|
label: "Gemini",
|
|
16722
16887
|
description: "Google's multimodal Gemini model family.",
|
|
@@ -16740,12 +16905,12 @@ var uh = {
|
|
|
16740
16905
|
supportsDocuments: !0
|
|
16741
16906
|
},
|
|
16742
16907
|
discoverModels: async (e) => {
|
|
16743
|
-
let t = await Ht(`${
|
|
16908
|
+
let t = await Ht(`${dh}?key=${e}`, null, rl);
|
|
16744
16909
|
return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
|
|
16745
16910
|
},
|
|
16746
16911
|
validateApiKey: async (e) => {
|
|
16747
16912
|
try {
|
|
16748
|
-
let t = await Ht(`${
|
|
16913
|
+
let t = await Ht(`${dh}?key=${e}`, null, rl);
|
|
16749
16914
|
return t === null ? {
|
|
16750
16915
|
valid: !1,
|
|
16751
16916
|
error: "Nessuna risposta dal server (CORS o rete)"
|
|
@@ -16766,22 +16931,22 @@ var uh = {
|
|
|
16766
16931
|
mime_type: e.mimeType,
|
|
16767
16932
|
data: e.base64
|
|
16768
16933
|
} }), { text: n.prompt }];
|
|
16769
|
-
return
|
|
16934
|
+
return hh(await Ht(`${fh}/${n.model}:generateContent?key=${t}`, {
|
|
16770
16935
|
method: "POST",
|
|
16771
16936
|
headers: n.logId ? { [e]: n.logId } : void 0,
|
|
16772
16937
|
body: {
|
|
16773
|
-
contents: [...(n.history ?? []).map(
|
|
16938
|
+
contents: [...(n.history ?? []).map(mh), ...n.prompt ? [{
|
|
16774
16939
|
role: "user",
|
|
16775
16940
|
parts: r
|
|
16776
16941
|
}] : []],
|
|
16777
16942
|
...n.role ? { systemInstruction: { parts: [{ text: Kc.parseRole(n.role, n) }] } } : {},
|
|
16778
|
-
...n.tools?.length ? { tools:
|
|
16943
|
+
...n.tools?.length ? { tools: ph(n.tools) } : {},
|
|
16779
16944
|
generationConfig: typeof n.temperature == "number" ? { temperature: n.temperature } : void 0
|
|
16780
16945
|
},
|
|
16781
16946
|
signal: n.signal
|
|
16782
16947
|
}, rl));
|
|
16783
16948
|
}
|
|
16784
|
-
},
|
|
16949
|
+
}, _h = lh({
|
|
16785
16950
|
id: "mistral",
|
|
16786
16951
|
label: "Mistral",
|
|
16787
16952
|
description: "European-hosted open and commercial language models.",
|
|
@@ -16795,7 +16960,7 @@ var uh = {
|
|
|
16795
16960
|
baseUrl: "https://api.mistral.ai/v1",
|
|
16796
16961
|
dashboardUrl: "https://console.mistral.ai/api-keys",
|
|
16797
16962
|
credentialsHint: "Mistral Console → API Keys → Create new key."
|
|
16798
|
-
}),
|
|
16963
|
+
}), vh = lh({
|
|
16799
16964
|
id: "openai",
|
|
16800
16965
|
label: "OpenAI",
|
|
16801
16966
|
description: "GPT models via the OpenAI API.",
|
|
@@ -16813,7 +16978,7 @@ var uh = {
|
|
|
16813
16978
|
baseUrl: "https://api.openai.com/v1",
|
|
16814
16979
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
16815
16980
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
16816
|
-
}),
|
|
16981
|
+
}), yh = "https://opencode.ai/zen/v1/models", bh = "https://opencode.ai/zen/v1/chat/completions", xh = [
|
|
16817
16982
|
"big-pickle",
|
|
16818
16983
|
"deepseek-v4-flash-free",
|
|
16819
16984
|
"glm-5",
|
|
@@ -16825,16 +16990,16 @@ var uh = {
|
|
|
16825
16990
|
"minimax-m2.5",
|
|
16826
16991
|
"minimax-m2.7",
|
|
16827
16992
|
"nemotron-3-super-free"
|
|
16828
|
-
],
|
|
16993
|
+
], Sh = (e) => {
|
|
16829
16994
|
let t = e.endpoint || "", n = e.ai_sdk_package || e.aiSdkPackage || "";
|
|
16830
16995
|
return t.includes("/chat/completions") || n.includes("openai-compatible");
|
|
16831
|
-
},
|
|
16996
|
+
}, Ch = {
|
|
16832
16997
|
id: "opencode",
|
|
16833
16998
|
label: "OpenCode",
|
|
16834
16999
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
16835
17000
|
configKey: "openCodeApiKey",
|
|
16836
17001
|
defaultModel: "deepseek-v4-flash-free",
|
|
16837
|
-
fallbackModels:
|
|
17002
|
+
fallbackModels: xh,
|
|
16838
17003
|
dashboardUrl: "https://opencode.ai",
|
|
16839
17004
|
credentialsHint: "OpenCode Zen dashboard → API Keys → Create Key.",
|
|
16840
17005
|
credentialFields: [{
|
|
@@ -16848,8 +17013,8 @@ var uh = {
|
|
|
16848
17013
|
supportsDocuments: !0
|
|
16849
17014
|
},
|
|
16850
17015
|
discoverModels: async (e) => {
|
|
16851
|
-
let t = await Ht(
|
|
16852
|
-
return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).filter((e) =>
|
|
17016
|
+
let t = await Ht(yh, { headers: { Authorization: `Bearer ${e}` } }, rl);
|
|
17017
|
+
return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).filter((e) => Sh(e)).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0);
|
|
16853
17018
|
},
|
|
16854
17019
|
complete: async (t, n) => {
|
|
16855
17020
|
let r = n.attachments ?? [], i = r.length > 0 ? r.map((e) => e.mimeType.startsWith("image/") ? {
|
|
@@ -16864,7 +17029,7 @@ var uh = {
|
|
|
16864
17029
|
}).concat({
|
|
16865
17030
|
type: "text",
|
|
16866
17031
|
text: n.prompt
|
|
16867
|
-
}) : n.prompt, a = await Ht(
|
|
17032
|
+
}) : n.prompt, a = await Ht(bh, {
|
|
16868
17033
|
method: "POST",
|
|
16869
17034
|
headers: {
|
|
16870
17035
|
Authorization: `Bearer ${t}`,
|
|
@@ -16877,21 +17042,21 @@ var uh = {
|
|
|
16877
17042
|
role: "system",
|
|
16878
17043
|
content: Kc.parseRole(n.role, n)
|
|
16879
17044
|
}] : [],
|
|
16880
|
-
...(n.history ?? []).flatMap(
|
|
17045
|
+
...(n.history ?? []).flatMap(sh),
|
|
16881
17046
|
...n.prompt ? [{
|
|
16882
17047
|
role: "user",
|
|
16883
17048
|
content: i
|
|
16884
17049
|
}] : []
|
|
16885
17050
|
],
|
|
16886
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
17051
|
+
...n.tools?.length ? { tools: n.tools.map(ah) } : {},
|
|
16887
17052
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16888
17053
|
},
|
|
16889
17054
|
signal: n.signal
|
|
16890
17055
|
}, rl);
|
|
16891
17056
|
if (!a) throw ll("OpenCode");
|
|
16892
|
-
return
|
|
17057
|
+
return ch(a);
|
|
16893
17058
|
}
|
|
16894
|
-
},
|
|
17059
|
+
}, wh = lh({
|
|
16895
17060
|
id: "openrouter",
|
|
16896
17061
|
label: "OpenRouter",
|
|
16897
17062
|
description: "Unified access to many model providers through one API.",
|
|
@@ -16925,10 +17090,10 @@ var uh = {
|
|
|
16925
17090
|
};
|
|
16926
17091
|
}
|
|
16927
17092
|
}
|
|
16928
|
-
}),
|
|
17093
|
+
}), Th = {
|
|
16929
17094
|
dbRealtime: {
|
|
16930
17095
|
service: "data",
|
|
16931
|
-
create: () => new
|
|
17096
|
+
create: () => new Fm()
|
|
16932
17097
|
},
|
|
16933
17098
|
firestoreDb: {
|
|
16934
17099
|
service: "data",
|
|
@@ -16940,26 +17105,26 @@ var uh = {
|
|
|
16940
17105
|
},
|
|
16941
17106
|
firebaseAuth: {
|
|
16942
17107
|
service: "auth",
|
|
16943
|
-
create: () => new
|
|
17108
|
+
create: () => new zm()
|
|
16944
17109
|
}
|
|
16945
|
-
},
|
|
17110
|
+
}, Eh = {
|
|
16946
17111
|
googleAuth: {
|
|
16947
17112
|
service: "auth",
|
|
16948
|
-
create: () => new
|
|
17113
|
+
create: () => new gm()
|
|
16949
17114
|
},
|
|
16950
17115
|
gmail: {
|
|
16951
17116
|
service: "email",
|
|
16952
|
-
create: () => new
|
|
17117
|
+
create: () => new Ym()
|
|
16953
17118
|
},
|
|
16954
17119
|
googleServiceAccount: {
|
|
16955
17120
|
service: "credentials",
|
|
16956
|
-
create: (e) => new
|
|
17121
|
+
create: (e) => new Wm(e.serviceAccount),
|
|
16957
17122
|
when: (e) => !!e.serviceAccount
|
|
16958
17123
|
}
|
|
16959
|
-
},
|
|
17124
|
+
}, Dh = { dropboxAuth: {
|
|
16960
17125
|
service: "auth",
|
|
16961
|
-
create: (e) => new
|
|
16962
|
-
} },
|
|
17126
|
+
create: (e) => new Km(e)
|
|
17127
|
+
} }, Oh = {
|
|
16963
17128
|
supabaseDb: {
|
|
16964
17129
|
service: "data",
|
|
16965
17130
|
create: (e) => new oo(e)
|
|
@@ -16970,32 +17135,32 @@ var uh = {
|
|
|
16970
17135
|
},
|
|
16971
17136
|
supabaseAuth: {
|
|
16972
17137
|
service: "auth",
|
|
16973
|
-
create: (e) => new
|
|
17138
|
+
create: (e) => new Zm(e)
|
|
16974
17139
|
}
|
|
16975
|
-
},
|
|
17140
|
+
}, kh = { mock: {
|
|
16976
17141
|
service: "data",
|
|
16977
17142
|
create: (e) => new mo(e?.data)
|
|
16978
|
-
} },
|
|
17143
|
+
} }, Ah = (e, t) => ({
|
|
16979
17144
|
service: "ai",
|
|
16980
17145
|
create: (n) => new hl(e, n?.[t] || ""),
|
|
16981
17146
|
when: (e) => !!e?.[t]
|
|
16982
|
-
}),
|
|
16983
|
-
firebase:
|
|
16984
|
-
google:
|
|
16985
|
-
dropbox:
|
|
16986
|
-
supabase:
|
|
16987
|
-
mock:
|
|
17147
|
+
}), jh = {
|
|
17148
|
+
firebase: Th,
|
|
17149
|
+
google: Eh,
|
|
17150
|
+
dropbox: Dh,
|
|
17151
|
+
supabase: Oh,
|
|
17152
|
+
mock: kh,
|
|
16988
17153
|
ai: {
|
|
16989
|
-
openai:
|
|
16990
|
-
openrouter: wh
|
|
16991
|
-
opencode:
|
|
16992
|
-
deepseek:
|
|
16993
|
-
gemini:
|
|
16994
|
-
anthropic:
|
|
16995
|
-
mistral:
|
|
17154
|
+
openai: Ah(vh, "openaiApiKey"),
|
|
17155
|
+
openrouter: Ah(wh, "openRouterApiKey"),
|
|
17156
|
+
opencode: Ah(Ch, "openCodeApiKey"),
|
|
17157
|
+
deepseek: Ah(uh, "deepSeekApiKey"),
|
|
17158
|
+
gemini: Ah(gh, "geminiApiKey"),
|
|
17159
|
+
anthropic: Ah(rh, "anthropicApiKey"),
|
|
17160
|
+
mistral: Ah(_h, "mistralApiKey")
|
|
16996
17161
|
}
|
|
16997
|
-
},
|
|
16998
|
-
function
|
|
17162
|
+
}, Mh = () => /* @__PURE__ */ t.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ t.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
|
|
17163
|
+
function Nh(e, t) {
|
|
16999
17164
|
if (!t) return;
|
|
17000
17165
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
17001
17166
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -17004,10 +17169,10 @@ function Dh(e, t) {
|
|
|
17004
17169
|
}
|
|
17005
17170
|
e.custom = t;
|
|
17006
17171
|
}
|
|
17007
|
-
function
|
|
17172
|
+
function Ph(e, t, n = "default") {
|
|
17008
17173
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
17009
17174
|
}
|
|
17010
|
-
function
|
|
17175
|
+
function Fh(e = {}) {
|
|
17011
17176
|
let t = {
|
|
17012
17177
|
data: {},
|
|
17013
17178
|
storage: {},
|
|
@@ -17016,24 +17181,24 @@ function kh(e = {}) {
|
|
|
17016
17181
|
ai: {},
|
|
17017
17182
|
credentials: {}
|
|
17018
17183
|
}, n = (e) => t[e] ??= {};
|
|
17019
|
-
for (let [t, r] of Object.entries(
|
|
17184
|
+
for (let [t, r] of Object.entries(jh)) {
|
|
17020
17185
|
let i = e[t];
|
|
17021
17186
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
|
|
17022
17187
|
}
|
|
17023
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
17024
|
-
Object.keys(t.data).length === 0 && (t.data.mock = new mo()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new
|
|
17188
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Nh(n(t), r);
|
|
17189
|
+
Object.keys(t.data).length === 0 && (t.data.mock = new mo()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new gm());
|
|
17025
17190
|
let r = e.services ?? {}, i = {};
|
|
17026
17191
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
17027
17192
|
registry: n,
|
|
17028
|
-
defaultKey:
|
|
17193
|
+
defaultKey: Ph(n, r[e])
|
|
17029
17194
|
};
|
|
17030
17195
|
return i;
|
|
17031
17196
|
}
|
|
17032
|
-
var
|
|
17033
|
-
|
|
17034
|
-
},
|
|
17035
|
-
function
|
|
17036
|
-
let [p, g] = h(() =>
|
|
17197
|
+
var Ih = {}, Lh = (e) => {
|
|
17198
|
+
Ih = e;
|
|
17199
|
+
}, Rh = (e) => Ih[e] || [];
|
|
17200
|
+
function zh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native", scrapeConfig: i, iconProvider: a, googleMaps: o, themeProvider: s, i18n: c, children: l, errorReportUrl: u, debug: d, basename: f }) {
|
|
17201
|
+
let [p, g] = h(() => Fh(n)), v = m(p);
|
|
17037
17202
|
v.current = p;
|
|
17038
17203
|
let y = m(void 0);
|
|
17039
17204
|
y.current ||= (async (e, t, n) => {
|
|
@@ -17050,7 +17215,7 @@ function Nh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17050
17215
|
})));
|
|
17051
17216
|
});
|
|
17052
17217
|
let b = y.current, x = e ?? t.Fragment;
|
|
17053
|
-
return /* @__PURE__ */ t.createElement(
|
|
17218
|
+
return /* @__PURE__ */ t.createElement(mm, {
|
|
17054
17219
|
fullPage: !0,
|
|
17055
17220
|
reportUrl: u,
|
|
17056
17221
|
debug: d
|
|
@@ -17072,10 +17237,10 @@ function Nh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17072
17237
|
} }, /* @__PURE__ */ t.createElement(ma, {
|
|
17073
17238
|
registries: p,
|
|
17074
17239
|
setProvider: b
|
|
17075
|
-
}, /* @__PURE__ */ t.createElement($r, p.auth, /* @__PURE__ */ t.createElement(
|
|
17240
|
+
}, /* @__PURE__ */ t.createElement($r, p.auth, /* @__PURE__ */ t.createElement(xm, p.credentials, /* @__PURE__ */ t.createElement(Si, p.data, /* @__PURE__ */ t.createElement(oc, p.storage, /* @__PURE__ */ t.createElement(vm, p.email, /* @__PURE__ */ t.createElement(Xc, p.ai, /* @__PURE__ */ t.createElement(br, { config: a }, /* @__PURE__ */ t.createElement(Vd, { config: o }, /* @__PURE__ */ t.createElement(bp, { appName: r }, /* @__PURE__ */ t.createElement(Mn, { config: c }, /* @__PURE__ */ t.createElement(yn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
|
|
17076
17241
|
}
|
|
17077
|
-
function
|
|
17078
|
-
|
|
17242
|
+
function Bh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
|
|
17243
|
+
Lh(r);
|
|
17079
17244
|
let s = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), c = ({ pageSource: e, message: n }) => /* @__PURE__ */ t.createElement(Po, { variant: "warning" }, "Missing Page: ", e, n && /* @__PURE__ */ t.createElement("code", { className: "ml-2" }, n));
|
|
17080
17245
|
function l(r, a, l) {
|
|
17081
17246
|
let u = `./pages${a.component ? "/" + a.component : a.path === "/" ? "/Home" : et.toCamel(a.path.split("*")[0])}.js`, d = a.page || t.lazy(() => e(u).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${u}`), { default: () => /* @__PURE__ */ t.createElement(c, { pageSource: u }) })).catch((e) => (console.error(`❌ Failed to load ${u}:`, e), { default: () => /* @__PURE__ */ t.createElement(c, {
|
|
@@ -17085,32 +17250,32 @@ function Ph({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17085
17250
|
return /* @__PURE__ */ t.createElement(y, {
|
|
17086
17251
|
key: `${r}-${l}`,
|
|
17087
17252
|
path: a.path,
|
|
17088
|
-
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(
|
|
17253
|
+
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(mm, {
|
|
17089
17254
|
key: a.path,
|
|
17090
17255
|
reportUrl: o.errorReportUrl,
|
|
17091
17256
|
debug: o.debug
|
|
17092
|
-
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(
|
|
17257
|
+
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Mh, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17093
17258
|
});
|
|
17094
17259
|
}
|
|
17095
17260
|
let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean)));
|
|
17096
|
-
return /* @__PURE__ */ t.createElement(
|
|
17261
|
+
return /* @__PURE__ */ t.createElement(zh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17097
17262
|
path: oi,
|
|
17098
17263
|
element: /* @__PURE__ */ t.createElement(pi, null)
|
|
17099
17264
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17100
17265
|
default: [{ path: "/" }],
|
|
17101
|
-
...
|
|
17266
|
+
...Ih,
|
|
17102
17267
|
_auth: [{
|
|
17103
17268
|
path: "/users",
|
|
17104
|
-
page:
|
|
17269
|
+
page: am,
|
|
17105
17270
|
layout: n
|
|
17106
17271
|
}]
|
|
17107
17272
|
})), /* @__PURE__ */ t.createElement(y, {
|
|
17108
17273
|
path: "*",
|
|
17109
|
-
element: /* @__PURE__ */ t.createElement(
|
|
17274
|
+
element: /* @__PURE__ */ t.createElement(om, null)
|
|
17110
17275
|
})));
|
|
17111
17276
|
}
|
|
17112
|
-
var
|
|
17113
|
-
let t =
|
|
17277
|
+
var Vh = (e) => {
|
|
17278
|
+
let t = Rh(e), n = x(), r = (e) => e.map((e) => {
|
|
17114
17279
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
17115
17280
|
return {
|
|
17116
17281
|
...e,
|
|
@@ -17119,7 +17284,7 @@ var Fh = (e) => {
|
|
|
17119
17284
|
};
|
|
17120
17285
|
});
|
|
17121
17286
|
return p(() => r(t), [n.pathname]);
|
|
17122
|
-
},
|
|
17287
|
+
}, Hh = {
|
|
17123
17288
|
common: {
|
|
17124
17289
|
save: "Salva",
|
|
17125
17290
|
cancel: "Annulla",
|
|
@@ -17159,7 +17324,16 @@ var Fh = (e) => {
|
|
|
17159
17324
|
grid: {
|
|
17160
17325
|
buttonAdd: "Aggiungi",
|
|
17161
17326
|
deleteConfirm: "Sei sicuro di voler eliminare questo elemento?",
|
|
17162
|
-
emptyState: "Nessun elemento da mostrare"
|
|
17327
|
+
emptyState: "Nessun elemento da mostrare",
|
|
17328
|
+
filtersButton: "Filtri",
|
|
17329
|
+
filtersPanelTitle: "Filtri",
|
|
17330
|
+
filtersClearAll: "Cancella tutti",
|
|
17331
|
+
filtersSelectPlaceholder: "Tutti",
|
|
17332
|
+
filtersRangeFrom: "Da",
|
|
17333
|
+
filtersRangeTo: "A",
|
|
17334
|
+
filtersRangeMin: "Min",
|
|
17335
|
+
filtersRangeMax: "Max",
|
|
17336
|
+
filtersSelectedCountTemplate: "{count} selezionati"
|
|
17163
17337
|
},
|
|
17164
17338
|
select: {
|
|
17165
17339
|
placeholder: "Seleziona...",
|
|
@@ -17277,7 +17451,7 @@ var Fh = (e) => {
|
|
|
17277
17451
|
notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
|
|
17278
17452
|
loadError: "Impossibile caricare la ricerca indirizzi."
|
|
17279
17453
|
}
|
|
17280
|
-
},
|
|
17454
|
+
}, Uh = {
|
|
17281
17455
|
common: {
|
|
17282
17456
|
save: "Speichern",
|
|
17283
17457
|
cancel: "Abbrechen",
|
|
@@ -17317,7 +17491,16 @@ var Fh = (e) => {
|
|
|
17317
17491
|
grid: {
|
|
17318
17492
|
buttonAdd: "Hinzufügen",
|
|
17319
17493
|
deleteConfirm: "Dieses Element wirklich löschen?",
|
|
17320
|
-
emptyState: "Keine Elemente vorhanden"
|
|
17494
|
+
emptyState: "Keine Elemente vorhanden",
|
|
17495
|
+
filtersButton: "Filter",
|
|
17496
|
+
filtersPanelTitle: "Filter",
|
|
17497
|
+
filtersClearAll: "Alle zurücksetzen",
|
|
17498
|
+
filtersSelectPlaceholder: "Alle",
|
|
17499
|
+
filtersRangeFrom: "Von",
|
|
17500
|
+
filtersRangeTo: "Bis",
|
|
17501
|
+
filtersRangeMin: "Min",
|
|
17502
|
+
filtersRangeMax: "Max",
|
|
17503
|
+
filtersSelectedCountTemplate: "{count} ausgewählt"
|
|
17321
17504
|
},
|
|
17322
17505
|
select: {
|
|
17323
17506
|
placeholder: "Auswählen...",
|
|
@@ -17435,7 +17618,7 @@ var Fh = (e) => {
|
|
|
17435
17618
|
notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
|
|
17436
17619
|
loadError: "Adresssuche konnte nicht geladen werden."
|
|
17437
17620
|
}
|
|
17438
|
-
},
|
|
17621
|
+
}, Wh = {
|
|
17439
17622
|
common: {
|
|
17440
17623
|
save: "Сохранить",
|
|
17441
17624
|
cancel: "Отменить",
|
|
@@ -17475,7 +17658,16 @@ var Fh = (e) => {
|
|
|
17475
17658
|
grid: {
|
|
17476
17659
|
buttonAdd: "Добавить",
|
|
17477
17660
|
deleteConfirm: "Вы уверены, что хотите удалить этот элемент?",
|
|
17478
|
-
emptyState: "Нет элементов для отображения"
|
|
17661
|
+
emptyState: "Нет элементов для отображения",
|
|
17662
|
+
filtersButton: "Фильтры",
|
|
17663
|
+
filtersPanelTitle: "Фильтры",
|
|
17664
|
+
filtersClearAll: "Сбросить все",
|
|
17665
|
+
filtersSelectPlaceholder: "Все",
|
|
17666
|
+
filtersRangeFrom: "От",
|
|
17667
|
+
filtersRangeTo: "До",
|
|
17668
|
+
filtersRangeMin: "Мин",
|
|
17669
|
+
filtersRangeMax: "Макс",
|
|
17670
|
+
filtersSelectedCountTemplate: "Выбрано: {count}"
|
|
17479
17671
|
},
|
|
17480
17672
|
select: {
|
|
17481
17673
|
placeholder: "Выбрать...",
|
|
@@ -17593,7 +17785,7 @@ var Fh = (e) => {
|
|
|
17593
17785
|
notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
|
|
17594
17786
|
loadError: "Не удалось загрузить поиск адресов."
|
|
17595
17787
|
}
|
|
17596
|
-
},
|
|
17788
|
+
}, Gh = {
|
|
17597
17789
|
common: {
|
|
17598
17790
|
save: "保存",
|
|
17599
17791
|
cancel: "取消",
|
|
@@ -17633,7 +17825,16 @@ var Fh = (e) => {
|
|
|
17633
17825
|
grid: {
|
|
17634
17826
|
buttonAdd: "添加",
|
|
17635
17827
|
deleteConfirm: "确定要删除此项目吗?",
|
|
17636
|
-
emptyState: "暂无数据"
|
|
17828
|
+
emptyState: "暂无数据",
|
|
17829
|
+
filtersButton: "筛选",
|
|
17830
|
+
filtersPanelTitle: "筛选",
|
|
17831
|
+
filtersClearAll: "清除全部",
|
|
17832
|
+
filtersSelectPlaceholder: "全部",
|
|
17833
|
+
filtersRangeFrom: "从",
|
|
17834
|
+
filtersRangeTo: "到",
|
|
17835
|
+
filtersRangeMin: "最小",
|
|
17836
|
+
filtersRangeMax: "最大",
|
|
17837
|
+
filtersSelectedCountTemplate: "已选 {count} 项"
|
|
17637
17838
|
},
|
|
17638
17839
|
select: {
|
|
17639
17840
|
placeholder: "请选择...",
|
|
@@ -17751,7 +17952,7 @@ var Fh = (e) => {
|
|
|
17751
17952
|
notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
|
|
17752
17953
|
loadError: "无法加载地址搜索。"
|
|
17753
17954
|
}
|
|
17754
|
-
},
|
|
17955
|
+
}, Kh = {
|
|
17755
17956
|
common: {
|
|
17756
17957
|
save: "حفظ",
|
|
17757
17958
|
cancel: "إلغاء",
|
|
@@ -17791,7 +17992,16 @@ var Fh = (e) => {
|
|
|
17791
17992
|
grid: {
|
|
17792
17993
|
buttonAdd: "إضافة",
|
|
17793
17994
|
deleteConfirm: "هل أنت متأكد من حذف هذا العنصر؟",
|
|
17794
|
-
emptyState: "لا توجد عناصر للعرض"
|
|
17995
|
+
emptyState: "لا توجد عناصر للعرض",
|
|
17996
|
+
filtersButton: "الفلاتر",
|
|
17997
|
+
filtersPanelTitle: "الفلاتر",
|
|
17998
|
+
filtersClearAll: "مسح الكل",
|
|
17999
|
+
filtersSelectPlaceholder: "الكل",
|
|
18000
|
+
filtersRangeFrom: "من",
|
|
18001
|
+
filtersRangeTo: "إلى",
|
|
18002
|
+
filtersRangeMin: "أدنى",
|
|
18003
|
+
filtersRangeMax: "أقصى",
|
|
18004
|
+
filtersSelectedCountTemplate: "تم اختيار {count}"
|
|
17795
18005
|
},
|
|
17796
18006
|
select: {
|
|
17797
18007
|
placeholder: "اختر...",
|
|
@@ -17909,22 +18119,22 @@ var Fh = (e) => {
|
|
|
17909
18119
|
notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
|
|
17910
18120
|
loadError: "تعذر تحميل البحث عن العناوين."
|
|
17911
18121
|
}
|
|
17912
|
-
},
|
|
17913
|
-
ar: () =>
|
|
17914
|
-
de: () =>
|
|
18122
|
+
}, qh = /* @__PURE__ */ Je({
|
|
18123
|
+
ar: () => Kh,
|
|
18124
|
+
de: () => Uh,
|
|
17915
18125
|
en: () => Sn,
|
|
17916
|
-
it: () =>
|
|
17917
|
-
ru: () =>
|
|
17918
|
-
zh: () =>
|
|
17919
|
-
}),
|
|
18126
|
+
it: () => Hh,
|
|
18127
|
+
ru: () => Wh,
|
|
18128
|
+
zh: () => Gh
|
|
18129
|
+
}), Jh = (e) => _a("api", e);
|
|
17920
18130
|
//#endregion
|
|
17921
18131
|
//#region src/providers/api/direct.ts
|
|
17922
|
-
async function
|
|
18132
|
+
async function Yh(e) {
|
|
17923
18133
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
17924
18134
|
let t = await e.text();
|
|
17925
18135
|
return t ? JSON.parse(t) : void 0;
|
|
17926
18136
|
}
|
|
17927
|
-
var
|
|
18137
|
+
var Xh = class {
|
|
17928
18138
|
config;
|
|
17929
18139
|
constructor(e) {
|
|
17930
18140
|
this.config = e;
|
|
@@ -17939,7 +18149,7 @@ var Wh = class {
|
|
|
17939
18149
|
...e.body,
|
|
17940
18150
|
...this.config.body
|
|
17941
18151
|
};
|
|
17942
|
-
return
|
|
18152
|
+
return Yh(await rl(n.toString(), {
|
|
17943
18153
|
method: t,
|
|
17944
18154
|
headers: {
|
|
17945
18155
|
"Content-Type": "application/json",
|
|
@@ -17948,7 +18158,7 @@ var Wh = class {
|
|
|
17948
18158
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
17949
18159
|
}));
|
|
17950
18160
|
}
|
|
17951
|
-
},
|
|
18161
|
+
}, Zh = class {
|
|
17952
18162
|
resolver;
|
|
17953
18163
|
constructor(e) {
|
|
17954
18164
|
this.resolver = e;
|
|
@@ -17956,7 +18166,7 @@ var Wh = class {
|
|
|
17956
18166
|
async fetch(e) {
|
|
17957
18167
|
return this.resolver(e);
|
|
17958
18168
|
}
|
|
17959
|
-
},
|
|
18169
|
+
}, Qh = class {
|
|
17960
18170
|
config;
|
|
17961
18171
|
constructor(e) {
|
|
17962
18172
|
this.config = e;
|
|
@@ -17967,7 +18177,7 @@ var Wh = class {
|
|
|
17967
18177
|
request: e
|
|
17968
18178
|
}, void 0, this.config.region);
|
|
17969
18179
|
}
|
|
17970
|
-
},
|
|
18180
|
+
}, $h = class {
|
|
17971
18181
|
config;
|
|
17972
18182
|
constructor(e) {
|
|
17973
18183
|
this.config = e;
|
|
@@ -17980,7 +18190,7 @@ var Wh = class {
|
|
|
17980
18190
|
if (n) throw n;
|
|
17981
18191
|
return t;
|
|
17982
18192
|
}
|
|
17983
|
-
},
|
|
18193
|
+
}, eg = [
|
|
17984
18194
|
{
|
|
17985
18195
|
id: "resend",
|
|
17986
18196
|
label: "Resend",
|
|
@@ -18091,7 +18301,7 @@ var Wh = class {
|
|
|
18091
18301
|
],
|
|
18092
18302
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
18093
18303
|
}
|
|
18094
|
-
],
|
|
18304
|
+
], tg = [
|
|
18095
18305
|
{
|
|
18096
18306
|
id: "cloudflare_pages",
|
|
18097
18307
|
label: "Cloudflare Pages",
|
|
@@ -18321,15 +18531,15 @@ var Wh = class {
|
|
|
18321
18531
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
18322
18532
|
credentialFields: []
|
|
18323
18533
|
}
|
|
18324
|
-
],
|
|
18325
|
-
fh,
|
|
18534
|
+
], ng = [
|
|
18326
18535
|
vh,
|
|
18327
|
-
|
|
18328
|
-
|
|
18536
|
+
wh,
|
|
18537
|
+
Ch,
|
|
18329
18538
|
uh,
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18539
|
+
gh,
|
|
18540
|
+
rh,
|
|
18541
|
+
_h,
|
|
18542
|
+
lh({
|
|
18333
18543
|
id: "glm",
|
|
18334
18544
|
label: "ZhipuAI (GLM)",
|
|
18335
18545
|
description: "Zhipu AI's GLM model family.",
|
|
@@ -18346,7 +18556,7 @@ var Wh = class {
|
|
|
18346
18556
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
18347
18557
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
18348
18558
|
})
|
|
18349
|
-
],
|
|
18559
|
+
], rg = (e) => ({
|
|
18350
18560
|
id: e.id,
|
|
18351
18561
|
label: e.label,
|
|
18352
18562
|
description: e.description ?? "",
|
|
@@ -18357,7 +18567,7 @@ var Wh = class {
|
|
|
18357
18567
|
}],
|
|
18358
18568
|
credentialsUrl: e.dashboardUrl,
|
|
18359
18569
|
credentialsHint: e.credentialsHint
|
|
18360
|
-
}),
|
|
18570
|
+
}), ig = ng.map(rg), ag = {
|
|
18361
18571
|
id: "openai-compatible",
|
|
18362
18572
|
label: "OpenAI-compatible",
|
|
18363
18573
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18371,9 +18581,9 @@ var Wh = class {
|
|
|
18371
18581
|
type: "text",
|
|
18372
18582
|
placeholder: "https://api.example.com/v1"
|
|
18373
18583
|
}]
|
|
18374
|
-
},
|
|
18584
|
+
}, og = (e) => {
|
|
18375
18585
|
let t = e?.openAICompatible?.baseUrl?.trim();
|
|
18376
|
-
return t ? [
|
|
18586
|
+
return t ? [lh({
|
|
18377
18587
|
id: "openai-compatible",
|
|
18378
18588
|
label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
|
|
18379
18589
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18385,35 +18595,35 @@ var Wh = class {
|
|
|
18385
18595
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
18386
18596
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
18387
18597
|
})] : [];
|
|
18388
|
-
},
|
|
18598
|
+
}, sg = (e) => e ? [...ng, ...og(e)].reduce((t, n) => {
|
|
18389
18599
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
18390
18600
|
return r && (t[n.id] = new hl(n, r)), t;
|
|
18391
|
-
}, {}) : {},
|
|
18601
|
+
}, {}) : {}, cg = void 0;
|
|
18392
18602
|
typeof Sa == "function" && Sa((e) => {
|
|
18393
|
-
|
|
18603
|
+
cg = e.google;
|
|
18394
18604
|
});
|
|
18395
|
-
var
|
|
18605
|
+
var lg = {
|
|
18396
18606
|
ita: "geoTargetConstants/2380",
|
|
18397
18607
|
rome: "geoTargetConstants/1033236",
|
|
18398
18608
|
mil: "geoTargetConstants/1033239",
|
|
18399
18609
|
nap: "geoTargetConstants/1033245",
|
|
18400
18610
|
tor: "geoTargetConstants/1033247"
|
|
18401
|
-
},
|
|
18611
|
+
}, ug = {
|
|
18402
18612
|
it: "languageConstants/1000",
|
|
18403
18613
|
en: "languageConstants/1001",
|
|
18404
18614
|
fr: "languageConstants/1002",
|
|
18405
18615
|
es: "languageConstants/1003",
|
|
18406
18616
|
de: "languageConstants/1005"
|
|
18407
18617
|
};
|
|
18408
|
-
function
|
|
18409
|
-
return
|
|
18618
|
+
function dg(e) {
|
|
18619
|
+
return lg[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
18410
18620
|
}
|
|
18411
|
-
function
|
|
18412
|
-
return
|
|
18621
|
+
function fg(e) {
|
|
18622
|
+
return ug[e.toLowerCase()] || "languageConstants/1000";
|
|
18413
18623
|
}
|
|
18414
|
-
async function
|
|
18415
|
-
if (!
|
|
18416
|
-
let i = await
|
|
18624
|
+
async function pg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
18625
|
+
if (!cg?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
|
|
18626
|
+
let i = await qm(["https://www.googleapis.com/auth/adwords"]), a = dg(n), o = fg(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
18417
18627
|
keywordSeed: { keywords: [e] },
|
|
18418
18628
|
geoTargetConstants: [a],
|
|
18419
18629
|
language: o
|
|
@@ -18421,7 +18631,7 @@ async function sg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18421
18631
|
method: "POST",
|
|
18422
18632
|
headers: {
|
|
18423
18633
|
Authorization: `Bearer ${i}`,
|
|
18424
|
-
"developer-token":
|
|
18634
|
+
"developer-token": cg.developerToken,
|
|
18425
18635
|
"Content-Type": "application/json"
|
|
18426
18636
|
},
|
|
18427
18637
|
body: JSON.stringify(c)
|
|
@@ -18439,7 +18649,7 @@ async function sg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18439
18649
|
}
|
|
18440
18650
|
//#endregion
|
|
18441
18651
|
//#region src/providers/seo/google/trend.ts
|
|
18442
|
-
async function
|
|
18652
|
+
async function mg(e, t = "IT", n = "today 12-m") {
|
|
18443
18653
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18444
18654
|
comparisonItem: [{
|
|
18445
18655
|
keyword: e,
|
|
@@ -18459,7 +18669,7 @@ async function cg(e, t = "IT", n = "today 12-m") {
|
|
|
18459
18669
|
}))
|
|
18460
18670
|
};
|
|
18461
18671
|
}
|
|
18462
|
-
async function
|
|
18672
|
+
async function hg(e, t = "IT", n = "today 12-m") {
|
|
18463
18673
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18464
18674
|
comparisonItem: [{
|
|
18465
18675
|
keyword: e,
|
|
@@ -18485,13 +18695,13 @@ async function lg(e, t = "IT", n = "today 12-m") {
|
|
|
18485
18695
|
}
|
|
18486
18696
|
//#endregion
|
|
18487
18697
|
//#region src/providers/storage/dropbox.tsx
|
|
18488
|
-
var
|
|
18698
|
+
var gg = 5e3, _g = "https://www.dropbox.com/home", vg = void 0;
|
|
18489
18699
|
typeof Sa == "function" && Sa((e) => {
|
|
18490
|
-
|
|
18700
|
+
vg = e.dropbox;
|
|
18491
18701
|
});
|
|
18492
|
-
var
|
|
18493
|
-
if (!
|
|
18494
|
-
let r = await vi(
|
|
18702
|
+
var yg = async (e, t, n = {}) => {
|
|
18703
|
+
if (!vg) return console.error("DropBox: Config not found"), null;
|
|
18704
|
+
let r = await vi(vg.clientId);
|
|
18495
18705
|
if (!r) throw Error("DropBox: Access token not found");
|
|
18496
18706
|
return await fetch(e, {
|
|
18497
18707
|
method: "POST",
|
|
@@ -18504,12 +18714,12 @@ var pg = async (e, t, n = {}) => {
|
|
|
18504
18714
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
18505
18715
|
console.log("DropBox: Fetch operation completed");
|
|
18506
18716
|
});
|
|
18507
|
-
},
|
|
18508
|
-
if (!
|
|
18717
|
+
}, bg = async (e, t, n = {}) => {
|
|
18718
|
+
if (!vg) {
|
|
18509
18719
|
console.error("DropBox: Config not found");
|
|
18510
18720
|
return;
|
|
18511
18721
|
}
|
|
18512
|
-
let r = await vi(
|
|
18722
|
+
let r = await vi(vg.clientId);
|
|
18513
18723
|
if (!r) {
|
|
18514
18724
|
console.error("DropBox: Access token not found");
|
|
18515
18725
|
return;
|
|
@@ -18534,47 +18744,47 @@ var pg = async (e, t, n = {}) => {
|
|
|
18534
18744
|
}).finally(() => {
|
|
18535
18745
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
18536
18746
|
});
|
|
18537
|
-
},
|
|
18538
|
-
let n =
|
|
18539
|
-
return (t ?
|
|
18540
|
-
},
|
|
18747
|
+
}, xg = (e, t = !1) => {
|
|
18748
|
+
let n = vg?.rootPath || "";
|
|
18749
|
+
return (t ? _g : "") + (e.startsWith(n) ? e : n + e);
|
|
18750
|
+
}, Sg = async (e, t = "", n = !1) => {
|
|
18541
18751
|
let r = {};
|
|
18542
|
-
return (await
|
|
18752
|
+
return (await Ig.listFolders({
|
|
18543
18753
|
path: `${e + t}`,
|
|
18544
18754
|
recursive: !0
|
|
18545
18755
|
})).forEach((e) => {
|
|
18546
18756
|
e[".tag"] !== "folder" && (r[n ? ti.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
18547
18757
|
}), r;
|
|
18548
|
-
},
|
|
18758
|
+
}, Cg = async (e, t) => {
|
|
18549
18759
|
if (!e.async_job_id) return Promise.reject(e);
|
|
18550
18760
|
let n, r = !0;
|
|
18551
|
-
for (; r;) await ut(100), n = await
|
|
18761
|
+
for (; r;) await ut(100), n = await bg(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
|
|
18552
18762
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
18553
|
-
},
|
|
18554
|
-
let n = "files/create_folder_batch", r = await
|
|
18763
|
+
}, wg = async (e, t = "") => {
|
|
18764
|
+
let n = "files/create_folder_batch", r = await bg(`https://api.dropboxapi.com/2/${n}`, {
|
|
18555
18765
|
autorename: !1,
|
|
18556
18766
|
force_async: !0,
|
|
18557
|
-
paths: e.map((e) =>
|
|
18767
|
+
paths: e.map((e) => xg(t + e))
|
|
18558
18768
|
});
|
|
18559
|
-
return r ?
|
|
18560
|
-
},
|
|
18561
|
-
let n = "files/create_folder_batch", r = await
|
|
18562
|
-
return r ?
|
|
18563
|
-
},
|
|
18769
|
+
return r ? Cg(r, n) : void 0;
|
|
18770
|
+
}, Tg = async (e, t = "") => {
|
|
18771
|
+
let n = "files/create_folder_batch", r = await bg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: xg(t + e) })) });
|
|
18772
|
+
return r ? Cg(r, n) : void 0;
|
|
18773
|
+
}, Eg = async (e, t) => bg("https://api.dropboxapi.com/2/files/tags/add", {
|
|
18564
18774
|
path: e,
|
|
18565
18775
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
18566
|
-
}),
|
|
18567
|
-
for (let n in e) for (let r of e[n]) await
|
|
18568
|
-
},
|
|
18569
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
18776
|
+
}), Dg = async (e, t = "") => {
|
|
18777
|
+
for (let n in e) for (let r of e[n]) await Eg(xg(t + n), r);
|
|
18778
|
+
}, Og = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
18779
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await bg("https://api.dropboxapi.com/2/files/list_folder", {
|
|
18570
18780
|
include_deleted: !1,
|
|
18571
18781
|
include_has_explicit_shared_members: !1,
|
|
18572
18782
|
include_media_info: !1,
|
|
18573
18783
|
include_mounted_folders: !0,
|
|
18574
18784
|
include_non_downloadable_files: !0,
|
|
18575
|
-
path:
|
|
18785
|
+
path: xg(e),
|
|
18576
18786
|
recursive: n
|
|
18577
|
-
}) : await
|
|
18787
|
+
}) : await bg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
18578
18788
|
has_more: !0,
|
|
18579
18789
|
cursor: "",
|
|
18580
18790
|
entries: []
|
|
@@ -18587,44 +18797,44 @@ var pg = async (e, t, n = {}) => {
|
|
|
18587
18797
|
recursive: t
|
|
18588
18798
|
}), i && n.push(...i.entries);
|
|
18589
18799
|
return n;
|
|
18590
|
-
},
|
|
18591
|
-
let t = async (e) => await
|
|
18800
|
+
}, kg = async (e) => {
|
|
18801
|
+
let t = async (e) => await bg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
18592
18802
|
entries: e,
|
|
18593
18803
|
autorename: !1
|
|
18594
|
-
}), n = async (e) => await
|
|
18804
|
+
}), n = async (e) => await bg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
18595
18805
|
for (let a = 0; a < e.length; a += 900) {
|
|
18596
18806
|
i = e.slice(a, a + 900).map((e) => ({
|
|
18597
|
-
from_path:
|
|
18598
|
-
to_path:
|
|
18807
|
+
from_path: xg(e.from),
|
|
18808
|
+
to_path: xg(e.to)
|
|
18599
18809
|
}));
|
|
18600
18810
|
let o = await t(i);
|
|
18601
18811
|
if (!o) continue;
|
|
18602
18812
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
18603
18813
|
let s = o;
|
|
18604
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(
|
|
18814
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(gg), s = await n(o.async_job_id ?? "");
|
|
18605
18815
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
18606
18816
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
18607
18817
|
}
|
|
18608
18818
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
18609
|
-
},
|
|
18610
|
-
let t = async (e) => await
|
|
18819
|
+
}, Ag = async (e) => {
|
|
18820
|
+
let t = async (e) => await bg("https://api.dropboxapi.com/2/files/move_v2", {
|
|
18611
18821
|
...e,
|
|
18612
18822
|
autorename: !0
|
|
18613
18823
|
});
|
|
18614
18824
|
for (let n of e) await t({
|
|
18615
|
-
from_path:
|
|
18616
|
-
to_path:
|
|
18825
|
+
from_path: xg(n.from),
|
|
18826
|
+
to_path: xg(n.to)
|
|
18617
18827
|
});
|
|
18618
|
-
},
|
|
18828
|
+
}, jg = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
18619
18829
|
let a = {}, o = [];
|
|
18620
18830
|
for (let s = 0; s < e.length; s += 25) {
|
|
18621
18831
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
18622
|
-
path:
|
|
18832
|
+
path: xg(e.path),
|
|
18623
18833
|
format: n,
|
|
18624
18834
|
size: t,
|
|
18625
18835
|
mode: r
|
|
18626
18836
|
}));
|
|
18627
|
-
await ut(100), o.push(
|
|
18837
|
+
await ut(100), o.push(bg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
18628
18838
|
if (!e) return;
|
|
18629
18839
|
let n = e.entries.reduce((e, n, r) => {
|
|
18630
18840
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -18643,7 +18853,7 @@ var pg = async (e, t, n = {}) => {
|
|
|
18643
18853
|
}));
|
|
18644
18854
|
}
|
|
18645
18855
|
return Promise.all(o).then(() => a);
|
|
18646
|
-
},
|
|
18856
|
+
}, Mg = (e, t = "application/octet-stream", n = 512) => {
|
|
18647
18857
|
let r = atob(e), i = [];
|
|
18648
18858
|
for (let e = 0; e < r.length; e += n) {
|
|
18649
18859
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -18652,11 +18862,11 @@ var pg = async (e, t, n = {}) => {
|
|
|
18652
18862
|
i.push(o);
|
|
18653
18863
|
}
|
|
18654
18864
|
return new Blob(i, { type: t });
|
|
18655
|
-
},
|
|
18865
|
+
}, Ng = async (e, t) => {
|
|
18656
18866
|
try {
|
|
18657
18867
|
let n = t.split(",")[1];
|
|
18658
|
-
|
|
18659
|
-
path:
|
|
18868
|
+
yg("https://content.dropboxapi.com/2/files/upload", Mg(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
18869
|
+
path: xg(e),
|
|
18660
18870
|
mode: "overwrite",
|
|
18661
18871
|
autorename: !0,
|
|
18662
18872
|
mute: !1
|
|
@@ -18666,12 +18876,12 @@ var pg = async (e, t, n = {}) => {
|
|
|
18666
18876
|
} catch (e) {
|
|
18667
18877
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
18668
18878
|
}
|
|
18669
|
-
},
|
|
18670
|
-
if (!
|
|
18879
|
+
}, Pg = (e = !1) => vg ? hi(vg.clientId, e) : !1, Fg = (e = {}) => {
|
|
18880
|
+
if (!vg) return /* @__PURE__ */ t.createElement("div", {
|
|
18671
18881
|
title: "DropBox: configurazione mancante. Recupera il \"Client ID\" accedendo a https://www.dropbox.com/developers, vai su \"App Console\", seleziona un'app esistente o chiedi il Client ID a chi ha configurato il sistema.",
|
|
18672
18882
|
className: "text-danger flex items-center gap-2"
|
|
18673
18883
|
}, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
|
|
18674
|
-
let n =
|
|
18884
|
+
let n = Pg(!0);
|
|
18675
18885
|
return /* @__PURE__ */ t.createElement(bi, {
|
|
18676
18886
|
provider: "dropboxAuth",
|
|
18677
18887
|
intent: "connect",
|
|
@@ -18683,33 +18893,33 @@ var pg = async (e, t, n = {}) => {
|
|
|
18683
18893
|
title: n ? "DropBox Connected" : "DropBox Disconnected"
|
|
18684
18894
|
}
|
|
18685
18895
|
});
|
|
18686
|
-
},
|
|
18896
|
+
}, Ig = {
|
|
18687
18897
|
setRootPath: (e) => {
|
|
18688
|
-
|
|
18898
|
+
vg && (vg.rootPath = e);
|
|
18689
18899
|
},
|
|
18690
|
-
resolvePath:
|
|
18691
|
-
createFolders:
|
|
18692
|
-
deleteBulk:
|
|
18693
|
-
addTags:
|
|
18694
|
-
listFolders:
|
|
18695
|
-
getThumbnails:
|
|
18696
|
-
search:
|
|
18697
|
-
upload:
|
|
18698
|
-
copy:
|
|
18699
|
-
move:
|
|
18700
|
-
},
|
|
18900
|
+
resolvePath: xg,
|
|
18901
|
+
createFolders: wg,
|
|
18902
|
+
deleteBulk: Tg,
|
|
18903
|
+
addTags: Dg,
|
|
18904
|
+
listFolders: Og,
|
|
18905
|
+
getThumbnails: jg,
|
|
18906
|
+
search: Sg,
|
|
18907
|
+
upload: Ng,
|
|
18908
|
+
copy: kg,
|
|
18909
|
+
move: Ag
|
|
18910
|
+
}, Lg = "https://api.serpapi.com/search", Rg = "google", zg = "google_images", Bg = "google_autocomplete", Vg = "google_trends", Hg = "google_maps", Ug = "google_maps_photos", Wg = "google_maps_reviews", Gg = {
|
|
18701
18911
|
engine: null,
|
|
18702
18912
|
device: null,
|
|
18703
18913
|
no_cache: !1,
|
|
18704
18914
|
async: !1,
|
|
18705
18915
|
output: "json"
|
|
18706
|
-
},
|
|
18916
|
+
}, Kg = { q: null }, qg = {
|
|
18707
18917
|
tbs: null,
|
|
18708
18918
|
safe: "active",
|
|
18709
18919
|
nfpr: 0,
|
|
18710
18920
|
filter: 1
|
|
18711
18921
|
};
|
|
18712
|
-
function
|
|
18922
|
+
function Jg(e) {
|
|
18713
18923
|
let t = Ic(), n = Ic(!0), r = Lc(!0), i = {
|
|
18714
18924
|
location: t,
|
|
18715
18925
|
uule: null
|
|
@@ -18727,13 +18937,13 @@ function Hg(e) {
|
|
|
18727
18937
|
hl: r
|
|
18728
18938
|
};
|
|
18729
18939
|
return {
|
|
18730
|
-
[
|
|
18731
|
-
...
|
|
18940
|
+
[Rg]: {
|
|
18941
|
+
...Gg,
|
|
18732
18942
|
...i,
|
|
18733
18943
|
...o,
|
|
18734
|
-
...
|
|
18735
|
-
...
|
|
18736
|
-
engine:
|
|
18944
|
+
...qg,
|
|
18945
|
+
...Kg,
|
|
18946
|
+
engine: Rg,
|
|
18737
18947
|
ludocid: null,
|
|
18738
18948
|
lsig: null,
|
|
18739
18949
|
kgmid: null,
|
|
@@ -18742,29 +18952,29 @@ function Hg(e) {
|
|
|
18742
18952
|
start: null,
|
|
18743
18953
|
num: null
|
|
18744
18954
|
},
|
|
18745
|
-
[
|
|
18746
|
-
...
|
|
18955
|
+
[zg]: {
|
|
18956
|
+
...Gg,
|
|
18747
18957
|
...i,
|
|
18748
18958
|
...o,
|
|
18749
|
-
...
|
|
18750
|
-
...
|
|
18751
|
-
engine:
|
|
18959
|
+
...qg,
|
|
18960
|
+
...Kg,
|
|
18961
|
+
engine: zg,
|
|
18752
18962
|
chips: null,
|
|
18753
18963
|
ijn: null
|
|
18754
18964
|
},
|
|
18755
|
-
[
|
|
18756
|
-
...
|
|
18965
|
+
[Bg]: {
|
|
18966
|
+
...Gg,
|
|
18757
18967
|
...o,
|
|
18758
|
-
...
|
|
18759
|
-
engine:
|
|
18968
|
+
...Kg,
|
|
18969
|
+
engine: Bg,
|
|
18760
18970
|
cp: null,
|
|
18761
18971
|
client: null
|
|
18762
18972
|
},
|
|
18763
|
-
[
|
|
18764
|
-
...
|
|
18973
|
+
[Vg]: {
|
|
18974
|
+
...Gg,
|
|
18765
18975
|
...a,
|
|
18766
|
-
...
|
|
18767
|
-
engine:
|
|
18976
|
+
...Kg,
|
|
18977
|
+
engine: Vg,
|
|
18768
18978
|
data_type: null,
|
|
18769
18979
|
tz: null,
|
|
18770
18980
|
cat: null,
|
|
@@ -18772,73 +18982,73 @@ function Hg(e) {
|
|
|
18772
18982
|
date: null,
|
|
18773
18983
|
csv: null
|
|
18774
18984
|
},
|
|
18775
|
-
[
|
|
18776
|
-
...
|
|
18985
|
+
[Hg]: {
|
|
18986
|
+
...Gg,
|
|
18777
18987
|
...i,
|
|
18778
18988
|
...o,
|
|
18779
|
-
...
|
|
18780
|
-
...
|
|
18781
|
-
engine:
|
|
18989
|
+
...qg,
|
|
18990
|
+
...Kg,
|
|
18991
|
+
engine: Hg
|
|
18782
18992
|
},
|
|
18783
|
-
[
|
|
18784
|
-
...
|
|
18993
|
+
[Ug]: {
|
|
18994
|
+
...Gg,
|
|
18785
18995
|
...s,
|
|
18786
|
-
engine:
|
|
18996
|
+
engine: Ug
|
|
18787
18997
|
},
|
|
18788
|
-
[
|
|
18789
|
-
...
|
|
18998
|
+
[Wg]: {
|
|
18999
|
+
...Gg,
|
|
18790
19000
|
...s,
|
|
18791
|
-
engine:
|
|
19001
|
+
engine: Wg
|
|
18792
19002
|
}
|
|
18793
19003
|
}[e] ?? {};
|
|
18794
19004
|
}
|
|
18795
|
-
var
|
|
19005
|
+
var Yg = void 0;
|
|
18796
19006
|
typeof Sa == "function" && Sa((e) => {
|
|
18797
|
-
|
|
19007
|
+
Yg = e.scrape;
|
|
18798
19008
|
});
|
|
18799
|
-
function
|
|
19009
|
+
function Xg(e) {
|
|
18800
19010
|
let t = {};
|
|
18801
19011
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
18802
19012
|
return t;
|
|
18803
19013
|
}
|
|
18804
|
-
var
|
|
18805
|
-
function
|
|
18806
|
-
let t =
|
|
18807
|
-
return t.length === 0 ? null : (e &&
|
|
19014
|
+
var Zg = 0;
|
|
19015
|
+
function Qg(e = !1) {
|
|
19016
|
+
let t = Yg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
19017
|
+
return t.length === 0 ? null : (e && Zg++, Zg < t.length ? t[Zg] : null);
|
|
18808
19018
|
}
|
|
18809
|
-
var
|
|
19019
|
+
var $g = async (e, t) => {
|
|
18810
19020
|
let n = (n) => {
|
|
18811
|
-
let r =
|
|
18812
|
-
...
|
|
19021
|
+
let r = Xg({
|
|
19022
|
+
...Jg(t),
|
|
18813
19023
|
api_key: n,
|
|
18814
19024
|
q: e
|
|
18815
19025
|
});
|
|
18816
|
-
return console.log(
|
|
18817
|
-
}, r =
|
|
19026
|
+
return console.log(Lg, r), `${Lg}?${new URLSearchParams(r)}`;
|
|
19027
|
+
}, r = Qg();
|
|
18818
19028
|
for (; r;) try {
|
|
18819
19029
|
return await Ht(n(r));
|
|
18820
19030
|
} catch (e) {
|
|
18821
19031
|
if (e?.error === "quota_exceeded") {
|
|
18822
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
19032
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = Qg(!0);
|
|
18823
19033
|
continue;
|
|
18824
19034
|
}
|
|
18825
19035
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
18826
19036
|
}
|
|
18827
19037
|
return null;
|
|
18828
|
-
},
|
|
19038
|
+
}, e_ = async (e, t, n) => {
|
|
18829
19039
|
let r = `${Da}/${ct(t)}/${ct(e)}`, i = await n.read(r);
|
|
18830
19040
|
if (i) return i;
|
|
18831
|
-
let a = await
|
|
19041
|
+
let a = await $g(e, t);
|
|
18832
19042
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
18833
|
-
},
|
|
18834
|
-
googleSearch: async (t) =>
|
|
18835
|
-
googleImages: async (t) =>
|
|
18836
|
-
googleAutocomplete: async (t) =>
|
|
18837
|
-
googleTrends: async (t) =>
|
|
18838
|
-
googleMaps: async (t) =>
|
|
18839
|
-
googleMapsPhotos: async (t) =>
|
|
18840
|
-
googleMapsReviews: async (t) =>
|
|
18841
|
-
}),
|
|
19043
|
+
}, t_ = (e) => ({
|
|
19044
|
+
googleSearch: async (t) => e_(t, Rg, e),
|
|
19045
|
+
googleImages: async (t) => e_(t, zg, e),
|
|
19046
|
+
googleAutocomplete: async (t) => e_(t, Bg, e),
|
|
19047
|
+
googleTrends: async (t) => e_(t, Vg, e),
|
|
19048
|
+
googleMaps: async (t) => e_(t, Hg, e),
|
|
19049
|
+
googleMapsPhotos: async (t) => e_(t, Ug, e),
|
|
19050
|
+
googleMapsReviews: async (t) => e_(t, Wg, e)
|
|
19051
|
+
}), n_ = {
|
|
18842
19052
|
"+": "+",
|
|
18843
19053
|
"﹢": "+",
|
|
18844
19054
|
"-": "-",
|
|
@@ -18913,7 +19123,7 @@ var qg = async (e, t) => {
|
|
|
18913
19123
|
x: "x",
|
|
18914
19124
|
y: "y",
|
|
18915
19125
|
z: "z"
|
|
18916
|
-
},
|
|
19126
|
+
}, r_ = {
|
|
18917
19127
|
email: {
|
|
18918
19128
|
description: "Email: no spaces -> Lower/Trim",
|
|
18919
19129
|
transformations: [{
|
|
@@ -18959,7 +19169,7 @@ var qg = async (e, t) => {
|
|
|
18959
19169
|
transformations: [],
|
|
18960
19170
|
mask: ["toSlug"]
|
|
18961
19171
|
}
|
|
18962
|
-
},
|
|
19172
|
+
}, i_ = [
|
|
18963
19173
|
{
|
|
18964
19174
|
pattern: "email*",
|
|
18965
19175
|
use: "email"
|
|
@@ -18976,24 +19186,24 @@ var qg = async (e, t) => {
|
|
|
18976
19186
|
pattern: "date*",
|
|
18977
19187
|
use: "date"
|
|
18978
19188
|
}
|
|
18979
|
-
],
|
|
18980
|
-
function
|
|
18981
|
-
return e ? e.normalize("NFKC").replace(
|
|
19189
|
+
], a_ = new RegExp(Object.keys(n_).join("|"), "g");
|
|
19190
|
+
function o_(e) {
|
|
19191
|
+
return e ? e.normalize("NFKC").replace(a_, (e) => n_[e] ?? e) : "";
|
|
18982
19192
|
}
|
|
18983
|
-
var
|
|
19193
|
+
var s_ = class {
|
|
18984
19194
|
config;
|
|
18985
19195
|
matches;
|
|
18986
19196
|
constructor(e = {}, t = []) {
|
|
18987
19197
|
this.config = {
|
|
18988
|
-
...
|
|
19198
|
+
...r_,
|
|
18989
19199
|
...e
|
|
18990
|
-
}, this.matches = [...
|
|
19200
|
+
}, this.matches = [...i_, ...t];
|
|
18991
19201
|
}
|
|
18992
19202
|
apply(e, t, n = !1) {
|
|
18993
19203
|
let r = this.config[e];
|
|
18994
19204
|
if (!r) return n ? Pt(t) : t;
|
|
18995
19205
|
let i = t;
|
|
18996
|
-
i =
|
|
19206
|
+
i = o_(String(i ?? ""));
|
|
18997
19207
|
let a = r.exclusions;
|
|
18998
19208
|
if (Array.isArray(a) && a.length) {
|
|
18999
19209
|
let e = String(i).toLowerCase();
|
|
@@ -19052,7 +19262,7 @@ var t_ = class {
|
|
|
19052
19262
|
};
|
|
19053
19263
|
//#endregion
|
|
19054
19264
|
//#region src/libs/csv.ts
|
|
19055
|
-
function
|
|
19265
|
+
function c_(e, t) {
|
|
19056
19266
|
let n = Oe.parse(e, {
|
|
19057
19267
|
header: !0,
|
|
19058
19268
|
skipEmptyLines: !0,
|
|
@@ -19065,6 +19275,6 @@ function n_(e, t) {
|
|
|
19065
19275
|
};
|
|
19066
19276
|
}
|
|
19067
19277
|
//#endregion
|
|
19068
|
-
export { Xc as AIProvider,
|
|
19278
|
+
export { Xc as AIProvider, ng as AI_PROVIDER_DEFINITIONS, ig as AI_PROVIDER_DESCRIPTORS, Br as ActionButton, ef as AddressAutocomplete, Po as Alert, Bh as App, zh as AppProvider, Li as AsyncDropdown, bi as AuthButton, $r as AuthProvider, Ks as Autocomplete, an as BUILT_IN_THEMES, en as BUILT_IN_THEME_IDS, Vr as BackLink, Xn as Badge, Yn as BadgeOverlay, Wi as Brand, Qi as Breadcrumbs, Sl as CONTEXT_MENU_SEARCH_THRESHOLD, ki as Card, $i as Carousel, Ul as Chatbot, ks as Checkbox, qs as Checklist, Uo as Code, Au as CodeEditor, du as CodeSyntaxError, Kn as Col, bs as Color, Mu as Component, Nu as ComponentBlock, Wn as Container, Rl as ContextMenu, _c as CropImage, np as DEFAULT_DOCUMENT_HEAD, tp as DEFAULT_HEAD_APP_NAME, rp as DEFAULT_LANGUAGE_HEAD, Ps as DEFAULT_ORDER, Si as DataProvider, xs as Date, Cs as DateTime, Xh as DirectApiProviderAdapter, Fg as DropBoxConnectButton, Km as DropboxAuthProvider, Ii as Dropdown, Ri as DropdownButton, Vi as DropdownDivider, Bi as DropdownHeader, zi as DropdownItem, Hi as DropdownMenu, eg as EMAIL_PROVIDER_DEFINITIONS, vs as Email, vm as EmailProvider, ps as FieldError, wc as FileNameEditor, Qh as FirebaseApiProviderAdapter, zm as FirebaseAuthProvider, Fm as FirebaseDataProvider, bo as FirebaseStorageProvider, qa as FirestoreDataProvider, sd as Form, Ku as FormControllerContext, Up as Gallery, Ym as GmailEmailProvider, Hr as GoSite, gm as GoogleAuthProvider, Vd as GoogleMapsProvider, Wm as GoogleServiceAccountProvider, im as Grid, rm as GridArray, nm as GridCore, zf as GridDB, Wp as GridGalleryView, Qf as GridTableView, Mp as Head, bp as HeadProvider, Os as Hidden, Mn as I18nProvider, Q as Icon, br as IconProvider, Ui as Image, ni as ImageAvatar, lc as ImageEditor, dc as ImageField, hs as Input, js as Label, zd as LayoutBuilder, Ef as ListCard, Ns as ListGroup, wi as Loader, zr as LoadingButton, Go as LocaleSwitcher, lr as LucideIconProvider, Bp as MarkdownReader, Pi as Menu, Zh as MockApiProviderAdapter, mo as MockDataProvider, Ai as Modal, Ni as ModalOk, Mi as ModalYesNo, Ts as Month, n_ as NORMALIZE_MAP, ea as Notifications, _s as Number, ag as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, Ls as Order, tg as PUBLISH_PROVIDER_DEFINITIONS, am as PageUsers, Hp as Pagination, ys as Password, Zo as Percentage, fr as PhosphorIconProvider, tu as Prompt, Wl as PromptMode, xl as PromptUtils, jo as ProviderSwitcher, Es as Range, Ur as ReferSite, _d as Repeat, wf as RichText, Gn as Row, s_ as Sanitizer, na as Search, Gs as Select, If as SideNav, oc as StorageProvider, gs as String, $h as SupabaseApiProviderAdapter, Zm as SupabaseAuthProvider, oo as SupabaseDataProvider, xo as SupabaseStorageProvider, As as Switch, Td as Tab, Vp as TabDynamic, Cd as TabItem, Sd as TabLayouts, Od as Table, Ms as TextArea, fa as ThemeSwitcher, Ss as Time, aa as Toolbar, tf as UploadCSV, Mc as UploadDocument, Nc as UploadImage, Ds as Url, ws as Week, Z as Wrapper, xt as arrayUnique, Et as arraysEqual, Tt as base64Encode, At as base64ToBlob, jt as base64ToUrl, Gi as buildBreadcrumbSchema, Fl as buildTextCommandContext, wr as buttonBaseClass, Dr as buttonDangerClass, Mr as buttonDarkClass, Ar as buttonInfoClass, jr as buttonLightClass, Lr as buttonLinkClass, Fr as buttonOutlineDangerClass, Nr as buttonOutlinePrimaryClass, Pr as buttonOutlineSecondaryClass, Ir as buttonOutlineSuccessClass, Tr as buttonPrimaryClass, Er as buttonSecondaryClass, Or as buttonSuccessClass, kr as buttonWarningClass, Ia as callFirebaseFunction, ht as checkConditions, Nt as cleanRecord, X as cn, nl as configureProxy, et as converter, it as copyToClipboard, gt as crc32, sg as createAIProviderRegistry, tr as createMotionTransition, wn as createTranslations, rt as decodeJWT, Cn as defineLocaleMessages, lt as dirname, Ig as dropBox, ft as eventClosest, Ht as fetchJson, Vt as fetchRest, Ut as fetchWithRetry, as as fieldAddonClass, ns as fieldControlBaseClass, ts as fieldFeedbackClass, is as fieldGroupClass, es as fieldLabelClass, rs as fieldTextAreaBaseClass, qc as formatAIModelRef, dt as generateUniqueId, ml as getAIModelCatalog, vi as getAccessToken, Ml as getAutoClosedSuffixLength, xu as getCodeValidationResult, jc as getFileUrl, Yr as getGlobalVars, mg as getGoogleTrendsData, hg as getGoogleTrendsRelated, pg as getKeywordIdeas, ai as getProviderConfigurationState, Mt as getRecordValue, yd as getTabLayoutConfig, xd as getTabPaneClassName, bd as getTabTriggerClassName, qm as googleGetAccessToken, jl as hasAutoClosedSuffix, Tn as interpolate, yt as intersectObjects, qn as isBadgeDescriptor, St as isEmpty, Ot as isInteractiveElement, al as isProxyEnabled, Gd as loadGoogleMaps, vt as loadScripts, qh as locales, Nl as matchCommandTrigger, Jn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, o_ as normalizeVisualChars, Jc as parseAIModelRef, c_ as parseCsvText, ti as path, rl as proxyFetch, Co as registerProviderSessionFactory, Zr as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, nr as resolveMotionEffect, uu as runPrompt, wt as safeClone, Dt as sanitizeKey, t_ as scrape, Jm as sendEmail, Xr as setGlobalVars, ut as sleep, Pt as smartTypeCast, pt as substrCount, rg as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, Zc as useAIProvider, Qc as useAIProviderRegistry, hi as useAccessToken, Jh as useApiProvider, kp as useAssetsHead, ei as useAuthProvider, Sm as useCredentialsProvider, Ci as useDataProvider, Op as useDocumentHead, Pg as useDropBoxConnect, $o as useEditorHeight, ym as useEmailProvider, or as useEnterMotion, Tc as useFileUploadCore, Ju as useFormActions, rd as useFormContext, qu as useFormController, Jr as useGlobalVars, Hd as useGoogleMapsConfig, Cp as useHead, Tp as useHeadLinks, Nn as useI18n, Sr as useIconController, xr as useIconProvider, Qs as useImage, Dp as useLanguageHead, Vh as useMenu, rr as useMotionEffect, ir as useMotionState, Ep as usePaginationHead, ar as usePressMotion, _a as useProvider, ko as useProviderSession, il as useProxy, Ap as usePwaHead, jp as useSchemaOrgHead, ga as useSetProvider, wp as useSocialHead, sc as useStorageProvider, Y as useTheme, xn as useThemeController, bu as validateCodeSyntax };
|
|
19069
19279
|
|
|
19070
19280
|
//# sourceMappingURL=index.mjs.map
|