@llmnative/react 1.11.0 → 1.12.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.css +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -229
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/ui/Gallery.d.ts +15 -1
- package/dist/types/src/components/widgets/grid-core/GridGalleryView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/types.d.ts +11 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { ArrowDown as E, ArrowUp as D, ArrowUpDown as O, GripVertical as k } fro
|
|
|
8
8
|
import * as A from "@phosphor-icons/react";
|
|
9
9
|
import { createPortal as j, flushSync as M } from "react-dom";
|
|
10
10
|
import { deleteApp as N, getApp as P, getApps as F, initializeApp as I } from "firebase/app";
|
|
11
|
-
import { GoogleAuthProvider as L, OAuthProvider as R, getAdditionalUserInfo as z, getAuth as B, inMemoryPersistence as V, onAuthStateChanged as H, onIdTokenChanged as U, setPersistence as W, signInAnonymously as ee, signInWithCredential as G, signInWithCustomToken as
|
|
11
|
+
import { GoogleAuthProvider as L, OAuthProvider as R, getAdditionalUserInfo as z, getAuth as B, inMemoryPersistence as V, onAuthStateChanged as H, onIdTokenChanged as U, setPersistence as W, signInAnonymously as ee, signInWithCredential as G, signInWithCustomToken as te, signInWithEmailAndPassword as ne, signInWithPopup as re, signOut as K } from "firebase/auth";
|
|
12
12
|
import { addDoc as ie, collection as ae, deleteDoc as oe, doc as se, getCountFromServer as ce, getDoc as le, getDocs as ue, getFirestore as de, onSnapshot as fe, orderBy as q, query as pe, setDoc as me, terminate as he, updateDoc as ge, where as _e, writeBatch as ve } from "firebase/firestore";
|
|
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";
|
|
@@ -3109,10 +3109,7 @@ var Tr = new dr(), Q = ({ name: e, size: n = 16, className: r, style: i, provide
|
|
|
3109
3109
|
}), r);
|
|
3110
3110
|
return /* @__PURE__ */ t.createElement(Z, { className: u }, c, /* @__PURE__ */ t.createElement("span", {
|
|
3111
3111
|
title: s ? a : void 0,
|
|
3112
|
-
style: s ? {
|
|
3113
|
-
cursor: "not-allowed",
|
|
3114
|
-
display: "inline-flex"
|
|
3115
|
-
} : void 0
|
|
3112
|
+
style: s ? { cursor: "not-allowed" } : void 0
|
|
3116
3113
|
}, /* @__PURE__ */ t.createElement(Zn, { badge: i }, v)), l);
|
|
3117
3114
|
}, Ur = ({ label: e = void 0, before: n = void 0, after: r = void 0, wrapperClassName: i = void 0, className: a = void 0 }) => {
|
|
3118
3115
|
let o = S(), s = Y("button"), c = Fn("common");
|
|
@@ -3636,16 +3633,16 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3636
3633
|
P.current = window.setTimeout(() => {
|
|
3637
3634
|
a?.();
|
|
3638
3635
|
}, e);
|
|
3639
|
-
},
|
|
3636
|
+
}, te = or(A, W, W), ne = T ? { right: T } : {}, re = {
|
|
3640
3637
|
...or(A, O.Modal.motion?.backdrop ?? "fade", O.Modal.motion?.backdrop ?? "fade"),
|
|
3641
3638
|
cursor: S && a ? "pointer" : "default",
|
|
3642
3639
|
...C === void 0 ? {} : { zIndex: C - 10 },
|
|
3643
|
-
...
|
|
3644
|
-
},
|
|
3640
|
+
...ne
|
|
3641
|
+
}, K = {
|
|
3645
3642
|
cursor: S && a ? "pointer" : "default",
|
|
3646
3643
|
...C === void 0 ? {} : { zIndex: C },
|
|
3647
3644
|
...w ? { pointerEvents: "none" } : {},
|
|
3648
|
-
...
|
|
3645
|
+
...ne
|
|
3649
3646
|
}, ie = w ? {
|
|
3650
3647
|
transform: l === "left" ? "scale(0.94) translateX(-14px)" : l === "right" ? "scale(0.94) translateX(14px)" : l === "bottom" ? "scale(0.94) translateY(14px)" : l === "top" ? "scale(0.94) translateY(-14px)" : "scale(0.94)",
|
|
3651
3648
|
transformOrigin: l === "left" ? "left center" : l === "right" ? "right center" : l === "bottom" ? "bottom center" : l === "top" ? "top center" : "center",
|
|
@@ -3654,17 +3651,17 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3654
3651
|
} : {}, ae = i !== !1 && (i || o || s || d && a), oe = "inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
3655
3652
|
return j(/* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
3656
3653
|
className: U,
|
|
3657
|
-
style:
|
|
3654
|
+
style: K,
|
|
3658
3655
|
onClick: () => {
|
|
3659
3656
|
S && a && G();
|
|
3660
3657
|
}
|
|
3661
3658
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
3662
3659
|
className: H.dialogClass,
|
|
3663
3660
|
style: {
|
|
3664
|
-
...
|
|
3661
|
+
...te,
|
|
3665
3662
|
...ie,
|
|
3666
3663
|
...C === void 0 ? {} : { zIndex: C },
|
|
3667
|
-
...V === "right" ?
|
|
3664
|
+
...V === "right" ? ne : {}
|
|
3668
3665
|
},
|
|
3669
3666
|
onClick: (e) => e.stopPropagation()
|
|
3670
3667
|
}, f, /* @__PURE__ */ t.createElement("div", { className: H.contentClass }, (r || n || u || a || E) && /* @__PURE__ */ t.createElement("div", { className: H.headerClassName }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0" }, n && /* @__PURE__ */ t.createElement("h3", { className: H.titleClassName }, n), n && r && /* @__PURE__ */ t.createElement("div", { className: H.subtitleClassName }, r), !n && r && (typeof r == "string" ? /* @__PURE__ */ t.createElement("h3", { className: H.titleClassName }, r) : r)), (u || a || E) && /* @__PURE__ */ t.createElement("div", { className: "ml-auto flex shrink-0 items-center gap-1" }, u && /* @__PURE__ */ t.createElement("button", {
|
|
@@ -3709,7 +3706,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3709
3706
|
"data-rf-modal-backdrop": "",
|
|
3710
3707
|
"aria-hidden": "true",
|
|
3711
3708
|
className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm",
|
|
3712
|
-
style:
|
|
3709
|
+
style: re,
|
|
3713
3710
|
onClick: () => {
|
|
3714
3711
|
S && a && G();
|
|
3715
3712
|
}
|
|
@@ -3841,7 +3838,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3841
3838
|
}, H(n) ? /* @__PURE__ */ t.createElement(t.Fragment, null, n.icon && /* @__PURE__ */ t.createElement(Q, {
|
|
3842
3839
|
name: n.icon,
|
|
3843
3840
|
className: n.text ? "mr-2" : void 0
|
|
3844
|
-
}), n.text) : n) : null, W = m ?? w.Dropdown.wrapperClassName ?? (g || _ ? "flex items-center gap-2" : void 0), ee = N === "top" ? "bottom-full mb-1" : "top-full mt-1", G = d === "end" ? "right-0" : "left-0",
|
|
3841
|
+
}), n.text) : n) : null, W = m ?? w.Dropdown.wrapperClassName ?? (g || _ ? "flex items-center gap-2" : void 0), ee = N === "top" ? "bottom-full mb-1" : "top-full mt-1", G = d === "end" ? "right-0" : "left-0", te = /* @__PURE__ */ t.createElement(Li.Provider, { value: {
|
|
3845
3842
|
closeOnSelect: l,
|
|
3846
3843
|
close: () => V(!1)
|
|
3847
3844
|
} }, /* @__PURE__ */ t.createElement("div", {
|
|
@@ -3862,11 +3859,11 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3862
3859
|
onClick: (e) => {
|
|
3863
3860
|
e.stopPropagation();
|
|
3864
3861
|
}
|
|
3865
|
-
}, i && /* @__PURE__ */ t.createElement("div", { className: X("px-2 py-1.5 text-sm font-semibold", x || w.Dropdown.headerClassName) }, i, /* @__PURE__ */ t.createElement(Ui, null)), e, a && /* @__PURE__ */ t.createElement("div", { className: S || w.Dropdown.footerClassName }, /* @__PURE__ */ t.createElement(Ui, null), a))),
|
|
3862
|
+
}, i && /* @__PURE__ */ t.createElement("div", { className: X("px-2 py-1.5 text-sm font-semibold", x || w.Dropdown.headerClassName) }, i, /* @__PURE__ */ t.createElement(Ui, null)), e, a && /* @__PURE__ */ t.createElement("div", { className: S || w.Dropdown.footerClassName }, /* @__PURE__ */ t.createElement(Ui, null), a))), ne = !u && p === "fixed" && typeof document < "u";
|
|
3866
3863
|
return /* @__PURE__ */ t.createElement(Z, { className: W }, g, /* @__PURE__ */ t.createElement("div", {
|
|
3867
3864
|
ref: D,
|
|
3868
3865
|
className: X(u ? "inline-block text-left" : "relative inline-block text-left", h || w.Dropdown.className)
|
|
3869
|
-
}, U,
|
|
3866
|
+
}, U, ne ? j(te, document.body) : te), _);
|
|
3870
3867
|
};
|
|
3871
3868
|
function zi({ loadItems: e, getItemId: n, renderItem: r, onSelect: i, selectedId: a = void 0, searchPlaceholder: o = void 0, emptyState: s = void 0, loadingState: c = void 0, errorState: l = void 0, debounceMs: u = 200, closeOnSelect: d = !0, inputClassName: f = void 0, selectedClassName: p = void 0, header: m = void 0, open: h = void 0, defaultOpen: g = !1, onOpenChange: _ = void 0, footer: v = void 0, headerClassName: y = void 0, staticOpen: b = !1, ...x }) {
|
|
3872
3869
|
let S = Fn("common"), [C, w] = t.useState(g), [T, E] = t.useState(""), [D, O] = t.useState([]), [k, A] = t.useState(!1), [j, M] = t.useState(null), N = t.useRef(0), P = b || (h ?? C), F = t.useCallback((e) => {
|
|
@@ -4659,7 +4656,7 @@ var Oa = (e) => Da?.[e], ka = "scrape", Aa = "[DEFAULT]", ja = /* @__PURE__ */ n
|
|
|
4659
4656
|
let t = Fa();
|
|
4660
4657
|
if (!t) return !1;
|
|
4661
4658
|
try {
|
|
4662
|
-
return await W(t, V), await
|
|
4659
|
+
return await W(t, V), await te(t, e), !0;
|
|
4663
4660
|
} catch (e) {
|
|
4664
4661
|
let n = t.app.options?.apiKey;
|
|
4665
4662
|
return console.error("Firebase custom token sign-in error: ", e, `— app "${t.app.name}" options.apiKey: ${n ? `${n.slice(0, 6)}… (len ${n.length})` : String(n)}`), !1;
|
|
@@ -6691,11 +6688,11 @@ var Ws = (e, t, n) => {
|
|
|
6691
6688
|
} });
|
|
6692
6689
|
}, 0), r;
|
|
6693
6690
|
});
|
|
6694
|
-
},
|
|
6691
|
+
}, te = u(), ne = `${te}-options`;
|
|
6695
6692
|
return /* @__PURE__ */ t.createElement(Z, { className: A || M.Autocomplete.wrapperClassName }, d && /* @__PURE__ */ t.createElement(Ns, {
|
|
6696
6693
|
label: d,
|
|
6697
6694
|
required: o,
|
|
6698
|
-
htmlFor:
|
|
6695
|
+
htmlFor: te
|
|
6699
6696
|
}), /* @__PURE__ */ t.createElement(Z, { className: g || _ ? X(os, "flex-nowrap") : "" }, g && /* @__PURE__ */ t.createElement(Ks, { side: "before" }, g), /* @__PURE__ */ t.createElement("div", { className: X(is, "h-auto min-h-9 flex-wrap items-center gap-1 py-1.5 px-2", g && "rounded-l-none", _ && "rounded-r-none") }, P.map((e) => /* @__PURE__ */ t.createElement("span", {
|
|
6700
6697
|
className: "inline-flex items-center gap-1 rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
6701
6698
|
key: e
|
|
@@ -6704,19 +6701,19 @@ var Ws = (e, t, n) => {
|
|
|
6704
6701
|
className: "ml-0.5 opacity-60 transition-opacity hover:opacity-100",
|
|
6705
6702
|
onClick: () => G(e)
|
|
6706
6703
|
}, "×"))), (!i || P.length < i) && /* @__PURE__ */ t.createElement("input", {
|
|
6707
|
-
id:
|
|
6704
|
+
id: te,
|
|
6708
6705
|
type: "text",
|
|
6709
6706
|
className: X("min-w-[120px] flex-1 border-none bg-transparent text-sm outline-none placeholder:text-muted-foreground", w || M.Autocomplete.className),
|
|
6710
6707
|
required: o && P.length < (r || 0),
|
|
6711
6708
|
disabled: c || s && !St(O),
|
|
6712
6709
|
placeholder: E ? m ?? "Type or press Enter to create..." : m,
|
|
6713
6710
|
title: f,
|
|
6714
|
-
list:
|
|
6711
|
+
list: ne,
|
|
6715
6712
|
onChange: W,
|
|
6716
6713
|
onKeyDown: ee
|
|
6717
|
-
})), /* @__PURE__ */ t.createElement("datalist", { id:
|
|
6714
|
+
})), /* @__PURE__ */ t.createElement("datalist", { id: ne }, H.map((e, n) => /* @__PURE__ */ t.createElement("option", {
|
|
6718
6715
|
value: e.value,
|
|
6719
|
-
key: `${
|
|
6716
|
+
key: `${te}-${n}`
|
|
6720
6717
|
}, e.label))), _ && /* @__PURE__ */ t.createElement(Ks, { side: "after" }, _)), j ? /* @__PURE__ */ t.createElement(hs, { message: j }) : v && /* @__PURE__ */ t.createElement("div", { className: "mt-1 text-xs text-muted-foreground" }, v));
|
|
6721
6718
|
}, Ys = ({ name: e, defaultValue: n = void 0, onChange: r = void 0, required: i = !1, readOnlyAfterSet: a = !1, disabled: o = !1, label: s = void 0, title: c = void 0, before: d = void 0, after: f = void 0, feedback: m = void 0, options: g = [], optionsSource: _ = void 0, order: v = void 0, inheritWrapperClassName: y = !0, wrapperClassName: b = void 0, className: x = void 0, validator: S = void 0, itemClassName: C = void 0 }) => {
|
|
6722
6719
|
let { value: w, handleChange: T, formWrapClass: E } = Dd({
|
|
@@ -8034,13 +8031,13 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8034
8031
|
return C((e) => o ? [...e, t] : [t]), H(""), W(void 0), B(!1), !0;
|
|
8035
8032
|
}, G = () => {
|
|
8036
8033
|
B(!1), H(""), W(void 0);
|
|
8037
|
-
},
|
|
8034
|
+
}, te = (e, t) => {
|
|
8038
8035
|
let n = e.currentTarget, r = n.naturalWidth > 0 && n.naturalHeight > 0 && (n.naturalWidth < d || n.naturalHeight < u);
|
|
8039
8036
|
R((e) => {
|
|
8040
8037
|
let n = new Set(e);
|
|
8041
8038
|
return r ? n.add(t) : n.delete(t), n;
|
|
8042
8039
|
});
|
|
8043
|
-
},
|
|
8040
|
+
}, ne = ({ scales: e }) => {
|
|
8044
8041
|
if (!e) return;
|
|
8045
8042
|
let n = Object.keys(e);
|
|
8046
8043
|
return n.length === 0 ? null : n.map((n) => /* @__PURE__ */ t.createElement(Qn, { key: n }, /* @__PURE__ */ t.createElement("a", {
|
|
@@ -8082,7 +8079,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8082
8079
|
src: Nc(e),
|
|
8083
8080
|
alt: `preview-${n}`,
|
|
8084
8081
|
className: `absolute inset-0 w-full h-full ${L.has(e.key) ? "object-contain p-1" : "object-cover"}`,
|
|
8085
|
-
onLoad: (t) =>
|
|
8082
|
+
onLoad: (t) => te(t, e.key)
|
|
8086
8083
|
}), /* @__PURE__ */ t.createElement("div", {
|
|
8087
8084
|
className: "absolute inset-0 bg-black/55 backdrop-blur-[1px] flex flex-col items-center justify-end pb-2 gap-1 transition-opacity",
|
|
8088
8085
|
style: { display: F === n ? "flex" : "none" }
|
|
@@ -8110,7 +8107,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8110
8107
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
8111
8108
|
name: "x",
|
|
8112
8109
|
className: "w-4 h-4"
|
|
8113
|
-
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(
|
|
8110
|
+
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(ne, { scales: e.variants })))) : /* @__PURE__ */ t.createElement($o, {
|
|
8114
8111
|
max: 100,
|
|
8115
8112
|
min: 0,
|
|
8116
8113
|
value: e.progress,
|
|
@@ -8856,7 +8853,7 @@ function Wl(e) {
|
|
|
8856
8853
|
return e ? (e.includes("/") ? e.split("/").pop() : e) || e : null;
|
|
8857
8854
|
}
|
|
8858
8855
|
function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, onStop: o, disabled: c = !1, onSubmit: d, attachments: f = !1, commands: p, commandsTrigger: g, models: _ = [], selectedModel: v, onModelChange: y, modelPlaceholder: b, showSettings: x = !1, defaultRole: S = "", defaultVoice: C = "", defaultStyle: w = "", defaultLanguage: T = "", defaultTemperature: E, actions: D, minHeight: O = 96, maxHeight: k = 220, wrapperClassName: A, className: j }) {
|
|
8859
|
-
let M = Y("prompt"), N = Fn("prompt"), P = m(null), F = m(null), I = u(), [L, R] = h([]), [z, B] = h(!1), V = m(0), [H, U] = h(!1), [W, ee] = h(S), [G,
|
|
8856
|
+
let M = Y("prompt"), N = Fn("prompt"), P = m(null), F = m(null), I = u(), [L, R] = h([]), [z, B] = h(!1), V = m(0), [H, U] = h(!1), [W, ee] = h(S), [G, te] = h(C), [ne, re] = h(w), [K, ie] = h(T), [ae, oe] = h(E);
|
|
8860
8857
|
l(() => {
|
|
8861
8858
|
a || U(!1);
|
|
8862
8859
|
}, [a]), l(() => () => {
|
|
@@ -8916,8 +8913,8 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
8916
8913
|
...x ? {
|
|
8917
8914
|
role: W,
|
|
8918
8915
|
voice: G,
|
|
8919
|
-
style:
|
|
8920
|
-
language:
|
|
8916
|
+
style: ne,
|
|
8917
|
+
language: K,
|
|
8921
8918
|
temperature: ae
|
|
8922
8919
|
} : {}
|
|
8923
8920
|
}), L.forEach(({ objectUrl: e }) => URL.revokeObjectURL(e)), R([]));
|
|
@@ -9052,9 +9049,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9052
9049
|
placement: "top",
|
|
9053
9050
|
position: "start",
|
|
9054
9051
|
triggerClassName: Vl
|
|
9055
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9052
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => te("") }, N.defaultOption), Jc.getVoices().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9056
9053
|
key: e,
|
|
9057
|
-
onClick: () =>
|
|
9054
|
+
onClick: () => te(e)
|
|
9058
9055
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9059
9056
|
trigger: {
|
|
9060
9057
|
icon: "feather",
|
|
@@ -9063,9 +9060,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9063
9060
|
placement: "top",
|
|
9064
9061
|
position: "start",
|
|
9065
9062
|
triggerClassName: Vl
|
|
9066
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9063
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => re("") }, N.defaultOption), Jc.getStyles().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9067
9064
|
key: e,
|
|
9068
|
-
onClick: () =>
|
|
9065
|
+
onClick: () => re(e)
|
|
9069
9066
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9070
9067
|
trigger: {
|
|
9071
9068
|
icon: "thermometer",
|
|
@@ -9235,12 +9232,12 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9235
9232
|
let { handleChange: C, record: w } = Dd({
|
|
9236
9233
|
name: e,
|
|
9237
9234
|
subscribeToFullRecord: !0
|
|
9238
|
-
}), T = Y("prompt"), E = Fn("prompt"), D = n || e, [O, k] = h(!1), [A, j] = h(o?.value ?? ""), [M, N] = h(!1), [P, F] = h(null), I = $c(), L = el(), { modelOptions: R } = eu(), z = typeof localStorage < "u" ? localStorage.getItem("prompt.model") : null, B = z && R.some((e) => e.value === z) ? z : "", V = t.useMemo(() => lu(r?.prompt, o), [o, r?.prompt]), H = V.model || B, U = u(), W = tu(H, !!m), ee = !W.configured || !m && !H, [G,
|
|
9235
|
+
}), T = Y("prompt"), E = Fn("prompt"), D = n || e, [O, k] = h(!1), [A, j] = h(o?.value ?? ""), [M, N] = h(!1), [P, F] = h(null), I = $c(), L = el(), { modelOptions: R } = eu(), z = typeof localStorage < "u" ? localStorage.getItem("prompt.model") : null, B = z && R.some((e) => e.value === z) ? z : "", V = t.useMemo(() => lu(r?.prompt, o), [o, r?.prompt]), H = V.model || B, U = u(), W = tu(H, !!m), ee = !W.configured || !m && !H, [G, te] = h(null), ne = !G && !W.configured ? g?.({
|
|
9239
9236
|
mode: "run",
|
|
9240
9237
|
providerId: W.providerId,
|
|
9241
9238
|
reason: W.reason,
|
|
9242
9239
|
configured: W.configured
|
|
9243
|
-
}) : null,
|
|
9240
|
+
}) : null, re = t.useMemo(() => {
|
|
9244
9241
|
if (!A) return "";
|
|
9245
9242
|
let e = {
|
|
9246
9243
|
...w,
|
|
@@ -9251,7 +9248,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9251
9248
|
A,
|
|
9252
9249
|
w,
|
|
9253
9250
|
_
|
|
9254
|
-
]),
|
|
9251
|
+
]), K = re !== A, ie = (e, t) => C?.({ target: {
|
|
9255
9252
|
name: e,
|
|
9256
9253
|
value: t
|
|
9257
9254
|
} }), ae = x?.map((e) => e.key === "tokenUsage" && !e.content ? {
|
|
@@ -9275,7 +9272,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9275
9272
|
noProvider: E.noProvider,
|
|
9276
9273
|
noResponse: E.noResponse
|
|
9277
9274
|
}), c = Date.now() - a;
|
|
9278
|
-
if (
|
|
9275
|
+
if (te(null), C?.({ target: {
|
|
9279
9276
|
name: e + ".value",
|
|
9280
9277
|
value: s
|
|
9281
9278
|
} }), t.role !== void 0 && ie(e + ".prompt.role", t.role), t.voice !== void 0 && ie(e + ".prompt.voice", t.voice), t.style !== void 0 && ie(e + ".prompt.style", t.style), t.language !== void 0 && ie(e + ".prompt.language", t.language), S && S.length > 0) {
|
|
@@ -9290,7 +9287,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9290
9287
|
});
|
|
9291
9288
|
}
|
|
9292
9289
|
} catch (e) {
|
|
9293
|
-
|
|
9290
|
+
te(Ql(e, E.runFailed));
|
|
9294
9291
|
}
|
|
9295
9292
|
};
|
|
9296
9293
|
return /* @__PURE__ */ t.createElement(Z, { className: f || T.Prompt.wrapperClassName }, /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2" }, l && /* @__PURE__ */ t.createElement("div", { className: "shrink-0" }, l), /* @__PURE__ */ t.createElement("div", { className: `${ql} min-w-0 flex-1` }, D && /* @__PURE__ */ t.createElement($l, {
|
|
@@ -9318,7 +9315,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9318
9315
|
className: `${p || T.Prompt.className} ${su}`,
|
|
9319
9316
|
minHeight: s,
|
|
9320
9317
|
maxHeight: c
|
|
9321
|
-
}),
|
|
9318
|
+
}), K && M && /* @__PURE__ */ t.createElement("div", { className: "border-t border-input px-4 py-3 bg-muted/20" }, /* @__PURE__ */ t.createElement("p", { className: "whitespace-pre-wrap text-sm text-foreground/70" }, re)), K && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-end border-t border-input px-2 py-1" }, /* @__PURE__ */ t.createElement("button", {
|
|
9322
9319
|
type: "button",
|
|
9323
9320
|
title: M ? E.hidePreview : E.showPreview,
|
|
9324
9321
|
className: `${cu} flex items-center justify-center ${M ? "bg-muted text-foreground" : ""}`,
|
|
@@ -9365,7 +9362,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9365
9362
|
maxHeight: c,
|
|
9366
9363
|
className: p || T.Prompt.className,
|
|
9367
9364
|
wrapperClassName: ""
|
|
9368
|
-
}), (G || !W.configured) && (
|
|
9365
|
+
}), (G || !W.configured) && (ne ? /* @__PURE__ */ t.createElement("div", { className: "mt-1" }, ne) : /* @__PURE__ */ t.createElement("span", { className: "mt-1 flex min-w-0 items-center gap-1 text-xs text-warning" }, /* @__PURE__ */ t.createElement(Q, {
|
|
9369
9366
|
name: "triangle-alert",
|
|
9370
9367
|
size: 13,
|
|
9371
9368
|
className: "shrink-0"
|
|
@@ -9621,16 +9618,16 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9621
9618
|
editorContext: null
|
|
9622
9619
|
}), H = m(j ?? ""), U = m(B);
|
|
9623
9620
|
U.current = B;
|
|
9624
|
-
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]),
|
|
9621
|
+
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]), te = t.useMemo(() => (S ?? []).map((e) => ({
|
|
9625
9622
|
key: e.name,
|
|
9626
9623
|
label: `${W ?? "/"}${e.name}`,
|
|
9627
9624
|
value: e.name,
|
|
9628
9625
|
icon: e.icon,
|
|
9629
9626
|
description: e.description,
|
|
9630
9627
|
group: e.group
|
|
9631
|
-
})), [S, W]),
|
|
9628
|
+
})), [S, W]), ne = t.useMemo(() => {
|
|
9632
9629
|
let e = [], n;
|
|
9633
|
-
return
|
|
9630
|
+
return te.forEach((r) => {
|
|
9634
9631
|
r.group !== n && (n = r.group, r.group && e.push(/* @__PURE__ */ t.createElement(Bl.Heading, { key: `group:${r.group}` }, r.group))), e.push(/* @__PURE__ */ t.createElement(Bl.Item, {
|
|
9635
9632
|
key: r.key,
|
|
9636
9633
|
label: r.label,
|
|
@@ -9639,17 +9636,17 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9639
9636
|
description: r.description
|
|
9640
9637
|
}));
|
|
9641
9638
|
}), e;
|
|
9642
|
-
}, [
|
|
9639
|
+
}, [te]);
|
|
9643
9640
|
l(() => {
|
|
9644
9641
|
I.current || (H.current = j ?? "");
|
|
9645
9642
|
}, [j]);
|
|
9646
|
-
let
|
|
9643
|
+
let re = s((t) => {
|
|
9647
9644
|
H.current = t, M({ target: {
|
|
9648
9645
|
name: e,
|
|
9649
9646
|
value: t
|
|
9650
9647
|
} });
|
|
9651
|
-
}, [M, e]),
|
|
9652
|
-
|
|
9648
|
+
}, [M, e]), K = m(re);
|
|
9649
|
+
K.current = re;
|
|
9653
9650
|
let ie = s(() => {
|
|
9654
9651
|
V({
|
|
9655
9652
|
open: !1,
|
|
@@ -9717,7 +9714,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9717
9714
|
n.language,
|
|
9718
9715
|
r,
|
|
9719
9716
|
n.EditorView.updateListener.of((e) => {
|
|
9720
|
-
e.docChanged &&
|
|
9717
|
+
e.docChanged && K.current(e.state.doc.toString());
|
|
9721
9718
|
}),
|
|
9722
9719
|
...x ?? []
|
|
9723
9720
|
];
|
|
@@ -9825,7 +9822,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9825
9822
|
required: p,
|
|
9826
9823
|
htmlFor: O,
|
|
9827
9824
|
className: v
|
|
9828
|
-
}), /* @__PURE__ */ t.createElement("div", { className: X(E || D ? os : "", A.fill && "flex-1 min-h-0 flex flex-col") }, E && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-md rounded-r-none border-r-0") }, E), W &&
|
|
9825
|
+
}), /* @__PURE__ */ t.createElement("div", { className: X(E || D ? os : "", A.fill && "flex-1 min-h-0 flex flex-col") }, E && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-md rounded-r-none border-r-0") }, E), W && te.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
9829
9826
|
ref: L,
|
|
9830
9827
|
className: X(A.fill && "flex-1 min-h-0 flex flex-col"),
|
|
9831
9828
|
trigger: W,
|
|
@@ -9840,7 +9837,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9840
9837
|
onSelect: (e, t) => {
|
|
9841
9838
|
ae(e, t);
|
|
9842
9839
|
}
|
|
9843
|
-
},
|
|
9840
|
+
}, ne, se) : se, D && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-none rounded-r-md border-l-0") }, D)), P && /* @__PURE__ */ t.createElement(hs, { message: P }), _ && /* @__PURE__ */ t.createElement("p", { className: "mt-1 text-xs text-muted-foreground" }, _));
|
|
9844
9841
|
}, Nu = () => Promise.all([
|
|
9845
9842
|
import("@tiptap/react"),
|
|
9846
9843
|
import("@tiptap/react/menus"),
|
|
@@ -10467,19 +10464,19 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10467
10464
|
a
|
|
10468
10465
|
] : a;
|
|
10469
10466
|
}
|
|
10470
|
-
}), { Table: A, TableRow: j, TableHeader: M, TableCell: N } = e[6], P = e[7].default, F = e[8].default, [I, L] = h(!1), [R, z] = h(""), [B, V] = h([]), [H, U] = h(null), [, W] = t.useReducer((e) => e + 1, 0), ee = m(null), G = m(null), [
|
|
10467
|
+
}), { Table: A, TableRow: j, TableHeader: M, TableCell: N } = e[6], P = e[7].default, F = e[8].default, [I, L] = h(!1), [R, z] = h(""), [B, V] = h([]), [H, U] = h(null), [, W] = t.useReducer((e) => e + 1, 0), ee = m(null), G = m(null), [te, ne] = h({
|
|
10471
10468
|
open: !1,
|
|
10472
10469
|
query: "",
|
|
10473
10470
|
anchorPosition: null,
|
|
10474
10471
|
editorContext: null
|
|
10475
|
-
}),
|
|
10476
|
-
|
|
10477
|
-
let
|
|
10472
|
+
}), re = m(te);
|
|
10473
|
+
re.current = te;
|
|
10474
|
+
let K = x?.length ? S ?? "/" : void 0, ie = (x?.length ?? 0) >= 10, ae = t.useMemo(() => new Map((x ?? []).map((e) => [e.name, e])), [x]), oe = t.useMemo(() => (x ?? []).map((e) => ({
|
|
10478
10475
|
key: e.name,
|
|
10479
|
-
label: `${
|
|
10476
|
+
label: `${K ?? "/"}${e.name}`,
|
|
10480
10477
|
value: e.name,
|
|
10481
10478
|
icon: e.icon
|
|
10482
|
-
})), [x,
|
|
10479
|
+
})), [x, K]), se = g?.srcsetWidths === void 0 ? [400, 800] : g.srcsetWidths, ce = lc(), le = Dc({
|
|
10483
10480
|
uploadPath: g?.path,
|
|
10484
10481
|
srcsetWidths: se,
|
|
10485
10482
|
onFileReady: (e) => {
|
|
@@ -10495,7 +10492,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10495
10492
|
maxHeight: p,
|
|
10496
10493
|
paddingOffset: 16
|
|
10497
10494
|
}), de = s(() => {
|
|
10498
|
-
|
|
10495
|
+
ne({
|
|
10499
10496
|
open: !1,
|
|
10500
10497
|
query: "",
|
|
10501
10498
|
anchorPosition: null,
|
|
@@ -10574,7 +10571,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10574
10571
|
return !1;
|
|
10575
10572
|
},
|
|
10576
10573
|
handleKeyDown(e, t) {
|
|
10577
|
-
if (!
|
|
10574
|
+
if (!re.current.open) return !1;
|
|
10578
10575
|
switch (t.key) {
|
|
10579
10576
|
case "ArrowDown": return t.preventDefault(), G.current?.moveNext(), !0;
|
|
10580
10577
|
case "ArrowUp": return t.preventDefault(), G.current?.movePrev(), !0;
|
|
@@ -10600,32 +10597,32 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10600
10597
|
q.off("selectionUpdate", W);
|
|
10601
10598
|
};
|
|
10602
10599
|
}, [q, ue.adjustedMinHeight]), l(() => {
|
|
10603
|
-
if (!q || !
|
|
10604
|
-
|
|
10600
|
+
if (!q || !K || I) {
|
|
10601
|
+
re.current.open && de();
|
|
10605
10602
|
return;
|
|
10606
10603
|
}
|
|
10607
10604
|
let e = () => {
|
|
10608
10605
|
if (!q.isFocused) {
|
|
10609
|
-
|
|
10606
|
+
re.current.open && de();
|
|
10610
10607
|
return;
|
|
10611
10608
|
}
|
|
10612
10609
|
let e = q.state.selection;
|
|
10613
10610
|
if (!e.empty) {
|
|
10614
|
-
|
|
10611
|
+
re.current.open && de();
|
|
10615
10612
|
return;
|
|
10616
10613
|
}
|
|
10617
10614
|
let { $from: t } = e, n = t.parent;
|
|
10618
10615
|
if (!n.isTextblock) {
|
|
10619
|
-
|
|
10616
|
+
re.current.open && de();
|
|
10620
10617
|
return;
|
|
10621
10618
|
}
|
|
10622
|
-
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i,
|
|
10619
|
+
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i, K);
|
|
10623
10620
|
if (!a) {
|
|
10624
|
-
|
|
10621
|
+
re.current.open && de();
|
|
10625
10622
|
return;
|
|
10626
10623
|
}
|
|
10627
|
-
let o = q.view.coordsAtPos(e.from), s = fe(q,
|
|
10628
|
-
!o || !s ||
|
|
10624
|
+
let o = q.view.coordsAtPos(e.from), s = fe(q, K);
|
|
10625
|
+
!o || !s || ne({
|
|
10629
10626
|
open: !0,
|
|
10630
10627
|
query: a.query,
|
|
10631
10628
|
anchorPosition: {
|
|
@@ -10642,7 +10639,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10642
10639
|
de,
|
|
10643
10640
|
q,
|
|
10644
10641
|
fe,
|
|
10645
|
-
|
|
10642
|
+
K,
|
|
10646
10643
|
I
|
|
10647
10644
|
]);
|
|
10648
10645
|
let me = s(async (e, t) => {
|
|
@@ -10863,15 +10860,15 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10863
10860
|
style: ue.wrapperStyle,
|
|
10864
10861
|
className: X("w-full px-3 py-2 text-sm", "[&_.ProseMirror]:outline-none", "[&_.ProseMirror_p]:my-1", "[&_.ProseMirror_h1]:my-2 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold", "[&_.ProseMirror_h2]:my-2 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold", "[&_.ProseMirror_h3]:my-1 [&_.ProseMirror_h3]:text-lg [&_.ProseMirror_h3]:font-semibold", "[&_.ProseMirror_ul]:list-disc [&_.ProseMirror_ul]:pl-6", "[&_.ProseMirror_ol]:list-decimal [&_.ProseMirror_ol]:pl-6", "[&_.ProseMirror_blockquote]:my-2 [&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:text-muted-foreground", "[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-xs", "[&_.ProseMirror_pre]:my-2 [&_.ProseMirror_pre]:overflow-x-auto [&_.ProseMirror_pre]:rounded [&_.ProseMirror_pre]:bg-muted [&_.ProseMirror_pre]:p-3", "[&_.ProseMirror_table]:w-full [&_.ProseMirror_table]:border-collapse", "[&_.ProseMirror_td]:border [&_.ProseMirror_td]:border-border [&_.ProseMirror_td]:px-2 [&_.ProseMirror_td]:py-1", "[&_.ProseMirror_th]:border [&_.ProseMirror_th]:border-border [&_.ProseMirror_th]:bg-muted [&_.ProseMirror_th]:px-2 [&_.ProseMirror_th]:py-1 [&_.ProseMirror_th]:font-semibold", "[&_.ProseMirror_a]:text-primary [&_.ProseMirror_a]:underline [&_.ProseMirror_a]:pointer-events-none", "[&_.ProseMirror_a_img]:pointer-events-auto", "[&_.ProseMirror_.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror_.is-editor-empty:first-child::before]:float-left [&_.ProseMirror_.is-editor-empty:first-child::before]:h-0 [&_.ProseMirror_.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]")
|
|
10865
10862
|
}, /* @__PURE__ */ t.createElement(w, { editor: q }));
|
|
10866
|
-
return
|
|
10863
|
+
return K && oe.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
10867
10864
|
ref: G,
|
|
10868
|
-
trigger:
|
|
10865
|
+
trigger: K,
|
|
10869
10866
|
searchable: ie,
|
|
10870
|
-
controlled:
|
|
10871
|
-
open:
|
|
10872
|
-
anchorPosition:
|
|
10873
|
-
query:
|
|
10874
|
-
editorContext:
|
|
10867
|
+
controlled: te.editorContext ? {
|
|
10868
|
+
open: te.open,
|
|
10869
|
+
anchorPosition: te.anchorPosition,
|
|
10870
|
+
query: te.query,
|
|
10871
|
+
editorContext: te.editorContext,
|
|
10875
10872
|
onClose: de
|
|
10876
10873
|
} : void 0,
|
|
10877
10874
|
onSelect: (e, t) => {
|
|
@@ -12060,7 +12057,7 @@ function Fd(e) {
|
|
|
12060
12057
|
var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0, header: i = void 0, footer: a = void 0, path: o = void 0, defaultValues: c = void 0, keyGenerator: u = void 0, onLoad: d = void 0, onRecordChange: f = void 0, onSave: _ = void 0, onDelete: v = void 0, onComplete: y = void 0, log: b = !1, showNotice: S = !0, draftBucket: C = void 0, noticeAnchorRef: w = void 0, showBack: T = !1, wrapperClassName: E = void 0, headerClassName: D = void 0, className: O = void 0, footerClassName: k = void 0, formClassName: A = void 0 }) => {
|
|
12061
12058
|
let j = x(), N = Y("form"), P = Fn("form"), F = Ti(), I = _d(r), L = md(I), R = m(void 0);
|
|
12062
12059
|
R.current ||= Fd(c);
|
|
12063
|
-
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za],
|
|
12060
|
+
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za], te = m(wt(c ?? {})), [ne, re] = h(() => Nd(c)), [K, ie] = h(null), ae = m({ isDirty: !1 }), oe = p(() => {
|
|
12064
12061
|
if (!C) return;
|
|
12065
12062
|
let e = ct(C), t = ct(o || `${j.pathname}${j.hash || ""}`);
|
|
12066
12063
|
return e && t ? `llmnative.form-draft.${e}.${t}` : void 0;
|
|
@@ -12069,12 +12066,12 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12069
12066
|
j.pathname,
|
|
12070
12067
|
j.hash,
|
|
12071
12068
|
o
|
|
12072
|
-
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B,
|
|
12069
|
+
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B, te.current), [B, te.current]), ue = P.noChangesToSave ?? "No changes to save", de = P.draftRestoreTitle ?? "Unsaved changes found", fe = P.draftRestoreMessage ?? "A local draft is available for this form. Restore it or discard it.", q = P.draftRestoreAction ?? "Restore", pe = P.draftDiscardAction ?? "Discard", me = P.draftRestoredTitle ?? "Draft restored", he = P.draftRestoredMessage ?? "The local draft has been restored. You can still discard it for a few seconds.", ge = s(() => {
|
|
12073
12070
|
!oe || typeof localStorage > "u" || localStorage.removeItem(oe);
|
|
12074
12071
|
}, [oe]), _e = s(() => {
|
|
12075
12072
|
if (!(!oe || typeof localStorage > "u")) return Pd(localStorage.getItem(oe));
|
|
12076
12073
|
}, [oe]), ve = s(() => {
|
|
12077
|
-
V(wt(
|
|
12074
|
+
V(wt(te.current));
|
|
12078
12075
|
}, []), [ye, be] = h(void 0), xe = s(({ message: e, type: t = "danger" }) => {
|
|
12079
12076
|
S && be({
|
|
12080
12077
|
type: t,
|
|
@@ -12179,7 +12176,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12179
12176
|
action: t,
|
|
12180
12177
|
storagePath: je.current
|
|
12181
12178
|
})) ?? ze(Ee.current ?? {});
|
|
12182
|
-
return e && await F.set(e, Nt(Ee.current)),
|
|
12179
|
+
return e && await F.set(e, Nt(Ee.current)), te.current = wt(Ee.current ?? {}), re(Nd(Ee.current)), ge(), ie(null), await Be(t);
|
|
12183
12180
|
} finally {
|
|
12184
12181
|
U(!1);
|
|
12185
12182
|
}
|
|
@@ -12211,7 +12208,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12211
12208
|
]);
|
|
12212
12209
|
l(() => {
|
|
12213
12210
|
let e = wt(c ?? {});
|
|
12214
|
-
if (c && (V(e), d?.(wt(e))),
|
|
12211
|
+
if (c && (V(e), d?.(wt(e))), te.current = e, re(Nd(e)), !C) {
|
|
12215
12212
|
ie(null);
|
|
12216
12213
|
return;
|
|
12217
12214
|
}
|
|
@@ -12241,7 +12238,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12241
12238
|
if (!oe || typeof localStorage > "u" || B === void 0) return;
|
|
12242
12239
|
if (!le) {
|
|
12243
12240
|
let e = _e();
|
|
12244
|
-
if (e && Nd(e) !==
|
|
12241
|
+
if (e && Nd(e) !== ne) return;
|
|
12245
12242
|
localStorage.removeItem(oe);
|
|
12246
12243
|
return;
|
|
12247
12244
|
}
|
|
@@ -12250,7 +12247,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12250
12247
|
}, 150);
|
|
12251
12248
|
return () => window.clearTimeout(e);
|
|
12252
12249
|
}, [
|
|
12253
|
-
|
|
12250
|
+
ne,
|
|
12254
12251
|
oe,
|
|
12255
12252
|
le,
|
|
12256
12253
|
_e,
|
|
@@ -12294,8 +12291,8 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12294
12291
|
isDeleting: W,
|
|
12295
12292
|
saveDisabled: !se || !le || H,
|
|
12296
12293
|
deleteDisabled: !ce || W,
|
|
12297
|
-
hasDraft:
|
|
12298
|
-
draftStatus:
|
|
12294
|
+
hasDraft: K !== null,
|
|
12295
|
+
draftStatus: K,
|
|
12299
12296
|
errors: Se,
|
|
12300
12297
|
hasErrors: Object.keys(Se).length > 0
|
|
12301
12298
|
});
|
|
@@ -12303,7 +12300,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12303
12300
|
ce,
|
|
12304
12301
|
se,
|
|
12305
12302
|
L,
|
|
12306
|
-
|
|
12303
|
+
K,
|
|
12307
12304
|
Se,
|
|
12308
12305
|
W,
|
|
12309
12306
|
le,
|
|
@@ -12340,13 +12337,13 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12340
12337
|
timeout: ye.type === "success" ? 3e3 : void 0,
|
|
12341
12338
|
onClose: ye.type === "success" ? () => be(void 0) : void 0
|
|
12342
12339
|
}, ye.message) : null, [ye, w]), Je = p(() => {
|
|
12343
|
-
if (!
|
|
12344
|
-
let e =
|
|
12340
|
+
if (!K) return null;
|
|
12341
|
+
let e = K === "restore" ? de : me, n = K === "restore" ? fe : he;
|
|
12345
12342
|
return /* @__PURE__ */ t.createElement(Io, {
|
|
12346
|
-
variant:
|
|
12347
|
-
timeout:
|
|
12348
|
-
onClose:
|
|
12349
|
-
}, /* @__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" },
|
|
12343
|
+
variant: K === "restore" ? "warning" : "info",
|
|
12344
|
+
timeout: K === "restored" ? 6e3 : void 0,
|
|
12345
|
+
onClose: K === "restored" ? () => ie(null) : void 0
|
|
12346
|
+
}, /* @__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" }, K === "restore" ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Hr, {
|
|
12350
12347
|
label: q,
|
|
12351
12348
|
variant: "warning",
|
|
12352
12349
|
onClick: () => Pe()
|
|
@@ -12362,7 +12359,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12362
12359
|
}, [
|
|
12363
12360
|
Ne,
|
|
12364
12361
|
pe,
|
|
12365
|
-
|
|
12362
|
+
K,
|
|
12366
12363
|
q,
|
|
12367
12364
|
fe,
|
|
12368
12365
|
de,
|
|
@@ -12688,7 +12685,7 @@ function $d(e, t) {
|
|
|
12688
12685
|
function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
|
|
12689
12686
|
let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
|
|
12690
12687
|
if (!(!d || typeof d == "boolean")) return d;
|
|
12691
|
-
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G,
|
|
12688
|
+
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G, te] = h(null), [ne, re] = h(null), [K, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
|
|
12692
12689
|
e && ee(e);
|
|
12693
12690
|
}, []), le = u(), ue = !!a, de = V || !!zs.normalize(B), fe = ue && de, q = !fe && V, pe = fe ? void 0 : B;
|
|
12694
12691
|
l(() => {
|
|
@@ -12757,8 +12754,8 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12757
12754
|
]), Te = s((e, t) => {
|
|
12758
12755
|
if (!G) return;
|
|
12759
12756
|
let n = be.findIndex((e, t) => he(e, t) === G), r = be.findIndex((n, r) => he(n, r) === he(e, t));
|
|
12760
|
-
|
|
12761
|
-
let i =
|
|
12757
|
+
re(null), te(null);
|
|
12758
|
+
let i = K?.position || "after";
|
|
12762
12759
|
if (ie(null), n < 0 || r < 0 || n === r) return;
|
|
12763
12760
|
let o = [...be], [s] = o.splice(n, 1), c = n < r ? r + (i === "after" ? 0 : -1) : r + +(i === "after");
|
|
12764
12761
|
o.splice(c, 0, s), U(void 0), z(o), a?.(o, {
|
|
@@ -12768,7 +12765,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12768
12765
|
});
|
|
12769
12766
|
}, [
|
|
12770
12767
|
G,
|
|
12771
|
-
|
|
12768
|
+
K?.position,
|
|
12772
12769
|
he,
|
|
12773
12770
|
a,
|
|
12774
12771
|
be
|
|
@@ -12783,10 +12780,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12783
12780
|
F.Table.scrollClassName,
|
|
12784
12781
|
j ? `${j} overflow-auto` : "",
|
|
12785
12782
|
M || ""
|
|
12786
|
-
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !
|
|
12783
|
+
].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", {
|
|
12787
12784
|
"aria-hidden": "true",
|
|
12788
12785
|
onDragOver: (t) => {
|
|
12789
|
-
ue && (t.preventDefault(),
|
|
12786
|
+
ue && (t.preventDefault(), ne !== e && re(e), ie({
|
|
12790
12787
|
key: e,
|
|
12791
12788
|
position: n
|
|
12792
12789
|
}));
|
|
@@ -12860,7 +12857,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12860
12857
|
return e.map((e, o) => {
|
|
12861
12858
|
let s = n + o, l = he(e, s), u = r ? r.map((t) => String(e[t] ?? "")).join(" · ") : void 0, d = u !== void 0 && u !== a;
|
|
12862
12859
|
a = u;
|
|
12863
|
-
let f = ge.includes(l), p =
|
|
12860
|
+
let f = ge.includes(l), p = ne === l, m = G === l, h = L && (g === void 0 ? ae : g) === l;
|
|
12864
12861
|
return /* @__PURE__ */ t.createElement(t.Fragment, { key: l }, d && /* @__PURE__ */ t.createElement("tr", { "aria-hidden": "true" }, /* @__PURE__ */ t.createElement("td", {
|
|
12865
12862
|
colSpan: ke,
|
|
12866
12863
|
className: "bg-muted/40 px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground"
|
|
@@ -12879,22 +12876,22 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12879
12876
|
i && xe(t, e, s);
|
|
12880
12877
|
},
|
|
12881
12878
|
onDragStart: () => {
|
|
12882
|
-
|
|
12879
|
+
te(l);
|
|
12883
12880
|
},
|
|
12884
12881
|
onDragOver: (e) => {
|
|
12885
12882
|
if (!ue) return;
|
|
12886
12883
|
e.preventDefault();
|
|
12887
12884
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientY < t.top + t.height / 2 ? "before" : "after";
|
|
12888
|
-
|
|
12885
|
+
ne !== l && re(l), G !== l && ie((e) => e?.key === l && e.position === n ? e : {
|
|
12889
12886
|
key: l,
|
|
12890
12887
|
position: n
|
|
12891
12888
|
});
|
|
12892
12889
|
},
|
|
12893
12890
|
onDragLeave: () => {
|
|
12894
|
-
|
|
12891
|
+
ne === l && re(null);
|
|
12895
12892
|
},
|
|
12896
12893
|
onDragEnd: () => {
|
|
12897
|
-
|
|
12894
|
+
te(null), re(null), ie(null);
|
|
12898
12895
|
},
|
|
12899
12896
|
onDrop: (t) => {
|
|
12900
12897
|
ue && (t.preventDefault(), Te(e, s));
|
|
@@ -12933,10 +12930,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12933
12930
|
"aria-label": Dn(I.reorderRow, { key: l }),
|
|
12934
12931
|
onClick: (e) => e.preventDefault(),
|
|
12935
12932
|
onDragStart: (e) => {
|
|
12936
|
-
e.stopPropagation(),
|
|
12933
|
+
e.stopPropagation(), te(l);
|
|
12937
12934
|
},
|
|
12938
12935
|
onDragEnd: (e) => {
|
|
12939
|
-
e.stopPropagation(),
|
|
12936
|
+
e.stopPropagation(), te(null), re(null), ie(null);
|
|
12940
12937
|
}
|
|
12941
12938
|
}, /* @__PURE__ */ t.createElement(k, { size: 14 }))), Ee.map((n) => /* @__PURE__ */ t.createElement("td", {
|
|
12942
12939
|
key: n.key,
|
|
@@ -13293,9 +13290,9 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13293
13290
|
required: r,
|
|
13294
13291
|
label: n,
|
|
13295
13292
|
validator: f
|
|
13296
|
-
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15,
|
|
13293
|
+
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15, te = U.height ?? 240, [ne, re] = h(typeof A.value == "string" ? A.value : ""), [K, ie] = h([]), [ae, oe] = h(!1), [se, ce] = h(!1), [le, ue] = h(null), de = m(void 0), fe = m(0), q = m(null), pe = m(null), me = m(void 0), he = m(void 0), ge = m(void 0), _e = m(void 0), ve = m(!1);
|
|
13297
13294
|
l(() => {
|
|
13298
|
-
typeof A.value == "string" && A.value !==
|
|
13295
|
+
typeof A.value == "string" && A.value !== ne && re(A.value);
|
|
13299
13296
|
}, [A.value]), l(() => {
|
|
13300
13297
|
if (!ae) return;
|
|
13301
13298
|
let e = (e) => {
|
|
@@ -13304,7 +13301,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13304
13301
|
return window.document.addEventListener("pointerdown", e), () => window.document.removeEventListener("pointerdown", e);
|
|
13305
13302
|
}, [ae]), l(() => {
|
|
13306
13303
|
if (!O) return;
|
|
13307
|
-
let e = ++fe.current, t =
|
|
13304
|
+
let e = ++fe.current, t = ne.trim();
|
|
13308
13305
|
if (t.length < 3) {
|
|
13309
13306
|
ie([]), ce(!1);
|
|
13310
13307
|
return;
|
|
@@ -13342,11 +13339,11 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13342
13339
|
})();
|
|
13343
13340
|
}, 250);
|
|
13344
13341
|
return () => window.clearTimeout(n);
|
|
13345
|
-
}, [
|
|
13342
|
+
}, [ne, O]);
|
|
13346
13343
|
let ye = (e, t) => {
|
|
13347
13344
|
ve.current = !0;
|
|
13348
|
-
let n = e.formatted ??
|
|
13349
|
-
|
|
13345
|
+
let n = e.formatted ?? ne;
|
|
13346
|
+
re(n), A.handleChange({ target: {
|
|
13350
13347
|
name: k.formatted,
|
|
13351
13348
|
value: n
|
|
13352
13349
|
} }), e.street !== void 0 && j.handleChange({ target: {
|
|
@@ -13427,7 +13424,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13427
13424
|
})).results[0];
|
|
13428
13425
|
if (!n) return;
|
|
13429
13426
|
let r = Ef(n), i = r.formatted ?? t;
|
|
13430
|
-
if (
|
|
13427
|
+
if (re(i), A.handleChange({ target: {
|
|
13431
13428
|
name: k.formatted,
|
|
13432
13429
|
value: i
|
|
13433
13430
|
} }), r.lat !== void 0 && L.handleChange({ target: {
|
|
@@ -13529,7 +13526,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13529
13526
|
let we = W ? /* @__PURE__ */ t.createElement("div", {
|
|
13530
13527
|
ref: pe,
|
|
13531
13528
|
className: X("mt-2 w-full overflow-hidden rounded-md border", T),
|
|
13532
|
-
style: { height:
|
|
13529
|
+
style: { height: te }
|
|
13533
13530
|
}) : null;
|
|
13534
13531
|
return /* @__PURE__ */ t.createElement(Z, { className: A.formWrapClass || D.AddressAutocomplete.wrapperClassName }, n && /* @__PURE__ */ t.createElement(Ns, {
|
|
13535
13532
|
label: n,
|
|
@@ -13550,16 +13547,16 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13550
13547
|
placeholder: i ?? E.placeholder,
|
|
13551
13548
|
required: r,
|
|
13552
13549
|
disabled: a,
|
|
13553
|
-
value:
|
|
13550
|
+
value: ne,
|
|
13554
13551
|
onChange: (e) => {
|
|
13555
|
-
|
|
13552
|
+
re(e.target.value), oe(!0);
|
|
13556
13553
|
},
|
|
13557
13554
|
onFocus: () => oe(!0)
|
|
13558
13555
|
}), /* @__PURE__ */ t.createElement("span", { className: "pointer-events-none absolute inset-y-0 right-2 flex items-center text-muted-foreground" }, /* @__PURE__ */ t.createElement(Q, {
|
|
13559
13556
|
name: se ? "loader-circle" : "map-pin",
|
|
13560
13557
|
size: 15,
|
|
13561
13558
|
className: se ? "animate-spin" : void 0
|
|
13562
|
-
})), ae &&
|
|
13559
|
+
})), ae && ne.trim().length >= 3 && /* @__PURE__ */ t.createElement("div", { className: X("absolute z-50 mt-1 max-h-64 w-full overflow-y-auto rounded-md border p-1 text-sm shadow-lg", C || D.AddressAutocomplete.menuClassName) }, le ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-destructive" }, le) : se && K.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.searching) : K.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.noResults) : K.map((e) => /* @__PURE__ */ t.createElement("button", {
|
|
13563
13560
|
key: e.id,
|
|
13564
13561
|
type: "button",
|
|
13565
13562
|
className: X("flex w-full items-start gap-2 rounded-sm px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground", w || D.AddressAutocomplete.itemClassName),
|
|
@@ -14698,19 +14695,19 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14698
14695
|
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
14699
14696
|
}, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
|
|
14700
14697
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, n(E, w), o ? j(P, o) : o === void 0 && P);
|
|
14701
|
-
}, qp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0,
|
|
14702
|
-
let
|
|
14703
|
-
e &&
|
|
14704
|
-
}, []),
|
|
14698
|
+
}, qp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
|
|
14699
|
+
let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
|
|
14700
|
+
e && N(e);
|
|
14701
|
+
}, []), F = f ?? O.Gallery.gap, I = g ?? O.Gallery.rowCols, L = {
|
|
14705
14702
|
0: "0",
|
|
14706
14703
|
1: "0.25rem",
|
|
14707
14704
|
2: "0.5rem",
|
|
14708
14705
|
3: "1rem",
|
|
14709
14706
|
4: "1.5rem",
|
|
14710
14707
|
5: "3rem"
|
|
14711
|
-
},
|
|
14712
|
-
if (!
|
|
14713
|
-
if (typeof
|
|
14708
|
+
}, R = L[F] ?? L[2], z = "0.75rem", B = "calc(50% - 1rem)", V = F === 0 ? `${(100 / I).toFixed(4)}%` : `calc((100% - (${R} * ${I - 1})) / ${I})`, H = e || [], U = p(() => {
|
|
14709
|
+
if (!u) return;
|
|
14710
|
+
if (typeof u == "object") return u;
|
|
14714
14711
|
let t = e?.[0];
|
|
14715
14712
|
if (!t) return;
|
|
14716
14713
|
let n = Object.keys(t).find((e) => !e.startsWith("_"));
|
|
@@ -14720,22 +14717,22 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14720
14717
|
};
|
|
14721
14718
|
}, [
|
|
14722
14719
|
e,
|
|
14723
|
-
typeof
|
|
14724
|
-
typeof
|
|
14725
|
-
|
|
14726
|
-
]),
|
|
14727
|
-
records:
|
|
14728
|
-
selectedKeys:
|
|
14729
|
-
onSelectionChange:
|
|
14730
|
-
getRecordKey:
|
|
14731
|
-
}),
|
|
14720
|
+
typeof u == "object" ? u?.dir : void 0,
|
|
14721
|
+
typeof u == "object" ? u?.field : void 0,
|
|
14722
|
+
u
|
|
14723
|
+
]), W = $d("item"), ee = s((e, t) => W(e, t), [W]), { activeSelectedKeys: G, showSelection: te, updateSelection: ne } = Qd({
|
|
14724
|
+
records: H,
|
|
14725
|
+
selectedKeys: v,
|
|
14726
|
+
onSelectionChange: c,
|
|
14727
|
+
getRecordKey: ee
|
|
14728
|
+
}), re = m(/* @__PURE__ */ new Map());
|
|
14732
14729
|
l(() => {
|
|
14733
|
-
let e = new Set(
|
|
14734
|
-
for (let t of
|
|
14735
|
-
}, [
|
|
14736
|
-
let
|
|
14737
|
-
if (
|
|
14738
|
-
let t =
|
|
14730
|
+
let e = new Set(H.map((e, t) => ee(e, t)));
|
|
14731
|
+
for (let t of re.current.keys()) e.has(t) || re.current.delete(t);
|
|
14732
|
+
}, [H, ee]);
|
|
14733
|
+
let K = (e, t) => {
|
|
14734
|
+
if (j) {
|
|
14735
|
+
let t = j.split(/\s+/).filter(Boolean), n = e.target;
|
|
14739
14736
|
for (; n && !n.classList.contains("item");) {
|
|
14740
14737
|
if ([
|
|
14741
14738
|
"A",
|
|
@@ -14749,25 +14746,25 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14749
14746
|
e.classList.remove(...t);
|
|
14750
14747
|
}), n.classList.add(...t));
|
|
14751
14748
|
}
|
|
14752
|
-
|
|
14753
|
-
},
|
|
14754
|
-
let n =
|
|
14755
|
-
|
|
14749
|
+
o?.(t);
|
|
14750
|
+
}, ie = s((e, t) => {
|
|
14751
|
+
let n = ee(e, t), r = G.includes(n) ? G.filter((e) => e !== n) : [...G, n];
|
|
14752
|
+
ne(r);
|
|
14756
14753
|
}, [
|
|
14754
|
+
G,
|
|
14757
14755
|
ee,
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
]), ie = (e, n) => {
|
|
14756
|
+
ne
|
|
14757
|
+
]), ae = (e, n) => {
|
|
14761
14758
|
let r = e.img;
|
|
14762
14759
|
return r && t.isValidElement(r) ? t.cloneElement(r, {
|
|
14763
14760
|
className: X("block h-auto w-full max-w-full rounded-lg object-cover", r.props.className),
|
|
14764
14761
|
style: {
|
|
14765
14762
|
...r.props.style || {},
|
|
14766
14763
|
aspectRatio: r.props.style?.aspectRatio || "16 / 11",
|
|
14767
|
-
cursor:
|
|
14764
|
+
cursor: o ? "pointer" : "default"
|
|
14768
14765
|
},
|
|
14769
|
-
onClick:
|
|
14770
|
-
|
|
14766
|
+
onClick: o ? ((t) => {
|
|
14767
|
+
K(t, e), r.props.onClick?.(t);
|
|
14771
14768
|
}) : r.props.onClick
|
|
14772
14769
|
}) : /* @__PURE__ */ t.createElement("img", {
|
|
14773
14770
|
className: "block h-auto w-full max-w-full rounded-lg object-cover",
|
|
@@ -14777,105 +14774,111 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14777
14774
|
height: e.height,
|
|
14778
14775
|
style: {
|
|
14779
14776
|
aspectRatio: "16 / 11",
|
|
14780
|
-
cursor:
|
|
14777
|
+
cursor: o ? "pointer" : "default"
|
|
14781
14778
|
},
|
|
14782
|
-
onClick:
|
|
14779
|
+
onClick: o ? ((t) => K(t, e)) : void 0
|
|
14783
14780
|
});
|
|
14784
|
-
},
|
|
14781
|
+
}, oe = (e) => t.isValidElement(e) ? e : /* @__PURE__ */ t.createElement("span", { className: "inline-block max-w-full overflow-hidden text-ellipsis align-top" }, /* @__PURE__ */ t.createElement(Zn, {
|
|
14785
14782
|
badge: e,
|
|
14786
14783
|
className: "badge-overlay"
|
|
14787
|
-
})),
|
|
14784
|
+
})), se = (e, n, r = "left", i) => /* @__PURE__ */ t.createElement("div", {
|
|
14788
14785
|
className: X("absolute z-10 overflow-hidden text-ellipsis whitespace-nowrap leading-none", r === "right" ? "text-right" : "text-left", i),
|
|
14789
14786
|
style: {
|
|
14790
|
-
width:
|
|
14791
|
-
maxWidth:
|
|
14787
|
+
width: B,
|
|
14788
|
+
maxWidth: B,
|
|
14792
14789
|
pointerEvents: "none",
|
|
14793
14790
|
...n
|
|
14794
14791
|
}
|
|
14795
|
-
},
|
|
14792
|
+
}, oe(e)), ce = {
|
|
14796
14793
|
topLeft: { style: {
|
|
14797
|
-
left:
|
|
14798
|
-
top:
|
|
14794
|
+
left: z,
|
|
14795
|
+
top: z
|
|
14799
14796
|
} },
|
|
14800
14797
|
topRight: {
|
|
14801
14798
|
style: {
|
|
14802
|
-
right:
|
|
14803
|
-
top:
|
|
14799
|
+
right: z,
|
|
14800
|
+
top: z
|
|
14804
14801
|
},
|
|
14805
14802
|
align: "right"
|
|
14806
14803
|
},
|
|
14807
14804
|
bottomLeft: { style: {
|
|
14808
|
-
bottom:
|
|
14809
|
-
left:
|
|
14805
|
+
bottom: z,
|
|
14806
|
+
left: z
|
|
14810
14807
|
} },
|
|
14811
14808
|
bottomRight: {
|
|
14812
14809
|
style: {
|
|
14813
|
-
bottom:
|
|
14814
|
-
right:
|
|
14810
|
+
bottom: z,
|
|
14811
|
+
right: z
|
|
14815
14812
|
},
|
|
14816
14813
|
align: "right"
|
|
14817
14814
|
},
|
|
14818
14815
|
middleLeft: { style: {
|
|
14819
|
-
left:
|
|
14816
|
+
left: z,
|
|
14820
14817
|
top: "50%",
|
|
14821
14818
|
transform: "translateY(-50%)"
|
|
14822
14819
|
} },
|
|
14823
14820
|
middleRight: {
|
|
14824
14821
|
style: {
|
|
14825
|
-
right:
|
|
14822
|
+
right: z,
|
|
14826
14823
|
top: "50%",
|
|
14827
14824
|
transform: "translateY(-50%)"
|
|
14828
14825
|
},
|
|
14829
14826
|
align: "right"
|
|
14830
14827
|
}
|
|
14831
|
-
},
|
|
14832
|
-
if (!r.position || !
|
|
14833
|
-
let a =
|
|
14828
|
+
}, le = (e, t, n) => e.when ? typeof e.when == "function" ? e.when(t, n) : Object.entries(e.when).every(([e, n]) => t[e] === n) : !0, ue = (e, t, n) => e.render ? e.render(t, n) : typeof e.badge == "function" ? e.badge(t, n) : e.badge, de = (e, n) => i?.length ? i.map((r, i) => {
|
|
14829
|
+
if (!r.position || !le(r, e, n)) return null;
|
|
14830
|
+
let a = ue(r, e, n);
|
|
14834
14831
|
if (a == null || a === !1) return null;
|
|
14835
|
-
let o =
|
|
14836
|
-
return o ? /* @__PURE__ */ t.createElement(t.Fragment, { key: `${r.position}-${i}` },
|
|
14832
|
+
let o = ce[r.position];
|
|
14833
|
+
return o ? /* @__PURE__ */ t.createElement(t.Fragment, { key: `${r.position}-${i}` }, se(a, {
|
|
14837
14834
|
...o.style,
|
|
14838
14835
|
...r.style
|
|
14839
14836
|
}, o.align, r.className)) : null;
|
|
14840
|
-
}) : null,
|
|
14841
|
-
let n =
|
|
14842
|
-
if (r && r.recordRef === e && r.overlaysRef === i && r.onClickRef ===
|
|
14837
|
+
}) : null, fe = s((e, t) => {
|
|
14838
|
+
let n = ee(e, t), r = re.current.get(n);
|
|
14839
|
+
if (r && r.recordRef === e && r.overlaysRef === i && r.onClickRef === o && r.rowIndex === t) return {
|
|
14843
14840
|
image: r.image,
|
|
14844
14841
|
overlays: r.overlays
|
|
14845
14842
|
};
|
|
14846
|
-
let
|
|
14847
|
-
image:
|
|
14848
|
-
overlays:
|
|
14843
|
+
let a = {
|
|
14844
|
+
image: ae(e, t),
|
|
14845
|
+
overlays: de(e, t)
|
|
14849
14846
|
};
|
|
14850
|
-
return
|
|
14847
|
+
return re.current.set(n, {
|
|
14851
14848
|
recordRef: e,
|
|
14852
14849
|
overlaysRef: i,
|
|
14853
|
-
onClickRef:
|
|
14850
|
+
onClickRef: o,
|
|
14854
14851
|
rowIndex: t,
|
|
14855
|
-
image:
|
|
14856
|
-
overlays:
|
|
14857
|
-
}),
|
|
14852
|
+
image: a.image,
|
|
14853
|
+
overlays: a.overlays
|
|
14854
|
+
}), a;
|
|
14858
14855
|
}, [
|
|
14859
|
-
|
|
14860
|
-
|
|
14856
|
+
ee,
|
|
14857
|
+
o,
|
|
14861
14858
|
i
|
|
14862
|
-
]),
|
|
14863
|
-
let r =
|
|
14859
|
+
]), q = (e, n) => {
|
|
14860
|
+
let r = ee(n, e), i = G.includes(r), s = j?.split(/\s+/).filter(Boolean) || [], c = a ? null : fe(n, e), l = a ? a(n, e, {
|
|
14861
|
+
isSelected: i,
|
|
14862
|
+
toggleSelection: () => ie(n, e)
|
|
14863
|
+
}) : null;
|
|
14864
14864
|
return /* @__PURE__ */ t.createElement("div", {
|
|
14865
14865
|
key: r,
|
|
14866
|
-
className: X("item min-w-0", i &&
|
|
14866
|
+
className: X("item min-w-0", i && s),
|
|
14867
14867
|
style: {
|
|
14868
|
-
flex: `0 0 ${
|
|
14869
|
-
maxWidth:
|
|
14868
|
+
flex: `0 0 ${V}`,
|
|
14869
|
+
maxWidth: V
|
|
14870
14870
|
}
|
|
14871
|
-
}, /* @__PURE__ */ t.createElement("div", {
|
|
14871
|
+
}, /* @__PURE__ */ t.createElement("div", {
|
|
14872
|
+
className: X("relative", !a && "overflow-hidden rounded-lg", a && o && "cursor-pointer"),
|
|
14873
|
+
onClick: a && o ? (e) => K(e, n) : void 0
|
|
14874
|
+
}, te && /* @__PURE__ */ t.createElement("label", { className: "absolute left-3 top-3 z-20 inline-flex items-center rounded bg-background/90 px-2 py-1 shadow-sm" }, /* @__PURE__ */ t.createElement("input", {
|
|
14872
14875
|
type: "checkbox",
|
|
14873
|
-
"aria-label": Dn(
|
|
14876
|
+
"aria-label": Dn(k.selectItem, { key: r }),
|
|
14874
14877
|
checked: i,
|
|
14875
|
-
onChange: () =>
|
|
14878
|
+
onChange: () => ie(n, e),
|
|
14876
14879
|
onClick: (e) => e.stopPropagation()
|
|
14877
|
-
})),
|
|
14878
|
-
},
|
|
14880
|
+
})), a ? l : /* @__PURE__ */ t.createElement(t.Fragment, null, c.image, c.overlays)));
|
|
14881
|
+
}, pe = (e, t) => {
|
|
14879
14882
|
let n = Array.isArray(t) ? t : [t], r = /* @__PURE__ */ new Map();
|
|
14880
14883
|
return e.forEach((e, t) => {
|
|
14881
14884
|
let i = n.map((t) => String(e[t] ?? "")).join(" · ") || "-";
|
|
@@ -14888,48 +14891,49 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14888
14891
|
groupName: e,
|
|
14889
14892
|
items: t
|
|
14890
14893
|
}));
|
|
14891
|
-
},
|
|
14894
|
+
}, me = p(() => {
|
|
14892
14895
|
if (!Array.isArray(e)) return;
|
|
14893
|
-
let t = zs.records(e,
|
|
14894
|
-
return
|
|
14896
|
+
let t = zs.records(e, U) || [];
|
|
14897
|
+
return _ ? pe(t, _) : t.map((e, t) => ({
|
|
14895
14898
|
kind: "item",
|
|
14896
14899
|
item: e,
|
|
14897
14900
|
index: t
|
|
14898
14901
|
}));
|
|
14899
14902
|
}, [
|
|
14900
14903
|
e,
|
|
14901
|
-
|
|
14902
|
-
|
|
14904
|
+
_,
|
|
14905
|
+
U
|
|
14903
14906
|
]);
|
|
14904
|
-
return
|
|
14905
|
-
records:
|
|
14906
|
-
appendTo:
|
|
14907
|
+
return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(Kp, {
|
|
14908
|
+
records: me,
|
|
14909
|
+
appendTo: M,
|
|
14907
14910
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
14908
|
-
...
|
|
14911
|
+
...d || {}
|
|
14909
14912
|
}, (e) => /* @__PURE__ */ t.createElement("div", { className: "p-3" }, /* @__PURE__ */ t.createElement("div", {
|
|
14910
|
-
className: "flex flex-wrap text-center items-center " + (
|
|
14911
|
-
style: { gap:
|
|
14913
|
+
className: "flex flex-wrap text-center items-center " + (T || O.Gallery.bodyClassName),
|
|
14914
|
+
style: { gap: R }
|
|
14912
14915
|
}, e.map((e) => e.kind === "group" ? /* @__PURE__ */ t.createElement("section", {
|
|
14913
14916
|
key: e.groupName,
|
|
14914
14917
|
className: "gallery-group rounded-lg border bg-card p-3 text-left"
|
|
14915
14918
|
}, /* @__PURE__ */ t.createElement("h3", { className: "mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground" }, e.groupName), /* @__PURE__ */ t.createElement("div", {
|
|
14916
14919
|
className: X("flex flex-wrap items-center"),
|
|
14917
|
-
style: { gap:
|
|
14918
|
-
}, e.items.map(({ item: e, index: t }) =>
|
|
14919
|
-
ref:
|
|
14920
|
+
style: { gap: R }
|
|
14921
|
+
}, e.items.map(({ item: e, index: t }) => q(t, e)))) : q(e.index, e.item)))))), /* @__PURE__ */ t.createElement("div", {
|
|
14922
|
+
ref: P,
|
|
14920
14923
|
className: "mt-auto"
|
|
14921
|
-
}), r && /* @__PURE__ */ t.createElement("div", { className:
|
|
14924
|
+
}), r && /* @__PURE__ */ t.createElement("div", { className: E || O.Gallery.footerClassName }, r)), b && /* @__PURE__ */ t.createElement("div", { className: "gallery-after flex shrink-0 items-center self-stretch" }, b));
|
|
14922
14925
|
};
|
|
14923
14926
|
//#endregion
|
|
14924
14927
|
//#region src/components/widgets/grid-core/GridGalleryView.tsx
|
|
14925
|
-
function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h }) {
|
|
14926
|
-
let
|
|
14928
|
+
function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h, renderItem: g }) {
|
|
14929
|
+
let _ = p(() => Gf(n), [n]), v = p(() => e.reduce((e, t) => (e.set(_(t), t), e), /* @__PURE__ */ new Map()), [_, e]), y = p(() => e.map((e) => ({
|
|
14927
14930
|
...e,
|
|
14928
|
-
[za]:
|
|
14929
|
-
})), [e,
|
|
14931
|
+
[za]: _(e)
|
|
14932
|
+
})), [e, _]);
|
|
14930
14933
|
return /* @__PURE__ */ t.createElement(qp, {
|
|
14931
|
-
records:
|
|
14934
|
+
records: y,
|
|
14932
14935
|
overlays: h,
|
|
14936
|
+
renderItem: g ? (e, t, n) => g(e, t, n) : void 0,
|
|
14933
14937
|
sortable: r,
|
|
14934
14938
|
pagination: i,
|
|
14935
14939
|
selectedKeys: a ? o : void 0,
|
|
@@ -14937,7 +14941,7 @@ function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a
|
|
|
14937
14941
|
let t = e.keys, n = e.records;
|
|
14938
14942
|
if (a === "single" && e.keys.length > 1) {
|
|
14939
14943
|
let r = e.keys[e.keys.length - 1];
|
|
14940
|
-
t = r ? [r] : [], n = r &&
|
|
14944
|
+
t = r ? [r] : [], n = r && v.get(r) ? [v.get(r)] : [];
|
|
14941
14945
|
}
|
|
14942
14946
|
let r = {
|
|
14943
14947
|
keys: t,
|
|
@@ -15361,13 +15365,13 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15361
15365
|
columns: i,
|
|
15362
15366
|
records: U,
|
|
15363
15367
|
form: o
|
|
15364
|
-
}), [G,
|
|
15365
|
-
|
|
15368
|
+
}), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, em(e)]))), [ne, re] = h(!1), K = s((e, t) => {
|
|
15369
|
+
te((n) => ({
|
|
15366
15370
|
...n,
|
|
15367
15371
|
[e]: t
|
|
15368
15372
|
}));
|
|
15369
15373
|
}, []), ie = s((e) => {
|
|
15370
|
-
|
|
15374
|
+
te((t) => ({
|
|
15371
15375
|
...t,
|
|
15372
15376
|
[e.key]: em(e)
|
|
15373
15377
|
}));
|
|
@@ -15381,7 +15385,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15381
15385
|
title: z.filtersButton,
|
|
15382
15386
|
variant: "link",
|
|
15383
15387
|
badge: ae.length > 0 ? ae.length : void 0,
|
|
15384
|
-
onClick: () =>
|
|
15388
|
+
onClick: () => re(!0)
|
|
15385
15389
|
}) : null, ce = (M ?? []).length > 0 && ae.length > 0 ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-1.5" }, ae.map((e) => /* @__PURE__ */ t.createElement(Qn, {
|
|
15386
15390
|
key: e.key,
|
|
15387
15391
|
variant: "info",
|
|
@@ -15392,22 +15396,22 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15392
15396
|
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
15393
15397
|
title: `${z.filtersClearAll} ${e.label}`,
|
|
15394
15398
|
onClick: () => ie(e)
|
|
15395
|
-
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue =
|
|
15399
|
+
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue = ne && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Mi, {
|
|
15396
15400
|
title: z.filtersPanelTitle,
|
|
15397
15401
|
size: "md",
|
|
15398
15402
|
position: "right",
|
|
15399
|
-
onClose: () =>
|
|
15403
|
+
onClose: () => re(!1),
|
|
15400
15404
|
footer: /* @__PURE__ */ t.createElement(Hr, {
|
|
15401
15405
|
label: z.filtersClearAll,
|
|
15402
15406
|
variant: "link",
|
|
15403
15407
|
disabled: ae.length === 0,
|
|
15404
|
-
onClick: () =>
|
|
15408
|
+
onClick: () => te(Object.fromEntries(M.map((e) => [e.key, em(e)])))
|
|
15405
15409
|
})
|
|
15406
15410
|
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(am, {
|
|
15407
15411
|
key: e.key,
|
|
15408
15412
|
filter: e,
|
|
15409
15413
|
value: G[e.key] ?? em(e),
|
|
15410
|
-
onChange: (t) =>
|
|
15414
|
+
onChange: (t) => K(e.key, t),
|
|
15411
15415
|
dict: z
|
|
15412
15416
|
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
15413
15417
|
if (!de || !fe.trim()) return oe;
|
|
@@ -15441,6 +15445,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15441
15445
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15442
15446
|
});
|
|
15443
15447
|
}, []), Oe = p(() => we.filter((e) => !Te.has(String(e.key))), [we, Te]), ke = p(() => {
|
|
15448
|
+
if (_e.renderItem) return;
|
|
15444
15449
|
let e = [];
|
|
15445
15450
|
if (Oe.length) {
|
|
15446
15451
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -15460,7 +15465,11 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15460
15465
|
}
|
|
15461
15466
|
let n = [..._e.overlays ?? [], ...e];
|
|
15462
15467
|
return n.length ? n : void 0;
|
|
15463
|
-
}, [
|
|
15468
|
+
}, [
|
|
15469
|
+
_e.overlays,
|
|
15470
|
+
_e.renderItem,
|
|
15471
|
+
Oe
|
|
15472
|
+
]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Qp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Yp({
|
|
15464
15473
|
actions: a,
|
|
15465
15474
|
form: o,
|
|
15466
15475
|
editDeepLink: c,
|
|
@@ -15618,7 +15627,8 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15618
15627
|
before: S,
|
|
15619
15628
|
after: C,
|
|
15620
15629
|
columns: _e.columns,
|
|
15621
|
-
overlays: ke
|
|
15630
|
+
overlays: ke,
|
|
15631
|
+
renderItem: _e.renderItem
|
|
15622
15632
|
}) : /* @__PURE__ */ t.createElement(np, {
|
|
15623
15633
|
records: pe,
|
|
15624
15634
|
recordId: n,
|
|
@@ -15938,7 +15948,7 @@ var um = () => {
|
|
|
15938
15948
|
let e = Zr("user");
|
|
15939
15949
|
e?.profile?.sub && window.google?.accounts?.id?.revoke(e.profile.sub), localStorage.removeItem("googleCredentialToken"), $r("user");
|
|
15940
15950
|
let t = Fa();
|
|
15941
|
-
t && await
|
|
15951
|
+
t && await K(t);
|
|
15942
15952
|
}
|
|
15943
15953
|
onAuthChange(e) {
|
|
15944
15954
|
let t = Fa();
|
|
@@ -16324,19 +16334,19 @@ var Um = class {
|
|
|
16324
16334
|
if (n === "oauth") {
|
|
16325
16335
|
let { provider: n } = e;
|
|
16326
16336
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16327
|
-
let { user: r } = await
|
|
16337
|
+
let { user: r } = await re(t, Vm(n));
|
|
16328
16338
|
return Hm(r);
|
|
16329
16339
|
}
|
|
16330
16340
|
let { email: r, password: i } = e;
|
|
16331
16341
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16332
|
-
let { user: a } = await
|
|
16342
|
+
let { user: a } = await ne(t, r, i);
|
|
16333
16343
|
return Hm(a);
|
|
16334
16344
|
}
|
|
16335
16345
|
async signOut() {
|
|
16336
16346
|
await this.initPromise;
|
|
16337
16347
|
let e = Fa(this.appName);
|
|
16338
16348
|
if (!e) throw Error("FirebaseAuthProvider: Firebase auth is not initialized");
|
|
16339
|
-
await
|
|
16349
|
+
await K(e);
|
|
16340
16350
|
}
|
|
16341
16351
|
onAuthChange(e) {
|
|
16342
16352
|
if (!this.options.config) {
|