@llmnative/react 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +793 -573
- 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 J, get as Fe, 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,22 +10881,22 @@ 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
|
+
}, []), J = s((e) => {
|
|
10891
10900
|
be((t) => {
|
|
10892
10901
|
if (!t[e]) return t;
|
|
10893
10902
|
let { [e]: n, ...r } = 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",
|
|
@@ -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: J,
|
|
11112
11121
|
errors: ye
|
|
11113
11122
|
}), [
|
|
11114
|
-
Me,
|
|
11115
11123
|
Ne,
|
|
11116
11124
|
Pe,
|
|
11125
|
+
J,
|
|
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,145 @@ 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 items-center gap-2" }, /* @__PURE__ */ t.createElement("input", {
|
|
15224
|
+
type: "date",
|
|
15225
|
+
"aria-label": `${e.label} ${i.filtersRangeFrom}`,
|
|
15226
|
+
className: em,
|
|
15227
|
+
value: a.from,
|
|
15228
|
+
onChange: (e) => r({
|
|
15229
|
+
...a,
|
|
15230
|
+
from: e.target.value
|
|
15231
|
+
})
|
|
15232
|
+
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
|
|
15233
|
+
type: "date",
|
|
15234
|
+
"aria-label": `${e.label} ${i.filtersRangeTo}`,
|
|
15235
|
+
className: em,
|
|
15236
|
+
value: a.to,
|
|
15237
|
+
onChange: (e) => r({
|
|
15238
|
+
...a,
|
|
15239
|
+
to: e.target.value
|
|
15240
|
+
})
|
|
15241
|
+
})));
|
|
15242
|
+
}
|
|
15243
|
+
if (e.kind === "numberRange") {
|
|
15244
|
+
let a = n;
|
|
15245
|
+
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 items-center gap-2" }, /* @__PURE__ */ t.createElement("input", {
|
|
15246
|
+
type: "number",
|
|
15247
|
+
placeholder: i.filtersRangeMin,
|
|
15248
|
+
"aria-label": `${e.label} ${i.filtersRangeMin}`,
|
|
15249
|
+
className: em,
|
|
15250
|
+
value: a.min ?? "",
|
|
15251
|
+
onChange: (e) => r({
|
|
15252
|
+
...a,
|
|
15253
|
+
min: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15254
|
+
})
|
|
15255
|
+
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" }, "–"), /* @__PURE__ */ t.createElement("input", {
|
|
15256
|
+
type: "number",
|
|
15257
|
+
placeholder: i.filtersRangeMax,
|
|
15258
|
+
"aria-label": `${e.label} ${i.filtersRangeMax}`,
|
|
15259
|
+
className: em,
|
|
15260
|
+
value: a.max ?? "",
|
|
15261
|
+
onChange: (e) => r({
|
|
15262
|
+
...a,
|
|
15263
|
+
max: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15264
|
+
})
|
|
15265
|
+
})));
|
|
15266
|
+
}
|
|
15267
|
+
let a = n;
|
|
15268
|
+
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", {
|
|
15269
|
+
type: "checkbox",
|
|
15270
|
+
checked: a,
|
|
15271
|
+
onChange: () => r(!a),
|
|
15272
|
+
className: "peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0"
|
|
15273
|
+
}), /* @__PURE__ */ t.createElement("span", {
|
|
15274
|
+
"aria-hidden": "true",
|
|
15275
|
+
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")
|
|
15276
|
+
}, /* @__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));
|
|
15277
|
+
}
|
|
15278
|
+
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
15279
|
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
15280
|
records: e,
|
|
15135
15281
|
onLoad: L
|
|
@@ -15137,58 +15283,87 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15137
15283
|
columns: i,
|
|
15138
15284
|
records: U,
|
|
15139
15285
|
form: o
|
|
15140
|
-
}), [te, G] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, e
|
|
15286
|
+
}), [te, G] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, Xp(e)]))), [ne, re] = h(!1), K = s((e, t) => {
|
|
15287
|
+
G((n) => ({
|
|
15288
|
+
...n,
|
|
15289
|
+
[e]: t
|
|
15290
|
+
}));
|
|
15291
|
+
}, []), ie = s((e) => {
|
|
15141
15292
|
G((t) => ({
|
|
15142
15293
|
...t,
|
|
15143
|
-
[e]:
|
|
15294
|
+
[e.key]: Xp(e)
|
|
15144
15295
|
}));
|
|
15145
|
-
}, []),
|
|
15296
|
+
}, []), 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
15297
|
U,
|
|
15147
15298
|
M,
|
|
15148
15299
|
te
|
|
15149
|
-
]),
|
|
15300
|
+
]), se = M && M.length > 0 ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement(Br, {
|
|
15301
|
+
icon: "filter",
|
|
15302
|
+
label: z.filtersButton,
|
|
15303
|
+
variant: "outline-secondary",
|
|
15304
|
+
badge: ae.length > 0 ? ae.length : void 0,
|
|
15305
|
+
onClick: () => re(!0)
|
|
15306
|
+
}), ae.map((e) => /* @__PURE__ */ t.createElement("span", {
|
|
15150
15307
|
key: e.key,
|
|
15151
|
-
className: "flex shrink-0 items-center gap-1.5 text-
|
|
15152
|
-
}, /* @__PURE__ */ t.createElement("
|
|
15153
|
-
type: "
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15308
|
+
className: "inline-flex shrink-0 items-center gap-1.5 rounded-full border border-primary/20 bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary"
|
|
15309
|
+
}, $p(e, te[e.key] ?? Xp(e), z), /* @__PURE__ */ t.createElement("button", {
|
|
15310
|
+
type: "button",
|
|
15311
|
+
"aria-label": `${z.filtersClearAll} ${e.label}`,
|
|
15312
|
+
className: "opacity-60 transition-opacity hover:opacity-100",
|
|
15313
|
+
onClick: () => ie(e)
|
|
15314
|
+
}, "×")))) : null, ce = M && M.length > 0 ? se : null, le = ne && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Ai, {
|
|
15315
|
+
title: z.filtersPanelTitle,
|
|
15316
|
+
size: "sm",
|
|
15317
|
+
position: "right",
|
|
15318
|
+
onClose: () => re(!1),
|
|
15319
|
+
footer: /* @__PURE__ */ t.createElement(Br, {
|
|
15320
|
+
label: z.filtersClearAll,
|
|
15321
|
+
variant: "link",
|
|
15322
|
+
disabled: ae.length === 0,
|
|
15323
|
+
onClick: () => G(Object.fromEntries(M.map((e) => [e.key, Xp(e)])))
|
|
15324
|
+
})
|
|
15325
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(tm, {
|
|
15326
|
+
key: e.key,
|
|
15327
|
+
filter: e,
|
|
15328
|
+
value: te[e.key] ?? Xp(e),
|
|
15329
|
+
onChange: (t) => K(e.key, t),
|
|
15330
|
+
dict: z
|
|
15331
|
+
})))) : null, ue = j === !0 ? {} : j || void 0, [de, fe] = h(""), q = p(() => {
|
|
15332
|
+
if (!ue || !de.trim()) return oe;
|
|
15333
|
+
let e = de.trim().toLowerCase(), t = ue.fields?.map(String);
|
|
15334
|
+
return oe.filter((n) => (t ?? Object.keys(n)).some((t) => {
|
|
15160
15335
|
let r = Mt(n, t);
|
|
15161
15336
|
return typeof r == "string" && r.toLowerCase().includes(e);
|
|
15162
15337
|
}));
|
|
15163
15338
|
}, [
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
]),
|
|
15339
|
+
oe,
|
|
15340
|
+
ue,
|
|
15341
|
+
de
|
|
15342
|
+
]), pe = ue ? /* @__PURE__ */ t.createElement("div", { className: "flex min-w-0 items-center gap-2" }, /* @__PURE__ */ t.createElement("input", {
|
|
15168
15343
|
type: "search",
|
|
15169
|
-
value:
|
|
15170
|
-
onChange: (e) =>
|
|
15171
|
-
placeholder:
|
|
15344
|
+
value: de,
|
|
15345
|
+
onChange: (e) => fe(e.target.value),
|
|
15346
|
+
placeholder: ue.placeholder ?? B.search,
|
|
15172
15347
|
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"
|
|
15173
|
-
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" },
|
|
15348
|
+
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" }, q.length, " / ", oe.length)) : null, me = m ?? {}, he = me.table ?? {}, ge = me.gallery ?? {}, [_e, ve] = h(f);
|
|
15174
15349
|
l(() => {
|
|
15175
|
-
|
|
15350
|
+
ve(f);
|
|
15176
15351
|
}, [f]);
|
|
15177
|
-
let [
|
|
15178
|
-
|
|
15352
|
+
let [ye, be] = h(() => new Set(ee.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), xe = s((e) => {
|
|
15353
|
+
be((t) => {
|
|
15179
15354
|
let n = new Set(t);
|
|
15180
15355
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15181
15356
|
});
|
|
15182
|
-
}, []),
|
|
15183
|
-
|
|
15357
|
+
}, []), Se = p(() => ee.filter((e) => !ye.has(String(e.key))), [ee, ye]), Ce = ge.fields ?? [], [we, Te] = h(() => new Set(Ce.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), Ee = s((e) => {
|
|
15358
|
+
Te((t) => {
|
|
15184
15359
|
let n = new Set(t);
|
|
15185
15360
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15186
15361
|
});
|
|
15187
|
-
}, []),
|
|
15362
|
+
}, []), De = p(() => Ce.filter((e) => !we.has(String(e.key))), [Ce, we]), Oe = p(() => {
|
|
15188
15363
|
let e = [];
|
|
15189
|
-
if (
|
|
15364
|
+
if (De.length) {
|
|
15190
15365
|
let n = /* @__PURE__ */ new Map();
|
|
15191
|
-
|
|
15366
|
+
De.forEach((e) => {
|
|
15192
15367
|
let t = e.position ?? "bottomLeft";
|
|
15193
15368
|
n.has(t) || n.set(t, []), n.get(t).push(e);
|
|
15194
15369
|
}), e.push(...Array.from(n.entries()).map(([e, n]) => ({
|
|
@@ -15202,9 +15377,9 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15202
15377
|
}))
|
|
15203
15378
|
})));
|
|
15204
15379
|
}
|
|
15205
|
-
let n = [...
|
|
15380
|
+
let n = [...ge.overlays ?? [], ...e];
|
|
15206
15381
|
return n.length ? n : void 0;
|
|
15207
|
-
}, [
|
|
15382
|
+
}, [ge.overlays, De]), { mode: ke, activeSelectionKeys: Ae, selectionState: je, handleSelectionChange: Me } = Jp({ selection: E }), { normalizedActions: Ne, activeAction: Pe, activeActionConfig: J, activeActionBody: Fe, activeKey: Ie, runAction: Le, close: Re, getActionContext: ze, getModalActionContext: Be, getRecordKey: Ve, formController: He } = Gp({
|
|
15208
15383
|
actions: a,
|
|
15209
15384
|
form: o,
|
|
15210
15385
|
editDeepLink: c,
|
|
@@ -15216,66 +15391,66 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15216
15391
|
onDelete: P,
|
|
15217
15392
|
onComplete: F,
|
|
15218
15393
|
audit: I
|
|
15219
|
-
}),
|
|
15220
|
-
if (D?.(e), !
|
|
15221
|
-
let t =
|
|
15222
|
-
if (
|
|
15223
|
-
|
|
15394
|
+
}), Ue = Ne.edit, We = !!Ue && (Ue.kind !== "modal" || !!o), Ge = s((e) => {
|
|
15395
|
+
if (D?.(e), !We) return;
|
|
15396
|
+
let t = Ve(e);
|
|
15397
|
+
if (Pe?.actionKey === "edit" && Pe.record && Ve(Pe.record) === t) {
|
|
15398
|
+
Re();
|
|
15224
15399
|
return;
|
|
15225
15400
|
}
|
|
15226
|
-
|
|
15401
|
+
Le("edit", e);
|
|
15227
15402
|
}, [
|
|
15228
|
-
|
|
15229
|
-
|
|
15403
|
+
Pe?.actionKey,
|
|
15404
|
+
Pe?.record,
|
|
15405
|
+
We,
|
|
15230
15406
|
Re,
|
|
15231
|
-
|
|
15232
|
-
Fe,
|
|
15407
|
+
Ve,
|
|
15233
15408
|
D,
|
|
15234
|
-
|
|
15235
|
-
]),
|
|
15236
|
-
let i =
|
|
15409
|
+
Le
|
|
15410
|
+
]), Ke = D || We ? Ge : void 0, qe = s((e, n, r) => {
|
|
15411
|
+
let i = Ne[e];
|
|
15237
15412
|
return !i || !Jf(i, n) ? null : /* @__PURE__ */ t.createElement(Br, {
|
|
15238
15413
|
className: r || (e === "add" ? "btn-primary" : void 0),
|
|
15239
15414
|
icon: i.icon,
|
|
15240
15415
|
label: Xf(e, i, V),
|
|
15241
15416
|
disabled: Yf(i, n),
|
|
15242
|
-
onClick: () =>
|
|
15417
|
+
onClick: () => Le(e, n)
|
|
15243
15418
|
});
|
|
15244
15419
|
}, [
|
|
15245
|
-
|
|
15246
|
-
|
|
15420
|
+
Ne,
|
|
15421
|
+
Le,
|
|
15247
15422
|
V
|
|
15248
|
-
]),
|
|
15423
|
+
]), Je = p(() => Object.entries(Ne).filter(([e, t]) => e !== "edit" && e !== "delete" && Jf(t, void 0)).map(([e]) => e), [Ne]), Ye = p(() => ({
|
|
15249
15424
|
title: x,
|
|
15250
15425
|
records: U,
|
|
15251
|
-
selection:
|
|
15252
|
-
runAction:
|
|
15426
|
+
selection: je,
|
|
15427
|
+
runAction: Le
|
|
15253
15428
|
}), [
|
|
15254
15429
|
U,
|
|
15430
|
+
Le,
|
|
15255
15431
|
je,
|
|
15256
|
-
Te,
|
|
15257
15432
|
x
|
|
15258
|
-
]),
|
|
15433
|
+
]), Xe = p(() => ({
|
|
15259
15434
|
records: U,
|
|
15260
|
-
selection:
|
|
15261
|
-
runAction:
|
|
15435
|
+
selection: je,
|
|
15436
|
+
runAction: Le
|
|
15262
15437
|
}), [
|
|
15263
15438
|
U,
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
]),
|
|
15439
|
+
Le,
|
|
15440
|
+
je
|
|
15441
|
+
]), Ze = me.toggle ? /* @__PURE__ */ t.createElement("span", { className: "inline-flex rounded-md border border-border overflow-hidden" }, /* @__PURE__ */ t.createElement(Br, {
|
|
15267
15442
|
icon: "list",
|
|
15268
15443
|
ariaLabel: "Table view",
|
|
15269
15444
|
title: "Table view",
|
|
15270
|
-
className: "rounded-none border-0 " + (
|
|
15271
|
-
onClick: () =>
|
|
15445
|
+
className: "rounded-none border-0 " + (_e === "table" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15446
|
+
onClick: () => ve("table")
|
|
15272
15447
|
}), /* @__PURE__ */ t.createElement(Br, {
|
|
15273
15448
|
icon: "layout-grid",
|
|
15274
15449
|
ariaLabel: "Gallery view",
|
|
15275
15450
|
title: "Gallery view",
|
|
15276
|
-
className: "rounded-none border-0 border-l border-border " + (
|
|
15277
|
-
onClick: () =>
|
|
15278
|
-
})) : null,
|
|
15451
|
+
className: "rounded-none border-0 border-l border-border " + (_e === "gallery" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15452
|
+
onClick: () => ve("gallery")
|
|
15453
|
+
})) : null, Qe = he.columnPicker && _e === "table" ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15279
15454
|
trigger: {
|
|
15280
15455
|
icon: "columns",
|
|
15281
15456
|
title: "Columns"
|
|
@@ -15289,122 +15464,122 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15289
15464
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15290
15465
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15291
15466
|
type: "checkbox",
|
|
15292
|
-
checked: !
|
|
15293
|
-
onChange: () =>
|
|
15467
|
+
checked: !ye.has(n),
|
|
15468
|
+
onChange: () => xe(n)
|
|
15294
15469
|
}), e.label);
|
|
15295
|
-
})) : null,
|
|
15470
|
+
})) : null, $e = ge.fieldPicker && _e === "gallery" && Ce.length ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15296
15471
|
trigger: {
|
|
15297
15472
|
icon: "sliders-horizontal",
|
|
15298
15473
|
title: "Fields"
|
|
15299
15474
|
},
|
|
15300
15475
|
triggerClassName: "btn btn-outline-secondary",
|
|
15301
15476
|
position: "end"
|
|
15302
|
-
},
|
|
15477
|
+
}, Ce.map((e) => {
|
|
15303
15478
|
let n = String(e.key);
|
|
15304
15479
|
return /* @__PURE__ */ t.createElement("label", {
|
|
15305
15480
|
key: n,
|
|
15306
15481
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15307
15482
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15308
15483
|
type: "checkbox",
|
|
15309
|
-
checked: !
|
|
15310
|
-
onChange: () =>
|
|
15484
|
+
checked: !we.has(n),
|
|
15485
|
+
onChange: () => Ee(n)
|
|
15311
15486
|
}), e.label);
|
|
15312
|
-
})) : null,
|
|
15313
|
-
if (u !== void 0) return typeof u == "function" ? u(
|
|
15314
|
-
if (!(!x && !
|
|
15487
|
+
})) : null, et = p(() => {
|
|
15488
|
+
if (u !== void 0) return typeof u == "function" ? u(Ye) : u;
|
|
15489
|
+
if (!(!x && !pe && !ce && !Je.length && !Ze && !Qe && !$e)) return /* @__PURE__ */ t.createElement(t.Fragment, null, pe || ce ? /* @__PURE__ */ t.createElement("span", { className: "flex min-w-0 flex-1 items-center gap-3" }, x, pe, ce) : x || /* @__PURE__ */ t.createElement("span", null), Je.length || Ze || Qe || $e ? /* @__PURE__ */ t.createElement("span", { className: "flex flex-wrap items-center gap-2" }, Qe, $e, Ze, Je.map((e) => /* @__PURE__ */ t.createElement(t.Fragment, { key: e }, qe(e)))) : null);
|
|
15315
15490
|
}, [
|
|
15316
|
-
|
|
15491
|
+
qe,
|
|
15317
15492
|
u,
|
|
15318
|
-
|
|
15319
|
-
|
|
15493
|
+
Je,
|
|
15494
|
+
Ye,
|
|
15320
15495
|
x,
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
]),
|
|
15327
|
-
if (d !== void 0) return typeof d == "function" ? d(
|
|
15328
|
-
}, [d,
|
|
15329
|
-
if (!(!
|
|
15496
|
+
Ze,
|
|
15497
|
+
Qe,
|
|
15498
|
+
$e,
|
|
15499
|
+
pe,
|
|
15500
|
+
ce
|
|
15501
|
+
]), tt = p(() => {
|
|
15502
|
+
if (d !== void 0) return typeof d == "function" ? d(Xe) : d;
|
|
15503
|
+
}, [d, Xe]), nt = p(() => {
|
|
15504
|
+
if (!(!Pe || !J || J.kind !== "modal" && J.kind !== "delete")) return Be(Pe.actionKey, Pe.record);
|
|
15330
15505
|
}, [
|
|
15331
|
-
|
|
15506
|
+
Pe,
|
|
15332
15507
|
J,
|
|
15333
|
-
|
|
15334
|
-
]),
|
|
15335
|
-
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !
|
|
15336
|
-
}, [J,
|
|
15508
|
+
Be
|
|
15509
|
+
]), rt = p(() => {
|
|
15510
|
+
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !nt)) return typeof J.header == "function" ? J.header(nt) : J.header;
|
|
15511
|
+
}, [J, nt]), it = p(() => {
|
|
15337
15512
|
if (!(!J || J.kind !== "modal" && J.kind !== "delete")) {
|
|
15338
15513
|
if (J.footer === !1) return !1;
|
|
15339
|
-
if (!(J.footer === void 0 || !
|
|
15514
|
+
if (!(J.footer === void 0 || !nt)) return typeof J.footer == "function" ? J.footer(nt) : J.footer;
|
|
15340
15515
|
}
|
|
15341
|
-
}, [J,
|
|
15516
|
+
}, [J, nt]), at = Zf(w);
|
|
15342
15517
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ki, {
|
|
15343
15518
|
wrapperClassName: _,
|
|
15344
|
-
header:
|
|
15345
|
-
footer:
|
|
15519
|
+
header: et,
|
|
15520
|
+
footer: tt,
|
|
15346
15521
|
className: X(R.Grid.Card.className, g ? `sticky-${g}` : "", v),
|
|
15347
15522
|
headerClassName: R.Grid.Card.headerClassName,
|
|
15348
15523
|
bodyClassName: X(R.Grid.Card.bodyClassName, y),
|
|
15349
15524
|
footerClassName: R.Grid.Card.footerClassName,
|
|
15350
15525
|
loading: b || W
|
|
15351
|
-
},
|
|
15352
|
-
records:
|
|
15526
|
+
}, _e === "gallery" ? /* @__PURE__ */ t.createElement(Wp, {
|
|
15527
|
+
records: q,
|
|
15353
15528
|
recordId: n,
|
|
15354
|
-
sortable:
|
|
15529
|
+
sortable: at || w,
|
|
15355
15530
|
pagination: T,
|
|
15356
|
-
selection:
|
|
15357
|
-
selectedKeys:
|
|
15358
|
-
onSelectionChange:
|
|
15359
|
-
onRowClick:
|
|
15531
|
+
selection: ke,
|
|
15532
|
+
selectedKeys: Ae,
|
|
15533
|
+
onSelectionChange: ke ? Me : void 0,
|
|
15534
|
+
onRowClick: Ke,
|
|
15360
15535
|
groupBy: A,
|
|
15361
15536
|
wrapperClassName: R.Grid.Gallery.wrapperClassName,
|
|
15362
15537
|
before: S,
|
|
15363
15538
|
after: C,
|
|
15364
|
-
columns:
|
|
15365
|
-
overlays:
|
|
15539
|
+
columns: ge.columns,
|
|
15540
|
+
overlays: Oe
|
|
15366
15541
|
}) : /* @__PURE__ */ t.createElement(Qf, {
|
|
15367
|
-
records:
|
|
15542
|
+
records: q,
|
|
15368
15543
|
recordId: n,
|
|
15369
|
-
columns:
|
|
15370
|
-
runAction:
|
|
15371
|
-
sortable:
|
|
15544
|
+
columns: Se,
|
|
15545
|
+
runAction: Le,
|
|
15546
|
+
sortable: at || w,
|
|
15372
15547
|
pagination: T,
|
|
15373
|
-
selection:
|
|
15374
|
-
selectedKeys:
|
|
15375
|
-
onSelectionChange:
|
|
15376
|
-
onRowClick:
|
|
15548
|
+
selection: ke,
|
|
15549
|
+
selectedKeys: Ae,
|
|
15550
|
+
onSelectionChange: ke ? Me : void 0,
|
|
15551
|
+
onRowClick: Ke,
|
|
15377
15552
|
reorderable: O,
|
|
15378
15553
|
onReorder: k,
|
|
15379
|
-
activeKey:
|
|
15554
|
+
activeKey: Ie,
|
|
15380
15555
|
groupBy: A,
|
|
15381
15556
|
wrapperClassName: R.Grid.Table.wrapperClassName,
|
|
15382
|
-
className:
|
|
15383
|
-
heightClassName:
|
|
15384
|
-
scrollClassName:
|
|
15385
|
-
headerClassName:
|
|
15557
|
+
className: he.className,
|
|
15558
|
+
heightClassName: he.heightClassName,
|
|
15559
|
+
scrollClassName: he.scrollClassName,
|
|
15560
|
+
headerClassName: he.headerClassName,
|
|
15386
15561
|
before: S,
|
|
15387
15562
|
after: C
|
|
15388
|
-
})),
|
|
15563
|
+
})), le, Pe && J && (J.kind === "modal" || J.kind === "delete") && /* @__PURE__ */ t.createElement(Ai, {
|
|
15389
15564
|
size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
|
|
15390
15565
|
position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
|
|
15391
|
-
header:
|
|
15392
|
-
title: Yp(
|
|
15393
|
-
onClose:
|
|
15394
|
-
onSave: J.kind === "modal" && J.footer === void 0 && (
|
|
15566
|
+
header: rt,
|
|
15567
|
+
title: Yp(Pe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Be(Pe.actionKey, Pe.record) : ze(Pe.actionKey, Pe.record), z.deleteConfirm, V),
|
|
15568
|
+
onClose: Re,
|
|
15569
|
+
onSave: J.kind === "modal" && J.footer === void 0 && (Pe.actionKey === "add" || Pe.actionKey === "edit") ? (e) => He.save(e) : void 0,
|
|
15395
15570
|
onDelete: J.kind === "delete" ? async () => {
|
|
15396
|
-
let e =
|
|
15571
|
+
let e = Pe.record;
|
|
15397
15572
|
if (!e) return !1;
|
|
15398
|
-
let t = P ? await P({ record: e }) : r ? `${r}/${
|
|
15573
|
+
let t = P ? await P({ record: e }) : r ? `${r}/${Ve(e)}` : void 0;
|
|
15399
15574
|
if (!t && !P) return !1;
|
|
15400
15575
|
t && await H.remove(t);
|
|
15401
15576
|
let n = await F?.({
|
|
15402
15577
|
record: e,
|
|
15403
15578
|
action: "delete"
|
|
15404
15579
|
}) ?? !0;
|
|
15405
|
-
return n &&
|
|
15406
|
-
} : J.kind === "modal" && J.footer === void 0 &&
|
|
15407
|
-
footer:
|
|
15580
|
+
return n && Re(), n;
|
|
15581
|
+
} : J.kind === "modal" && J.footer === void 0 && Pe.actionKey === "edit" && Pe.record && Ne.delete ? async () => (await Be(Pe.actionKey, Pe.record).runAction("remove"), !1) : void 0,
|
|
15582
|
+
footer: it,
|
|
15408
15583
|
showCancel: J.kind === "modal" || J.kind === "delete" ? J.footer === void 0 : !0,
|
|
15409
15584
|
allowFullscreen: J.kind === "modal" || J.kind === "delete" ? J.allowFullscreen : !0,
|
|
15410
15585
|
wrapperClassName: R.Grid.Modal.wrapperClassName,
|
|
@@ -15413,22 +15588,22 @@ function Xp({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15413
15588
|
titleClassName: R.Grid.Modal.titleClassName,
|
|
15414
15589
|
bodyClassName: R.Grid.Modal.bodyClassName,
|
|
15415
15590
|
footerClassName: R.Grid.Modal.footerClassName
|
|
15416
|
-
},
|
|
15591
|
+
}, Fe));
|
|
15417
15592
|
}
|
|
15418
15593
|
//#endregion
|
|
15419
15594
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
15420
|
-
function
|
|
15421
|
-
return /* @__PURE__ */ t.createElement(
|
|
15595
|
+
function rm(e) {
|
|
15596
|
+
return /* @__PURE__ */ t.createElement(nm, e);
|
|
15422
15597
|
}
|
|
15423
15598
|
//#endregion
|
|
15424
15599
|
//#region src/components/widgets/Grid.tsx
|
|
15425
|
-
function
|
|
15426
|
-
return "records" in e ? /* @__PURE__ */ t.createElement(
|
|
15600
|
+
function im(e) {
|
|
15601
|
+
return "records" in e ? /* @__PURE__ */ t.createElement(rm, e) : /* @__PURE__ */ t.createElement(zf, e);
|
|
15427
15602
|
}
|
|
15428
15603
|
//#endregion
|
|
15429
15604
|
//#region src/pages/Users.tsx
|
|
15430
|
-
function
|
|
15431
|
-
return /* @__PURE__ */ t.createElement(
|
|
15605
|
+
function am() {
|
|
15606
|
+
return /* @__PURE__ */ t.createElement(im, {
|
|
15432
15607
|
path: "/users",
|
|
15433
15608
|
recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
|
|
15434
15609
|
form: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(gs, {
|
|
@@ -15455,10 +15630,10 @@ function $p() {
|
|
|
15455
15630
|
}
|
|
15456
15631
|
//#endregion
|
|
15457
15632
|
//#region src/pages/NotFound.tsx
|
|
15458
|
-
var
|
|
15633
|
+
var om = () => {
|
|
15459
15634
|
let e = Nn("common");
|
|
15460
15635
|
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));
|
|
15461
|
-
},
|
|
15636
|
+
}, sm = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15462
15637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15463
15638
|
width: e,
|
|
15464
15639
|
height: e,
|
|
@@ -15478,7 +15653,7 @@ var em = () => {
|
|
|
15478
15653
|
x2: "12.01",
|
|
15479
15654
|
y1: "17",
|
|
15480
15655
|
y2: "17"
|
|
15481
|
-
})),
|
|
15656
|
+
})), cm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15482
15657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15483
15658
|
width: "13",
|
|
15484
15659
|
height: "13",
|
|
@@ -15493,7 +15668,7 @@ var em = () => {
|
|
|
15493
15668
|
transform: e ? "rotate(180deg)" : "none",
|
|
15494
15669
|
flexShrink: 0
|
|
15495
15670
|
}
|
|
15496
|
-
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })),
|
|
15671
|
+
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), lm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15497
15672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15498
15673
|
width: "13",
|
|
15499
15674
|
height: "13",
|
|
@@ -15510,7 +15685,7 @@ var em = () => {
|
|
|
15510
15685
|
y: "8",
|
|
15511
15686
|
rx: "2",
|
|
15512
15687
|
ry: "2"
|
|
15513
|
-
}), /* @__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" })),
|
|
15688
|
+
}), /* @__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", {
|
|
15514
15689
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15515
15690
|
width: "13",
|
|
15516
15691
|
height: "13",
|
|
@@ -15520,7 +15695,7 @@ var em = () => {
|
|
|
15520
15695
|
strokeWidth: "2",
|
|
15521
15696
|
strokeLinecap: "round",
|
|
15522
15697
|
strokeLinejoin: "round"
|
|
15523
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })),
|
|
15698
|
+
}, /* @__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", {
|
|
15524
15699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15525
15700
|
width: "14",
|
|
15526
15701
|
height: "14",
|
|
@@ -15530,7 +15705,7 @@ var em = () => {
|
|
|
15530
15705
|
strokeWidth: "2",
|
|
15531
15706
|
strokeLinecap: "round",
|
|
15532
15707
|
strokeLinejoin: "round"
|
|
15533
|
-
}, /* @__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" })),
|
|
15708
|
+
}, /* @__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) => ({
|
|
15534
15709
|
error: {
|
|
15535
15710
|
message: e.message,
|
|
15536
15711
|
stack: e.stack ?? ""
|
|
@@ -15541,8 +15716,8 @@ var em = () => {
|
|
|
15541
15716
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
15542
15717
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
15543
15718
|
}
|
|
15544
|
-
}),
|
|
15545
|
-
let n =
|
|
15719
|
+
}), pm = (e, t) => {
|
|
15720
|
+
let n = fm(e, t);
|
|
15546
15721
|
return [
|
|
15547
15722
|
`Error: ${n.error.message}`,
|
|
15548
15723
|
"",
|
|
@@ -15557,7 +15732,7 @@ var em = () => {
|
|
|
15557
15732
|
`Timestamp: ${n.context.timestamp}`,
|
|
15558
15733
|
`Agent: ${n.context.userAgent}`
|
|
15559
15734
|
].join("\n");
|
|
15560
|
-
},
|
|
15735
|
+
}, mm = class extends t.Component {
|
|
15561
15736
|
constructor(e) {
|
|
15562
15737
|
super(e), this.state = {
|
|
15563
15738
|
error: null,
|
|
@@ -15579,7 +15754,7 @@ var em = () => {
|
|
|
15579
15754
|
};
|
|
15580
15755
|
copy = () => {
|
|
15581
15756
|
let { error: e, errorInfo: t } = this.state;
|
|
15582
|
-
e && navigator.clipboard?.writeText(
|
|
15757
|
+
e && navigator.clipboard?.writeText(pm(e, t)).then(() => {
|
|
15583
15758
|
this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
|
|
15584
15759
|
});
|
|
15585
15760
|
};
|
|
@@ -15588,7 +15763,7 @@ var em = () => {
|
|
|
15588
15763
|
!e || !n || (this.setState({ reportState: "sending" }), fetch(n, {
|
|
15589
15764
|
method: "POST",
|
|
15590
15765
|
headers: { "Content-Type": "application/json" },
|
|
15591
|
-
body: JSON.stringify(
|
|
15766
|
+
body: JSON.stringify(fm(e, t))
|
|
15592
15767
|
}).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
|
|
15593
15768
|
};
|
|
15594
15769
|
render() {
|
|
@@ -15598,16 +15773,16 @@ var em = () => {
|
|
|
15598
15773
|
if (typeof s == "function") return s(e, this.reset);
|
|
15599
15774
|
if (s != null) return s;
|
|
15600
15775
|
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";
|
|
15601
|
-
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(
|
|
15776
|
+
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", {
|
|
15602
15777
|
onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
|
|
15603
15778
|
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"
|
|
15604
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15779
|
+
}, /* @__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", {
|
|
15605
15780
|
onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
|
|
15606
15781
|
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"
|
|
15607
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15782
|
+
}, /* @__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", {
|
|
15608
15783
|
onClick: this.copy,
|
|
15609
15784
|
className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
|
|
15610
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15785
|
+
}, /* @__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", {
|
|
15611
15786
|
onClick: this.reset,
|
|
15612
15787
|
className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
|
|
15613
15788
|
}, "Try again"), /* @__PURE__ */ t.createElement("a", {
|
|
@@ -15617,15 +15792,15 @@ var em = () => {
|
|
|
15617
15792
|
onClick: this.sendReport,
|
|
15618
15793
|
disabled: o === "sending" || o === "sent",
|
|
15619
15794
|
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"
|
|
15620
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15795
|
+
}, /* @__PURE__ */ t.createElement(um, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
|
|
15621
15796
|
}
|
|
15622
|
-
},
|
|
15797
|
+
}, hm = async () => {
|
|
15623
15798
|
window.google?.accounts?.id || (vt([{
|
|
15624
15799
|
src: "https://accounts.google.com/gsi/client",
|
|
15625
15800
|
async: !0,
|
|
15626
15801
|
clean: !0
|
|
15627
15802
|
}]), await new Promise((e) => setTimeout(e, 0)));
|
|
15628
|
-
},
|
|
15803
|
+
}, gm = class {
|
|
15629
15804
|
getConfigurationState() {
|
|
15630
15805
|
return ii("GoogleAuthProvider", ri(Ea("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
15631
15806
|
}
|
|
@@ -15648,7 +15823,7 @@ var em = () => {
|
|
|
15648
15823
|
async signIn(e = {}) {
|
|
15649
15824
|
let t = Ea("oAuth2");
|
|
15650
15825
|
if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
|
|
15651
|
-
return await
|
|
15826
|
+
return await hm(), new Promise((n, r) => {
|
|
15652
15827
|
if (!window.google?.accounts?.id) {
|
|
15653
15828
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
|
|
15654
15829
|
return;
|
|
@@ -15729,41 +15904,41 @@ var em = () => {
|
|
|
15729
15904
|
isAuthenticated() {
|
|
15730
15905
|
return !!this.getUser();
|
|
15731
15906
|
}
|
|
15732
|
-
},
|
|
15907
|
+
}, _m = a(null), vm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15733
15908
|
let i = p(() => ({
|
|
15734
15909
|
registry: e,
|
|
15735
15910
|
defaultKey: n
|
|
15736
15911
|
}), [e, n]);
|
|
15737
|
-
return /* @__PURE__ */ t.createElement(
|
|
15738
|
-
},
|
|
15739
|
-
let t = c(
|
|
15912
|
+
return /* @__PURE__ */ t.createElement(_m.Provider, { value: i }, r);
|
|
15913
|
+
}, ym = (e) => {
|
|
15914
|
+
let t = c(_m);
|
|
15740
15915
|
if (!t) return null;
|
|
15741
15916
|
let n = e ?? t.defaultKey;
|
|
15742
15917
|
return t.registry[n] ?? null;
|
|
15743
|
-
},
|
|
15918
|
+
}, bm = a(null), xm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15744
15919
|
let i = p(() => ({
|
|
15745
15920
|
registry: e,
|
|
15746
15921
|
defaultKey: n
|
|
15747
15922
|
}), [e, n]);
|
|
15748
|
-
return /* @__PURE__ */ t.createElement(
|
|
15749
|
-
},
|
|
15750
|
-
let t = c(
|
|
15923
|
+
return /* @__PURE__ */ t.createElement(bm.Provider, { value: i }, r);
|
|
15924
|
+
}, Sm = (e) => {
|
|
15925
|
+
let t = c(bm);
|
|
15751
15926
|
if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
|
|
15752
15927
|
let n = e ?? t.defaultKey, r = t.registry[n];
|
|
15753
15928
|
if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
|
|
15754
15929
|
return r;
|
|
15755
|
-
},
|
|
15930
|
+
}, Cm = {
|
|
15756
15931
|
key: "@key",
|
|
15757
15932
|
value: "@value"
|
|
15758
|
-
},
|
|
15933
|
+
}, wm = () => Ie(), Tm = (e, t, n) => {
|
|
15759
15934
|
let r = `Error during ${e}: ${String(t)}`;
|
|
15760
15935
|
if (n) throw Error(r);
|
|
15761
15936
|
console.error(r);
|
|
15762
|
-
},
|
|
15937
|
+
}, Em = (e, t) => {
|
|
15763
15938
|
if (!e || !(t in e)) return e;
|
|
15764
15939
|
let { [t]: n, ...r } = e;
|
|
15765
15940
|
return Object.keys(r).length ? r : void 0;
|
|
15766
|
-
},
|
|
15941
|
+
}, Dm = (e) => {
|
|
15767
15942
|
let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
|
|
15768
15943
|
return t.gt !== void 0 && (n = {
|
|
15769
15944
|
...n,
|
|
@@ -15781,40 +15956,40 @@ var em = () => {
|
|
|
15781
15956
|
condition: t,
|
|
15782
15957
|
clientCondition: n
|
|
15783
15958
|
};
|
|
15784
|
-
},
|
|
15959
|
+
}, Om = (e, t) => {
|
|
15785
15960
|
switch (t) {
|
|
15786
|
-
case
|
|
15787
|
-
case
|
|
15961
|
+
case Cm.key: return Ve(e, ze());
|
|
15962
|
+
case Cm.value: return Ve(e, Be());
|
|
15788
15963
|
default: return Ve(e, Re(t));
|
|
15789
15964
|
}
|
|
15790
|
-
},
|
|
15965
|
+
}, km = (e, t, n) => {
|
|
15791
15966
|
let [r] = Object.entries(t || {});
|
|
15792
15967
|
if (!r) return {
|
|
15793
15968
|
dbRef: e,
|
|
15794
15969
|
clientWhere: n
|
|
15795
15970
|
};
|
|
15796
|
-
let [i] = r, a =
|
|
15971
|
+
let [i] = r, a = Om(e, i), o = n?.[i];
|
|
15797
15972
|
if (o == null) return {
|
|
15798
15973
|
dbRef: a,
|
|
15799
15974
|
clientWhere: n
|
|
15800
15975
|
};
|
|
15801
|
-
let { condition: s, clientCondition: c } =
|
|
15976
|
+
let { condition: s, clientCondition: c } = Dm(o);
|
|
15802
15977
|
switch (!0) {
|
|
15803
15978
|
case s.eq !== void 0: return {
|
|
15804
|
-
dbRef: Ve(a,
|
|
15805
|
-
clientWhere:
|
|
15979
|
+
dbRef: Ve(a, J(s.eq)),
|
|
15980
|
+
clientWhere: Em(n, i)
|
|
15806
15981
|
};
|
|
15807
15982
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
15808
|
-
a = Ve(a, Ge(s.gte),
|
|
15983
|
+
a = Ve(a, Ge(s.gte), Pe(s.lte));
|
|
15809
15984
|
break;
|
|
15810
15985
|
case s.gte !== void 0 && s.lt !== void 0:
|
|
15811
|
-
a = Ve(a, Ge(s.gte),
|
|
15986
|
+
a = Ve(a, Ge(s.gte), Pe(s.lt));
|
|
15812
15987
|
break;
|
|
15813
15988
|
case s.gt !== void 0 && s.lte !== void 0:
|
|
15814
|
-
a = Ve(a, Ge(s.gt),
|
|
15989
|
+
a = Ve(a, Ge(s.gt), Pe(s.lte));
|
|
15815
15990
|
break;
|
|
15816
15991
|
case s.gt !== void 0 && s.lt !== void 0:
|
|
15817
|
-
a = Ve(a, Ge(s.gt),
|
|
15992
|
+
a = Ve(a, Ge(s.gt), Pe(s.lt));
|
|
15818
15993
|
break;
|
|
15819
15994
|
case s.gte !== void 0:
|
|
15820
15995
|
a = Ve(a, Ge(s.gte));
|
|
@@ -15823,20 +15998,20 @@ var em = () => {
|
|
|
15823
15998
|
a = Ve(a, Ge(s.gt));
|
|
15824
15999
|
break;
|
|
15825
16000
|
case s.lte !== void 0:
|
|
15826
|
-
a = Ve(a,
|
|
16001
|
+
a = Ve(a, Pe(s.lte));
|
|
15827
16002
|
break;
|
|
15828
16003
|
case s.lt !== void 0:
|
|
15829
|
-
a = Ve(a,
|
|
16004
|
+
a = Ve(a, Pe(s.lt));
|
|
15830
16005
|
break;
|
|
15831
16006
|
}
|
|
15832
16007
|
return {
|
|
15833
16008
|
dbRef: a,
|
|
15834
16009
|
clientWhere: c ? {
|
|
15835
|
-
...
|
|
16010
|
+
...Em(n, i) || {},
|
|
15836
16011
|
[i]: c
|
|
15837
|
-
} :
|
|
16012
|
+
} : Em(n, i)
|
|
15838
16013
|
};
|
|
15839
|
-
},
|
|
16014
|
+
}, Am = (e, t) => {
|
|
15840
16015
|
if (!t) return e;
|
|
15841
16016
|
let n = t.split("."), r = e;
|
|
15842
16017
|
for (let e of n) {
|
|
@@ -15844,10 +16019,10 @@ var em = () => {
|
|
|
15844
16019
|
r = r[e];
|
|
15845
16020
|
}
|
|
15846
16021
|
return r;
|
|
15847
|
-
},
|
|
16022
|
+
}, 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, {
|
|
15848
16023
|
numeric: !0,
|
|
15849
16024
|
sensitivity: "base"
|
|
15850
|
-
}),
|
|
16025
|
+
}), Mm = (e, t) => {
|
|
15851
16026
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
|
|
15852
16027
|
for (let [t, r] of Object.entries(n)) switch (t) {
|
|
15853
16028
|
case "eq":
|
|
@@ -15874,23 +16049,23 @@ var em = () => {
|
|
|
15874
16049
|
default: return !1;
|
|
15875
16050
|
}
|
|
15876
16051
|
return !0;
|
|
15877
|
-
},
|
|
16052
|
+
}, Nm = (e, t, n) => {
|
|
15878
16053
|
let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
|
|
15879
|
-
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) =>
|
|
16054
|
+
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Mm(Am(e, t), n)))), r) {
|
|
15880
16055
|
let e = [r, ...i];
|
|
15881
16056
|
o.sort((t, n) => {
|
|
15882
16057
|
for (let [r, i] of e) {
|
|
15883
|
-
let e =
|
|
16058
|
+
let e = jm(Am(t[1], r), Am(n[1], r));
|
|
15884
16059
|
if (e) return i === "desc" ? -e : e;
|
|
15885
16060
|
}
|
|
15886
16061
|
return 0;
|
|
15887
16062
|
});
|
|
15888
16063
|
}
|
|
15889
16064
|
return Object.fromEntries(o);
|
|
15890
|
-
},
|
|
15891
|
-
let t = await Na()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(
|
|
16065
|
+
}, Pm = async (e) => {
|
|
16066
|
+
let t = await Na()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(wm()).toString());
|
|
15892
16067
|
return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
|
|
15893
|
-
},
|
|
16068
|
+
}, Fm = class e {
|
|
15894
16069
|
static listenerRegistered = !1;
|
|
15895
16070
|
constructor() {
|
|
15896
16071
|
!e.listenerRegistered && typeof Sa == "function" && (e.listenerRegistered = !0, Sa((e) => {
|
|
@@ -15905,43 +16080,43 @@ var em = () => {
|
|
|
15905
16080
|
}
|
|
15906
16081
|
readShallow = async (e, t = !1) => {
|
|
15907
16082
|
try {
|
|
15908
|
-
let t = await
|
|
16083
|
+
let t = await Pm(e), n = await fetch(t);
|
|
15909
16084
|
if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
|
|
15910
16085
|
let r = await n.json();
|
|
15911
16086
|
return r ? Object.keys(r) : [];
|
|
15912
16087
|
} catch (n) {
|
|
15913
|
-
return
|
|
16088
|
+
return Tm(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
|
|
15914
16089
|
}
|
|
15915
16090
|
};
|
|
15916
16091
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
15917
|
-
let { dbRef: a, clientWhere: o } =
|
|
16092
|
+
let { dbRef: a, clientWhere: o } = km(He(wm(), e), n, t);
|
|
15918
16093
|
try {
|
|
15919
16094
|
let t = await Fe(a);
|
|
15920
16095
|
if (t.exists()) {
|
|
15921
16096
|
`${e}`;
|
|
15922
|
-
let i =
|
|
16097
|
+
let i = Nm(t.val(), o, n);
|
|
15923
16098
|
return r ? Object.values(i) : i;
|
|
15924
|
-
} else i &&
|
|
16099
|
+
} else i && Tm(`Data not found in Firebase for path ${e}`, null, i);
|
|
15925
16100
|
} catch (t) {
|
|
15926
|
-
|
|
16101
|
+
Tm(`reading data in Firebase for ${e}`, t, i);
|
|
15927
16102
|
}
|
|
15928
16103
|
};
|
|
15929
16104
|
update = async (e, t, n = !1) => {
|
|
15930
16105
|
try {
|
|
15931
|
-
await Ke(He(
|
|
16106
|
+
await Ke(He(wm(), e), t), `${e}`;
|
|
15932
16107
|
} catch (t) {
|
|
15933
|
-
|
|
16108
|
+
Tm(`updating data in Firebase for ${e}`, t, n);
|
|
15934
16109
|
}
|
|
15935
16110
|
};
|
|
15936
16111
|
set = async (e, t, n = !1) => {
|
|
15937
16112
|
try {
|
|
15938
|
-
await We(He(
|
|
16113
|
+
await We(He(wm(), e), t), `${e}`;
|
|
15939
16114
|
} catch (t) {
|
|
15940
|
-
|
|
16115
|
+
Tm(`updating data in Firebase for ${e}`, t, n);
|
|
15941
16116
|
}
|
|
15942
16117
|
};
|
|
15943
16118
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
15944
|
-
let a = He(
|
|
16119
|
+
let a = He(wm(), e);
|
|
15945
16120
|
try {
|
|
15946
16121
|
r && (await Ue(a), i?.(0, 0, `Purging existing data at ${e}`));
|
|
15947
16122
|
let o = Object.entries(Nt(t)), s = Math.ceil(o.length / n);
|
|
@@ -15951,14 +16126,14 @@ var em = () => {
|
|
|
15951
16126
|
i?.(t, s, `Saving chunk ${t}/${s}`);
|
|
15952
16127
|
}
|
|
15953
16128
|
} catch (t) {
|
|
15954
|
-
|
|
16129
|
+
Tm(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
15955
16130
|
}
|
|
15956
16131
|
};
|
|
15957
16132
|
remove = async (e, t = !1) => {
|
|
15958
16133
|
try {
|
|
15959
|
-
await Ue(He(
|
|
16134
|
+
await Ue(He(wm(), e)), `${e}`;
|
|
15960
16135
|
} catch (n) {
|
|
15961
|
-
|
|
16136
|
+
Tm(`removing data from Firebase for ${e}`, n, t);
|
|
15962
16137
|
}
|
|
15963
16138
|
};
|
|
15964
16139
|
count = async (e) => (await this.readShallow(e)).length;
|
|
@@ -15966,14 +16141,14 @@ var em = () => {
|
|
|
15966
16141
|
let o = Na();
|
|
15967
16142
|
if (!o || !e) return () => void 0;
|
|
15968
16143
|
let s = () => {
|
|
15969
|
-
let { dbRef: o, clientWhere: s } =
|
|
16144
|
+
let { dbRef: o, clientWhere: s } = km(He(wm(), e), r, n);
|
|
15970
16145
|
return Le(o, (e) => {
|
|
15971
16146
|
let n = e.val();
|
|
15972
16147
|
if (!n) {
|
|
15973
16148
|
t([]);
|
|
15974
16149
|
return;
|
|
15975
16150
|
}
|
|
15976
|
-
let o = a ? a(
|
|
16151
|
+
let o = a ? a(Nm(n, s, r)) : Nm(n, s, r), c = Object.entries(o);
|
|
15977
16152
|
if (!i) {
|
|
15978
16153
|
t(c.map(([e, t], n) => typeof t == "object" && t ? {
|
|
15979
16154
|
_index: n,
|
|
@@ -15982,22 +16157,22 @@ var em = () => {
|
|
|
15982
16157
|
} : {
|
|
15983
16158
|
_index: n,
|
|
15984
16159
|
[La]: e,
|
|
15985
|
-
[
|
|
16160
|
+
[Cm.value]: t
|
|
15986
16161
|
}));
|
|
15987
16162
|
return;
|
|
15988
16163
|
}
|
|
15989
16164
|
let l = Object.keys(i);
|
|
15990
16165
|
t(c.map(([e, t], n) => {
|
|
15991
16166
|
let r = typeof t == "object" && t ? {
|
|
15992
|
-
[
|
|
16167
|
+
[Cm.key]: e,
|
|
15993
16168
|
...t
|
|
15994
16169
|
} : {
|
|
15995
|
-
[
|
|
15996
|
-
[
|
|
16170
|
+
[Cm.key]: e,
|
|
16171
|
+
[Cm.value]: t
|
|
15997
16172
|
}, a = {};
|
|
15998
16173
|
for (let n of l) {
|
|
15999
16174
|
let o = i[n];
|
|
16000
|
-
a[n] = o.includes("{") ? et.parse(r, o) : o ===
|
|
16175
|
+
a[n] = o.includes("{") ? et.parse(r, o) : o === Cm.key ? e : o === Cm.value ? t : r[o];
|
|
16001
16176
|
}
|
|
16002
16177
|
return {
|
|
16003
16178
|
[La]: e,
|
|
@@ -16014,10 +16189,10 @@ var em = () => {
|
|
|
16014
16189
|
};
|
|
16015
16190
|
};
|
|
16016
16191
|
};
|
|
16017
|
-
new
|
|
16192
|
+
new Fm();
|
|
16018
16193
|
//#endregion
|
|
16019
16194
|
//#region src/providers/auth/firebase/FirebaseAuthProvider.ts
|
|
16020
|
-
var
|
|
16195
|
+
var Im = {
|
|
16021
16196
|
github: "github.com",
|
|
16022
16197
|
apple: "apple.com",
|
|
16023
16198
|
microsoft: "microsoft.com",
|
|
@@ -16025,10 +16200,10 @@ var Am = {
|
|
|
16025
16200
|
twitter: "twitter.com",
|
|
16026
16201
|
facebook: "facebook.com"
|
|
16027
16202
|
};
|
|
16028
|
-
function
|
|
16029
|
-
return new R(
|
|
16203
|
+
function Lm(e) {
|
|
16204
|
+
return new R(Im[e] ?? e);
|
|
16030
16205
|
}
|
|
16031
|
-
function
|
|
16206
|
+
function Rm(e) {
|
|
16032
16207
|
return e ? {
|
|
16033
16208
|
uid: e.uid,
|
|
16034
16209
|
email: e.email ?? void 0,
|
|
@@ -16037,7 +16212,7 @@ function Mm(e) {
|
|
|
16037
16212
|
isAnonymous: e.isAnonymous
|
|
16038
16213
|
} : null;
|
|
16039
16214
|
}
|
|
16040
|
-
var
|
|
16215
|
+
var zm = class {
|
|
16041
16216
|
options;
|
|
16042
16217
|
appName;
|
|
16043
16218
|
initPromise;
|
|
@@ -16051,7 +16226,7 @@ var Nm = class {
|
|
|
16051
16226
|
return this.getConfigurationState().configured;
|
|
16052
16227
|
}
|
|
16053
16228
|
getUser() {
|
|
16054
|
-
return
|
|
16229
|
+
return Rm(Na(this.appName)?.currentUser ?? null);
|
|
16055
16230
|
}
|
|
16056
16231
|
isAuthenticated() {
|
|
16057
16232
|
return !!this.getUser();
|
|
@@ -16063,18 +16238,18 @@ var Nm = class {
|
|
|
16063
16238
|
let n = e.method ?? "password";
|
|
16064
16239
|
if (n === "anonymous") {
|
|
16065
16240
|
let { user: e } = await ee(t);
|
|
16066
|
-
return
|
|
16241
|
+
return Rm(e);
|
|
16067
16242
|
}
|
|
16068
16243
|
if (n === "oauth") {
|
|
16069
16244
|
let { provider: n } = e;
|
|
16070
16245
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16071
|
-
let { user: r } = await re(t,
|
|
16072
|
-
return
|
|
16246
|
+
let { user: r } = await re(t, Lm(n));
|
|
16247
|
+
return Rm(r);
|
|
16073
16248
|
}
|
|
16074
16249
|
let { email: r, password: i } = e;
|
|
16075
16250
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16076
16251
|
let { user: a } = await ne(t, r, i);
|
|
16077
|
-
return
|
|
16252
|
+
return Rm(a);
|
|
16078
16253
|
}
|
|
16079
16254
|
async signOut() {
|
|
16080
16255
|
await this.initPromise;
|
|
@@ -16085,7 +16260,7 @@ var Nm = class {
|
|
|
16085
16260
|
onAuthChange(e) {
|
|
16086
16261
|
if (!this.options.config) {
|
|
16087
16262
|
let t = Na(this.appName);
|
|
16088
|
-
return t ? H(t, (t) => e(
|
|
16263
|
+
return t ? H(t, (t) => e(Rm(t))) : (e(null), () => {});
|
|
16089
16264
|
}
|
|
16090
16265
|
let t = () => {}, n = !1;
|
|
16091
16266
|
return this.initPromise.then(() => {
|
|
@@ -16095,7 +16270,7 @@ var Nm = class {
|
|
|
16095
16270
|
e(null);
|
|
16096
16271
|
return;
|
|
16097
16272
|
}
|
|
16098
|
-
t = H(r, (t) => e(
|
|
16273
|
+
t = H(r, (t) => e(Rm(t)));
|
|
16099
16274
|
}), () => {
|
|
16100
16275
|
n = !0, t();
|
|
16101
16276
|
};
|
|
@@ -16113,26 +16288,26 @@ var Nm = class {
|
|
|
16113
16288
|
let { claims: n } = await t.currentUser.getIdTokenResult(e);
|
|
16114
16289
|
return n;
|
|
16115
16290
|
}
|
|
16116
|
-
},
|
|
16117
|
-
function
|
|
16291
|
+
}, Bm = "https://oauth2.googleapis.com/token";
|
|
16292
|
+
function Vm(e) {
|
|
16118
16293
|
let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
|
|
16119
16294
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
16120
16295
|
return r.buffer;
|
|
16121
16296
|
}
|
|
16122
|
-
function
|
|
16297
|
+
function Hm(e) {
|
|
16123
16298
|
return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
16124
16299
|
}
|
|
16125
|
-
async function
|
|
16126
|
-
let n = `${
|
|
16300
|
+
async function Um(e, t) {
|
|
16301
|
+
let n = `${Hm(JSON.stringify({
|
|
16127
16302
|
alg: "RS256",
|
|
16128
16303
|
typ: "JWT"
|
|
16129
|
-
}))}.${
|
|
16304
|
+
}))}.${Hm(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Vm(t), {
|
|
16130
16305
|
name: "RSASSA-PKCS1-v1_5",
|
|
16131
16306
|
hash: "SHA-256"
|
|
16132
16307
|
}, !1, ["sign"]);
|
|
16133
|
-
return `${n}.${
|
|
16308
|
+
return `${n}.${Hm(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
|
|
16134
16309
|
}
|
|
16135
|
-
var
|
|
16310
|
+
var Wm = class {
|
|
16136
16311
|
config;
|
|
16137
16312
|
cache = /* @__PURE__ */ new Map();
|
|
16138
16313
|
constructor(e) {
|
|
@@ -16141,13 +16316,13 @@ var Rm = class {
|
|
|
16141
16316
|
async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
|
|
16142
16317
|
let t = this.cache.get(e);
|
|
16143
16318
|
if (t && t.expiresAt > Date.now() + 6e4) return t.token;
|
|
16144
|
-
let n = Math.floor(Date.now() / 1e3), r = await
|
|
16319
|
+
let n = Math.floor(Date.now() / 1e3), r = await Um({
|
|
16145
16320
|
iss: this.config.client_email,
|
|
16146
16321
|
scope: e,
|
|
16147
|
-
aud:
|
|
16322
|
+
aud: Bm,
|
|
16148
16323
|
iat: n,
|
|
16149
16324
|
exp: n + 3600
|
|
16150
|
-
}, this.config.private_key), i = await fetch(
|
|
16325
|
+
}, this.config.private_key), i = await fetch(Bm, {
|
|
16151
16326
|
method: "POST",
|
|
16152
16327
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
16153
16328
|
body: new URLSearchParams({
|
|
@@ -16165,7 +16340,7 @@ var Rm = class {
|
|
|
16165
16340
|
expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
|
|
16166
16341
|
}), a.access_token;
|
|
16167
16342
|
}
|
|
16168
|
-
},
|
|
16343
|
+
}, Gm = "www.dropbox.com/oauth2", Km = class {
|
|
16169
16344
|
config;
|
|
16170
16345
|
constructor(e) {
|
|
16171
16346
|
this.config = e;
|
|
@@ -16189,7 +16364,7 @@ var Rm = class {
|
|
|
16189
16364
|
async signIn(e = {}) {
|
|
16190
16365
|
if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
|
|
16191
16366
|
return di({
|
|
16192
|
-
authServer:
|
|
16367
|
+
authServer: Gm,
|
|
16193
16368
|
clientID: this.config.clientId,
|
|
16194
16369
|
scopes: e.scopes,
|
|
16195
16370
|
refreshParamName: "token_access_type"
|
|
@@ -16210,7 +16385,7 @@ var Rm = class {
|
|
|
16210
16385
|
isAuthenticated() {
|
|
16211
16386
|
return this.isConfigured() ? !!gi(this.config.clientId)?.access_token : !1;
|
|
16212
16387
|
}
|
|
16213
|
-
},
|
|
16388
|
+
}, qm = (e) => {
|
|
16214
16389
|
let t = Ea("oAuth2");
|
|
16215
16390
|
if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
|
|
16216
16391
|
let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
|
|
@@ -16227,8 +16402,8 @@ var Rm = class {
|
|
|
16227
16402
|
};
|
|
16228
16403
|
//#endregion
|
|
16229
16404
|
//#region src/providers/email/google/email.ts
|
|
16230
|
-
async function
|
|
16231
|
-
let i = await
|
|
16405
|
+
async function Jm({ to: e, bcc: t, subject: n, message: r }) {
|
|
16406
|
+
let i = await qm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
|
|
16232
16407
|
t && t.length && a.push(`Bcc: ${t.join(", ")}`);
|
|
16233
16408
|
let o = [
|
|
16234
16409
|
...a,
|
|
@@ -16253,7 +16428,7 @@ async function Hm({ to: e, bcc: t, subject: n, message: r }) {
|
|
|
16253
16428
|
}
|
|
16254
16429
|
//#endregion
|
|
16255
16430
|
//#region src/providers/email/google/GmailEmailProvider.ts
|
|
16256
|
-
var
|
|
16431
|
+
var Ym = class {
|
|
16257
16432
|
getConfigurationState() {
|
|
16258
16433
|
return ii("GmailEmailProvider", ri(Ea("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
16259
16434
|
}
|
|
@@ -16262,7 +16437,7 @@ var Um = class {
|
|
|
16262
16437
|
}
|
|
16263
16438
|
async send(e) {
|
|
16264
16439
|
if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
|
|
16265
|
-
await
|
|
16440
|
+
await Jm({
|
|
16266
16441
|
to: Array.isArray(e.to) ? e.to : [e.to],
|
|
16267
16442
|
bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
|
|
16268
16443
|
subject: e.subject,
|
|
@@ -16272,7 +16447,7 @@ var Um = class {
|
|
|
16272
16447
|
};
|
|
16273
16448
|
//#endregion
|
|
16274
16449
|
//#region src/providers/auth/supabase/SupabaseAuthProvider.ts
|
|
16275
|
-
function
|
|
16450
|
+
function Xm(e) {
|
|
16276
16451
|
return e ? {
|
|
16277
16452
|
uid: e.id,
|
|
16278
16453
|
email: e.email ?? void 0,
|
|
@@ -16281,7 +16456,7 @@ function Wm(e) {
|
|
|
16281
16456
|
raw: e
|
|
16282
16457
|
} : null;
|
|
16283
16458
|
}
|
|
16284
|
-
var
|
|
16459
|
+
var Zm = class {
|
|
16285
16460
|
config;
|
|
16286
16461
|
get client() {
|
|
16287
16462
|
return Ya(this.config.url, this.config.anonKey);
|
|
@@ -16296,7 +16471,7 @@ var Gm = class {
|
|
|
16296
16471
|
return this.getConfigurationState().configured;
|
|
16297
16472
|
}
|
|
16298
16473
|
getUser() {
|
|
16299
|
-
return
|
|
16474
|
+
return Xm((this.client.auth?._session ?? null)?.user ?? null);
|
|
16300
16475
|
}
|
|
16301
16476
|
isAuthenticated() {
|
|
16302
16477
|
return !!this.getUser();
|
|
@@ -16306,7 +16481,7 @@ var Gm = class {
|
|
|
16306
16481
|
if (t === "anonymous") {
|
|
16307
16482
|
let { data: e, error: t } = await this.client.auth.signInAnonymously();
|
|
16308
16483
|
if (t) throw t;
|
|
16309
|
-
return
|
|
16484
|
+
return Xm(e.user);
|
|
16310
16485
|
}
|
|
16311
16486
|
if (t === "magic_link") {
|
|
16312
16487
|
let t = e.email;
|
|
@@ -16335,7 +16510,7 @@ var Gm = class {
|
|
|
16335
16510
|
password: r
|
|
16336
16511
|
});
|
|
16337
16512
|
if (a) throw a;
|
|
16338
|
-
return
|
|
16513
|
+
return Xm(i.user);
|
|
16339
16514
|
}
|
|
16340
16515
|
async signOut() {
|
|
16341
16516
|
let { error: e } = await this.client.auth.signOut();
|
|
@@ -16343,10 +16518,10 @@ var Gm = class {
|
|
|
16343
16518
|
}
|
|
16344
16519
|
onAuthChange(e) {
|
|
16345
16520
|
this.client.auth.getSession().then(({ data: t }) => {
|
|
16346
|
-
e(
|
|
16521
|
+
e(Xm(t.session?.user ?? null));
|
|
16347
16522
|
});
|
|
16348
16523
|
let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
|
|
16349
|
-
e(
|
|
16524
|
+
e(Xm(n?.user ?? null));
|
|
16350
16525
|
});
|
|
16351
16526
|
return () => t.unsubscribe();
|
|
16352
16527
|
}
|
|
@@ -16357,15 +16532,15 @@ var Gm = class {
|
|
|
16357
16532
|
if (!n) throw Error("SupabaseAuthProvider: no active session");
|
|
16358
16533
|
return n;
|
|
16359
16534
|
}
|
|
16360
|
-
},
|
|
16361
|
-
function
|
|
16535
|
+
}, Qm = "https://api.anthropic.com/v1/models", $m = "https://api.anthropic.com/v1/messages";
|
|
16536
|
+
function eh(e) {
|
|
16362
16537
|
return {
|
|
16363
16538
|
name: e.name,
|
|
16364
16539
|
description: e.description,
|
|
16365
16540
|
input_schema: e.inputSchema
|
|
16366
16541
|
};
|
|
16367
16542
|
}
|
|
16368
|
-
function
|
|
16543
|
+
function th(e) {
|
|
16369
16544
|
if (e.role === "user") return {
|
|
16370
16545
|
role: "user",
|
|
16371
16546
|
content: e.content
|
|
@@ -16397,7 +16572,7 @@ function Ym(e) {
|
|
|
16397
16572
|
}))
|
|
16398
16573
|
};
|
|
16399
16574
|
}
|
|
16400
|
-
function
|
|
16575
|
+
function nh(e) {
|
|
16401
16576
|
let t = e?.content;
|
|
16402
16577
|
if (!Array.isArray(t)) return null;
|
|
16403
16578
|
let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
|
|
@@ -16416,7 +16591,7 @@ function Xm(e) {
|
|
|
16416
16591
|
text: i
|
|
16417
16592
|
} : null;
|
|
16418
16593
|
}
|
|
16419
|
-
var
|
|
16594
|
+
var rh = {
|
|
16420
16595
|
id: "anthropic",
|
|
16421
16596
|
label: "Anthropic",
|
|
16422
16597
|
description: "Claude models via the Anthropic API.",
|
|
@@ -16440,7 +16615,7 @@ var Zm = {
|
|
|
16440
16615
|
supportsDocuments: !0
|
|
16441
16616
|
},
|
|
16442
16617
|
discoverModels: async (e) => {
|
|
16443
|
-
let t = await Ht(
|
|
16618
|
+
let t = await Ht(Qm, { headers: {
|
|
16444
16619
|
"x-api-key": e,
|
|
16445
16620
|
"anthropic-version": "2023-06-01"
|
|
16446
16621
|
} }, rl);
|
|
@@ -16468,7 +16643,7 @@ var Zm = {
|
|
|
16468
16643
|
type: "text",
|
|
16469
16644
|
text: n.prompt
|
|
16470
16645
|
}] : n.prompt;
|
|
16471
|
-
return
|
|
16646
|
+
return nh(await Ht($m, {
|
|
16472
16647
|
method: "POST",
|
|
16473
16648
|
headers: {
|
|
16474
16649
|
"x-api-key": t,
|
|
@@ -16479,18 +16654,18 @@ var Zm = {
|
|
|
16479
16654
|
model: n.model,
|
|
16480
16655
|
max_tokens: 4096,
|
|
16481
16656
|
...n.role ? { system: Kc.parseRole(n.role, n) } : {},
|
|
16482
|
-
messages: [...(n.history ?? []).map(
|
|
16657
|
+
messages: [...(n.history ?? []).map(th), ...n.prompt ? [{
|
|
16483
16658
|
role: "user",
|
|
16484
16659
|
content: i
|
|
16485
16660
|
}] : []],
|
|
16486
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
16661
|
+
...n.tools?.length ? { tools: n.tools.map(eh) } : {},
|
|
16487
16662
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16488
16663
|
},
|
|
16489
16664
|
signal: n.signal
|
|
16490
16665
|
}, rl));
|
|
16491
16666
|
}
|
|
16492
|
-
},
|
|
16493
|
-
function
|
|
16667
|
+
}, ih = (e) => e.replace(/\/+$/, "");
|
|
16668
|
+
function ah(e) {
|
|
16494
16669
|
return {
|
|
16495
16670
|
type: "function",
|
|
16496
16671
|
function: {
|
|
@@ -16500,7 +16675,7 @@ function $m(e) {
|
|
|
16500
16675
|
}
|
|
16501
16676
|
};
|
|
16502
16677
|
}
|
|
16503
|
-
function
|
|
16678
|
+
function oh(e) {
|
|
16504
16679
|
if (typeof e != "string") return {};
|
|
16505
16680
|
try {
|
|
16506
16681
|
return JSON.parse(e);
|
|
@@ -16508,7 +16683,7 @@ function eh(e) {
|
|
|
16508
16683
|
return {};
|
|
16509
16684
|
}
|
|
16510
16685
|
}
|
|
16511
|
-
function
|
|
16686
|
+
function sh(e) {
|
|
16512
16687
|
return e.role === "user" ? [{
|
|
16513
16688
|
role: "user",
|
|
16514
16689
|
content: e.content
|
|
@@ -16529,7 +16704,7 @@ function th(e) {
|
|
|
16529
16704
|
content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
|
|
16530
16705
|
}));
|
|
16531
16706
|
}
|
|
16532
|
-
function
|
|
16707
|
+
function ch(e) {
|
|
16533
16708
|
let t = e?.choices?.[0]?.message;
|
|
16534
16709
|
if (!t) return null;
|
|
16535
16710
|
let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
|
|
@@ -16542,7 +16717,7 @@ function nh(e) {
|
|
|
16542
16717
|
return {
|
|
16543
16718
|
id: String(e.id),
|
|
16544
16719
|
name: String(t.name ?? ""),
|
|
16545
|
-
input:
|
|
16720
|
+
input: oh(t.arguments)
|
|
16546
16721
|
};
|
|
16547
16722
|
}),
|
|
16548
16723
|
text: e || void 0
|
|
@@ -16554,8 +16729,8 @@ function nh(e) {
|
|
|
16554
16729
|
text: r
|
|
16555
16730
|
} : null;
|
|
16556
16731
|
}
|
|
16557
|
-
var
|
|
16558
|
-
let m =
|
|
16732
|
+
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 }) => {
|
|
16733
|
+
let m = ih(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
|
|
16559
16734
|
return {
|
|
16560
16735
|
id: t,
|
|
16561
16736
|
label: n,
|
|
@@ -16632,22 +16807,22 @@ var rh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16632
16807
|
role: "system",
|
|
16633
16808
|
content: Kc.parseRole(r.role, r)
|
|
16634
16809
|
}] : [],
|
|
16635
|
-
...(r.history ?? []).flatMap(
|
|
16810
|
+
...(r.history ?? []).flatMap(sh),
|
|
16636
16811
|
...r.prompt ? [{
|
|
16637
16812
|
role: "user",
|
|
16638
16813
|
content: a
|
|
16639
16814
|
}] : []
|
|
16640
16815
|
],
|
|
16641
|
-
...r.tools?.length ? { tools: r.tools.map(
|
|
16816
|
+
...r.tools?.length ? { tools: r.tools.map(ah) } : {},
|
|
16642
16817
|
...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
|
|
16643
16818
|
},
|
|
16644
16819
|
signal: r.signal
|
|
16645
16820
|
}, rl);
|
|
16646
16821
|
if (!o) throw ll(n);
|
|
16647
|
-
return
|
|
16822
|
+
return ch(o);
|
|
16648
16823
|
}
|
|
16649
16824
|
};
|
|
16650
|
-
},
|
|
16825
|
+
}, uh = lh({
|
|
16651
16826
|
id: "deepseek",
|
|
16652
16827
|
label: "DeepSeek",
|
|
16653
16828
|
description: "Cost-efficient reasoning and chat models.",
|
|
@@ -16657,15 +16832,15 @@ var rh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16657
16832
|
baseUrl: "https://api.deepseek.com",
|
|
16658
16833
|
dashboardUrl: "https://platform.deepseek.com/api_keys",
|
|
16659
16834
|
credentialsHint: "DeepSeek platform → API Keys → Create new API key."
|
|
16660
|
-
}),
|
|
16661
|
-
function
|
|
16835
|
+
}), dh = "https://generativelanguage.googleapis.com/v1beta/models", fh = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
16836
|
+
function ph(e) {
|
|
16662
16837
|
return [{ function_declarations: e.map((e) => ({
|
|
16663
16838
|
name: e.name,
|
|
16664
16839
|
description: e.description,
|
|
16665
16840
|
parameters: e.inputSchema
|
|
16666
16841
|
})) }];
|
|
16667
16842
|
}
|
|
16668
|
-
function
|
|
16843
|
+
function mh(e) {
|
|
16669
16844
|
if (e.role === "user") return {
|
|
16670
16845
|
role: "user",
|
|
16671
16846
|
parts: [{ text: e.content }]
|
|
@@ -16690,7 +16865,7 @@ function ch(e) {
|
|
|
16690
16865
|
} }))
|
|
16691
16866
|
};
|
|
16692
16867
|
}
|
|
16693
|
-
function
|
|
16868
|
+
function hh(e) {
|
|
16694
16869
|
let t = e?.candidates?.[0]?.content?.parts;
|
|
16695
16870
|
if (!Array.isArray(t)) return null;
|
|
16696
16871
|
let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
|
|
@@ -16709,7 +16884,7 @@ function lh(e) {
|
|
|
16709
16884
|
text: i
|
|
16710
16885
|
} : null;
|
|
16711
16886
|
}
|
|
16712
|
-
var
|
|
16887
|
+
var gh = {
|
|
16713
16888
|
id: "gemini",
|
|
16714
16889
|
label: "Gemini",
|
|
16715
16890
|
description: "Google's multimodal Gemini model family.",
|
|
@@ -16733,12 +16908,12 @@ var uh = {
|
|
|
16733
16908
|
supportsDocuments: !0
|
|
16734
16909
|
},
|
|
16735
16910
|
discoverModels: async (e) => {
|
|
16736
|
-
let t = await Ht(`${
|
|
16911
|
+
let t = await Ht(`${dh}?key=${e}`, null, rl);
|
|
16737
16912
|
return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
|
|
16738
16913
|
},
|
|
16739
16914
|
validateApiKey: async (e) => {
|
|
16740
16915
|
try {
|
|
16741
|
-
let t = await Ht(`${
|
|
16916
|
+
let t = await Ht(`${dh}?key=${e}`, null, rl);
|
|
16742
16917
|
return t === null ? {
|
|
16743
16918
|
valid: !1,
|
|
16744
16919
|
error: "Nessuna risposta dal server (CORS o rete)"
|
|
@@ -16759,22 +16934,22 @@ var uh = {
|
|
|
16759
16934
|
mime_type: e.mimeType,
|
|
16760
16935
|
data: e.base64
|
|
16761
16936
|
} }), { text: n.prompt }];
|
|
16762
|
-
return
|
|
16937
|
+
return hh(await Ht(`${fh}/${n.model}:generateContent?key=${t}`, {
|
|
16763
16938
|
method: "POST",
|
|
16764
16939
|
headers: n.logId ? { [e]: n.logId } : void 0,
|
|
16765
16940
|
body: {
|
|
16766
|
-
contents: [...(n.history ?? []).map(
|
|
16941
|
+
contents: [...(n.history ?? []).map(mh), ...n.prompt ? [{
|
|
16767
16942
|
role: "user",
|
|
16768
16943
|
parts: r
|
|
16769
16944
|
}] : []],
|
|
16770
16945
|
...n.role ? { systemInstruction: { parts: [{ text: Kc.parseRole(n.role, n) }] } } : {},
|
|
16771
|
-
...n.tools?.length ? { tools:
|
|
16946
|
+
...n.tools?.length ? { tools: ph(n.tools) } : {},
|
|
16772
16947
|
generationConfig: typeof n.temperature == "number" ? { temperature: n.temperature } : void 0
|
|
16773
16948
|
},
|
|
16774
16949
|
signal: n.signal
|
|
16775
16950
|
}, rl));
|
|
16776
16951
|
}
|
|
16777
|
-
},
|
|
16952
|
+
}, _h = lh({
|
|
16778
16953
|
id: "mistral",
|
|
16779
16954
|
label: "Mistral",
|
|
16780
16955
|
description: "European-hosted open and commercial language models.",
|
|
@@ -16788,7 +16963,7 @@ var uh = {
|
|
|
16788
16963
|
baseUrl: "https://api.mistral.ai/v1",
|
|
16789
16964
|
dashboardUrl: "https://console.mistral.ai/api-keys",
|
|
16790
16965
|
credentialsHint: "Mistral Console → API Keys → Create new key."
|
|
16791
|
-
}),
|
|
16966
|
+
}), vh = lh({
|
|
16792
16967
|
id: "openai",
|
|
16793
16968
|
label: "OpenAI",
|
|
16794
16969
|
description: "GPT models via the OpenAI API.",
|
|
@@ -16806,7 +16981,7 @@ var uh = {
|
|
|
16806
16981
|
baseUrl: "https://api.openai.com/v1",
|
|
16807
16982
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
16808
16983
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
16809
|
-
}),
|
|
16984
|
+
}), yh = "https://opencode.ai/zen/v1/models", bh = "https://opencode.ai/zen/v1/chat/completions", xh = [
|
|
16810
16985
|
"big-pickle",
|
|
16811
16986
|
"deepseek-v4-flash-free",
|
|
16812
16987
|
"glm-5",
|
|
@@ -16818,16 +16993,16 @@ var uh = {
|
|
|
16818
16993
|
"minimax-m2.5",
|
|
16819
16994
|
"minimax-m2.7",
|
|
16820
16995
|
"nemotron-3-super-free"
|
|
16821
|
-
],
|
|
16996
|
+
], Sh = (e) => {
|
|
16822
16997
|
let t = e.endpoint || "", n = e.ai_sdk_package || e.aiSdkPackage || "";
|
|
16823
16998
|
return t.includes("/chat/completions") || n.includes("openai-compatible");
|
|
16824
|
-
},
|
|
16999
|
+
}, Ch = {
|
|
16825
17000
|
id: "opencode",
|
|
16826
17001
|
label: "OpenCode",
|
|
16827
17002
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
16828
17003
|
configKey: "openCodeApiKey",
|
|
16829
17004
|
defaultModel: "deepseek-v4-flash-free",
|
|
16830
|
-
fallbackModels:
|
|
17005
|
+
fallbackModels: xh,
|
|
16831
17006
|
dashboardUrl: "https://opencode.ai",
|
|
16832
17007
|
credentialsHint: "OpenCode Zen dashboard → API Keys → Create Key.",
|
|
16833
17008
|
credentialFields: [{
|
|
@@ -16841,8 +17016,8 @@ var uh = {
|
|
|
16841
17016
|
supportsDocuments: !0
|
|
16842
17017
|
},
|
|
16843
17018
|
discoverModels: async (e) => {
|
|
16844
|
-
let t = await Ht(
|
|
16845
|
-
return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).filter((e) =>
|
|
17019
|
+
let t = await Ht(yh, { headers: { Authorization: `Bearer ${e}` } }, rl);
|
|
17020
|
+
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);
|
|
16846
17021
|
},
|
|
16847
17022
|
complete: async (t, n) => {
|
|
16848
17023
|
let r = n.attachments ?? [], i = r.length > 0 ? r.map((e) => e.mimeType.startsWith("image/") ? {
|
|
@@ -16857,7 +17032,7 @@ var uh = {
|
|
|
16857
17032
|
}).concat({
|
|
16858
17033
|
type: "text",
|
|
16859
17034
|
text: n.prompt
|
|
16860
|
-
}) : n.prompt, a = await Ht(
|
|
17035
|
+
}) : n.prompt, a = await Ht(bh, {
|
|
16861
17036
|
method: "POST",
|
|
16862
17037
|
headers: {
|
|
16863
17038
|
Authorization: `Bearer ${t}`,
|
|
@@ -16870,21 +17045,21 @@ var uh = {
|
|
|
16870
17045
|
role: "system",
|
|
16871
17046
|
content: Kc.parseRole(n.role, n)
|
|
16872
17047
|
}] : [],
|
|
16873
|
-
...(n.history ?? []).flatMap(
|
|
17048
|
+
...(n.history ?? []).flatMap(sh),
|
|
16874
17049
|
...n.prompt ? [{
|
|
16875
17050
|
role: "user",
|
|
16876
17051
|
content: i
|
|
16877
17052
|
}] : []
|
|
16878
17053
|
],
|
|
16879
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
17054
|
+
...n.tools?.length ? { tools: n.tools.map(ah) } : {},
|
|
16880
17055
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16881
17056
|
},
|
|
16882
17057
|
signal: n.signal
|
|
16883
17058
|
}, rl);
|
|
16884
17059
|
if (!a) throw ll("OpenCode");
|
|
16885
|
-
return
|
|
17060
|
+
return ch(a);
|
|
16886
17061
|
}
|
|
16887
|
-
},
|
|
17062
|
+
}, wh = lh({
|
|
16888
17063
|
id: "openrouter",
|
|
16889
17064
|
label: "OpenRouter",
|
|
16890
17065
|
description: "Unified access to many model providers through one API.",
|
|
@@ -16918,10 +17093,10 @@ var uh = {
|
|
|
16918
17093
|
};
|
|
16919
17094
|
}
|
|
16920
17095
|
}
|
|
16921
|
-
}),
|
|
17096
|
+
}), Th = {
|
|
16922
17097
|
dbRealtime: {
|
|
16923
17098
|
service: "data",
|
|
16924
|
-
create: () => new
|
|
17099
|
+
create: () => new Fm()
|
|
16925
17100
|
},
|
|
16926
17101
|
firestoreDb: {
|
|
16927
17102
|
service: "data",
|
|
@@ -16933,26 +17108,26 @@ var uh = {
|
|
|
16933
17108
|
},
|
|
16934
17109
|
firebaseAuth: {
|
|
16935
17110
|
service: "auth",
|
|
16936
|
-
create: () => new
|
|
17111
|
+
create: () => new zm()
|
|
16937
17112
|
}
|
|
16938
|
-
},
|
|
17113
|
+
}, Eh = {
|
|
16939
17114
|
googleAuth: {
|
|
16940
17115
|
service: "auth",
|
|
16941
|
-
create: () => new
|
|
17116
|
+
create: () => new gm()
|
|
16942
17117
|
},
|
|
16943
17118
|
gmail: {
|
|
16944
17119
|
service: "email",
|
|
16945
|
-
create: () => new
|
|
17120
|
+
create: () => new Ym()
|
|
16946
17121
|
},
|
|
16947
17122
|
googleServiceAccount: {
|
|
16948
17123
|
service: "credentials",
|
|
16949
|
-
create: (e) => new
|
|
17124
|
+
create: (e) => new Wm(e.serviceAccount),
|
|
16950
17125
|
when: (e) => !!e.serviceAccount
|
|
16951
17126
|
}
|
|
16952
|
-
},
|
|
17127
|
+
}, Dh = { dropboxAuth: {
|
|
16953
17128
|
service: "auth",
|
|
16954
|
-
create: (e) => new
|
|
16955
|
-
} },
|
|
17129
|
+
create: (e) => new Km(e)
|
|
17130
|
+
} }, Oh = {
|
|
16956
17131
|
supabaseDb: {
|
|
16957
17132
|
service: "data",
|
|
16958
17133
|
create: (e) => new oo(e)
|
|
@@ -16963,32 +17138,32 @@ var uh = {
|
|
|
16963
17138
|
},
|
|
16964
17139
|
supabaseAuth: {
|
|
16965
17140
|
service: "auth",
|
|
16966
|
-
create: (e) => new
|
|
17141
|
+
create: (e) => new Zm(e)
|
|
16967
17142
|
}
|
|
16968
|
-
},
|
|
17143
|
+
}, kh = { mock: {
|
|
16969
17144
|
service: "data",
|
|
16970
17145
|
create: (e) => new mo(e?.data)
|
|
16971
|
-
} },
|
|
17146
|
+
} }, Ah = (e, t) => ({
|
|
16972
17147
|
service: "ai",
|
|
16973
17148
|
create: (n) => new hl(e, n?.[t] || ""),
|
|
16974
17149
|
when: (e) => !!e?.[t]
|
|
16975
|
-
}),
|
|
16976
|
-
firebase:
|
|
16977
|
-
google:
|
|
16978
|
-
dropbox:
|
|
16979
|
-
supabase:
|
|
16980
|
-
mock:
|
|
17150
|
+
}), jh = {
|
|
17151
|
+
firebase: Th,
|
|
17152
|
+
google: Eh,
|
|
17153
|
+
dropbox: Dh,
|
|
17154
|
+
supabase: Oh,
|
|
17155
|
+
mock: kh,
|
|
16981
17156
|
ai: {
|
|
16982
|
-
openai:
|
|
16983
|
-
openrouter: wh
|
|
16984
|
-
opencode:
|
|
16985
|
-
deepseek:
|
|
16986
|
-
gemini:
|
|
16987
|
-
anthropic:
|
|
16988
|
-
mistral:
|
|
17157
|
+
openai: Ah(vh, "openaiApiKey"),
|
|
17158
|
+
openrouter: Ah(wh, "openRouterApiKey"),
|
|
17159
|
+
opencode: Ah(Ch, "openCodeApiKey"),
|
|
17160
|
+
deepseek: Ah(uh, "deepSeekApiKey"),
|
|
17161
|
+
gemini: Ah(gh, "geminiApiKey"),
|
|
17162
|
+
anthropic: Ah(rh, "anthropicApiKey"),
|
|
17163
|
+
mistral: Ah(_h, "mistralApiKey")
|
|
16989
17164
|
}
|
|
16990
|
-
},
|
|
16991
|
-
function
|
|
17165
|
+
}, 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" }));
|
|
17166
|
+
function Nh(e, t) {
|
|
16992
17167
|
if (!t) return;
|
|
16993
17168
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
16994
17169
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -16997,10 +17172,10 @@ function Dh(e, t) {
|
|
|
16997
17172
|
}
|
|
16998
17173
|
e.custom = t;
|
|
16999
17174
|
}
|
|
17000
|
-
function
|
|
17175
|
+
function Ph(e, t, n = "default") {
|
|
17001
17176
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
17002
17177
|
}
|
|
17003
|
-
function
|
|
17178
|
+
function Fh(e = {}) {
|
|
17004
17179
|
let t = {
|
|
17005
17180
|
data: {},
|
|
17006
17181
|
storage: {},
|
|
@@ -17009,24 +17184,24 @@ function kh(e = {}) {
|
|
|
17009
17184
|
ai: {},
|
|
17010
17185
|
credentials: {}
|
|
17011
17186
|
}, n = (e) => t[e] ??= {};
|
|
17012
|
-
for (let [t, r] of Object.entries(
|
|
17187
|
+
for (let [t, r] of Object.entries(jh)) {
|
|
17013
17188
|
let i = e[t];
|
|
17014
17189
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
|
|
17015
17190
|
}
|
|
17016
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
17017
|
-
Object.keys(t.data).length === 0 && (t.data.mock = new mo()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new
|
|
17191
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Nh(n(t), r);
|
|
17192
|
+
Object.keys(t.data).length === 0 && (t.data.mock = new mo()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new gm());
|
|
17018
17193
|
let r = e.services ?? {}, i = {};
|
|
17019
17194
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
17020
17195
|
registry: n,
|
|
17021
|
-
defaultKey:
|
|
17196
|
+
defaultKey: Ph(n, r[e])
|
|
17022
17197
|
};
|
|
17023
17198
|
return i;
|
|
17024
17199
|
}
|
|
17025
|
-
var
|
|
17026
|
-
|
|
17027
|
-
},
|
|
17028
|
-
function
|
|
17029
|
-
let [p, g] = h(() =>
|
|
17200
|
+
var Ih = {}, Lh = (e) => {
|
|
17201
|
+
Ih = e;
|
|
17202
|
+
}, Rh = (e) => Ih[e] || [];
|
|
17203
|
+
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 }) {
|
|
17204
|
+
let [p, g] = h(() => Fh(n)), v = m(p);
|
|
17030
17205
|
v.current = p;
|
|
17031
17206
|
let y = m(void 0);
|
|
17032
17207
|
y.current ||= (async (e, t, n) => {
|
|
@@ -17043,7 +17218,7 @@ function Nh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17043
17218
|
})));
|
|
17044
17219
|
});
|
|
17045
17220
|
let b = y.current, x = e ?? t.Fragment;
|
|
17046
|
-
return /* @__PURE__ */ t.createElement(
|
|
17221
|
+
return /* @__PURE__ */ t.createElement(mm, {
|
|
17047
17222
|
fullPage: !0,
|
|
17048
17223
|
reportUrl: u,
|
|
17049
17224
|
debug: d
|
|
@@ -17065,10 +17240,10 @@ function Nh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17065
17240
|
} }, /* @__PURE__ */ t.createElement(ma, {
|
|
17066
17241
|
registries: p,
|
|
17067
17242
|
setProvider: b
|
|
17068
|
-
}, /* @__PURE__ */ t.createElement($r, p.auth, /* @__PURE__ */ t.createElement(
|
|
17243
|
+
}, /* @__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))))))))))))))));
|
|
17069
17244
|
}
|
|
17070
|
-
function
|
|
17071
|
-
|
|
17245
|
+
function Bh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
|
|
17246
|
+
Lh(r);
|
|
17072
17247
|
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));
|
|
17073
17248
|
function l(r, a, l) {
|
|
17074
17249
|
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, {
|
|
@@ -17078,32 +17253,32 @@ function Ph({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17078
17253
|
return /* @__PURE__ */ t.createElement(y, {
|
|
17079
17254
|
key: `${r}-${l}`,
|
|
17080
17255
|
path: a.path,
|
|
17081
|
-
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(
|
|
17256
|
+
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(mm, {
|
|
17082
17257
|
key: a.path,
|
|
17083
17258
|
reportUrl: o.errorReportUrl,
|
|
17084
17259
|
debug: o.debug
|
|
17085
|
-
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(
|
|
17260
|
+
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Mh, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17086
17261
|
});
|
|
17087
17262
|
}
|
|
17088
17263
|
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)));
|
|
17089
|
-
return /* @__PURE__ */ t.createElement(
|
|
17264
|
+
return /* @__PURE__ */ t.createElement(zh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17090
17265
|
path: oi,
|
|
17091
17266
|
element: /* @__PURE__ */ t.createElement(pi, null)
|
|
17092
17267
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17093
17268
|
default: [{ path: "/" }],
|
|
17094
|
-
...
|
|
17269
|
+
...Ih,
|
|
17095
17270
|
_auth: [{
|
|
17096
17271
|
path: "/users",
|
|
17097
|
-
page:
|
|
17272
|
+
page: am,
|
|
17098
17273
|
layout: n
|
|
17099
17274
|
}]
|
|
17100
17275
|
})), /* @__PURE__ */ t.createElement(y, {
|
|
17101
17276
|
path: "*",
|
|
17102
|
-
element: /* @__PURE__ */ t.createElement(
|
|
17277
|
+
element: /* @__PURE__ */ t.createElement(om, null)
|
|
17103
17278
|
})));
|
|
17104
17279
|
}
|
|
17105
|
-
var
|
|
17106
|
-
let t =
|
|
17280
|
+
var Vh = (e) => {
|
|
17281
|
+
let t = Rh(e), n = x(), r = (e) => e.map((e) => {
|
|
17107
17282
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
17108
17283
|
return {
|
|
17109
17284
|
...e,
|
|
@@ -17112,7 +17287,7 @@ var Fh = (e) => {
|
|
|
17112
17287
|
};
|
|
17113
17288
|
});
|
|
17114
17289
|
return p(() => r(t), [n.pathname]);
|
|
17115
|
-
},
|
|
17290
|
+
}, Hh = {
|
|
17116
17291
|
common: {
|
|
17117
17292
|
save: "Salva",
|
|
17118
17293
|
cancel: "Annulla",
|
|
@@ -17152,7 +17327,16 @@ var Fh = (e) => {
|
|
|
17152
17327
|
grid: {
|
|
17153
17328
|
buttonAdd: "Aggiungi",
|
|
17154
17329
|
deleteConfirm: "Sei sicuro di voler eliminare questo elemento?",
|
|
17155
|
-
emptyState: "Nessun elemento da mostrare"
|
|
17330
|
+
emptyState: "Nessun elemento da mostrare",
|
|
17331
|
+
filtersButton: "Filtri",
|
|
17332
|
+
filtersPanelTitle: "Filtri",
|
|
17333
|
+
filtersClearAll: "Cancella tutti",
|
|
17334
|
+
filtersSelectPlaceholder: "Tutti",
|
|
17335
|
+
filtersRangeFrom: "Da",
|
|
17336
|
+
filtersRangeTo: "A",
|
|
17337
|
+
filtersRangeMin: "Min",
|
|
17338
|
+
filtersRangeMax: "Max",
|
|
17339
|
+
filtersSelectedCountTemplate: "{count} selezionati"
|
|
17156
17340
|
},
|
|
17157
17341
|
select: {
|
|
17158
17342
|
placeholder: "Seleziona...",
|
|
@@ -17270,7 +17454,7 @@ var Fh = (e) => {
|
|
|
17270
17454
|
notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
|
|
17271
17455
|
loadError: "Impossibile caricare la ricerca indirizzi."
|
|
17272
17456
|
}
|
|
17273
|
-
},
|
|
17457
|
+
}, Uh = {
|
|
17274
17458
|
common: {
|
|
17275
17459
|
save: "Speichern",
|
|
17276
17460
|
cancel: "Abbrechen",
|
|
@@ -17310,7 +17494,16 @@ var Fh = (e) => {
|
|
|
17310
17494
|
grid: {
|
|
17311
17495
|
buttonAdd: "Hinzufügen",
|
|
17312
17496
|
deleteConfirm: "Dieses Element wirklich löschen?",
|
|
17313
|
-
emptyState: "Keine Elemente vorhanden"
|
|
17497
|
+
emptyState: "Keine Elemente vorhanden",
|
|
17498
|
+
filtersButton: "Filter",
|
|
17499
|
+
filtersPanelTitle: "Filter",
|
|
17500
|
+
filtersClearAll: "Alle zurücksetzen",
|
|
17501
|
+
filtersSelectPlaceholder: "Alle",
|
|
17502
|
+
filtersRangeFrom: "Von",
|
|
17503
|
+
filtersRangeTo: "Bis",
|
|
17504
|
+
filtersRangeMin: "Min",
|
|
17505
|
+
filtersRangeMax: "Max",
|
|
17506
|
+
filtersSelectedCountTemplate: "{count} ausgewählt"
|
|
17314
17507
|
},
|
|
17315
17508
|
select: {
|
|
17316
17509
|
placeholder: "Auswählen...",
|
|
@@ -17428,7 +17621,7 @@ var Fh = (e) => {
|
|
|
17428
17621
|
notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
|
|
17429
17622
|
loadError: "Adresssuche konnte nicht geladen werden."
|
|
17430
17623
|
}
|
|
17431
|
-
},
|
|
17624
|
+
}, Wh = {
|
|
17432
17625
|
common: {
|
|
17433
17626
|
save: "Сохранить",
|
|
17434
17627
|
cancel: "Отменить",
|
|
@@ -17468,7 +17661,16 @@ var Fh = (e) => {
|
|
|
17468
17661
|
grid: {
|
|
17469
17662
|
buttonAdd: "Добавить",
|
|
17470
17663
|
deleteConfirm: "Вы уверены, что хотите удалить этот элемент?",
|
|
17471
|
-
emptyState: "Нет элементов для отображения"
|
|
17664
|
+
emptyState: "Нет элементов для отображения",
|
|
17665
|
+
filtersButton: "Фильтры",
|
|
17666
|
+
filtersPanelTitle: "Фильтры",
|
|
17667
|
+
filtersClearAll: "Сбросить все",
|
|
17668
|
+
filtersSelectPlaceholder: "Все",
|
|
17669
|
+
filtersRangeFrom: "От",
|
|
17670
|
+
filtersRangeTo: "До",
|
|
17671
|
+
filtersRangeMin: "Мин",
|
|
17672
|
+
filtersRangeMax: "Макс",
|
|
17673
|
+
filtersSelectedCountTemplate: "Выбрано: {count}"
|
|
17472
17674
|
},
|
|
17473
17675
|
select: {
|
|
17474
17676
|
placeholder: "Выбрать...",
|
|
@@ -17586,7 +17788,7 @@ var Fh = (e) => {
|
|
|
17586
17788
|
notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
|
|
17587
17789
|
loadError: "Не удалось загрузить поиск адресов."
|
|
17588
17790
|
}
|
|
17589
|
-
},
|
|
17791
|
+
}, Gh = {
|
|
17590
17792
|
common: {
|
|
17591
17793
|
save: "保存",
|
|
17592
17794
|
cancel: "取消",
|
|
@@ -17626,7 +17828,16 @@ var Fh = (e) => {
|
|
|
17626
17828
|
grid: {
|
|
17627
17829
|
buttonAdd: "添加",
|
|
17628
17830
|
deleteConfirm: "确定要删除此项目吗?",
|
|
17629
|
-
emptyState: "暂无数据"
|
|
17831
|
+
emptyState: "暂无数据",
|
|
17832
|
+
filtersButton: "筛选",
|
|
17833
|
+
filtersPanelTitle: "筛选",
|
|
17834
|
+
filtersClearAll: "清除全部",
|
|
17835
|
+
filtersSelectPlaceholder: "全部",
|
|
17836
|
+
filtersRangeFrom: "从",
|
|
17837
|
+
filtersRangeTo: "到",
|
|
17838
|
+
filtersRangeMin: "最小",
|
|
17839
|
+
filtersRangeMax: "最大",
|
|
17840
|
+
filtersSelectedCountTemplate: "已选 {count} 项"
|
|
17630
17841
|
},
|
|
17631
17842
|
select: {
|
|
17632
17843
|
placeholder: "请选择...",
|
|
@@ -17744,7 +17955,7 @@ var Fh = (e) => {
|
|
|
17744
17955
|
notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
|
|
17745
17956
|
loadError: "无法加载地址搜索。"
|
|
17746
17957
|
}
|
|
17747
|
-
},
|
|
17958
|
+
}, Kh = {
|
|
17748
17959
|
common: {
|
|
17749
17960
|
save: "حفظ",
|
|
17750
17961
|
cancel: "إلغاء",
|
|
@@ -17784,7 +17995,16 @@ var Fh = (e) => {
|
|
|
17784
17995
|
grid: {
|
|
17785
17996
|
buttonAdd: "إضافة",
|
|
17786
17997
|
deleteConfirm: "هل أنت متأكد من حذف هذا العنصر؟",
|
|
17787
|
-
emptyState: "لا توجد عناصر للعرض"
|
|
17998
|
+
emptyState: "لا توجد عناصر للعرض",
|
|
17999
|
+
filtersButton: "الفلاتر",
|
|
18000
|
+
filtersPanelTitle: "الفلاتر",
|
|
18001
|
+
filtersClearAll: "مسح الكل",
|
|
18002
|
+
filtersSelectPlaceholder: "الكل",
|
|
18003
|
+
filtersRangeFrom: "من",
|
|
18004
|
+
filtersRangeTo: "إلى",
|
|
18005
|
+
filtersRangeMin: "أدنى",
|
|
18006
|
+
filtersRangeMax: "أقصى",
|
|
18007
|
+
filtersSelectedCountTemplate: "تم اختيار {count}"
|
|
17788
18008
|
},
|
|
17789
18009
|
select: {
|
|
17790
18010
|
placeholder: "اختر...",
|
|
@@ -17902,22 +18122,22 @@ var Fh = (e) => {
|
|
|
17902
18122
|
notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
|
|
17903
18123
|
loadError: "تعذر تحميل البحث عن العناوين."
|
|
17904
18124
|
}
|
|
17905
|
-
},
|
|
17906
|
-
ar: () =>
|
|
17907
|
-
de: () =>
|
|
18125
|
+
}, qh = /* @__PURE__ */ Je({
|
|
18126
|
+
ar: () => Kh,
|
|
18127
|
+
de: () => Uh,
|
|
17908
18128
|
en: () => Sn,
|
|
17909
|
-
it: () =>
|
|
17910
|
-
ru: () =>
|
|
17911
|
-
zh: () =>
|
|
17912
|
-
}),
|
|
18129
|
+
it: () => Hh,
|
|
18130
|
+
ru: () => Wh,
|
|
18131
|
+
zh: () => Gh
|
|
18132
|
+
}), Jh = (e) => _a("api", e);
|
|
17913
18133
|
//#endregion
|
|
17914
18134
|
//#region src/providers/api/direct.ts
|
|
17915
|
-
async function
|
|
18135
|
+
async function Yh(e) {
|
|
17916
18136
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
17917
18137
|
let t = await e.text();
|
|
17918
18138
|
return t ? JSON.parse(t) : void 0;
|
|
17919
18139
|
}
|
|
17920
|
-
var
|
|
18140
|
+
var Xh = class {
|
|
17921
18141
|
config;
|
|
17922
18142
|
constructor(e) {
|
|
17923
18143
|
this.config = e;
|
|
@@ -17932,7 +18152,7 @@ var Wh = class {
|
|
|
17932
18152
|
...e.body,
|
|
17933
18153
|
...this.config.body
|
|
17934
18154
|
};
|
|
17935
|
-
return
|
|
18155
|
+
return Yh(await rl(n.toString(), {
|
|
17936
18156
|
method: t,
|
|
17937
18157
|
headers: {
|
|
17938
18158
|
"Content-Type": "application/json",
|
|
@@ -17941,7 +18161,7 @@ var Wh = class {
|
|
|
17941
18161
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
17942
18162
|
}));
|
|
17943
18163
|
}
|
|
17944
|
-
},
|
|
18164
|
+
}, Zh = class {
|
|
17945
18165
|
resolver;
|
|
17946
18166
|
constructor(e) {
|
|
17947
18167
|
this.resolver = e;
|
|
@@ -17949,7 +18169,7 @@ var Wh = class {
|
|
|
17949
18169
|
async fetch(e) {
|
|
17950
18170
|
return this.resolver(e);
|
|
17951
18171
|
}
|
|
17952
|
-
},
|
|
18172
|
+
}, Qh = class {
|
|
17953
18173
|
config;
|
|
17954
18174
|
constructor(e) {
|
|
17955
18175
|
this.config = e;
|
|
@@ -17960,7 +18180,7 @@ var Wh = class {
|
|
|
17960
18180
|
request: e
|
|
17961
18181
|
}, void 0, this.config.region);
|
|
17962
18182
|
}
|
|
17963
|
-
},
|
|
18183
|
+
}, $h = class {
|
|
17964
18184
|
config;
|
|
17965
18185
|
constructor(e) {
|
|
17966
18186
|
this.config = e;
|
|
@@ -17973,7 +18193,7 @@ var Wh = class {
|
|
|
17973
18193
|
if (n) throw n;
|
|
17974
18194
|
return t;
|
|
17975
18195
|
}
|
|
17976
|
-
},
|
|
18196
|
+
}, eg = [
|
|
17977
18197
|
{
|
|
17978
18198
|
id: "resend",
|
|
17979
18199
|
label: "Resend",
|
|
@@ -18084,7 +18304,7 @@ var Wh = class {
|
|
|
18084
18304
|
],
|
|
18085
18305
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
18086
18306
|
}
|
|
18087
|
-
],
|
|
18307
|
+
], tg = [
|
|
18088
18308
|
{
|
|
18089
18309
|
id: "cloudflare_pages",
|
|
18090
18310
|
label: "Cloudflare Pages",
|
|
@@ -18314,15 +18534,15 @@ var Wh = class {
|
|
|
18314
18534
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
18315
18535
|
credentialFields: []
|
|
18316
18536
|
}
|
|
18317
|
-
],
|
|
18318
|
-
fh,
|
|
18537
|
+
], ng = [
|
|
18319
18538
|
vh,
|
|
18320
|
-
|
|
18321
|
-
|
|
18539
|
+
wh,
|
|
18540
|
+
Ch,
|
|
18322
18541
|
uh,
|
|
18323
|
-
|
|
18324
|
-
|
|
18325
|
-
|
|
18542
|
+
gh,
|
|
18543
|
+
rh,
|
|
18544
|
+
_h,
|
|
18545
|
+
lh({
|
|
18326
18546
|
id: "glm",
|
|
18327
18547
|
label: "ZhipuAI (GLM)",
|
|
18328
18548
|
description: "Zhipu AI's GLM model family.",
|
|
@@ -18339,7 +18559,7 @@ var Wh = class {
|
|
|
18339
18559
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
18340
18560
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
18341
18561
|
})
|
|
18342
|
-
],
|
|
18562
|
+
], rg = (e) => ({
|
|
18343
18563
|
id: e.id,
|
|
18344
18564
|
label: e.label,
|
|
18345
18565
|
description: e.description ?? "",
|
|
@@ -18350,7 +18570,7 @@ var Wh = class {
|
|
|
18350
18570
|
}],
|
|
18351
18571
|
credentialsUrl: e.dashboardUrl,
|
|
18352
18572
|
credentialsHint: e.credentialsHint
|
|
18353
|
-
}),
|
|
18573
|
+
}), ig = ng.map(rg), ag = {
|
|
18354
18574
|
id: "openai-compatible",
|
|
18355
18575
|
label: "OpenAI-compatible",
|
|
18356
18576
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18364,9 +18584,9 @@ var Wh = class {
|
|
|
18364
18584
|
type: "text",
|
|
18365
18585
|
placeholder: "https://api.example.com/v1"
|
|
18366
18586
|
}]
|
|
18367
|
-
},
|
|
18587
|
+
}, og = (e) => {
|
|
18368
18588
|
let t = e?.openAICompatible?.baseUrl?.trim();
|
|
18369
|
-
return t ? [
|
|
18589
|
+
return t ? [lh({
|
|
18370
18590
|
id: "openai-compatible",
|
|
18371
18591
|
label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
|
|
18372
18592
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18378,35 +18598,35 @@ var Wh = class {
|
|
|
18378
18598
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
18379
18599
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
18380
18600
|
})] : [];
|
|
18381
|
-
},
|
|
18601
|
+
}, sg = (e) => e ? [...ng, ...og(e)].reduce((t, n) => {
|
|
18382
18602
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
18383
18603
|
return r && (t[n.id] = new hl(n, r)), t;
|
|
18384
|
-
}, {}) : {},
|
|
18604
|
+
}, {}) : {}, cg = void 0;
|
|
18385
18605
|
typeof Sa == "function" && Sa((e) => {
|
|
18386
|
-
|
|
18606
|
+
cg = e.google;
|
|
18387
18607
|
});
|
|
18388
|
-
var
|
|
18608
|
+
var lg = {
|
|
18389
18609
|
ita: "geoTargetConstants/2380",
|
|
18390
18610
|
rome: "geoTargetConstants/1033236",
|
|
18391
18611
|
mil: "geoTargetConstants/1033239",
|
|
18392
18612
|
nap: "geoTargetConstants/1033245",
|
|
18393
18613
|
tor: "geoTargetConstants/1033247"
|
|
18394
|
-
},
|
|
18614
|
+
}, ug = {
|
|
18395
18615
|
it: "languageConstants/1000",
|
|
18396
18616
|
en: "languageConstants/1001",
|
|
18397
18617
|
fr: "languageConstants/1002",
|
|
18398
18618
|
es: "languageConstants/1003",
|
|
18399
18619
|
de: "languageConstants/1005"
|
|
18400
18620
|
};
|
|
18401
|
-
function
|
|
18402
|
-
return
|
|
18621
|
+
function dg(e) {
|
|
18622
|
+
return lg[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
18403
18623
|
}
|
|
18404
|
-
function
|
|
18405
|
-
return
|
|
18624
|
+
function fg(e) {
|
|
18625
|
+
return ug[e.toLowerCase()] || "languageConstants/1000";
|
|
18406
18626
|
}
|
|
18407
|
-
async function
|
|
18408
|
-
if (!
|
|
18409
|
-
let i = await
|
|
18627
|
+
async function pg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
18628
|
+
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"), [];
|
|
18629
|
+
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 = {
|
|
18410
18630
|
keywordSeed: { keywords: [e] },
|
|
18411
18631
|
geoTargetConstants: [a],
|
|
18412
18632
|
language: o
|
|
@@ -18414,7 +18634,7 @@ async function sg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18414
18634
|
method: "POST",
|
|
18415
18635
|
headers: {
|
|
18416
18636
|
Authorization: `Bearer ${i}`,
|
|
18417
|
-
"developer-token":
|
|
18637
|
+
"developer-token": cg.developerToken,
|
|
18418
18638
|
"Content-Type": "application/json"
|
|
18419
18639
|
},
|
|
18420
18640
|
body: JSON.stringify(c)
|
|
@@ -18432,7 +18652,7 @@ async function sg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18432
18652
|
}
|
|
18433
18653
|
//#endregion
|
|
18434
18654
|
//#region src/providers/seo/google/trend.ts
|
|
18435
|
-
async function
|
|
18655
|
+
async function mg(e, t = "IT", n = "today 12-m") {
|
|
18436
18656
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18437
18657
|
comparisonItem: [{
|
|
18438
18658
|
keyword: e,
|
|
@@ -18452,7 +18672,7 @@ async function cg(e, t = "IT", n = "today 12-m") {
|
|
|
18452
18672
|
}))
|
|
18453
18673
|
};
|
|
18454
18674
|
}
|
|
18455
|
-
async function
|
|
18675
|
+
async function hg(e, t = "IT", n = "today 12-m") {
|
|
18456
18676
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18457
18677
|
comparisonItem: [{
|
|
18458
18678
|
keyword: e,
|
|
@@ -18478,13 +18698,13 @@ async function lg(e, t = "IT", n = "today 12-m") {
|
|
|
18478
18698
|
}
|
|
18479
18699
|
//#endregion
|
|
18480
18700
|
//#region src/providers/storage/dropbox.tsx
|
|
18481
|
-
var
|
|
18701
|
+
var gg = 5e3, _g = "https://www.dropbox.com/home", vg = void 0;
|
|
18482
18702
|
typeof Sa == "function" && Sa((e) => {
|
|
18483
|
-
|
|
18703
|
+
vg = e.dropbox;
|
|
18484
18704
|
});
|
|
18485
|
-
var
|
|
18486
|
-
if (!
|
|
18487
|
-
let r = await vi(
|
|
18705
|
+
var yg = async (e, t, n = {}) => {
|
|
18706
|
+
if (!vg) return console.error("DropBox: Config not found"), null;
|
|
18707
|
+
let r = await vi(vg.clientId);
|
|
18488
18708
|
if (!r) throw Error("DropBox: Access token not found");
|
|
18489
18709
|
return await fetch(e, {
|
|
18490
18710
|
method: "POST",
|
|
@@ -18497,12 +18717,12 @@ var pg = async (e, t, n = {}) => {
|
|
|
18497
18717
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
18498
18718
|
console.log("DropBox: Fetch operation completed");
|
|
18499
18719
|
});
|
|
18500
|
-
},
|
|
18501
|
-
if (!
|
|
18720
|
+
}, bg = async (e, t, n = {}) => {
|
|
18721
|
+
if (!vg) {
|
|
18502
18722
|
console.error("DropBox: Config not found");
|
|
18503
18723
|
return;
|
|
18504
18724
|
}
|
|
18505
|
-
let r = await vi(
|
|
18725
|
+
let r = await vi(vg.clientId);
|
|
18506
18726
|
if (!r) {
|
|
18507
18727
|
console.error("DropBox: Access token not found");
|
|
18508
18728
|
return;
|
|
@@ -18527,47 +18747,47 @@ var pg = async (e, t, n = {}) => {
|
|
|
18527
18747
|
}).finally(() => {
|
|
18528
18748
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
18529
18749
|
});
|
|
18530
|
-
},
|
|
18531
|
-
let n =
|
|
18532
|
-
return (t ?
|
|
18533
|
-
},
|
|
18750
|
+
}, xg = (e, t = !1) => {
|
|
18751
|
+
let n = vg?.rootPath || "";
|
|
18752
|
+
return (t ? _g : "") + (e.startsWith(n) ? e : n + e);
|
|
18753
|
+
}, Sg = async (e, t = "", n = !1) => {
|
|
18534
18754
|
let r = {};
|
|
18535
|
-
return (await
|
|
18755
|
+
return (await Ig.listFolders({
|
|
18536
18756
|
path: `${e + t}`,
|
|
18537
18757
|
recursive: !0
|
|
18538
18758
|
})).forEach((e) => {
|
|
18539
18759
|
e[".tag"] !== "folder" && (r[n ? ti.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
18540
18760
|
}), r;
|
|
18541
|
-
},
|
|
18761
|
+
}, Cg = async (e, t) => {
|
|
18542
18762
|
if (!e.async_job_id) return Promise.reject(e);
|
|
18543
18763
|
let n, r = !0;
|
|
18544
|
-
for (; r;) await ut(100), n = await
|
|
18764
|
+
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);
|
|
18545
18765
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
18546
|
-
},
|
|
18547
|
-
let n = "files/create_folder_batch", r = await
|
|
18766
|
+
}, wg = async (e, t = "") => {
|
|
18767
|
+
let n = "files/create_folder_batch", r = await bg(`https://api.dropboxapi.com/2/${n}`, {
|
|
18548
18768
|
autorename: !1,
|
|
18549
18769
|
force_async: !0,
|
|
18550
|
-
paths: e.map((e) =>
|
|
18770
|
+
paths: e.map((e) => xg(t + e))
|
|
18551
18771
|
});
|
|
18552
|
-
return r ?
|
|
18553
|
-
},
|
|
18554
|
-
let n = "files/create_folder_batch", r = await
|
|
18555
|
-
return r ?
|
|
18556
|
-
},
|
|
18772
|
+
return r ? Cg(r, n) : void 0;
|
|
18773
|
+
}, Tg = async (e, t = "") => {
|
|
18774
|
+
let n = "files/create_folder_batch", r = await bg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: xg(t + e) })) });
|
|
18775
|
+
return r ? Cg(r, n) : void 0;
|
|
18776
|
+
}, Eg = async (e, t) => bg("https://api.dropboxapi.com/2/files/tags/add", {
|
|
18557
18777
|
path: e,
|
|
18558
18778
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
18559
|
-
}),
|
|
18560
|
-
for (let n in e) for (let r of e[n]) await
|
|
18561
|
-
},
|
|
18562
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
18779
|
+
}), Dg = async (e, t = "") => {
|
|
18780
|
+
for (let n in e) for (let r of e[n]) await Eg(xg(t + n), r);
|
|
18781
|
+
}, Og = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
18782
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await bg("https://api.dropboxapi.com/2/files/list_folder", {
|
|
18563
18783
|
include_deleted: !1,
|
|
18564
18784
|
include_has_explicit_shared_members: !1,
|
|
18565
18785
|
include_media_info: !1,
|
|
18566
18786
|
include_mounted_folders: !0,
|
|
18567
18787
|
include_non_downloadable_files: !0,
|
|
18568
|
-
path:
|
|
18788
|
+
path: xg(e),
|
|
18569
18789
|
recursive: n
|
|
18570
|
-
}) : await
|
|
18790
|
+
}) : await bg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
18571
18791
|
has_more: !0,
|
|
18572
18792
|
cursor: "",
|
|
18573
18793
|
entries: []
|
|
@@ -18580,44 +18800,44 @@ var pg = async (e, t, n = {}) => {
|
|
|
18580
18800
|
recursive: t
|
|
18581
18801
|
}), i && n.push(...i.entries);
|
|
18582
18802
|
return n;
|
|
18583
|
-
},
|
|
18584
|
-
let t = async (e) => await
|
|
18803
|
+
}, kg = async (e) => {
|
|
18804
|
+
let t = async (e) => await bg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
18585
18805
|
entries: e,
|
|
18586
18806
|
autorename: !1
|
|
18587
|
-
}), n = async (e) => await
|
|
18807
|
+
}), n = async (e) => await bg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
18588
18808
|
for (let a = 0; a < e.length; a += 900) {
|
|
18589
18809
|
i = e.slice(a, a + 900).map((e) => ({
|
|
18590
|
-
from_path:
|
|
18591
|
-
to_path:
|
|
18810
|
+
from_path: xg(e.from),
|
|
18811
|
+
to_path: xg(e.to)
|
|
18592
18812
|
}));
|
|
18593
18813
|
let o = await t(i);
|
|
18594
18814
|
if (!o) continue;
|
|
18595
18815
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
18596
18816
|
let s = o;
|
|
18597
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(
|
|
18817
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(gg), s = await n(o.async_job_id ?? "");
|
|
18598
18818
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
18599
18819
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
18600
18820
|
}
|
|
18601
18821
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
18602
|
-
},
|
|
18603
|
-
let t = async (e) => await
|
|
18822
|
+
}, Ag = async (e) => {
|
|
18823
|
+
let t = async (e) => await bg("https://api.dropboxapi.com/2/files/move_v2", {
|
|
18604
18824
|
...e,
|
|
18605
18825
|
autorename: !0
|
|
18606
18826
|
});
|
|
18607
18827
|
for (let n of e) await t({
|
|
18608
|
-
from_path:
|
|
18609
|
-
to_path:
|
|
18828
|
+
from_path: xg(n.from),
|
|
18829
|
+
to_path: xg(n.to)
|
|
18610
18830
|
});
|
|
18611
|
-
},
|
|
18831
|
+
}, jg = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
18612
18832
|
let a = {}, o = [];
|
|
18613
18833
|
for (let s = 0; s < e.length; s += 25) {
|
|
18614
18834
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
18615
|
-
path:
|
|
18835
|
+
path: xg(e.path),
|
|
18616
18836
|
format: n,
|
|
18617
18837
|
size: t,
|
|
18618
18838
|
mode: r
|
|
18619
18839
|
}));
|
|
18620
|
-
await ut(100), o.push(
|
|
18840
|
+
await ut(100), o.push(bg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
18621
18841
|
if (!e) return;
|
|
18622
18842
|
let n = e.entries.reduce((e, n, r) => {
|
|
18623
18843
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -18636,7 +18856,7 @@ var pg = async (e, t, n = {}) => {
|
|
|
18636
18856
|
}));
|
|
18637
18857
|
}
|
|
18638
18858
|
return Promise.all(o).then(() => a);
|
|
18639
|
-
},
|
|
18859
|
+
}, Mg = (e, t = "application/octet-stream", n = 512) => {
|
|
18640
18860
|
let r = atob(e), i = [];
|
|
18641
18861
|
for (let e = 0; e < r.length; e += n) {
|
|
18642
18862
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -18645,11 +18865,11 @@ var pg = async (e, t, n = {}) => {
|
|
|
18645
18865
|
i.push(o);
|
|
18646
18866
|
}
|
|
18647
18867
|
return new Blob(i, { type: t });
|
|
18648
|
-
},
|
|
18868
|
+
}, Ng = async (e, t) => {
|
|
18649
18869
|
try {
|
|
18650
18870
|
let n = t.split(",")[1];
|
|
18651
|
-
|
|
18652
|
-
path:
|
|
18871
|
+
yg("https://content.dropboxapi.com/2/files/upload", Mg(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
18872
|
+
path: xg(e),
|
|
18653
18873
|
mode: "overwrite",
|
|
18654
18874
|
autorename: !0,
|
|
18655
18875
|
mute: !1
|
|
@@ -18659,12 +18879,12 @@ var pg = async (e, t, n = {}) => {
|
|
|
18659
18879
|
} catch (e) {
|
|
18660
18880
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
18661
18881
|
}
|
|
18662
|
-
},
|
|
18663
|
-
if (!
|
|
18882
|
+
}, Pg = (e = !1) => vg ? hi(vg.clientId, e) : !1, Fg = (e = {}) => {
|
|
18883
|
+
if (!vg) return /* @__PURE__ */ t.createElement("div", {
|
|
18664
18884
|
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.",
|
|
18665
18885
|
className: "text-danger flex items-center gap-2"
|
|
18666
18886
|
}, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
|
|
18667
|
-
let n =
|
|
18887
|
+
let n = Pg(!0);
|
|
18668
18888
|
return /* @__PURE__ */ t.createElement(bi, {
|
|
18669
18889
|
provider: "dropboxAuth",
|
|
18670
18890
|
intent: "connect",
|
|
@@ -18676,33 +18896,33 @@ var pg = async (e, t, n = {}) => {
|
|
|
18676
18896
|
title: n ? "DropBox Connected" : "DropBox Disconnected"
|
|
18677
18897
|
}
|
|
18678
18898
|
});
|
|
18679
|
-
},
|
|
18899
|
+
}, Ig = {
|
|
18680
18900
|
setRootPath: (e) => {
|
|
18681
|
-
|
|
18901
|
+
vg && (vg.rootPath = e);
|
|
18682
18902
|
},
|
|
18683
|
-
resolvePath:
|
|
18684
|
-
createFolders:
|
|
18685
|
-
deleteBulk:
|
|
18686
|
-
addTags:
|
|
18687
|
-
listFolders:
|
|
18688
|
-
getThumbnails:
|
|
18689
|
-
search:
|
|
18690
|
-
upload:
|
|
18691
|
-
copy:
|
|
18692
|
-
move:
|
|
18693
|
-
},
|
|
18903
|
+
resolvePath: xg,
|
|
18904
|
+
createFolders: wg,
|
|
18905
|
+
deleteBulk: Tg,
|
|
18906
|
+
addTags: Dg,
|
|
18907
|
+
listFolders: Og,
|
|
18908
|
+
getThumbnails: jg,
|
|
18909
|
+
search: Sg,
|
|
18910
|
+
upload: Ng,
|
|
18911
|
+
copy: kg,
|
|
18912
|
+
move: Ag
|
|
18913
|
+
}, 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 = {
|
|
18694
18914
|
engine: null,
|
|
18695
18915
|
device: null,
|
|
18696
18916
|
no_cache: !1,
|
|
18697
18917
|
async: !1,
|
|
18698
18918
|
output: "json"
|
|
18699
|
-
},
|
|
18919
|
+
}, Kg = { q: null }, qg = {
|
|
18700
18920
|
tbs: null,
|
|
18701
18921
|
safe: "active",
|
|
18702
18922
|
nfpr: 0,
|
|
18703
18923
|
filter: 1
|
|
18704
18924
|
};
|
|
18705
|
-
function
|
|
18925
|
+
function Jg(e) {
|
|
18706
18926
|
let t = Ic(), n = Ic(!0), r = Lc(!0), i = {
|
|
18707
18927
|
location: t,
|
|
18708
18928
|
uule: null
|
|
@@ -18720,13 +18940,13 @@ function Hg(e) {
|
|
|
18720
18940
|
hl: r
|
|
18721
18941
|
};
|
|
18722
18942
|
return {
|
|
18723
|
-
[
|
|
18724
|
-
...
|
|
18943
|
+
[Rg]: {
|
|
18944
|
+
...Gg,
|
|
18725
18945
|
...i,
|
|
18726
18946
|
...o,
|
|
18727
|
-
...
|
|
18728
|
-
...
|
|
18729
|
-
engine:
|
|
18947
|
+
...qg,
|
|
18948
|
+
...Kg,
|
|
18949
|
+
engine: Rg,
|
|
18730
18950
|
ludocid: null,
|
|
18731
18951
|
lsig: null,
|
|
18732
18952
|
kgmid: null,
|
|
@@ -18735,29 +18955,29 @@ function Hg(e) {
|
|
|
18735
18955
|
start: null,
|
|
18736
18956
|
num: null
|
|
18737
18957
|
},
|
|
18738
|
-
[
|
|
18739
|
-
...
|
|
18958
|
+
[zg]: {
|
|
18959
|
+
...Gg,
|
|
18740
18960
|
...i,
|
|
18741
18961
|
...o,
|
|
18742
|
-
...
|
|
18743
|
-
...
|
|
18744
|
-
engine:
|
|
18962
|
+
...qg,
|
|
18963
|
+
...Kg,
|
|
18964
|
+
engine: zg,
|
|
18745
18965
|
chips: null,
|
|
18746
18966
|
ijn: null
|
|
18747
18967
|
},
|
|
18748
|
-
[
|
|
18749
|
-
...
|
|
18968
|
+
[Bg]: {
|
|
18969
|
+
...Gg,
|
|
18750
18970
|
...o,
|
|
18751
|
-
...
|
|
18752
|
-
engine:
|
|
18971
|
+
...Kg,
|
|
18972
|
+
engine: Bg,
|
|
18753
18973
|
cp: null,
|
|
18754
18974
|
client: null
|
|
18755
18975
|
},
|
|
18756
|
-
[
|
|
18757
|
-
...
|
|
18976
|
+
[Vg]: {
|
|
18977
|
+
...Gg,
|
|
18758
18978
|
...a,
|
|
18759
|
-
...
|
|
18760
|
-
engine:
|
|
18979
|
+
...Kg,
|
|
18980
|
+
engine: Vg,
|
|
18761
18981
|
data_type: null,
|
|
18762
18982
|
tz: null,
|
|
18763
18983
|
cat: null,
|
|
@@ -18765,73 +18985,73 @@ function Hg(e) {
|
|
|
18765
18985
|
date: null,
|
|
18766
18986
|
csv: null
|
|
18767
18987
|
},
|
|
18768
|
-
[
|
|
18769
|
-
...
|
|
18988
|
+
[Hg]: {
|
|
18989
|
+
...Gg,
|
|
18770
18990
|
...i,
|
|
18771
18991
|
...o,
|
|
18772
|
-
...
|
|
18773
|
-
...
|
|
18774
|
-
engine:
|
|
18992
|
+
...qg,
|
|
18993
|
+
...Kg,
|
|
18994
|
+
engine: Hg
|
|
18775
18995
|
},
|
|
18776
|
-
[
|
|
18777
|
-
...
|
|
18996
|
+
[Ug]: {
|
|
18997
|
+
...Gg,
|
|
18778
18998
|
...s,
|
|
18779
|
-
engine:
|
|
18999
|
+
engine: Ug
|
|
18780
19000
|
},
|
|
18781
|
-
[
|
|
18782
|
-
...
|
|
19001
|
+
[Wg]: {
|
|
19002
|
+
...Gg,
|
|
18783
19003
|
...s,
|
|
18784
|
-
engine:
|
|
19004
|
+
engine: Wg
|
|
18785
19005
|
}
|
|
18786
19006
|
}[e] ?? {};
|
|
18787
19007
|
}
|
|
18788
|
-
var
|
|
19008
|
+
var Yg = void 0;
|
|
18789
19009
|
typeof Sa == "function" && Sa((e) => {
|
|
18790
|
-
|
|
19010
|
+
Yg = e.scrape;
|
|
18791
19011
|
});
|
|
18792
|
-
function
|
|
19012
|
+
function Xg(e) {
|
|
18793
19013
|
let t = {};
|
|
18794
19014
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
18795
19015
|
return t;
|
|
18796
19016
|
}
|
|
18797
|
-
var
|
|
18798
|
-
function
|
|
18799
|
-
let t =
|
|
18800
|
-
return t.length === 0 ? null : (e &&
|
|
19017
|
+
var Zg = 0;
|
|
19018
|
+
function Qg(e = !1) {
|
|
19019
|
+
let t = Yg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
19020
|
+
return t.length === 0 ? null : (e && Zg++, Zg < t.length ? t[Zg] : null);
|
|
18801
19021
|
}
|
|
18802
|
-
var
|
|
19022
|
+
var $g = async (e, t) => {
|
|
18803
19023
|
let n = (n) => {
|
|
18804
|
-
let r =
|
|
18805
|
-
...
|
|
19024
|
+
let r = Xg({
|
|
19025
|
+
...Jg(t),
|
|
18806
19026
|
api_key: n,
|
|
18807
19027
|
q: e
|
|
18808
19028
|
});
|
|
18809
|
-
return console.log(
|
|
18810
|
-
}, r =
|
|
19029
|
+
return console.log(Lg, r), `${Lg}?${new URLSearchParams(r)}`;
|
|
19030
|
+
}, r = Qg();
|
|
18811
19031
|
for (; r;) try {
|
|
18812
19032
|
return await Ht(n(r));
|
|
18813
19033
|
} catch (e) {
|
|
18814
19034
|
if (e?.error === "quota_exceeded") {
|
|
18815
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
19035
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = Qg(!0);
|
|
18816
19036
|
continue;
|
|
18817
19037
|
}
|
|
18818
19038
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
18819
19039
|
}
|
|
18820
19040
|
return null;
|
|
18821
|
-
},
|
|
19041
|
+
}, e_ = async (e, t, n) => {
|
|
18822
19042
|
let r = `${Da}/${ct(t)}/${ct(e)}`, i = await n.read(r);
|
|
18823
19043
|
if (i) return i;
|
|
18824
|
-
let a = await
|
|
19044
|
+
let a = await $g(e, t);
|
|
18825
19045
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
18826
|
-
},
|
|
18827
|
-
googleSearch: async (t) =>
|
|
18828
|
-
googleImages: async (t) =>
|
|
18829
|
-
googleAutocomplete: async (t) =>
|
|
18830
|
-
googleTrends: async (t) =>
|
|
18831
|
-
googleMaps: async (t) =>
|
|
18832
|
-
googleMapsPhotos: async (t) =>
|
|
18833
|
-
googleMapsReviews: async (t) =>
|
|
18834
|
-
}),
|
|
19046
|
+
}, t_ = (e) => ({
|
|
19047
|
+
googleSearch: async (t) => e_(t, Rg, e),
|
|
19048
|
+
googleImages: async (t) => e_(t, zg, e),
|
|
19049
|
+
googleAutocomplete: async (t) => e_(t, Bg, e),
|
|
19050
|
+
googleTrends: async (t) => e_(t, Vg, e),
|
|
19051
|
+
googleMaps: async (t) => e_(t, Hg, e),
|
|
19052
|
+
googleMapsPhotos: async (t) => e_(t, Ug, e),
|
|
19053
|
+
googleMapsReviews: async (t) => e_(t, Wg, e)
|
|
19054
|
+
}), n_ = {
|
|
18835
19055
|
"+": "+",
|
|
18836
19056
|
"﹢": "+",
|
|
18837
19057
|
"-": "-",
|
|
@@ -18906,7 +19126,7 @@ var qg = async (e, t) => {
|
|
|
18906
19126
|
x: "x",
|
|
18907
19127
|
y: "y",
|
|
18908
19128
|
z: "z"
|
|
18909
|
-
},
|
|
19129
|
+
}, r_ = {
|
|
18910
19130
|
email: {
|
|
18911
19131
|
description: "Email: no spaces -> Lower/Trim",
|
|
18912
19132
|
transformations: [{
|
|
@@ -18952,7 +19172,7 @@ var qg = async (e, t) => {
|
|
|
18952
19172
|
transformations: [],
|
|
18953
19173
|
mask: ["toSlug"]
|
|
18954
19174
|
}
|
|
18955
|
-
},
|
|
19175
|
+
}, i_ = [
|
|
18956
19176
|
{
|
|
18957
19177
|
pattern: "email*",
|
|
18958
19178
|
use: "email"
|
|
@@ -18969,24 +19189,24 @@ var qg = async (e, t) => {
|
|
|
18969
19189
|
pattern: "date*",
|
|
18970
19190
|
use: "date"
|
|
18971
19191
|
}
|
|
18972
|
-
],
|
|
18973
|
-
function
|
|
18974
|
-
return e ? e.normalize("NFKC").replace(
|
|
19192
|
+
], a_ = new RegExp(Object.keys(n_).join("|"), "g");
|
|
19193
|
+
function o_(e) {
|
|
19194
|
+
return e ? e.normalize("NFKC").replace(a_, (e) => n_[e] ?? e) : "";
|
|
18975
19195
|
}
|
|
18976
|
-
var
|
|
19196
|
+
var s_ = class {
|
|
18977
19197
|
config;
|
|
18978
19198
|
matches;
|
|
18979
19199
|
constructor(e = {}, t = []) {
|
|
18980
19200
|
this.config = {
|
|
18981
|
-
...
|
|
19201
|
+
...r_,
|
|
18982
19202
|
...e
|
|
18983
|
-
}, this.matches = [...
|
|
19203
|
+
}, this.matches = [...i_, ...t];
|
|
18984
19204
|
}
|
|
18985
19205
|
apply(e, t, n = !1) {
|
|
18986
19206
|
let r = this.config[e];
|
|
18987
19207
|
if (!r) return n ? Pt(t) : t;
|
|
18988
19208
|
let i = t;
|
|
18989
|
-
i =
|
|
19209
|
+
i = o_(String(i ?? ""));
|
|
18990
19210
|
let a = r.exclusions;
|
|
18991
19211
|
if (Array.isArray(a) && a.length) {
|
|
18992
19212
|
let e = String(i).toLowerCase();
|
|
@@ -19045,7 +19265,7 @@ var t_ = class {
|
|
|
19045
19265
|
};
|
|
19046
19266
|
//#endregion
|
|
19047
19267
|
//#region src/libs/csv.ts
|
|
19048
|
-
function
|
|
19268
|
+
function c_(e, t) {
|
|
19049
19269
|
let n = Oe.parse(e, {
|
|
19050
19270
|
header: !0,
|
|
19051
19271
|
skipEmptyLines: !0,
|
|
@@ -19058,6 +19278,6 @@ function n_(e, t) {
|
|
|
19058
19278
|
};
|
|
19059
19279
|
}
|
|
19060
19280
|
//#endregion
|
|
19061
|
-
export { Xc as AIProvider,
|
|
19281
|
+
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 };
|
|
19062
19282
|
|
|
19063
19283
|
//# sourceMappingURL=index.mjs.map
|