@cedros/pay-react 1.1.14 → 1.1.15
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/components/admin/StorefrontSection.d.ts.map +1 -1
- package/dist/components/admin/configApi.d.ts.map +1 -1
- package/dist/crypto-only.js +1 -1
- package/dist/crypto-only.mjs +2 -2
- package/dist/{index-CdyuXqXT.mjs → index-BjxGupjw.mjs} +699 -656
- package/dist/{index-FGF9nfl8.js → index-DW6XWuRP.js} +17 -17
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/pay-react.css +1 -1
- package/dist/{sections-BF5Zky5V.js → sections-DG4Ws13b.js} +1 -1
- package/dist/{sections-Dsma4UNK.mjs → sections-Dl8qjlql.mjs} +1 -1
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +1 -1
- package/package.json +1 -1
|
@@ -311,12 +311,12 @@ function Co(e) {
|
|
|
311
311
|
technicalHint: `Unknown error code: ${e}`
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
const Al = /* @__PURE__ */ new Map(), ss = /* @__PURE__ */ new Map(), is = /* @__PURE__ */ new Map(),
|
|
314
|
+
const Al = /* @__PURE__ */ new Map(), ss = /* @__PURE__ */ new Map(), is = /* @__PURE__ */ new Map(), El = 200, Os = 2e3;
|
|
315
315
|
function Xp(e) {
|
|
316
316
|
const t = is.get(e);
|
|
317
317
|
return t ? Date.now() < t ? !0 : (is.delete(e), !1) : !1;
|
|
318
318
|
}
|
|
319
|
-
function Jp(e, t =
|
|
319
|
+
function Jp(e, t = El) {
|
|
320
320
|
const n = Date.now() + t;
|
|
321
321
|
is.set(e, n);
|
|
322
322
|
}
|
|
@@ -353,7 +353,7 @@ async function of(e, t, n = {}) {
|
|
|
353
353
|
return rf(e, i);
|
|
354
354
|
}
|
|
355
355
|
function lr(e, t, n = {}) {
|
|
356
|
-
const { cooldownMs: r =
|
|
356
|
+
const { cooldownMs: r = El, deduplicationWindowMs: a = Os } = n;
|
|
357
357
|
return async () => {
|
|
358
358
|
if (Xp(e)) {
|
|
359
359
|
fe().debug(`[Deduplication] Button in cooldown: ${e}`);
|
|
@@ -376,7 +376,7 @@ function lr(e, t, n = {}) {
|
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Tl(e) {
|
|
380
380
|
return {
|
|
381
381
|
background: "none",
|
|
382
382
|
border: "none",
|
|
@@ -859,14 +859,14 @@ const mf = (e, t, n) => {
|
|
|
859
859
|
return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((a, s) => {
|
|
860
860
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + t + (t.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
861
861
|
});
|
|
862
|
-
},
|
|
862
|
+
}, Ea = /* @__PURE__ */ new Map();
|
|
863
863
|
let Jr = null;
|
|
864
864
|
async function Ji(e) {
|
|
865
|
-
if (
|
|
866
|
-
return
|
|
865
|
+
if (Ea.has(e))
|
|
866
|
+
return Ea.get(e);
|
|
867
867
|
try {
|
|
868
868
|
const t = await mf(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-w27mU-4x.mjs"), "./translations/bn.json": () => import("./bn-Ba_k3Kex.mjs"), "./translations/de.json": () => import("./de-CoZiPFN7.mjs"), "./translations/en.json": () => import("./en-BXheDBal.mjs"), "./translations/es.json": () => import("./es-BWGIBp2f.mjs"), "./translations/fil.json": () => import("./fil-Czo27xmj.mjs"), "./translations/fr.json": () => import("./fr-DQ-2ThBv.mjs"), "./translations/he.json": () => import("./he-DpV1WnBQ.mjs"), "./translations/id.json": () => import("./id-BJMqsu19.mjs"), "./translations/in.json": () => import("./in-BxgxKLQH.mjs"), "./translations/it.json": () => import("./it-DZFFPALf.mjs"), "./translations/jp.json": () => import("./jp-ZExTrlHK.mjs"), "./translations/kr.json": () => import("./kr-DHX3i4Ht.mjs"), "./translations/ms.json": () => import("./ms-Cv1fdIi2.mjs"), "./translations/nl.json": () => import("./nl-BmGonsKb.mjs"), "./translations/pa.json": () => import("./pa-BfwcJIar.mjs"), "./translations/pl.json": () => import("./pl-DE5IB9xv.mjs"), "./translations/pt.json": () => import("./pt-CLzkqDzf.mjs"), "./translations/ru.json": () => import("./ru-DM6-oUR0.mjs"), "./translations/ta.json": () => import("./ta-A5HnrGb5.mjs"), "./translations/th.json": () => import("./th-3fbB3Ytp.mjs"), "./translations/tr.json": () => import("./tr-BrgfFFdq.mjs"), "./translations/uk.json": () => import("./uk-0hFun_g_.mjs"), "./translations/ur.json": () => import("./ur-CaOjJXai.mjs"), "./translations/vn.json": () => import("./vn-0nlIZFLP.mjs"), "./translations/zh.json": () => import("./zh-B4Endr1F.mjs") }), `./translations/${e}.json`, 3), n = t.default || t;
|
|
869
|
-
return
|
|
869
|
+
return Ea.set(e, n), n;
|
|
870
870
|
} catch {
|
|
871
871
|
return null;
|
|
872
872
|
}
|
|
@@ -975,20 +975,20 @@ function Il({
|
|
|
975
975
|
onError: m,
|
|
976
976
|
className: f = ""
|
|
977
977
|
}) {
|
|
978
|
-
const { status: g, error: x, transactionId: y, processPayment: h, processCartCheckout: _ } = Ms(), k = pn(), { isCartMode: w, effectiveResource: b } = Gr(e, t), { t: S, translations: O } = Vn(), P = c || S("ui.pay_with_card"), N = k.unstyled ? f : `${k.className} cedros-theme__stripe-button ${f}`.trim(), I = x && typeof x != "string" ? x?.code ?? null : null, z = x ? typeof x == "string" ? x : ((
|
|
979
|
-
if (!
|
|
980
|
-
const A = O.errors[
|
|
978
|
+
const { status: g, error: x, transactionId: y, processPayment: h, processCartCheckout: _ } = Ms(), k = pn(), { isCartMode: w, effectiveResource: b } = Gr(e, t), { t: S, translations: O } = Vn(), P = c || S("ui.pay_with_card"), N = k.unstyled ? f : `${k.className} cedros-theme__stripe-button ${f}`.trim(), I = x && typeof x != "string" ? x?.code ?? null : null, z = x ? typeof x == "string" ? x : ((T) => {
|
|
979
|
+
if (!T || !O) return "";
|
|
980
|
+
const A = O.errors[T];
|
|
981
981
|
return A ? A.action ? `${A.message} ${A.action}` : A.message : "";
|
|
982
982
|
})(I) : null, C = J(async () => {
|
|
983
983
|
fe().debug("[StripeButton] executePayment with couponCode:", i);
|
|
984
|
-
const
|
|
985
|
-
if (dr("stripe", b,
|
|
984
|
+
const T = w && t ? vn(t) : void 0;
|
|
985
|
+
if (dr("stripe", b, T), u && u("stripe"), !w && !b) {
|
|
986
986
|
const F = "Invalid payment configuration: missing resource or items";
|
|
987
|
-
fe().error("[StripeButton]", F), Ft("stripe", F, b,
|
|
987
|
+
fe().error("[StripeButton]", F), Ft("stripe", F, b, T), m && m(F);
|
|
988
988
|
return;
|
|
989
989
|
}
|
|
990
990
|
let A;
|
|
991
|
-
Dn("stripe", b,
|
|
991
|
+
Dn("stripe", b, T), w && t ? (fe().debug("[StripeButton] Processing cart checkout with coupon:", i), A = await _(
|
|
992
992
|
t,
|
|
993
993
|
n,
|
|
994
994
|
r,
|
|
@@ -1002,10 +1002,10 @@ function Il({
|
|
|
1002
1002
|
a,
|
|
1003
1003
|
s,
|
|
1004
1004
|
i
|
|
1005
|
-
)), A && A.success && A.transactionId ? (ur("stripe", A.transactionId, b,
|
|
1006
|
-
}, [i, w, b, t, n, r, a, s, _, h, u, p, m]),
|
|
1007
|
-
() => lr(
|
|
1008
|
-
[
|
|
1005
|
+
)), A && A.success && A.transactionId ? (ur("stripe", A.transactionId, b, T), p && p(A.transactionId)) : A && !A.success && A.error && (Ft("stripe", A.error, b, T), m && m(A.error));
|
|
1006
|
+
}, [i, w, b, t, n, r, a, s, _, h, u, p, m]), E = Se(() => w && t ? `stripe-cart-${t.map((T) => T.resource).join("-")}` : `stripe-${b || "unknown"}`, [w, t, b]), R = Se(
|
|
1007
|
+
() => lr(E, C),
|
|
1008
|
+
[E, C]
|
|
1009
1009
|
), j = g === "loading", L = l || j;
|
|
1010
1010
|
return /* @__PURE__ */ d("div", { className: N, style: k.unstyled ? {} : k.style, children: [
|
|
1011
1011
|
/* @__PURE__ */ o(
|
|
@@ -1200,13 +1200,13 @@ function Rl({
|
|
|
1200
1200
|
fe().debug("[CreditsButton] executePayment");
|
|
1201
1201
|
const j = _ && t ? vn(t) : void 0;
|
|
1202
1202
|
if (dr("credits", k, j), c && c("credits"), !n) {
|
|
1203
|
-
const
|
|
1204
|
-
fe().error("[CreditsButton]",
|
|
1203
|
+
const T = "Authentication required: please log in to pay with credits";
|
|
1204
|
+
fe().error("[CreditsButton]", T), Ft("credits", T, k, j), u && u(T);
|
|
1205
1205
|
return;
|
|
1206
1206
|
}
|
|
1207
1207
|
if (!_ && !k) {
|
|
1208
|
-
const
|
|
1209
|
-
fe().error("[CreditsButton]",
|
|
1208
|
+
const T = "Invalid payment configuration: missing resource";
|
|
1209
|
+
fe().error("[CreditsButton]", T), Ft("credits", T, k, j), u && u(T);
|
|
1210
1210
|
return;
|
|
1211
1211
|
}
|
|
1212
1212
|
let L;
|
|
@@ -1226,7 +1226,7 @@ function Rl({
|
|
|
1226
1226
|
]), z = Se(() => _ && t ? `credits-cart-${t.map((j) => j.resource).join("-")}` : `credits-${k || "unknown"}`, [_, t, k]), C = Se(
|
|
1227
1227
|
() => lr(z, M),
|
|
1228
1228
|
[z, M]
|
|
1229
|
-
),
|
|
1229
|
+
), E = m === "loading", R = i || E;
|
|
1230
1230
|
return /* @__PURE__ */ d("div", { className: O, style: h.unstyled ? {} : h.style, children: [
|
|
1231
1231
|
/* @__PURE__ */ o(
|
|
1232
1232
|
"button",
|
|
@@ -1235,7 +1235,7 @@ function Rl({
|
|
|
1235
1235
|
disabled: R,
|
|
1236
1236
|
className: h.unstyled ? p : "cedros-theme__button cedros-theme__credits",
|
|
1237
1237
|
type: "button",
|
|
1238
|
-
children:
|
|
1238
|
+
children: E ? w("ui.processing") : S
|
|
1239
1239
|
}
|
|
1240
1240
|
),
|
|
1241
1241
|
I && /* @__PURE__ */ o("div", { className: h.unstyled ? "" : "cedros-theme__error", children: I }),
|
|
@@ -1437,11 +1437,11 @@ function Ol({
|
|
|
1437
1437
|
metadata: p,
|
|
1438
1438
|
couponCode: m
|
|
1439
1439
|
}) {
|
|
1440
|
-
const { connected: f, connecting: g, connect: x, disconnect: y, select: h, wallets: _, wallet: k, publicKey: w } = Rs(), { status: b, error: S, transactionId: O, processPayment: P, processCartPayment: N } = yf(), I = pn(), { solanaError: M } = kn(), { isCartMode: z, effectiveResource: C } = Gr(e, t), { t:
|
|
1440
|
+
const { connected: f, connecting: g, connect: x, disconnect: y, select: h, wallets: _, wallet: k, publicKey: w } = Rs(), { status: b, error: S, transactionId: O, processPayment: P, processCartPayment: N } = yf(), I = pn(), { solanaError: M } = kn(), { isCartMode: z, effectiveResource: C } = Gr(e, t), { t: E, translations: R } = Vn(), j = n || E("ui.pay_with_crypto"), L = S && typeof S != "string" ? S?.code ?? null : null, T = M && typeof M != "string" ? M?.code ?? null : null, A = (re) => {
|
|
1441
1441
|
if (!re || !R) return "";
|
|
1442
1442
|
const _e = R.errors[re];
|
|
1443
1443
|
return _e ? _e.action ? `${_e.message} ${_e.action}` : _e.message : "";
|
|
1444
|
-
}, F = S ? typeof S == "string" ? S : A(L) : null, Q = M ? typeof M == "string" ? M : A(
|
|
1444
|
+
}, F = S ? typeof S == "string" ? S : A(L) : null, Q = M ? typeof M == "string" ? M : A(T) : null, ee = tt(P), $ = tt(N);
|
|
1445
1445
|
ve(() => {
|
|
1446
1446
|
ee.current = P, $.current = N;
|
|
1447
1447
|
}, [P, N]);
|
|
@@ -1560,7 +1560,7 @@ function Ol({
|
|
|
1560
1560
|
// MUST be 0 for crypto - each payment needs fresh transaction
|
|
1561
1561
|
}),
|
|
1562
1562
|
[Me, ye]
|
|
1563
|
-
), Ke = b === "loading", Xe = r || Ke || g || !!ue,
|
|
1563
|
+
), Ke = b === "loading", Xe = r || Ke || g || !!ue, St = Ke ? E("ui.processing") : j, et = J(async () => {
|
|
1564
1564
|
try {
|
|
1565
1565
|
ge(!1), f && await y(), h(null), B(!0);
|
|
1566
1566
|
} catch (re) {
|
|
@@ -1588,7 +1588,7 @@ function Ol({
|
|
|
1588
1588
|
disabled: Xe,
|
|
1589
1589
|
className: I.unstyled ? c : "cedros-theme__button cedros-theme__crypto",
|
|
1590
1590
|
type: "button",
|
|
1591
|
-
children:
|
|
1591
|
+
children: St
|
|
1592
1592
|
}
|
|
1593
1593
|
),
|
|
1594
1594
|
de && !u && /* @__PURE__ */ o(
|
|
@@ -1643,14 +1643,14 @@ function Ol({
|
|
|
1643
1643
|
fontWeight: 600,
|
|
1644
1644
|
color: I.tokens.surfaceText
|
|
1645
1645
|
},
|
|
1646
|
-
children:
|
|
1646
|
+
children: E("wallet.select_wallet")
|
|
1647
1647
|
}
|
|
1648
1648
|
),
|
|
1649
1649
|
/* @__PURE__ */ o(
|
|
1650
1650
|
"button",
|
|
1651
1651
|
{
|
|
1652
1652
|
onClick: () => B(!1),
|
|
1653
|
-
style:
|
|
1653
|
+
style: Tl(I.tokens.surfaceText),
|
|
1654
1654
|
"aria-label": "Close modal",
|
|
1655
1655
|
type: "button",
|
|
1656
1656
|
children: "×"
|
|
@@ -1736,13 +1736,13 @@ function Ol({
|
|
|
1736
1736
|
fontSize: "inherit"
|
|
1737
1737
|
},
|
|
1738
1738
|
type: "button",
|
|
1739
|
-
children:
|
|
1739
|
+
children: E("ui.disconnect")
|
|
1740
1740
|
}
|
|
1741
1741
|
)
|
|
1742
1742
|
] }),
|
|
1743
1743
|
!u && Q && /* @__PURE__ */ o("div", { className: I.unstyled ? "" : "cedros-theme__error", children: Q }),
|
|
1744
1744
|
!u && F && /* @__PURE__ */ o("div", { className: I.unstyled ? "" : "cedros-theme__error", children: F }),
|
|
1745
|
-
!u && O && /* @__PURE__ */ o("div", { className: I.unstyled ? "" : "cedros-theme__success", children:
|
|
1745
|
+
!u && O && /* @__PURE__ */ o("div", { className: I.unstyled ? "" : "cedros-theme__success", children: E("ui.payment_successful") })
|
|
1746
1746
|
] });
|
|
1747
1747
|
}
|
|
1748
1748
|
const vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1779,16 +1779,16 @@ const vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1779
1779
|
}) => {
|
|
1780
1780
|
const { tokens: z } = pn();
|
|
1781
1781
|
return ve(() => {
|
|
1782
|
-
const C = (
|
|
1783
|
-
|
|
1782
|
+
const C = (E) => {
|
|
1783
|
+
E.key === "Escape" && e && t();
|
|
1784
1784
|
};
|
|
1785
1785
|
return window.addEventListener("keydown", C), () => window.removeEventListener("keydown", C);
|
|
1786
1786
|
}, [e, t]), ve(() => {
|
|
1787
1787
|
if (e) {
|
|
1788
1788
|
const C = window.scrollY;
|
|
1789
1789
|
return document.body.style.position = "fixed", document.body.style.top = `-${C}px`, document.body.style.width = "100%", document.body.style.overflowY = "scroll", () => {
|
|
1790
|
-
const
|
|
1791
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", document.body.style.overflowY = "", window.scrollTo(0,
|
|
1790
|
+
const E = document.body.style.top ? Math.abs(parseInt(document.body.style.top.replace("px", ""), 10)) : 0;
|
|
1791
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", document.body.style.overflowY = "", window.scrollTo(0, E);
|
|
1792
1792
|
};
|
|
1793
1793
|
}
|
|
1794
1794
|
}, [e]), e ? /* @__PURE__ */ o(
|
|
@@ -1850,7 +1850,7 @@ const vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1850
1850
|
"button",
|
|
1851
1851
|
{
|
|
1852
1852
|
onClick: t,
|
|
1853
|
-
style:
|
|
1853
|
+
style: Tl(z.surfaceText),
|
|
1854
1854
|
"aria-label": "Close modal",
|
|
1855
1855
|
children: "×"
|
|
1856
1856
|
}
|
|
@@ -1940,14 +1940,14 @@ const vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1940
1940
|
hideMessages: M = !1,
|
|
1941
1941
|
renderModal: z
|
|
1942
1942
|
}) => {
|
|
1943
|
-
const C = pn(), [
|
|
1943
|
+
const C = pn(), [E, R] = H(!1), { status: j, processPayment: L, processCartCheckout: T } = Ms(), { isCartMode: A, effectiveResource: F } = Gr(e, t), { t: Q } = Vn(), ee = n || Q("ui.purchase"), $ = r || Q("ui.card"), W = a || Q("ui.usdc_solana"), X = s || Q("ui.pay_with_credits") || "Pay with Credits", q = J(async () => {
|
|
1944
1944
|
if (N && i) {
|
|
1945
1945
|
const { detectSolanaWallets: Z } = await Promise.resolve().then(() => xN);
|
|
1946
1946
|
if (!Z()) {
|
|
1947
1947
|
const oe = A ? void 0 : F, ue = A && t ? vn(t) : void 0;
|
|
1948
1948
|
dr("stripe", oe, ue), u && u("stripe"), Dn("stripe", oe, ue);
|
|
1949
1949
|
let ye;
|
|
1950
|
-
A && t ? ye = await
|
|
1950
|
+
A && t ? ye = await T(
|
|
1951
1951
|
t,
|
|
1952
1952
|
w,
|
|
1953
1953
|
b,
|
|
@@ -1966,11 +1966,11 @@ const vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
R(!0);
|
|
1969
|
-
}, [N, i, A, t, F,
|
|
1969
|
+
}, [N, i, A, t, F, T, L, w, b, S, k, O, p, m, f, y, u]), de = Se(() => A && t ? `purchase-cart-${t.map((Z) => Z.resource).join("-")}` : `purchase-${F || "unknown"}`, [A, t, F]), B = Se(
|
|
1970
1970
|
() => lr(de, q),
|
|
1971
1971
|
[de, q]
|
|
1972
1972
|
), ne = j === "loading", ge = {
|
|
1973
|
-
isOpen:
|
|
1973
|
+
isOpen: E,
|
|
1974
1974
|
onClose: () => R(!1),
|
|
1975
1975
|
resource: A ? void 0 : F,
|
|
1976
1976
|
items: A ? t : void 0,
|
|
@@ -2098,7 +2098,7 @@ function g1(e) {
|
|
|
2098
2098
|
), O = m ? c.solanaEndpoint ?? _f[c.solanaCluster] : "";
|
|
2099
2099
|
if (!t && (!n || n.length === 0))
|
|
2100
2100
|
return fe().error('CedrosPay: Must provide either "resource" or "items" prop'), /* @__PURE__ */ o("div", { className: a.className, style: { color: u.tokens.errorText }, children: "Configuration error: No resource or items provided" });
|
|
2101
|
-
const P = a.showCard ?? !0, N = a.showCredits ?? !1, I = a.showPurchaseButton ?? !1, M = a.layout ?? "vertical", z = a.hideMessages ?? !1, C = i.autoDetectWallets ?? !0,
|
|
2101
|
+
const P = a.showCard ?? !0, N = a.showCredits ?? !1, I = a.showPurchaseButton ?? !1, M = a.layout ?? "vertical", z = a.hideMessages ?? !1, C = i.autoDetectWallets ?? !0, E = /* @__PURE__ */ o("div", { className: u.unstyled ? a.className : `cedros-theme__pay ${a.className || ""}`, children: /* @__PURE__ */ d("div", { className: u.unstyled ? "" : `cedros-theme__pay-content cedros-theme__pay-content--${M}`, children: [
|
|
2102
2102
|
I ? /* @__PURE__ */ o(
|
|
2103
2103
|
wf,
|
|
2104
2104
|
{
|
|
@@ -2179,7 +2179,7 @@ function g1(e) {
|
|
|
2179
2179
|
" items"
|
|
2180
2180
|
] })
|
|
2181
2181
|
] }) });
|
|
2182
|
-
return /* @__PURE__ */ o("div", { className: u.unstyled ? a.className : u.className, style: u.unstyled ? {} : u.style, children: m ? /* @__PURE__ */ o(kf, { endpoint: O, wallets: g, children:
|
|
2182
|
+
return /* @__PURE__ */ o("div", { className: u.unstyled ? a.className : u.className, style: u.unstyled ? {} : u.style, children: m ? /* @__PURE__ */ o(kf, { endpoint: O, wallets: g, children: E }) : E });
|
|
2183
2183
|
}
|
|
2184
2184
|
const K = {
|
|
2185
2185
|
products: /* @__PURE__ */ d("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -2878,7 +2878,7 @@ function Pf(e) {
|
|
|
2878
2878
|
function Af(e) {
|
|
2879
2879
|
return e.optionValueIds?.length ? [...e.optionValueIds].sort().join("|") : Object.entries(e.options).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${t}:${n}`).join("|");
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2881
|
+
function Ef({
|
|
2882
2882
|
variationConfig: e,
|
|
2883
2883
|
variants: t,
|
|
2884
2884
|
onChange: n,
|
|
@@ -3093,7 +3093,7 @@ function Tf({
|
|
|
3093
3093
|
] }) })
|
|
3094
3094
|
] });
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function Tf({
|
|
3097
3097
|
serverUrl: e,
|
|
3098
3098
|
productId: t,
|
|
3099
3099
|
productTitle: n,
|
|
@@ -3198,7 +3198,7 @@ function Ef({
|
|
|
3198
3198
|
}
|
|
3199
3199
|
) }),
|
|
3200
3200
|
x.variationTypes.length > 0 && /* @__PURE__ */ o("div", { className: "cedros-admin__variations-editor-section", children: /* @__PURE__ */ o(
|
|
3201
|
-
|
|
3201
|
+
Ef,
|
|
3202
3202
|
{
|
|
3203
3203
|
variationConfig: x,
|
|
3204
3204
|
variants: h,
|
|
@@ -3235,40 +3235,40 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3235
3235
|
fulfillmentNotes: "",
|
|
3236
3236
|
shippingCountriesCsv: "",
|
|
3237
3237
|
inventoryQuantity: ""
|
|
3238
|
-
}), O = (
|
|
3239
|
-
const A =
|
|
3240
|
-
email:
|
|
3241
|
-
name:
|
|
3242
|
-
phone:
|
|
3243
|
-
shippingAddress:
|
|
3244
|
-
billingAddress:
|
|
3245
|
-
}, ee =
|
|
3246
|
-
title:
|
|
3247
|
-
slug:
|
|
3238
|
+
}), O = (T) => {
|
|
3239
|
+
const A = T.tagsCsv.split(",").map((q) => q.trim()).filter(Boolean), F = T.categoryIdsCsv.split(",").map((q) => q.trim()).filter(Boolean), Q = {
|
|
3240
|
+
email: T.checkoutEmail,
|
|
3241
|
+
name: T.checkoutName,
|
|
3242
|
+
phone: T.checkoutPhone,
|
|
3243
|
+
shippingAddress: T.checkoutShippingAddress,
|
|
3244
|
+
billingAddress: T.checkoutBillingAddress
|
|
3245
|
+
}, ee = T.fulfillmentType === "shipping" ? "physical" : "digital", $ = {
|
|
3246
|
+
title: T.title,
|
|
3247
|
+
slug: T.slug || T.id,
|
|
3248
3248
|
shipping_profile: ee,
|
|
3249
|
-
inventory_status:
|
|
3249
|
+
inventory_status: T.inventoryStatus,
|
|
3250
3250
|
checkout_requirements: JSON.stringify(Q),
|
|
3251
|
-
fulfillment_type:
|
|
3251
|
+
fulfillment_type: T.fulfillmentType
|
|
3252
3252
|
};
|
|
3253
|
-
|
|
3254
|
-
const W =
|
|
3255
|
-
W && ($.compare_at_amount_cents = String(W)), A.length && ($.tags = JSON.stringify(A)), F.length && ($.category_ids = JSON.stringify(F)),
|
|
3256
|
-
const X =
|
|
3253
|
+
T.imageUrl && ($.image_url = T.imageUrl);
|
|
3254
|
+
const W = T.compareAtUsd ? Math.round(Number(T.compareAtUsd) * 100) : 0;
|
|
3255
|
+
W && ($.compare_at_amount_cents = String(W)), A.length && ($.tags = JSON.stringify(A)), F.length && ($.category_ids = JSON.stringify(F)), T.fulfillmentNotes && ($.fulfillment_notes = T.fulfillmentNotes);
|
|
3256
|
+
const X = T.shippingCountriesCsv.split(",").map((q) => q.trim().toUpperCase()).filter(Boolean);
|
|
3257
3257
|
return X.length && ($.shippingCountries = X.join(","), $.shipping_countries = X.join(",")), $;
|
|
3258
|
-
}, P = (
|
|
3258
|
+
}, P = (T) => T.metadata?.title || T.description || T.id, N = (T) => T.metadata?.image_url, I = J(async () => {
|
|
3259
3259
|
try {
|
|
3260
3260
|
w(null);
|
|
3261
|
-
let
|
|
3261
|
+
let T;
|
|
3262
3262
|
if (r?.isAuthenticated())
|
|
3263
|
-
|
|
3263
|
+
T = await r.fetchWithAuth(`/admin/products?limit=${n}`);
|
|
3264
3264
|
else {
|
|
3265
3265
|
const A = { "Content-Type": "application/json" };
|
|
3266
3266
|
t && (A["X-API-Key"] = t);
|
|
3267
3267
|
const F = await fetch(`${e}/admin/products?limit=${n}`, { headers: A });
|
|
3268
3268
|
if (!F.ok) throw new Error(`Failed to fetch products: ${F.status}`);
|
|
3269
|
-
|
|
3269
|
+
T = await F.json();
|
|
3270
3270
|
}
|
|
3271
|
-
s(
|
|
3271
|
+
s(T.products || []);
|
|
3272
3272
|
} catch {
|
|
3273
3273
|
s([]), w("Failed to load products");
|
|
3274
3274
|
} finally {
|
|
@@ -3278,8 +3278,8 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3278
3278
|
ve(() => {
|
|
3279
3279
|
I();
|
|
3280
3280
|
}, [I]);
|
|
3281
|
-
const M = async (
|
|
3282
|
-
if (
|
|
3281
|
+
const M = async (T) => {
|
|
3282
|
+
if (T.preventDefault(), !(!b.id || !b.description)) {
|
|
3283
3283
|
if (g(null), b.fulfillmentType === "shipping" && b.checkoutShippingAddress && !b.shippingCountriesCsv.split(",").map((F) => F.trim()).filter(Boolean).length) {
|
|
3284
3284
|
g("Shipping countries are required when collecting shipping address. Example: US,CA");
|
|
3285
3285
|
return;
|
|
@@ -3344,8 +3344,8 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3344
3344
|
m(!1);
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
3347
|
-
}, z = (
|
|
3348
|
-
switch (
|
|
3347
|
+
}, z = (T) => `$${(T / 100).toFixed(2)}`, C = (T) => {
|
|
3348
|
+
switch (T) {
|
|
3349
3349
|
case "subscription":
|
|
3350
3350
|
return "Subscription";
|
|
3351
3351
|
case "pay_per_access":
|
|
@@ -3355,17 +3355,17 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3355
3355
|
default:
|
|
3356
3356
|
return "One-time purchase";
|
|
3357
3357
|
}
|
|
3358
|
-
},
|
|
3359
|
-
const
|
|
3358
|
+
}, E = Se(() => {
|
|
3359
|
+
const T = a.filter((F) => F.active).length, A = a.reduce((F, Q) => {
|
|
3360
3360
|
const ee = Q.variations?.length ?? 0;
|
|
3361
3361
|
return F + (ee > 0 ? ee : 1);
|
|
3362
3362
|
}, 0);
|
|
3363
|
-
return { activeCount:
|
|
3364
|
-
}, [a]), R = (
|
|
3365
|
-
_((A) => !A || A.key !==
|
|
3366
|
-
}, j = (
|
|
3363
|
+
return { activeCount: T, totalSkus: A };
|
|
3364
|
+
}, [a]), R = (T) => {
|
|
3365
|
+
_((A) => !A || A.key !== T ? { key: T, direction: "asc" } : { key: T, direction: A.direction === "asc" ? "desc" : "asc" });
|
|
3366
|
+
}, j = (T) => !h || h.key !== T ? /* @__PURE__ */ o("span", { className: "cedros-admin__sort-icon cedros-admin__sort-icon--idle", children: K.chevronUp }) : /* @__PURE__ */ o("span", { className: "cedros-admin__sort-icon", children: h.direction === "asc" ? K.chevronUp : K.chevronDown }), L = Se(() => {
|
|
3367
3367
|
if (!h) return a;
|
|
3368
|
-
const
|
|
3368
|
+
const T = h.direction === "asc" ? 1 : -1, A = (F) => {
|
|
3369
3369
|
switch (h.key) {
|
|
3370
3370
|
case "product":
|
|
3371
3371
|
return P(F);
|
|
@@ -3382,7 +3382,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3382
3382
|
};
|
|
3383
3383
|
return [...a].sort((F, Q) => {
|
|
3384
3384
|
const ee = A(F), $ = A(Q);
|
|
3385
|
-
return typeof ee == "number" && typeof $ == "number" ? (ee - $) *
|
|
3385
|
+
return typeof ee == "number" && typeof $ == "number" ? (ee - $) * T : String(ee).localeCompare(String($), void 0, { sensitivity: "base" }) * T;
|
|
3386
3386
|
});
|
|
3387
3387
|
}, [a, h]);
|
|
3388
3388
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__page", children: [
|
|
@@ -3392,8 +3392,8 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3392
3392
|
{
|
|
3393
3393
|
stats: [
|
|
3394
3394
|
{ label: "Total Products", value: a.length },
|
|
3395
|
-
{ label: "Active", value:
|
|
3396
|
-
{ label: "Total SKUs", value:
|
|
3395
|
+
{ label: "Active", value: E.activeCount, variant: E.activeCount > 0 ? "success" : "muted" },
|
|
3396
|
+
{ label: "Total SKUs", value: E.totalSkus }
|
|
3397
3397
|
],
|
|
3398
3398
|
isLoading: i
|
|
3399
3399
|
}
|
|
@@ -3425,7 +3425,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3425
3425
|
type: "text",
|
|
3426
3426
|
className: "cedros-admin__input",
|
|
3427
3427
|
value: b.id,
|
|
3428
|
-
onChange: (
|
|
3428
|
+
onChange: (T) => S((A) => ({ ...A, id: T.target.value })),
|
|
3429
3429
|
placeholder: "e.g., premium-article",
|
|
3430
3430
|
required: !0
|
|
3431
3431
|
}
|
|
@@ -3439,7 +3439,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3439
3439
|
type: "text",
|
|
3440
3440
|
className: "cedros-admin__input",
|
|
3441
3441
|
value: b.title,
|
|
3442
|
-
onChange: (
|
|
3442
|
+
onChange: (T) => S((A) => ({ ...A, title: T.target.value })),
|
|
3443
3443
|
placeholder: "e.g., Cedros Hoodie"
|
|
3444
3444
|
}
|
|
3445
3445
|
)
|
|
@@ -3454,7 +3454,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3454
3454
|
type: "text",
|
|
3455
3455
|
className: "cedros-admin__input",
|
|
3456
3456
|
value: b.slug,
|
|
3457
|
-
onChange: (
|
|
3457
|
+
onChange: (T) => S((A) => ({ ...A, slug: T.target.value })),
|
|
3458
3458
|
placeholder: "e.g., cedros-hoodie (defaults to ID)"
|
|
3459
3459
|
}
|
|
3460
3460
|
)
|
|
@@ -3467,7 +3467,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3467
3467
|
type: "url",
|
|
3468
3468
|
className: "cedros-admin__input",
|
|
3469
3469
|
value: b.imageUrl,
|
|
3470
|
-
onChange: (
|
|
3470
|
+
onChange: (T) => S((A) => ({ ...A, imageUrl: T.target.value })),
|
|
3471
3471
|
placeholder: "https://..."
|
|
3472
3472
|
}
|
|
3473
3473
|
)
|
|
@@ -3481,7 +3481,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3481
3481
|
type: "text",
|
|
3482
3482
|
className: "cedros-admin__input",
|
|
3483
3483
|
value: b.description,
|
|
3484
|
-
onChange: (
|
|
3484
|
+
onChange: (T) => S((A) => ({ ...A, description: T.target.value })),
|
|
3485
3485
|
placeholder: "e.g., Midweight fleece with relaxed fit",
|
|
3486
3486
|
required: !0
|
|
3487
3487
|
}
|
|
@@ -3492,7 +3492,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3492
3492
|
mt,
|
|
3493
3493
|
{
|
|
3494
3494
|
value: b.productType,
|
|
3495
|
-
onChange: (
|
|
3495
|
+
onChange: (T) => S((A) => ({ ...A, productType: T })),
|
|
3496
3496
|
options: [
|
|
3497
3497
|
{ value: "one_time", label: "One-time purchase" },
|
|
3498
3498
|
{ value: "pay_per_access", label: "Pay per access" },
|
|
@@ -3505,8 +3505,8 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3505
3505
|
mt,
|
|
3506
3506
|
{
|
|
3507
3507
|
value: b.fulfillmentType,
|
|
3508
|
-
onChange: (
|
|
3509
|
-
const A =
|
|
3508
|
+
onChange: (T) => {
|
|
3509
|
+
const A = T;
|
|
3510
3510
|
S((F) => ({
|
|
3511
3511
|
...F,
|
|
3512
3512
|
fulfillmentType: A,
|
|
@@ -3527,9 +3527,9 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3527
3527
|
mt,
|
|
3528
3528
|
{
|
|
3529
3529
|
value: b.inventoryStatus,
|
|
3530
|
-
onChange: (
|
|
3530
|
+
onChange: (T) => S((A) => ({
|
|
3531
3531
|
...A,
|
|
3532
|
-
inventoryStatus:
|
|
3532
|
+
inventoryStatus: T
|
|
3533
3533
|
})),
|
|
3534
3534
|
options: [
|
|
3535
3535
|
{ value: "in_stock", label: "In stock" },
|
|
@@ -3548,9 +3548,9 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3548
3548
|
type: "number",
|
|
3549
3549
|
className: "cedros-admin__input",
|
|
3550
3550
|
value: b.inventoryQuantity,
|
|
3551
|
-
onChange: (
|
|
3551
|
+
onChange: (T) => S((A) => ({
|
|
3552
3552
|
...A,
|
|
3553
|
-
inventoryQuantity:
|
|
3553
|
+
inventoryQuantity: T.target.value === "" ? "" : parseInt(T.target.value) || 0
|
|
3554
3554
|
})),
|
|
3555
3555
|
placeholder: "Leave blank for untracked",
|
|
3556
3556
|
min: "0"
|
|
@@ -3565,7 +3565,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3565
3565
|
type: "number",
|
|
3566
3566
|
className: "cedros-admin__input",
|
|
3567
3567
|
value: b.compareAtUsd === "" ? "" : b.compareAtUsd,
|
|
3568
|
-
onChange: (
|
|
3568
|
+
onChange: (T) => S((A) => ({ ...A, compareAtUsd: T.target.value === "" ? "" : parseFloat(T.target.value) || 0 })),
|
|
3569
3569
|
placeholder: "e.g., 78.00",
|
|
3570
3570
|
min: "0",
|
|
3571
3571
|
step: "0.01"
|
|
@@ -3581,7 +3581,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3581
3581
|
type: "number",
|
|
3582
3582
|
className: "cedros-admin__input",
|
|
3583
3583
|
value: b.priceUsd === "" ? "" : b.priceUsd,
|
|
3584
|
-
onChange: (
|
|
3584
|
+
onChange: (T) => S((A) => ({ ...A, priceUsd: T.target.value === "" ? "" : parseFloat(T.target.value) || 0 })),
|
|
3585
3585
|
placeholder: "e.g., 5.00",
|
|
3586
3586
|
min: "0",
|
|
3587
3587
|
step: "0.01",
|
|
@@ -3598,7 +3598,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3598
3598
|
type: "text",
|
|
3599
3599
|
className: "cedros-admin__input",
|
|
3600
3600
|
value: b.tagsCsv,
|
|
3601
|
-
onChange: (
|
|
3601
|
+
onChange: (T) => S((A) => ({ ...A, tagsCsv: T.target.value })),
|
|
3602
3602
|
placeholder: "e.g., core, new, gift"
|
|
3603
3603
|
}
|
|
3604
3604
|
)
|
|
@@ -3611,7 +3611,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3611
3611
|
type: "text",
|
|
3612
3612
|
className: "cedros-admin__input",
|
|
3613
3613
|
value: b.categoryIdsCsv,
|
|
3614
|
-
onChange: (
|
|
3614
|
+
onChange: (T) => S((A) => ({ ...A, categoryIdsCsv: T.target.value })),
|
|
3615
3615
|
placeholder: "e.g., cat_apparel, cat_accessories"
|
|
3616
3616
|
}
|
|
3617
3617
|
)
|
|
@@ -3622,7 +3622,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3622
3622
|
mt,
|
|
3623
3623
|
{
|
|
3624
3624
|
value: b.checkoutEmail,
|
|
3625
|
-
onChange: (
|
|
3625
|
+
onChange: (T) => S((A) => ({ ...A, checkoutEmail: T })),
|
|
3626
3626
|
options: [
|
|
3627
3627
|
{ value: "none", label: "None" },
|
|
3628
3628
|
{ value: "optional", label: "Optional" },
|
|
@@ -3635,7 +3635,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3635
3635
|
mt,
|
|
3636
3636
|
{
|
|
3637
3637
|
value: b.checkoutName,
|
|
3638
|
-
onChange: (
|
|
3638
|
+
onChange: (T) => S((A) => ({ ...A, checkoutName: T })),
|
|
3639
3639
|
options: [
|
|
3640
3640
|
{ value: "none", label: "None" },
|
|
3641
3641
|
{ value: "optional", label: "Optional" },
|
|
@@ -3648,7 +3648,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3648
3648
|
mt,
|
|
3649
3649
|
{
|
|
3650
3650
|
value: b.checkoutPhone,
|
|
3651
|
-
onChange: (
|
|
3651
|
+
onChange: (T) => S((A) => ({ ...A, checkoutPhone: T })),
|
|
3652
3652
|
options: [
|
|
3653
3653
|
{ value: "none", label: "None" },
|
|
3654
3654
|
{ value: "optional", label: "Optional" },
|
|
@@ -3667,7 +3667,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3667
3667
|
{
|
|
3668
3668
|
type: "checkbox",
|
|
3669
3669
|
checked: b.checkoutShippingAddress,
|
|
3670
|
-
onChange: (
|
|
3670
|
+
onChange: (T) => S((A) => ({ ...A, checkoutShippingAddress: T.target.checked }))
|
|
3671
3671
|
}
|
|
3672
3672
|
),
|
|
3673
3673
|
"Collect shipping address"
|
|
@@ -3681,7 +3681,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3681
3681
|
{
|
|
3682
3682
|
type: "checkbox",
|
|
3683
3683
|
checked: b.checkoutBillingAddress,
|
|
3684
|
-
onChange: (
|
|
3684
|
+
onChange: (T) => S((A) => ({ ...A, checkoutBillingAddress: T.target.checked }))
|
|
3685
3685
|
}
|
|
3686
3686
|
),
|
|
3687
3687
|
"Collect billing address"
|
|
@@ -3696,7 +3696,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3696
3696
|
type: "text",
|
|
3697
3697
|
className: "cedros-admin__input",
|
|
3698
3698
|
value: b.fulfillmentNotes,
|
|
3699
|
-
onChange: (
|
|
3699
|
+
onChange: (T) => S((A) => ({ ...A, fulfillmentNotes: T.target.value })),
|
|
3700
3700
|
placeholder: b.fulfillmentType === "shipping" ? "e.g., Ships within 3-5 business days" : "e.g., Downloadable from your account after purchase"
|
|
3701
3701
|
}
|
|
3702
3702
|
)
|
|
@@ -3709,7 +3709,7 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3709
3709
|
type: "text",
|
|
3710
3710
|
className: "cedros-admin__input",
|
|
3711
3711
|
value: b.shippingCountriesCsv,
|
|
3712
|
-
onChange: (
|
|
3712
|
+
onChange: (T) => S((A) => ({ ...A, shippingCountriesCsv: T.target.value })),
|
|
3713
3713
|
placeholder: "e.g., US,CA"
|
|
3714
3714
|
}
|
|
3715
3715
|
),
|
|
@@ -3744,45 +3744,45 @@ function If({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3744
3744
|
] }) }),
|
|
3745
3745
|
/* @__PURE__ */ o("th", { children: "Actions" })
|
|
3746
3746
|
] }) }),
|
|
3747
|
-
/* @__PURE__ */ o("tbody", { children: L.map((
|
|
3748
|
-
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("code", { children:
|
|
3747
|
+
/* @__PURE__ */ o("tbody", { children: L.map((T) => /* @__PURE__ */ d("tr", { children: [
|
|
3748
|
+
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("code", { children: T.id }) }),
|
|
3749
3749
|
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
3750
|
-
N(
|
|
3750
|
+
N(T) ? /* @__PURE__ */ o(
|
|
3751
3751
|
"img",
|
|
3752
3752
|
{
|
|
3753
|
-
src: N(
|
|
3753
|
+
src: N(T),
|
|
3754
3754
|
alt: "",
|
|
3755
3755
|
style: { width: 28, height: 28, borderRadius: 6, objectFit: "cover" }
|
|
3756
3756
|
}
|
|
3757
3757
|
) : /* @__PURE__ */ o("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(0,0,0,0.06)" } }),
|
|
3758
3758
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
3759
|
-
/* @__PURE__ */ o("span", { style: { fontWeight: 600 }, children: P(
|
|
3760
|
-
/* @__PURE__ */ o("span", { style: { opacity: 0.8 }, children:
|
|
3759
|
+
/* @__PURE__ */ o("span", { style: { fontWeight: 600 }, children: P(T) }),
|
|
3760
|
+
/* @__PURE__ */ o("span", { style: { opacity: 0.8 }, children: T.description })
|
|
3761
3761
|
] })
|
|
3762
3762
|
] }) }),
|
|
3763
|
-
/* @__PURE__ */ o("td", { children: C(
|
|
3764
|
-
/* @__PURE__ */ o("td", { children: z(
|
|
3765
|
-
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("span", { className: `cedros-admin__badge ${
|
|
3763
|
+
/* @__PURE__ */ o("td", { children: C(T.metadata?.product_type) }),
|
|
3764
|
+
/* @__PURE__ */ o("td", { children: z(T.fiatAmountCents) }),
|
|
3765
|
+
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("span", { className: `cedros-admin__badge ${T.active ? "cedros-admin__badge--success" : "cedros-admin__badge--muted"}`, children: T.active ? "Active" : "Inactive" }) }),
|
|
3766
3766
|
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ d("div", { style: { display: "flex", gap: "0.25rem" }, children: [
|
|
3767
3767
|
/* @__PURE__ */ o("button", { className: "cedros-admin__button cedros-admin__button--ghost", children: "Edit" }),
|
|
3768
3768
|
/* @__PURE__ */ o(
|
|
3769
3769
|
"button",
|
|
3770
3770
|
{
|
|
3771
3771
|
className: "cedros-admin__button cedros-admin__button--ghost",
|
|
3772
|
-
onClick: () => y(
|
|
3772
|
+
onClick: () => y(T),
|
|
3773
3773
|
children: "Variations"
|
|
3774
3774
|
}
|
|
3775
3775
|
)
|
|
3776
3776
|
] }) })
|
|
3777
|
-
] },
|
|
3777
|
+
] }, T.id)) })
|
|
3778
3778
|
] }) }),
|
|
3779
3779
|
x && /* @__PURE__ */ o("div", { className: "cedros-admin__modal-overlay", onClick: () => y(null), children: /* @__PURE__ */ o(
|
|
3780
3780
|
"div",
|
|
3781
3781
|
{
|
|
3782
3782
|
className: "cedros-admin__modal cedros-admin__modal--lg",
|
|
3783
|
-
onClick: (
|
|
3783
|
+
onClick: (T) => T.stopPropagation(),
|
|
3784
3784
|
children: /* @__PURE__ */ o(
|
|
3785
|
-
|
|
3785
|
+
Tf,
|
|
3786
3786
|
{
|
|
3787
3787
|
serverUrl: e,
|
|
3788
3788
|
productId: x.id,
|
|
@@ -3870,8 +3870,8 @@ function Rf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
};
|
|
3872
3872
|
return [...a].sort((M, z) => {
|
|
3873
|
-
const C = I(M),
|
|
3874
|
-
return typeof C == "number" && typeof
|
|
3873
|
+
const C = I(M), E = I(z);
|
|
3874
|
+
return typeof C == "number" && typeof E == "number" ? (C - E) * N : String(C).localeCompare(String(E), void 0, { sensitivity: "base" }) * N;
|
|
3875
3875
|
});
|
|
3876
3876
|
}, [a, h]);
|
|
3877
3877
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__page", children: [
|
|
@@ -4005,7 +4005,7 @@ function Of({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4005
4005
|
if (I.preventDefault(), !(!h.code || h.discountValue <= 0)) {
|
|
4006
4006
|
m(!0);
|
|
4007
4007
|
try {
|
|
4008
|
-
const M = h.minimumAmountUsd ? Math.round(Number(h.minimumAmountUsd) * 100) : void 0, z = h.productIdsCsv.split(",").map((R) => R.trim()).filter(Boolean), C = h.categoryIdsCsv.split(",").map((R) => R.trim()).filter(Boolean),
|
|
4008
|
+
const M = h.minimumAmountUsd ? Math.round(Number(h.minimumAmountUsd) * 100) : void 0, z = h.productIdsCsv.split(",").map((R) => R.trim()).filter(Boolean), C = h.categoryIdsCsv.split(",").map((R) => R.trim()).filter(Boolean), E = {
|
|
4009
4009
|
code: h.code,
|
|
4010
4010
|
discountType: h.discountType,
|
|
4011
4011
|
discountValue: h.discountValue,
|
|
@@ -4030,7 +4030,7 @@ function Of({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4030
4030
|
if (r?.isAuthenticated())
|
|
4031
4031
|
await r.fetchWithAuth("/admin/coupons", {
|
|
4032
4032
|
method: "POST",
|
|
4033
|
-
body: JSON.stringify(
|
|
4033
|
+
body: JSON.stringify(E)
|
|
4034
4034
|
});
|
|
4035
4035
|
else {
|
|
4036
4036
|
const R = { "Content-Type": "application/json" };
|
|
@@ -4038,7 +4038,7 @@ function Of({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4038
4038
|
const j = await fetch(`${e}/admin/coupons`, {
|
|
4039
4039
|
method: "POST",
|
|
4040
4040
|
headers: R,
|
|
4041
|
-
body: JSON.stringify(
|
|
4041
|
+
body: JSON.stringify(E)
|
|
4042
4042
|
});
|
|
4043
4043
|
if (!j.ok) throw new Error(`Failed to create coupon: ${j.status}`);
|
|
4044
4044
|
}
|
|
@@ -4086,8 +4086,8 @@ function Of({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4086
4086
|
}
|
|
4087
4087
|
};
|
|
4088
4088
|
return [...a].sort((z, C) => {
|
|
4089
|
-
const
|
|
4090
|
-
return typeof
|
|
4089
|
+
const E = M(z), R = M(C);
|
|
4090
|
+
return typeof E == "number" && typeof R == "number" ? (E - R) * I : String(E).localeCompare(String(R), void 0, { sensitivity: "base" }) * I;
|
|
4091
4091
|
});
|
|
4092
4092
|
}, [a, f]);
|
|
4093
4093
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__page", children: [
|
|
@@ -4375,7 +4375,7 @@ function Of({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4375
4375
|
] });
|
|
4376
4376
|
}
|
|
4377
4377
|
function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
4378
|
-
const [a, s] = H([]), [i, c] = H(!0), [l, u] = H(null), [p, m] = H([]), [f, g] = H(!0), [x, y] = H(null), [h, _] = H(null), [k, w] = H([]), [b, S] = H(!0), [O, P] = H(null), [N, I] = H(null), [M, z] = H(null), [C,
|
|
4378
|
+
const [a, s] = H([]), [i, c] = H(!0), [l, u] = H(null), [p, m] = H([]), [f, g] = H(!0), [x, y] = H(null), [h, _] = H(null), [k, w] = H([]), [b, S] = H(!0), [O, P] = H(null), [N, I] = H(null), [M, z] = H(null), [C, E] = H(""), [R, j] = H(null), L = J(async () => {
|
|
4379
4379
|
try {
|
|
4380
4380
|
let U;
|
|
4381
4381
|
const ae = `/admin/refunds?limit=${n}`;
|
|
@@ -4384,9 +4384,9 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4384
4384
|
else {
|
|
4385
4385
|
const me = { "Content-Type": "application/json" };
|
|
4386
4386
|
t && (me["X-API-Key"] = t);
|
|
4387
|
-
const
|
|
4388
|
-
if (!
|
|
4389
|
-
U = await
|
|
4387
|
+
const Ee = await fetch(`${e}${ae}`, { headers: me });
|
|
4388
|
+
if (!Ee.ok) throw new Error(`Failed to fetch x402 refunds: ${Ee.status}`);
|
|
4389
|
+
U = await Ee.json();
|
|
4390
4390
|
}
|
|
4391
4391
|
s(U.refunds || []);
|
|
4392
4392
|
} catch (U) {
|
|
@@ -4401,18 +4401,18 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4401
4401
|
ve(() => {
|
|
4402
4402
|
L();
|
|
4403
4403
|
}, [L]);
|
|
4404
|
-
const
|
|
4404
|
+
const T = J(async () => {
|
|
4405
4405
|
try {
|
|
4406
4406
|
let U;
|
|
4407
4407
|
const ae = `/admin/credits/refund-requests?status=pending&limit=${n}&offset=0`;
|
|
4408
4408
|
if (r?.isAuthenticated())
|
|
4409
4409
|
U = await r.fetchWithAuth(ae);
|
|
4410
4410
|
else {
|
|
4411
|
-
const
|
|
4412
|
-
t && (
|
|
4413
|
-
const
|
|
4414
|
-
if (!
|
|
4415
|
-
U = await
|
|
4411
|
+
const Ee = { "Content-Type": "application/json" };
|
|
4412
|
+
t && (Ee["X-API-Key"] = t);
|
|
4413
|
+
const Te = await fetch(`${e}${ae}`, { headers: Ee });
|
|
4414
|
+
if (!Te.ok) throw new Error(`Failed to fetch credits refund requests: ${Te.status}`);
|
|
4415
|
+
U = await Te.json();
|
|
4416
4416
|
}
|
|
4417
4417
|
const me = Array.isArray(U) ? U : "refundRequests" in U ? U.refundRequests : U.requests || [];
|
|
4418
4418
|
m(me);
|
|
@@ -4426,8 +4426,8 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4426
4426
|
}
|
|
4427
4427
|
}, [e, t, n, r]);
|
|
4428
4428
|
ve(() => {
|
|
4429
|
-
|
|
4430
|
-
}, [
|
|
4429
|
+
T();
|
|
4430
|
+
}, [T]);
|
|
4431
4431
|
const A = async (U) => {
|
|
4432
4432
|
y(U.id);
|
|
4433
4433
|
try {
|
|
@@ -4435,12 +4435,12 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4435
4435
|
if (r?.isAuthenticated())
|
|
4436
4436
|
await r.fetchWithAuth(ae, { method: "POST", body: me });
|
|
4437
4437
|
else {
|
|
4438
|
-
const
|
|
4439
|
-
t && (
|
|
4440
|
-
const
|
|
4441
|
-
if (!
|
|
4438
|
+
const Ee = { "Content-Type": "application/json" };
|
|
4439
|
+
t && (Ee["X-API-Key"] = t);
|
|
4440
|
+
const Te = await fetch(`${e}${ae}`, { method: "POST", headers: Ee, body: me });
|
|
4441
|
+
if (!Te.ok) throw new Error(`Failed to process credits refund: ${Te.status}`);
|
|
4442
4442
|
}
|
|
4443
|
-
await
|
|
4443
|
+
await T();
|
|
4444
4444
|
} catch (ae) {
|
|
4445
4445
|
fe().error("[RefundsSection] Failed to process credits refund:", ae, {
|
|
4446
4446
|
serverUrl: e.slice(0, 20) + "...",
|
|
@@ -4451,24 +4451,24 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4451
4451
|
y(null);
|
|
4452
4452
|
}
|
|
4453
4453
|
}, F = (U) => {
|
|
4454
|
-
|
|
4454
|
+
E(U.reason ?? ""), z(U);
|
|
4455
4455
|
}, Q = () => {
|
|
4456
|
-
z(null),
|
|
4456
|
+
z(null), E("");
|
|
4457
4457
|
}, ee = async () => {
|
|
4458
4458
|
if (!M) return;
|
|
4459
4459
|
const U = M, ae = C;
|
|
4460
4460
|
Q(), y(U.id);
|
|
4461
4461
|
try {
|
|
4462
|
-
const me = `/admin/credits/refund-requests/${U.id}/reject`,
|
|
4462
|
+
const me = `/admin/credits/refund-requests/${U.id}/reject`, Ee = JSON.stringify({ reason: ae });
|
|
4463
4463
|
if (r?.isAuthenticated())
|
|
4464
|
-
await r.fetchWithAuth(me, { method: "POST", body:
|
|
4464
|
+
await r.fetchWithAuth(me, { method: "POST", body: Ee });
|
|
4465
4465
|
else {
|
|
4466
|
-
const
|
|
4467
|
-
t && (
|
|
4468
|
-
const je = await fetch(`${e}${me}`, { method: "POST", headers:
|
|
4466
|
+
const Te = { "Content-Type": "application/json" };
|
|
4467
|
+
t && (Te["X-API-Key"] = t);
|
|
4468
|
+
const je = await fetch(`${e}${me}`, { method: "POST", headers: Te, body: Ee });
|
|
4469
4469
|
if (!je.ok) throw new Error(`Failed to reject credits refund: ${je.status}`);
|
|
4470
4470
|
}
|
|
4471
|
-
await
|
|
4471
|
+
await T();
|
|
4472
4472
|
} catch (me) {
|
|
4473
4473
|
fe().error("[RefundsSection] Failed to reject credits refund:", me, {
|
|
4474
4474
|
serverUrl: e.slice(0, 20) + "...",
|
|
@@ -4487,9 +4487,9 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4487
4487
|
else {
|
|
4488
4488
|
const me = { "Content-Type": "application/json" };
|
|
4489
4489
|
t && (me["X-API-Key"] = t);
|
|
4490
|
-
const
|
|
4491
|
-
if (!
|
|
4492
|
-
U = await
|
|
4490
|
+
const Ee = await fetch(`${e}${ae}`, { headers: me });
|
|
4491
|
+
if (!Ee.ok) throw new Error(`Failed to fetch Stripe refunds: ${Ee.status}`);
|
|
4492
|
+
U = await Ee.json();
|
|
4493
4493
|
}
|
|
4494
4494
|
w(U.refunds || []);
|
|
4495
4495
|
} catch (U) {
|
|
@@ -4513,8 +4513,8 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4513
4513
|
else {
|
|
4514
4514
|
const me = { "Content-Type": "application/json" };
|
|
4515
4515
|
t && (me["X-API-Key"] = t);
|
|
4516
|
-
const
|
|
4517
|
-
if (!
|
|
4516
|
+
const Ee = await fetch(`${e}${ae}`, { method: "POST", headers: me });
|
|
4517
|
+
if (!Ee.ok) throw new Error(`Failed to process refund: ${Ee.status}`);
|
|
4518
4518
|
}
|
|
4519
4519
|
await $();
|
|
4520
4520
|
} catch (ae) {
|
|
@@ -4549,7 +4549,7 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4549
4549
|
default:
|
|
4550
4550
|
return "muted";
|
|
4551
4551
|
}
|
|
4552
|
-
}, ge = (U) => U.stripeRefundId ?? "—", Z = (U) => U.chargeId ?? "—", oe = k.filter((U) => U.status === "pending" || U.status === "requires_action").length, ue = p.filter((U) => U.status === "pending").length, ye = a.filter((U) => U.status === "pending").length, Me = oe + ue + ye, Ye = k.filter((U) => U.status === "succeeded").reduce((U, ae) => U + ae.amount, 0), Ke = p.filter((U) => U.status === "processed").reduce((U, ae) => U + ae.amountLamports, 0), Xe = a.filter((U) => U.status === "completed").reduce((U, ae) => U + ae.amount, 0),
|
|
4552
|
+
}, ge = (U) => U.stripeRefundId ?? "—", Z = (U) => U.chargeId ?? "—", oe = k.filter((U) => U.status === "pending" || U.status === "requires_action").length, ue = p.filter((U) => U.status === "pending").length, ye = a.filter((U) => U.status === "pending").length, Me = oe + ue + ye, Ye = k.filter((U) => U.status === "succeeded").reduce((U, ae) => U + ae.amount, 0), Ke = p.filter((U) => U.status === "processed").reduce((U, ae) => U + ae.amountLamports, 0), Xe = a.filter((U) => U.status === "completed").reduce((U, ae) => U + ae.amount, 0), St = Ye / 100 + Ke / 1e6 + Xe, et = (U) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(U), qt = b || f || i, gt = (U) => {
|
|
4553
4553
|
I((ae) => !ae || ae.key !== U ? { key: U, direction: "asc" } : { key: U, direction: ae.direction === "asc" ? "desc" : "asc" });
|
|
4554
4554
|
}, re = (U) => {
|
|
4555
4555
|
_((ae) => !ae || ae.key !== U ? { key: U, direction: "asc" } : { key: U, direction: ae.direction === "asc" ? "desc" : "asc" });
|
|
@@ -4576,11 +4576,11 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4576
4576
|
return me.id;
|
|
4577
4577
|
}
|
|
4578
4578
|
};
|
|
4579
|
-
return [...k].sort((me,
|
|
4580
|
-
const
|
|
4581
|
-
return typeof
|
|
4579
|
+
return [...k].sort((me, Ee) => {
|
|
4580
|
+
const Te = ae(me), je = ae(Ee);
|
|
4581
|
+
return typeof Te == "number" && typeof je == "number" ? (Te - je) * U : String(Te).localeCompare(String(je), void 0, { sensitivity: "base" }) * U;
|
|
4582
4582
|
});
|
|
4583
|
-
}, [k, N]),
|
|
4583
|
+
}, [k, N]), Ct = Se(() => {
|
|
4584
4584
|
if (!h) return p;
|
|
4585
4585
|
const U = h.direction === "asc" ? 1 : -1, ae = (me) => {
|
|
4586
4586
|
switch (h.key) {
|
|
@@ -4601,9 +4601,9 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4601
4601
|
return me.id;
|
|
4602
4602
|
}
|
|
4603
4603
|
};
|
|
4604
|
-
return [...p].sort((me,
|
|
4605
|
-
const
|
|
4606
|
-
return typeof
|
|
4604
|
+
return [...p].sort((me, Ee) => {
|
|
4605
|
+
const Te = ae(me), je = ae(Ee);
|
|
4606
|
+
return typeof Te == "number" && typeof je == "number" ? (Te - je) * U : String(Te).localeCompare(String(je), void 0, { sensitivity: "base" }) * U;
|
|
4607
4607
|
});
|
|
4608
4608
|
}, [p, h]), vt = Se(() => {
|
|
4609
4609
|
if (!l) return a;
|
|
@@ -4624,14 +4624,14 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4624
4624
|
return me.id;
|
|
4625
4625
|
}
|
|
4626
4626
|
};
|
|
4627
|
-
return [...a].sort((me,
|
|
4628
|
-
const
|
|
4629
|
-
return typeof
|
|
4627
|
+
return [...a].sort((me, Ee) => {
|
|
4628
|
+
const Te = ae(me), je = ae(Ee);
|
|
4629
|
+
return typeof Te == "number" && typeof je == "number" ? (Te - je) * U : String(Te).localeCompare(String(je), void 0, { sensitivity: "base" }) * U;
|
|
4630
4630
|
});
|
|
4631
4631
|
}, [a, l]);
|
|
4632
4632
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__page", children: [
|
|
4633
4633
|
/* @__PURE__ */ o(rn, { message: R, onRetry: () => {
|
|
4634
|
-
L(),
|
|
4634
|
+
L(), T(), $();
|
|
4635
4635
|
} }),
|
|
4636
4636
|
/* @__PURE__ */ o(
|
|
4637
4637
|
mr,
|
|
@@ -4641,7 +4641,7 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4641
4641
|
{ label: "Card Pending", value: oe, description: "Stripe" },
|
|
4642
4642
|
{ label: "Credits Pending", value: ue },
|
|
4643
4643
|
{ label: "Crypto Pending", value: ye, description: "x402" },
|
|
4644
|
-
{ label: "Total Refunded", value: et(
|
|
4644
|
+
{ label: "Total Refunded", value: et(St), variant: "success" }
|
|
4645
4645
|
],
|
|
4646
4646
|
isLoading: qt
|
|
4647
4647
|
}
|
|
@@ -4737,7 +4737,7 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4737
4737
|
] }) }),
|
|
4738
4738
|
/* @__PURE__ */ o("th", { children: "Actions" })
|
|
4739
4739
|
] }) }),
|
|
4740
|
-
/* @__PURE__ */ o("tbody", { children:
|
|
4740
|
+
/* @__PURE__ */ o("tbody", { children: Ct.map((U) => /* @__PURE__ */ d("tr", { children: [
|
|
4741
4741
|
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("code", { children: U.id }) }),
|
|
4742
4742
|
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("code", { children: U.originalTransactionId }) }),
|
|
4743
4743
|
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o("code", { children: U.userId ?? "—" }) }),
|
|
@@ -4846,7 +4846,7 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4846
4846
|
{
|
|
4847
4847
|
className: "cedros-admin__input",
|
|
4848
4848
|
value: C,
|
|
4849
|
-
onChange: (U) =>
|
|
4849
|
+
onChange: (U) => E(U.target.value),
|
|
4850
4850
|
placeholder: "Enter rejection reason...",
|
|
4851
4851
|
rows: 3,
|
|
4852
4852
|
style: { resize: "vertical" }
|
|
@@ -5058,7 +5058,22 @@ const Ds = {
|
|
|
5058
5058
|
description: "Server keypair(s) used to sign and pay for transactions. Required for gasless payments.",
|
|
5059
5059
|
showWhen: "gasless_enabled"
|
|
5060
5060
|
},
|
|
5061
|
-
|
|
5061
|
+
rounding_mode: {
|
|
5062
|
+
type: "dropdown",
|
|
5063
|
+
options: ["nearest", "up", "down"],
|
|
5064
|
+
description: "How to round fractional token amounts: nearest (default), up (always round up), or down (always round down)."
|
|
5065
|
+
},
|
|
5066
|
+
network: { hidden: !0 },
|
|
5067
|
+
ws_url: { hidden: !0 },
|
|
5068
|
+
// Derived from rpc_url
|
|
5069
|
+
skip_preflight: { hidden: !0 },
|
|
5070
|
+
// Always false; not a user decision
|
|
5071
|
+
commitment: { hidden: !0 },
|
|
5072
|
+
// Internal Solana parameter
|
|
5073
|
+
compute_unit_limit: { hidden: !0 },
|
|
5074
|
+
// Internal Solana parameter
|
|
5075
|
+
compute_unit_price: { hidden: !0 }
|
|
5076
|
+
// Internal Solana parameter
|
|
5062
5077
|
}
|
|
5063
5078
|
},
|
|
5064
5079
|
paywall: {
|
|
@@ -5244,16 +5259,22 @@ const Ds = {
|
|
|
5244
5259
|
// Shown in header toggle when relevant
|
|
5245
5260
|
base_url: { hidden: !0 },
|
|
5246
5261
|
// Deployment setting
|
|
5247
|
-
timeout: { hidden: !0 }
|
|
5262
|
+
timeout: { hidden: !0 },
|
|
5248
5263
|
// Developer setting
|
|
5264
|
+
jwt_issuer: { hidden: !0 },
|
|
5265
|
+
// Internal auth config
|
|
5266
|
+
jwt_audience: { hidden: !0 }
|
|
5267
|
+
// Internal auth config
|
|
5249
5268
|
}
|
|
5250
5269
|
},
|
|
5251
|
-
|
|
5270
|
+
shop: {
|
|
5252
5271
|
label: "Storefront",
|
|
5253
5272
|
description: "Product pages & display settings",
|
|
5254
5273
|
secrets: [],
|
|
5255
5274
|
icon: "🏪",
|
|
5256
5275
|
fields: {
|
|
5276
|
+
enabled: { hidden: !0 },
|
|
5277
|
+
// Shown in StorefrontSection header toggle
|
|
5257
5278
|
"relatedProducts.mode": {
|
|
5258
5279
|
type: "dropdown",
|
|
5259
5280
|
options: ["most_recent", "by_category", "manual", "ai"]
|
|
@@ -5265,7 +5286,7 @@ const Ds = {
|
|
|
5265
5286
|
function Dl(e, t) {
|
|
5266
5287
|
return Ds[e]?.secrets.includes(t) ?? !1;
|
|
5267
5288
|
}
|
|
5268
|
-
const
|
|
5289
|
+
const Tr = "[REDACTED]";
|
|
5269
5290
|
function Ls({
|
|
5270
5291
|
data: e,
|
|
5271
5292
|
onSave: t,
|
|
@@ -5341,7 +5362,7 @@ function zf({
|
|
|
5341
5362
|
for (const w of Object.keys(k))
|
|
5342
5363
|
if (Dl(e, w)) {
|
|
5343
5364
|
const b = n[w], S = k[w];
|
|
5344
|
-
(S ===
|
|
5365
|
+
(S === Tr || S === b) && (k[w] = Tr);
|
|
5345
5366
|
}
|
|
5346
5367
|
return k;
|
|
5347
5368
|
}, [s, n, e]), { status: p, error: m } = Ls({
|
|
@@ -5567,7 +5588,7 @@ function zf({
|
|
|
5567
5588
|
),
|
|
5568
5589
|
x(b.description)
|
|
5569
5590
|
] });
|
|
5570
|
-
const S = c.has(k), O = b.isSecret && !S && w ===
|
|
5591
|
+
const S = c.has(k), O = b.isSecret && !S && w === Tr ? Tr : w;
|
|
5571
5592
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__field", children: [
|
|
5572
5593
|
/* @__PURE__ */ d("label", { className: "cedros-admin__field-label", children: [
|
|
5573
5594
|
b.label,
|
|
@@ -5909,7 +5930,7 @@ function Bf({
|
|
|
5909
5930
|
borderRadius: "0.5rem"
|
|
5910
5931
|
}, children: 'No items. Click "Add" to create one.' }),
|
|
5911
5932
|
m.map((w, b) => {
|
|
5912
|
-
const S = s.has(b), O = c === b, P = w ===
|
|
5933
|
+
const S = s.has(b), O = c === b, P = w === Tr;
|
|
5913
5934
|
return /* @__PURE__ */ o(
|
|
5914
5935
|
"div",
|
|
5915
5936
|
{
|
|
@@ -6118,7 +6139,7 @@ function Ll({
|
|
|
6118
6139
|
}, [g, z]);
|
|
6119
6140
|
const C = J(async (A) => {
|
|
6120
6141
|
await l.updateConfig(r, A, "Updated via admin dashboard"), await M();
|
|
6121
|
-
}, [l, r, M]),
|
|
6142
|
+
}, [l, r, M]), E = J(async (A) => l.validateConfig(r, A), [l, r]), [R, j] = H(!1), L = J(async () => {
|
|
6122
6143
|
if (!u || R) return;
|
|
6123
6144
|
const A = !!u.config[i], F = !A, Q = { ...u.config, [i]: F };
|
|
6124
6145
|
j(!0), p({ ...u, config: Q });
|
|
@@ -6129,7 +6150,7 @@ function Ll({
|
|
|
6129
6150
|
} finally {
|
|
6130
6151
|
j(!1);
|
|
6131
6152
|
}
|
|
6132
|
-
}, [u, l, r, i, R]),
|
|
6153
|
+
}, [u, l, r, i, R]), T = !!u?.config[i];
|
|
6133
6154
|
return y && !u ? /* @__PURE__ */ o("div", { className: "cedros-admin__section", children: /* @__PURE__ */ d("div", { className: "cedros-admin__loading", children: [
|
|
6134
6155
|
K.loading,
|
|
6135
6156
|
" Loading ",
|
|
@@ -6145,14 +6166,14 @@ function Ll({
|
|
|
6145
6166
|
] }),
|
|
6146
6167
|
I && /* @__PURE__ */ o("p", { className: "cedros-admin__text-muted", style: { marginTop: "0.25rem" }, children: I })
|
|
6147
6168
|
] }),
|
|
6148
|
-
c && u &&
|
|
6149
|
-
/* @__PURE__ */ o("span", { style: { fontSize: "0.875rem", color:
|
|
6169
|
+
c && u && /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
6170
|
+
/* @__PURE__ */ o("span", { style: { fontSize: "0.875rem", color: T ? "var(--cedros-admin-text, #171717)" : "var(--cedros-admin-muted, #737373)" }, children: T ? "Enabled" : "Disabled" }),
|
|
6150
6171
|
/* @__PURE__ */ o(
|
|
6151
6172
|
"button",
|
|
6152
6173
|
{
|
|
6153
6174
|
type: "button",
|
|
6154
6175
|
role: "switch",
|
|
6155
|
-
"aria-checked":
|
|
6176
|
+
"aria-checked": T,
|
|
6156
6177
|
onClick: L,
|
|
6157
6178
|
disabled: R,
|
|
6158
6179
|
style: {
|
|
@@ -6160,7 +6181,7 @@ function Ll({
|
|
|
6160
6181
|
height: 24,
|
|
6161
6182
|
borderRadius: 12,
|
|
6162
6183
|
border: "none",
|
|
6163
|
-
backgroundColor:
|
|
6184
|
+
backgroundColor: T ? "var(--cedros-admin-primary, #171717)" : "var(--cedros-admin-border, #d4d4d4)",
|
|
6164
6185
|
cursor: R ? "wait" : "pointer",
|
|
6165
6186
|
position: "relative",
|
|
6166
6187
|
transition: "background-color 0.2s",
|
|
@@ -6173,7 +6194,7 @@ function Ll({
|
|
|
6173
6194
|
style: {
|
|
6174
6195
|
position: "absolute",
|
|
6175
6196
|
top: 2,
|
|
6176
|
-
left:
|
|
6197
|
+
left: T ? 22 : 2,
|
|
6177
6198
|
width: 20,
|
|
6178
6199
|
height: 20,
|
|
6179
6200
|
borderRadius: "50%",
|
|
@@ -6193,11 +6214,11 @@ function Ll({
|
|
|
6193
6214
|
className: "cedros-admin__settings-editor",
|
|
6194
6215
|
style: {
|
|
6195
6216
|
marginTop: "1rem",
|
|
6196
|
-
opacity: c && !
|
|
6197
|
-
pointerEvents: c && !
|
|
6217
|
+
opacity: c && !T ? 0.6 : 1,
|
|
6218
|
+
pointerEvents: c && !T ? "none" : "auto"
|
|
6198
6219
|
},
|
|
6199
6220
|
children: [
|
|
6200
|
-
c && !
|
|
6221
|
+
c && !T && /* @__PURE__ */ o(
|
|
6201
6222
|
"div",
|
|
6202
6223
|
{
|
|
6203
6224
|
style: {
|
|
@@ -6220,7 +6241,7 @@ function Ll({
|
|
|
6220
6241
|
config: u.config,
|
|
6221
6242
|
originalConfig: u.config,
|
|
6222
6243
|
onSave: C,
|
|
6223
|
-
onValidate:
|
|
6244
|
+
onValidate: E,
|
|
6224
6245
|
onCancel: () => M()
|
|
6225
6246
|
}
|
|
6226
6247
|
)
|
|
@@ -6305,7 +6326,7 @@ function Ll({
|
|
|
6305
6326
|
if (u) {
|
|
6306
6327
|
O(!0), b(null);
|
|
6307
6328
|
try {
|
|
6308
|
-
const A = await
|
|
6329
|
+
const A = await E(u.config);
|
|
6309
6330
|
b(A);
|
|
6310
6331
|
} catch (A) {
|
|
6311
6332
|
b({
|
|
@@ -6519,7 +6540,7 @@ function zl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
6519
6540
|
...X,
|
|
6520
6541
|
plans: X.plans.map((q) => q.id === $ ? { ...q, ...W } : q)
|
|
6521
6542
|
}));
|
|
6522
|
-
},
|
|
6543
|
+
}, E = ($) => {
|
|
6523
6544
|
confirm("Delete this plan? This cannot be undone.") && (a((W) => ({
|
|
6524
6545
|
...W,
|
|
6525
6546
|
plans: W.plans.filter((X) => X.id !== $)
|
|
@@ -6538,7 +6559,7 @@ function zl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
6538
6559
|
if (!q) return;
|
|
6539
6560
|
const de = [...q.features];
|
|
6540
6561
|
de[W] = X, C($, { features: de });
|
|
6541
|
-
},
|
|
6562
|
+
}, T = ($, W) => {
|
|
6542
6563
|
const X = r.plans.find((de) => de.id === $);
|
|
6543
6564
|
if (!X) return;
|
|
6544
6565
|
const q = X.features.filter((de, B) => B !== W);
|
|
@@ -6778,7 +6799,7 @@ function zl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
6778
6799
|
"button",
|
|
6779
6800
|
{
|
|
6780
6801
|
className: "cedros-admin__button cedros-admin__button--ghost",
|
|
6781
|
-
onClick: () =>
|
|
6802
|
+
onClick: () => E($.id),
|
|
6782
6803
|
title: "Delete plan",
|
|
6783
6804
|
style: { padding: "4px 8px", color: "#dc2626" },
|
|
6784
6805
|
children: K.trash
|
|
@@ -6970,7 +6991,7 @@ function zl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
6970
6991
|
"button",
|
|
6971
6992
|
{
|
|
6972
6993
|
className: "cedros-admin__button cedros-admin__button--ghost",
|
|
6973
|
-
onClick: () =>
|
|
6994
|
+
onClick: () => T($.id, de),
|
|
6974
6995
|
style: { padding: "4px 8px", color: "#dc2626" },
|
|
6975
6996
|
title: "Remove feature",
|
|
6976
6997
|
children: K.trash
|
|
@@ -6991,7 +7012,8 @@ function zl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
6991
7012
|
const Hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6992
7013
|
__proto__: null,
|
|
6993
7014
|
SubscriptionsSection: zl
|
|
6994
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7015
|
+
}, Symbol.toStringTag, { value: "Module" })), Ta = {
|
|
7016
|
+
enabled: !0,
|
|
6995
7017
|
relatedProducts: {
|
|
6996
7018
|
mode: "most_recent",
|
|
6997
7019
|
maxItems: 4,
|
|
@@ -7089,23 +7111,23 @@ const Hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7089
7111
|
{ id: "checkout", label: "Checkout" }
|
|
7090
7112
|
];
|
|
7091
7113
|
function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
7092
|
-
const [r, a] = H("shop-page"), [s, i] = H(
|
|
7114
|
+
const [r, a] = H("shop-page"), [s, i] = H(Ta), [c, l] = H(!0), [u, p] = H(!0), [m, f] = H(null), g = J(async () => {
|
|
7093
7115
|
try {
|
|
7094
7116
|
f(null);
|
|
7095
7117
|
let C;
|
|
7096
|
-
const
|
|
7118
|
+
const E = "/admin/config/shop";
|
|
7097
7119
|
if (n?.isAuthenticated())
|
|
7098
|
-
C = await n.fetchWithAuth(
|
|
7120
|
+
C = await n.fetchWithAuth(E);
|
|
7099
7121
|
else {
|
|
7100
7122
|
const R = { "Content-Type": "application/json" };
|
|
7101
7123
|
t && (R["X-API-Key"] = t);
|
|
7102
|
-
const j = await fetch(`${e}${
|
|
7124
|
+
const j = await fetch(`${e}${E}`, { headers: R });
|
|
7103
7125
|
if (!j.ok) throw new Error(`Failed to fetch settings: ${j.status}`);
|
|
7104
7126
|
C = await j.json();
|
|
7105
7127
|
}
|
|
7106
|
-
i({ ...
|
|
7128
|
+
i({ ...Ta, ...C.config });
|
|
7107
7129
|
} catch {
|
|
7108
|
-
i(
|
|
7130
|
+
i(Ta), f("Could not load saved settings. Showing defaults.");
|
|
7109
7131
|
} finally {
|
|
7110
7132
|
l(!1), setTimeout(() => p(!1), 100);
|
|
7111
7133
|
}
|
|
@@ -7114,14 +7136,14 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7114
7136
|
g();
|
|
7115
7137
|
}, [g]);
|
|
7116
7138
|
const x = J(async (C) => {
|
|
7117
|
-
const
|
|
7139
|
+
const E = "/admin/config/shop", R = JSON.stringify({ config: C });
|
|
7118
7140
|
try {
|
|
7119
7141
|
if (n?.isAuthenticated())
|
|
7120
|
-
await n.fetchWithAuth(
|
|
7142
|
+
await n.fetchWithAuth(E, { method: "PUT", body: R });
|
|
7121
7143
|
else {
|
|
7122
7144
|
const j = { "Content-Type": "application/json" };
|
|
7123
7145
|
t && (j["X-API-Key"] = t);
|
|
7124
|
-
const L = await fetch(`${e}${
|
|
7146
|
+
const L = await fetch(`${e}${E}`, { method: "PUT", headers: j, body: R });
|
|
7125
7147
|
if (!L.ok) throw new Error(`Failed to save settings: ${L.status}`);
|
|
7126
7148
|
}
|
|
7127
7149
|
} catch {
|
|
@@ -7133,80 +7155,101 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7133
7155
|
debounceMs: 1500,
|
|
7134
7156
|
enabled: !u
|
|
7135
7157
|
}), _ = (C) => {
|
|
7136
|
-
i((
|
|
7137
|
-
...
|
|
7138
|
-
relatedProducts: { ...
|
|
7158
|
+
i((E) => ({
|
|
7159
|
+
...E,
|
|
7160
|
+
relatedProducts: { ...E.relatedProducts, mode: C }
|
|
7139
7161
|
}));
|
|
7140
7162
|
}, k = (C) => {
|
|
7141
|
-
i((
|
|
7142
|
-
...
|
|
7143
|
-
relatedProducts: { ...
|
|
7163
|
+
i((E) => ({
|
|
7164
|
+
...E,
|
|
7165
|
+
relatedProducts: { ...E.relatedProducts, maxItems: C }
|
|
7144
7166
|
}));
|
|
7145
|
-
}, w = (C,
|
|
7167
|
+
}, w = (C, E) => {
|
|
7146
7168
|
i((R) => ({
|
|
7147
7169
|
...R,
|
|
7148
7170
|
relatedProducts: {
|
|
7149
7171
|
...R.relatedProducts,
|
|
7150
|
-
layout: { ...R.relatedProducts.layout, [C]:
|
|
7172
|
+
layout: { ...R.relatedProducts.layout, [C]: E }
|
|
7151
7173
|
}
|
|
7152
7174
|
}));
|
|
7153
|
-
}, b = (C,
|
|
7175
|
+
}, b = (C, E) => {
|
|
7154
7176
|
i((R) => ({
|
|
7155
7177
|
...R,
|
|
7156
7178
|
catalog: {
|
|
7157
7179
|
...R.catalog,
|
|
7158
|
-
filters: { ...R.catalog.filters, [C]:
|
|
7180
|
+
filters: { ...R.catalog.filters, [C]: E }
|
|
7159
7181
|
}
|
|
7160
7182
|
}));
|
|
7161
|
-
}, S = (C,
|
|
7183
|
+
}, S = (C, E) => {
|
|
7162
7184
|
const R = s.catalog.sort, j = Object.values(R).filter(Boolean).length;
|
|
7163
|
-
!
|
|
7185
|
+
!E && j <= 1 || i((L) => ({
|
|
7164
7186
|
...L,
|
|
7165
7187
|
catalog: {
|
|
7166
7188
|
...L.catalog,
|
|
7167
|
-
sort: { ...L.catalog.sort, [C]:
|
|
7189
|
+
sort: { ...L.catalog.sort, [C]: E }
|
|
7168
7190
|
}
|
|
7169
7191
|
}));
|
|
7170
|
-
}, O = (C,
|
|
7192
|
+
}, O = (C, E) => {
|
|
7171
7193
|
i((R) => ({
|
|
7172
7194
|
...R,
|
|
7173
|
-
checkout: { ...R.checkout, [C]:
|
|
7195
|
+
checkout: { ...R.checkout, [C]: E }
|
|
7174
7196
|
}));
|
|
7175
|
-
}, P = (C,
|
|
7197
|
+
}, P = (C, E) => {
|
|
7176
7198
|
i((R) => ({
|
|
7177
7199
|
...R,
|
|
7178
|
-
shopLayout: { ...R.shopLayout, [C]:
|
|
7200
|
+
shopLayout: { ...R.shopLayout, [C]: E }
|
|
7179
7201
|
}));
|
|
7180
|
-
}, N = (C,
|
|
7202
|
+
}, N = (C, E) => {
|
|
7181
7203
|
i((R) => ({
|
|
7182
7204
|
...R,
|
|
7183
|
-
categoryLayout: { ...R.categoryLayout, [C]:
|
|
7205
|
+
categoryLayout: { ...R.categoryLayout, [C]: E }
|
|
7184
7206
|
}));
|
|
7185
|
-
}, I = (C,
|
|
7207
|
+
}, I = (C, E) => {
|
|
7186
7208
|
i((R) => ({
|
|
7187
7209
|
...R,
|
|
7188
|
-
sections: { ...R.sections, [C]:
|
|
7210
|
+
sections: { ...R.sections, [C]: E }
|
|
7189
7211
|
}));
|
|
7190
|
-
}, M = (C,
|
|
7212
|
+
}, M = (C, E) => {
|
|
7191
7213
|
i((R) => ({
|
|
7192
7214
|
...R,
|
|
7193
|
-
inventory: { ...R.inventory, [C]:
|
|
7215
|
+
inventory: { ...R.inventory, [C]: E }
|
|
7194
7216
|
}));
|
|
7195
|
-
}, z = (C,
|
|
7217
|
+
}, z = (C, E) => {
|
|
7196
7218
|
i((R) => ({
|
|
7197
7219
|
...R,
|
|
7198
|
-
shopPage: { ...R.shopPage, [C]:
|
|
7220
|
+
shopPage: { ...R.shopPage, [C]: E }
|
|
7199
7221
|
}));
|
|
7200
7222
|
};
|
|
7201
7223
|
return c ? /* @__PURE__ */ o("div", { className: "cedros-admin__section", children: /* @__PURE__ */ d("div", { className: "cedros-admin__loading", children: [
|
|
7202
7224
|
K.loading,
|
|
7203
7225
|
" Loading storefront settings..."
|
|
7204
7226
|
] }) }) : /* @__PURE__ */ d("div", { className: "cedros-admin__storefront-settings", children: [
|
|
7205
|
-
/* @__PURE__ */ d("div", { className: "cedros-admin__page-header", children: [
|
|
7206
|
-
/* @__PURE__ */
|
|
7207
|
-
|
|
7227
|
+
/* @__PURE__ */ d("div", { className: "cedros-admin__page-header", style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
|
|
7228
|
+
/* @__PURE__ */ d("div", { children: [
|
|
7229
|
+
/* @__PURE__ */ o("h2", { className: "cedros-admin__page-title", children: "Storefront" }),
|
|
7230
|
+
/* @__PURE__ */ o("p", { className: "cedros-admin__page-description", children: "Configure catalog filters, product layouts, and checkout settings." })
|
|
7231
|
+
] }),
|
|
7232
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem", flexShrink: 0 }, children: [
|
|
7233
|
+
/* @__PURE__ */ o("span", { style: { fontSize: "0.875rem", color: s.enabled ? "var(--cedros-admin-text, #171717)" : "var(--cedros-admin-muted, #737373)" }, children: s.enabled ? "Enabled" : "Disabled" }),
|
|
7234
|
+
/* @__PURE__ */ o(_t, { checked: s.enabled, onChange: (C) => i((E) => ({ ...E, enabled: C })) })
|
|
7235
|
+
] })
|
|
7208
7236
|
] }),
|
|
7209
|
-
/* @__PURE__ */
|
|
7237
|
+
!s.enabled && /* @__PURE__ */ o(
|
|
7238
|
+
"div",
|
|
7239
|
+
{
|
|
7240
|
+
style: {
|
|
7241
|
+
padding: "0.75rem 1rem",
|
|
7242
|
+
marginBottom: "1rem",
|
|
7243
|
+
backgroundColor: "var(--cedros-admin-warning-bg, #fef3c7)",
|
|
7244
|
+
border: "1px solid var(--cedros-admin-warning-border, #f59e0b)",
|
|
7245
|
+
borderRadius: "0.375rem",
|
|
7246
|
+
fontSize: "0.875rem",
|
|
7247
|
+
color: "var(--cedros-admin-warning-text, #92400e)"
|
|
7248
|
+
},
|
|
7249
|
+
children: "The storefront is disabled. Enable it using the toggle above to activate your store."
|
|
7250
|
+
}
|
|
7251
|
+
),
|
|
7252
|
+
/* @__PURE__ */ d("div", { className: "cedros-admin__tabs cedros-admin__tabs--line", style: { opacity: s.enabled ? 1 : 0.5, pointerEvents: s.enabled ? "auto" : "none" }, children: [
|
|
7210
7253
|
Zf.map((C) => /* @__PURE__ */ o(
|
|
7211
7254
|
"button",
|
|
7212
7255
|
{
|
|
@@ -7261,7 +7304,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7261
7304
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7262
7305
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7263
7306
|
/* @__PURE__ */ o(
|
|
7264
|
-
|
|
7307
|
+
_t,
|
|
7265
7308
|
{
|
|
7266
7309
|
checked: s.catalog.filters.tags,
|
|
7267
7310
|
onChange: (C) => b("tags", C)
|
|
@@ -7274,7 +7317,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7274
7317
|
] }),
|
|
7275
7318
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7276
7319
|
/* @__PURE__ */ o(
|
|
7277
|
-
|
|
7320
|
+
_t,
|
|
7278
7321
|
{
|
|
7279
7322
|
checked: s.catalog.filters.priceRange,
|
|
7280
7323
|
onChange: (C) => b("priceRange", C)
|
|
@@ -7287,7 +7330,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7287
7330
|
] }),
|
|
7288
7331
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7289
7332
|
/* @__PURE__ */ o(
|
|
7290
|
-
|
|
7333
|
+
_t,
|
|
7291
7334
|
{
|
|
7292
7335
|
checked: s.catalog.filters.inStock,
|
|
7293
7336
|
onChange: (C) => b("inStock", C)
|
|
@@ -7306,7 +7349,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7306
7349
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7307
7350
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7308
7351
|
/* @__PURE__ */ o(
|
|
7309
|
-
|
|
7352
|
+
_t,
|
|
7310
7353
|
{
|
|
7311
7354
|
checked: s.catalog.sort.featured,
|
|
7312
7355
|
onChange: (C) => S("featured", C)
|
|
@@ -7319,7 +7362,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7319
7362
|
] }),
|
|
7320
7363
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7321
7364
|
/* @__PURE__ */ o(
|
|
7322
|
-
|
|
7365
|
+
_t,
|
|
7323
7366
|
{
|
|
7324
7367
|
checked: s.catalog.sort.priceAsc,
|
|
7325
7368
|
onChange: (C) => S("priceAsc", C)
|
|
@@ -7332,7 +7375,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7332
7375
|
] }),
|
|
7333
7376
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7334
7377
|
/* @__PURE__ */ o(
|
|
7335
|
-
|
|
7378
|
+
_t,
|
|
7336
7379
|
{
|
|
7337
7380
|
checked: s.catalog.sort.priceDesc,
|
|
7338
7381
|
onChange: (C) => S("priceDesc", C)
|
|
@@ -7352,7 +7395,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7352
7395
|
/* @__PURE__ */ d("div", { style: { marginBottom: "2rem" }, children: [
|
|
7353
7396
|
/* @__PURE__ */ o("div", { style: { fontWeight: 500, marginBottom: "0.75rem" }, children: "Shop Page" }),
|
|
7354
7397
|
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem", marginBottom: "1rem" }, children: Ia.map((C) => {
|
|
7355
|
-
const
|
|
7398
|
+
const E = s.shopLayout.layout === C.value;
|
|
7356
7399
|
return /* @__PURE__ */ d(
|
|
7357
7400
|
"label",
|
|
7358
7401
|
{
|
|
@@ -7361,10 +7404,10 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7361
7404
|
alignItems: "flex-start",
|
|
7362
7405
|
gap: "0.75rem",
|
|
7363
7406
|
padding: "0.75rem",
|
|
7364
|
-
border: `2px solid ${
|
|
7407
|
+
border: `2px solid ${E ? "var(--cedros-admin-primary, #171717)" : "var(--cedros-admin-border, #e5e5e5)"}`,
|
|
7365
7408
|
borderRadius: 6,
|
|
7366
7409
|
cursor: "pointer",
|
|
7367
|
-
background:
|
|
7410
|
+
background: E ? "var(--cedros-admin-bg-accent, #f5f5f5)" : void 0,
|
|
7368
7411
|
transition: "border-color 0.15s, background 0.15s"
|
|
7369
7412
|
},
|
|
7370
7413
|
children: [
|
|
@@ -7374,7 +7417,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7374
7417
|
type: "radio",
|
|
7375
7418
|
name: "shopLayout",
|
|
7376
7419
|
value: C.value,
|
|
7377
|
-
checked:
|
|
7420
|
+
checked: E,
|
|
7378
7421
|
onChange: () => P("layout", C.value),
|
|
7379
7422
|
style: { marginTop: 2 }
|
|
7380
7423
|
}
|
|
@@ -7402,7 +7445,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7402
7445
|
/* @__PURE__ */ d("div", { style: { paddingTop: "1.5rem", borderTop: "1px solid var(--cedros-admin-border, #e5e5e5)" }, children: [
|
|
7403
7446
|
/* @__PURE__ */ o("div", { style: { fontWeight: 500, marginBottom: "0.75rem" }, children: "Category Pages" }),
|
|
7404
7447
|
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem", marginBottom: "1rem" }, children: Ia.map((C) => {
|
|
7405
|
-
const
|
|
7448
|
+
const E = s.categoryLayout.layout === C.value;
|
|
7406
7449
|
return /* @__PURE__ */ d(
|
|
7407
7450
|
"label",
|
|
7408
7451
|
{
|
|
@@ -7411,10 +7454,10 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7411
7454
|
alignItems: "flex-start",
|
|
7412
7455
|
gap: "0.75rem",
|
|
7413
7456
|
padding: "0.75rem",
|
|
7414
|
-
border: `2px solid ${
|
|
7457
|
+
border: `2px solid ${E ? "var(--cedros-admin-primary, #171717)" : "var(--cedros-admin-border, #e5e5e5)"}`,
|
|
7415
7458
|
borderRadius: 6,
|
|
7416
7459
|
cursor: "pointer",
|
|
7417
|
-
background:
|
|
7460
|
+
background: E ? "var(--cedros-admin-bg-accent, #f5f5f5)" : void 0,
|
|
7418
7461
|
transition: "border-color 0.15s, background 0.15s"
|
|
7419
7462
|
},
|
|
7420
7463
|
children: [
|
|
@@ -7424,7 +7467,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7424
7467
|
type: "radio",
|
|
7425
7468
|
name: "categoryLayout",
|
|
7426
7469
|
value: C.value,
|
|
7427
|
-
checked:
|
|
7470
|
+
checked: E,
|
|
7428
7471
|
onChange: () => N("layout", C.value),
|
|
7429
7472
|
style: { marginTop: 2 }
|
|
7430
7473
|
}
|
|
@@ -7455,7 +7498,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7455
7498
|
/* @__PURE__ */ o("h4", { style: { marginBottom: "0.5rem", fontWeight: 600 }, children: "Related Products" }),
|
|
7456
7499
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1rem", fontSize: 14, opacity: 0.7 }, children: "Configure how related products are displayed on product detail pages." }),
|
|
7457
7500
|
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem", marginBottom: "1.5rem" }, children: qf.map((C) => {
|
|
7458
|
-
const
|
|
7501
|
+
const E = s.relatedProducts.mode === C.value, R = C.badge === "Coming Soon";
|
|
7459
7502
|
return /* @__PURE__ */ d(
|
|
7460
7503
|
"label",
|
|
7461
7504
|
{
|
|
@@ -7464,11 +7507,11 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7464
7507
|
alignItems: "flex-start",
|
|
7465
7508
|
gap: "0.75rem",
|
|
7466
7509
|
padding: "1rem",
|
|
7467
|
-
border: `2px solid ${
|
|
7510
|
+
border: `2px solid ${E ? "var(--cedros-admin-primary, #171717)" : "var(--cedros-admin-border, #e5e5e5)"}`,
|
|
7468
7511
|
borderRadius: 8,
|
|
7469
7512
|
cursor: R ? "not-allowed" : "pointer",
|
|
7470
7513
|
opacity: R ? 0.6 : 1,
|
|
7471
|
-
background:
|
|
7514
|
+
background: E ? "var(--cedros-admin-bg-accent, #f5f5f5)" : void 0,
|
|
7472
7515
|
transition: "border-color 0.15s, background 0.15s"
|
|
7473
7516
|
},
|
|
7474
7517
|
children: [
|
|
@@ -7478,7 +7521,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7478
7521
|
type: "radio",
|
|
7479
7522
|
name: "relatedProductsMode",
|
|
7480
7523
|
value: C.value,
|
|
7481
|
-
checked:
|
|
7524
|
+
checked: E,
|
|
7482
7525
|
onChange: () => !R && _(C.value),
|
|
7483
7526
|
disabled: R,
|
|
7484
7527
|
style: { marginTop: 2 }
|
|
@@ -7550,7 +7593,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7550
7593
|
/* @__PURE__ */ d("div", { style: { marginTop: "1.5rem" }, children: [
|
|
7551
7594
|
/* @__PURE__ */ o("div", { style: { fontWeight: 500, marginBottom: "0.75rem" }, children: "Display Layout" }),
|
|
7552
7595
|
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem", marginBottom: "1rem" }, children: Ia.map((C) => {
|
|
7553
|
-
const
|
|
7596
|
+
const E = s.relatedProducts.layout.layout === C.value;
|
|
7554
7597
|
return /* @__PURE__ */ d(
|
|
7555
7598
|
"label",
|
|
7556
7599
|
{
|
|
@@ -7559,10 +7602,10 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7559
7602
|
alignItems: "flex-start",
|
|
7560
7603
|
gap: "0.75rem",
|
|
7561
7604
|
padding: "0.75rem",
|
|
7562
|
-
border: `2px solid ${
|
|
7605
|
+
border: `2px solid ${E ? "var(--cedros-admin-primary, #171717)" : "var(--cedros-admin-border, #e5e5e5)"}`,
|
|
7563
7606
|
borderRadius: 6,
|
|
7564
7607
|
cursor: "pointer",
|
|
7565
|
-
background:
|
|
7608
|
+
background: E ? "var(--cedros-admin-bg-accent, #f5f5f5)" : void 0,
|
|
7566
7609
|
transition: "border-color 0.15s, background 0.15s"
|
|
7567
7610
|
},
|
|
7568
7611
|
children: [
|
|
@@ -7572,7 +7615,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7572
7615
|
type: "radio",
|
|
7573
7616
|
name: "relatedLayout",
|
|
7574
7617
|
value: C.value,
|
|
7575
|
-
checked:
|
|
7618
|
+
checked: E,
|
|
7576
7619
|
onChange: () => w("layout", C.value),
|
|
7577
7620
|
style: { marginTop: 2 }
|
|
7578
7621
|
}
|
|
@@ -7604,7 +7647,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7604
7647
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7605
7648
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7606
7649
|
/* @__PURE__ */ o(
|
|
7607
|
-
|
|
7650
|
+
_t,
|
|
7608
7651
|
{
|
|
7609
7652
|
checked: s.sections.showDescription,
|
|
7610
7653
|
onChange: (C) => I("showDescription", C)
|
|
@@ -7617,7 +7660,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7617
7660
|
] }),
|
|
7618
7661
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7619
7662
|
/* @__PURE__ */ o(
|
|
7620
|
-
|
|
7663
|
+
_t,
|
|
7621
7664
|
{
|
|
7622
7665
|
checked: s.sections.showSpecs,
|
|
7623
7666
|
onChange: (C) => I("showSpecs", C)
|
|
@@ -7630,7 +7673,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7630
7673
|
] }),
|
|
7631
7674
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7632
7675
|
/* @__PURE__ */ o(
|
|
7633
|
-
|
|
7676
|
+
_t,
|
|
7634
7677
|
{
|
|
7635
7678
|
checked: s.sections.showShipping,
|
|
7636
7679
|
onChange: (C) => I("showShipping", C)
|
|
@@ -7643,7 +7686,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7643
7686
|
] }),
|
|
7644
7687
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7645
7688
|
/* @__PURE__ */ o(
|
|
7646
|
-
|
|
7689
|
+
_t,
|
|
7647
7690
|
{
|
|
7648
7691
|
checked: s.sections.showRelatedProducts,
|
|
7649
7692
|
onChange: (C) => I("showRelatedProducts", C)
|
|
@@ -7663,7 +7706,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7663
7706
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1rem", fontSize: 14, opacity: 0.7 }, children: "Configure checkout and cart page features." }),
|
|
7664
7707
|
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7665
7708
|
/* @__PURE__ */ o(
|
|
7666
|
-
|
|
7709
|
+
_t,
|
|
7667
7710
|
{
|
|
7668
7711
|
checked: s.checkout.promoCodes,
|
|
7669
7712
|
onChange: (C) => O("promoCodes", C)
|
|
@@ -7681,7 +7724,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7681
7724
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7682
7725
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7683
7726
|
/* @__PURE__ */ o(
|
|
7684
|
-
|
|
7727
|
+
_t,
|
|
7685
7728
|
{
|
|
7686
7729
|
checked: s.inventory.preCheckoutVerification,
|
|
7687
7730
|
onChange: (C) => M("preCheckoutVerification", C)
|
|
@@ -7694,7 +7737,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7694
7737
|
] }),
|
|
7695
7738
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7696
7739
|
/* @__PURE__ */ o(
|
|
7697
|
-
|
|
7740
|
+
_t,
|
|
7698
7741
|
{
|
|
7699
7742
|
checked: s.inventory.holdsEnabled,
|
|
7700
7743
|
onChange: (C) => M("holdsEnabled", C)
|
|
@@ -7754,7 +7797,7 @@ function Gf({ status: e, error: t }) {
|
|
|
7754
7797
|
}
|
|
7755
7798
|
);
|
|
7756
7799
|
}
|
|
7757
|
-
function
|
|
7800
|
+
function _t({
|
|
7758
7801
|
checked: e,
|
|
7759
7802
|
onChange: t,
|
|
7760
7803
|
disabled: n = !1
|
|
@@ -7802,7 +7845,7 @@ const Qf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7802
7845
|
__proto__: null,
|
|
7803
7846
|
StorefrontSection: Fl
|
|
7804
7847
|
}, Symbol.toStringTag, { value: "Module" })), Oa = [
|
|
7805
|
-
{ id: "not_set", label: "
|
|
7848
|
+
{ id: "not_set", label: "Disabled", provider: null },
|
|
7806
7849
|
{ id: "gemini-2.5-flash", label: "Gemini 2.5 Flash", provider: "gemini" },
|
|
7807
7850
|
{ id: "gemini-2.5-pro", label: "Gemini 2.5 Pro", provider: "gemini" },
|
|
7808
7851
|
{ id: "openai-4o", label: "OpenAI 4o", provider: "openai" },
|
|
@@ -7908,17 +7951,17 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7908
7951
|
openai: !1
|
|
7909
7952
|
}), O = J(async () => {
|
|
7910
7953
|
try {
|
|
7911
|
-
let
|
|
7954
|
+
let E;
|
|
7912
7955
|
if (n?.isAuthenticated())
|
|
7913
|
-
|
|
7956
|
+
E = await n.fetchWithAuth("/admin/config/ai");
|
|
7914
7957
|
else {
|
|
7915
7958
|
const R = { "Content-Type": "application/json" };
|
|
7916
7959
|
t && (R["X-API-Key"] = t);
|
|
7917
7960
|
const j = await fetch(`${e}/admin/config/ai`, { headers: R });
|
|
7918
7961
|
if (!j.ok) throw new Error(`Failed to fetch: ${j.status}`);
|
|
7919
|
-
|
|
7962
|
+
E = await j.json();
|
|
7920
7963
|
}
|
|
7921
|
-
|
|
7964
|
+
E.settings && i(E.settings);
|
|
7922
7965
|
} catch {
|
|
7923
7966
|
i(oc), h("Could not load saved AI settings. Showing defaults.");
|
|
7924
7967
|
} finally {
|
|
@@ -7929,12 +7972,12 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7929
7972
|
O();
|
|
7930
7973
|
}, [O]);
|
|
7931
7974
|
const P = J(
|
|
7932
|
-
async (
|
|
7933
|
-
const R = k[
|
|
7975
|
+
async (E) => {
|
|
7976
|
+
const R = k[E];
|
|
7934
7977
|
if (R.trim()) {
|
|
7935
7978
|
p(!0), f(null);
|
|
7936
7979
|
try {
|
|
7937
|
-
const j = { provider:
|
|
7980
|
+
const j = { provider: E, apiKey: R };
|
|
7938
7981
|
if (n?.isAuthenticated())
|
|
7939
7982
|
await n.fetchWithAuth("/admin/config/ai/api-key", {
|
|
7940
7983
|
method: "PUT",
|
|
@@ -7943,24 +7986,24 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7943
7986
|
else {
|
|
7944
7987
|
const L = { "Content-Type": "application/json" };
|
|
7945
7988
|
t && (L["X-API-Key"] = t);
|
|
7946
|
-
const
|
|
7989
|
+
const T = await fetch(`${e}/admin/config/ai/api-key`, {
|
|
7947
7990
|
method: "PUT",
|
|
7948
7991
|
headers: L,
|
|
7949
7992
|
body: JSON.stringify(j)
|
|
7950
7993
|
});
|
|
7951
|
-
if (!
|
|
7994
|
+
if (!T.ok) throw new Error(`Failed to save: ${T.status}`);
|
|
7952
7995
|
}
|
|
7953
7996
|
i((L) => ({
|
|
7954
7997
|
...L,
|
|
7955
7998
|
apiKeys: L.apiKeys.map(
|
|
7956
|
-
(
|
|
7957
|
-
...
|
|
7999
|
+
(T) => T.provider === E ? {
|
|
8000
|
+
...T,
|
|
7958
8001
|
isConfigured: !0,
|
|
7959
8002
|
maskedKey: `${R.slice(0, 4)}...${R.slice(-4)}`,
|
|
7960
8003
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7961
|
-
} :
|
|
8004
|
+
} : T
|
|
7962
8005
|
)
|
|
7963
|
-
})), w((L) => ({ ...L, [
|
|
8006
|
+
})), w((L) => ({ ...L, [E]: "" })), x(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => x(!1), 3e3);
|
|
7964
8007
|
} catch (j) {
|
|
7965
8008
|
f(j instanceof Error ? j.message : "Failed to save API key");
|
|
7966
8009
|
} finally {
|
|
@@ -7970,18 +8013,18 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7970
8013
|
},
|
|
7971
8014
|
[k, e, t, n]
|
|
7972
8015
|
), N = J(
|
|
7973
|
-
async (
|
|
7974
|
-
if (confirm(`Are you sure you want to delete the ${
|
|
8016
|
+
async (E) => {
|
|
8017
|
+
if (confirm(`Are you sure you want to delete the ${E === "gemini" ? "Google Gemini" : "OpenAI"} API key?`)) {
|
|
7975
8018
|
p(!0), f(null);
|
|
7976
8019
|
try {
|
|
7977
8020
|
if (n?.isAuthenticated())
|
|
7978
|
-
await n.fetchWithAuth(`/admin/config/ai/api-key/${
|
|
8021
|
+
await n.fetchWithAuth(`/admin/config/ai/api-key/${E}`, {
|
|
7979
8022
|
method: "DELETE"
|
|
7980
8023
|
});
|
|
7981
8024
|
else {
|
|
7982
8025
|
const R = { "Content-Type": "application/json" };
|
|
7983
8026
|
t && (R["X-API-Key"] = t);
|
|
7984
|
-
const j = await fetch(`${e}/admin/config/ai/api-key/${
|
|
8027
|
+
const j = await fetch(`${e}/admin/config/ai/api-key/${E}`, {
|
|
7985
8028
|
method: "DELETE",
|
|
7986
8029
|
headers: R
|
|
7987
8030
|
});
|
|
@@ -7990,7 +8033,7 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7990
8033
|
i((R) => ({
|
|
7991
8034
|
...R,
|
|
7992
8035
|
apiKeys: R.apiKeys.map(
|
|
7993
|
-
(j) => j.provider ===
|
|
8036
|
+
(j) => j.provider === E ? { provider: E, isConfigured: !1 } : j
|
|
7994
8037
|
)
|
|
7995
8038
|
}));
|
|
7996
8039
|
} catch (R) {
|
|
@@ -8002,10 +8045,10 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8002
8045
|
},
|
|
8003
8046
|
[e, t, n]
|
|
8004
8047
|
), I = J(
|
|
8005
|
-
async (
|
|
8048
|
+
async (E, R) => {
|
|
8006
8049
|
p(!0), f(null);
|
|
8007
8050
|
try {
|
|
8008
|
-
const j = { task:
|
|
8051
|
+
const j = { task: E, model: R };
|
|
8009
8052
|
if (n?.isAuthenticated())
|
|
8010
8053
|
await n.fetchWithAuth("/admin/config/ai/assignment", {
|
|
8011
8054
|
method: "PUT",
|
|
@@ -8014,17 +8057,17 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8014
8057
|
else {
|
|
8015
8058
|
const L = { "Content-Type": "application/json" };
|
|
8016
8059
|
t && (L["X-API-Key"] = t);
|
|
8017
|
-
const
|
|
8060
|
+
const T = await fetch(`${e}/admin/config/ai/assignment`, {
|
|
8018
8061
|
method: "PUT",
|
|
8019
8062
|
headers: L,
|
|
8020
8063
|
body: JSON.stringify(j)
|
|
8021
8064
|
});
|
|
8022
|
-
if (!
|
|
8065
|
+
if (!T.ok) throw new Error(`Failed to save: ${T.status}`);
|
|
8023
8066
|
}
|
|
8024
8067
|
i((L) => ({
|
|
8025
8068
|
...L,
|
|
8026
8069
|
taskAssignments: L.taskAssignments.map(
|
|
8027
|
-
(
|
|
8070
|
+
(T) => T.task === E ? { ...T, assignedModel: R } : T
|
|
8028
8071
|
)
|
|
8029
8072
|
})), x(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => x(!1), 3e3);
|
|
8030
8073
|
} catch (j) {
|
|
@@ -8035,24 +8078,24 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8035
8078
|
},
|
|
8036
8079
|
[e, t, n]
|
|
8037
8080
|
), M = J(
|
|
8038
|
-
(
|
|
8039
|
-
if (
|
|
8040
|
-
const R = Oa.find((L) => L.id ===
|
|
8081
|
+
(E) => {
|
|
8082
|
+
if (E === "not_set") return !0;
|
|
8083
|
+
const R = Oa.find((L) => L.id === E);
|
|
8041
8084
|
return R?.provider ? s.apiKeys.find((L) => L.provider === R.provider)?.isConfigured ?? !1 : !0;
|
|
8042
8085
|
},
|
|
8043
8086
|
[s.apiKeys]
|
|
8044
|
-
), z = Se(() => Oa.map((
|
|
8045
|
-
const R = M(
|
|
8087
|
+
), z = Se(() => Oa.map((E) => {
|
|
8088
|
+
const R = M(E.id);
|
|
8046
8089
|
return {
|
|
8047
|
-
value:
|
|
8048
|
-
label: R ?
|
|
8090
|
+
value: E.id,
|
|
8091
|
+
label: R ? E.label : `${E.label} (API key required)`,
|
|
8049
8092
|
disabled: !R
|
|
8050
8093
|
};
|
|
8051
8094
|
}), [M]), C = J(
|
|
8052
|
-
async (
|
|
8095
|
+
async (E, R) => {
|
|
8053
8096
|
p(!0), f(null);
|
|
8054
8097
|
try {
|
|
8055
|
-
const j = { task:
|
|
8098
|
+
const j = { task: E, systemPrompt: R };
|
|
8056
8099
|
if (n?.isAuthenticated())
|
|
8057
8100
|
await n.fetchWithAuth("/admin/config/ai/prompt", {
|
|
8058
8101
|
method: "PUT",
|
|
@@ -8061,17 +8104,17 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8061
8104
|
else {
|
|
8062
8105
|
const L = { "Content-Type": "application/json" };
|
|
8063
8106
|
t && (L["X-API-Key"] = t);
|
|
8064
|
-
const
|
|
8107
|
+
const T = await fetch(`${e}/admin/config/ai/prompt`, {
|
|
8065
8108
|
method: "PUT",
|
|
8066
8109
|
headers: L,
|
|
8067
8110
|
body: JSON.stringify(j)
|
|
8068
8111
|
});
|
|
8069
|
-
if (!
|
|
8112
|
+
if (!T.ok) throw new Error(`Failed to save: ${T.status}`);
|
|
8070
8113
|
}
|
|
8071
8114
|
i((L) => ({
|
|
8072
8115
|
...L,
|
|
8073
8116
|
taskAssignments: L.taskAssignments.map(
|
|
8074
|
-
(
|
|
8117
|
+
(T) => T.task === E ? { ...T, systemPrompt: R } : T
|
|
8075
8118
|
)
|
|
8076
8119
|
})), x(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => x(!1), 3e3);
|
|
8077
8120
|
} catch (j) {
|
|
@@ -8130,8 +8173,8 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8130
8173
|
r === "api-keys" && /* @__PURE__ */ d("div", { className: "cedros-admin__section", style: { marginTop: "1rem" }, children: [
|
|
8131
8174
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header", children: /* @__PURE__ */ o("h3", { className: "cedros-admin__section-title", children: "API Keys" }) }),
|
|
8132
8175
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1.5rem", opacity: 0.7, fontSize: 14 }, children: "Configure API keys for AI providers. Keys are stored securely and never exposed." }),
|
|
8133
|
-
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem" }, children: Yf.map((
|
|
8134
|
-
const R = s.apiKeys.find((L) => L.provider ===
|
|
8176
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem" }, children: Yf.map((E) => {
|
|
8177
|
+
const R = s.apiKeys.find((L) => L.provider === E.id), j = R?.isConfigured ?? !1;
|
|
8135
8178
|
return /* @__PURE__ */ d(
|
|
8136
8179
|
"div",
|
|
8137
8180
|
{
|
|
@@ -8144,7 +8187,7 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8144
8187
|
children: [
|
|
8145
8188
|
/* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "0.75rem" }, children: [
|
|
8146
8189
|
/* @__PURE__ */ d("div", { children: [
|
|
8147
|
-
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children:
|
|
8190
|
+
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children: E.label }),
|
|
8148
8191
|
j && R?.maskedKey && /* @__PURE__ */ d("div", { style: { fontSize: 12, opacity: 0.6, marginTop: 2 }, children: [
|
|
8149
8192
|
"Current key: ",
|
|
8150
8193
|
R.maskedKey,
|
|
@@ -8167,13 +8210,13 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8167
8210
|
/* @__PURE__ */ o(
|
|
8168
8211
|
"input",
|
|
8169
8212
|
{
|
|
8170
|
-
type: b[
|
|
8213
|
+
type: b[E.id] ? "text" : "password",
|
|
8171
8214
|
className: "cedros-admin__input",
|
|
8172
|
-
placeholder: j ? "Enter new key to replace" :
|
|
8173
|
-
value: k[
|
|
8174
|
-
onChange: (L) => w((
|
|
8215
|
+
placeholder: j ? "Enter new key to replace" : E.placeholder,
|
|
8216
|
+
value: k[E.id],
|
|
8217
|
+
onChange: (L) => w((T) => ({ ...T, [E.id]: L.target.value })),
|
|
8175
8218
|
onBlur: () => {
|
|
8176
|
-
k[
|
|
8219
|
+
k[E.id].trim() && P(E.id);
|
|
8177
8220
|
},
|
|
8178
8221
|
style: { flex: 1 }
|
|
8179
8222
|
}
|
|
@@ -8183,10 +8226,10 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8183
8226
|
{
|
|
8184
8227
|
type: "button",
|
|
8185
8228
|
className: "cedros-admin__button cedros-admin__button--ghost",
|
|
8186
|
-
onClick: () => S((L) => ({ ...L, [
|
|
8187
|
-
title: b[
|
|
8229
|
+
onClick: () => S((L) => ({ ...L, [E.id]: !L[E.id] })),
|
|
8230
|
+
title: b[E.id] ? "Hide key" : "Show key",
|
|
8188
8231
|
style: { padding: "0.5rem" },
|
|
8189
|
-
children: b[
|
|
8232
|
+
children: b[E.id] ? K.eyeOff : K.eye
|
|
8190
8233
|
}
|
|
8191
8234
|
),
|
|
8192
8235
|
j && /* @__PURE__ */ o(
|
|
@@ -8194,7 +8237,7 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8194
8237
|
{
|
|
8195
8238
|
type: "button",
|
|
8196
8239
|
className: "cedros-admin__button cedros-admin__button--ghost cedros-admin__button--danger",
|
|
8197
|
-
onClick: () => N(
|
|
8240
|
+
onClick: () => N(E.id),
|
|
8198
8241
|
disabled: u,
|
|
8199
8242
|
title: "Remove API key",
|
|
8200
8243
|
style: { padding: "0.5rem" },
|
|
@@ -8204,15 +8247,15 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8204
8247
|
] }) })
|
|
8205
8248
|
]
|
|
8206
8249
|
},
|
|
8207
|
-
|
|
8250
|
+
E.id
|
|
8208
8251
|
);
|
|
8209
8252
|
}) })
|
|
8210
8253
|
] }),
|
|
8211
8254
|
r === "assignments" && /* @__PURE__ */ d("div", { className: "cedros-admin__section", style: { marginTop: "1rem" }, children: [
|
|
8212
8255
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header", children: /* @__PURE__ */ o("h3", { className: "cedros-admin__section-title", children: "Model Assignments" }) }),
|
|
8213
8256
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1.5rem", opacity: 0.7, fontSize: 14 }, children: "Assign AI models to specific tasks. Models require their provider's API key to be configured." }),
|
|
8214
|
-
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: s.taskAssignments.map((
|
|
8215
|
-
const R = cs.find((L) => L.task ===
|
|
8257
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: s.taskAssignments.map((E) => {
|
|
8258
|
+
const R = cs.find((L) => L.task === E.task), j = Oa.find((L) => L.id === E.assignedModel);
|
|
8216
8259
|
return /* @__PURE__ */ d(
|
|
8217
8260
|
"div",
|
|
8218
8261
|
{
|
|
@@ -8223,15 +8266,15 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8223
8266
|
},
|
|
8224
8267
|
children: [
|
|
8225
8268
|
/* @__PURE__ */ d("div", { style: { marginBottom: "0.75rem" }, children: [
|
|
8226
|
-
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children: R?.label ??
|
|
8269
|
+
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children: R?.label ?? E.task }),
|
|
8227
8270
|
/* @__PURE__ */ o("div", { style: { fontSize: 13, opacity: 0.7, marginTop: 2 }, children: R?.description })
|
|
8228
8271
|
] }),
|
|
8229
8272
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
8230
8273
|
/* @__PURE__ */ o(
|
|
8231
8274
|
mt,
|
|
8232
8275
|
{
|
|
8233
|
-
value:
|
|
8234
|
-
onChange: (L) => I(
|
|
8276
|
+
value: E.assignedModel,
|
|
8277
|
+
onChange: (L) => I(E.task, L),
|
|
8235
8278
|
options: z,
|
|
8236
8279
|
label: "",
|
|
8237
8280
|
disabled: u,
|
|
@@ -8248,25 +8291,25 @@ function Bl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
8248
8291
|
] })
|
|
8249
8292
|
]
|
|
8250
8293
|
},
|
|
8251
|
-
|
|
8294
|
+
E.task
|
|
8252
8295
|
);
|
|
8253
8296
|
}) })
|
|
8254
8297
|
] }),
|
|
8255
8298
|
r === "prompts" && /* @__PURE__ */ d("div", { className: "cedros-admin__section", style: { marginTop: "1rem" }, children: [
|
|
8256
8299
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header", children: /* @__PURE__ */ o("h3", { className: "cedros-admin__section-title", children: "System Prompts" }) }),
|
|
8257
8300
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1.5rem", opacity: 0.7, fontSize: 14 }, children: "Configure the default system prompts for each AI task. These prompts guide the AI's behavior and responses." }),
|
|
8258
|
-
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem" }, children: s.taskAssignments.map((
|
|
8259
|
-
const R = cs.find((j) => j.task ===
|
|
8301
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem" }, children: s.taskAssignments.map((E) => {
|
|
8302
|
+
const R = cs.find((j) => j.task === E.task);
|
|
8260
8303
|
return /* @__PURE__ */ o(
|
|
8261
8304
|
Kf,
|
|
8262
8305
|
{
|
|
8263
|
-
task:
|
|
8264
|
-
label: R?.label ??
|
|
8306
|
+
task: E.task,
|
|
8307
|
+
label: R?.label ?? E.task,
|
|
8265
8308
|
description: R?.description ?? "",
|
|
8266
|
-
initialPrompt:
|
|
8309
|
+
initialPrompt: E.systemPrompt ?? "",
|
|
8267
8310
|
onSave: C
|
|
8268
8311
|
},
|
|
8269
|
-
|
|
8312
|
+
E.task
|
|
8270
8313
|
);
|
|
8271
8314
|
}) })
|
|
8272
8315
|
] })
|
|
@@ -8972,7 +9015,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
8972
9015
|
}
|
|
8973
9016
|
}, C = () => {
|
|
8974
9017
|
P({ question: "", answer: "", keywordsCsv: "", active: !0, useInChat: !0, displayOnPage: !0 }), m(null), u(!1);
|
|
8975
|
-
},
|
|
9018
|
+
}, E = (F) => {
|
|
8976
9019
|
P({
|
|
8977
9020
|
question: F.question,
|
|
8978
9021
|
answer: F.answer,
|
|
@@ -8981,7 +9024,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
8981
9024
|
useInChat: F.useInChat ?? !0,
|
|
8982
9025
|
displayOnPage: F.displayOnPage ?? !0
|
|
8983
9026
|
}), m(F), u(!0);
|
|
8984
|
-
}, R = a.length, j = a.filter((F) => F.active).length, L = a.filter((F) => F.active && F.useInChat).length,
|
|
9027
|
+
}, R = a.length, j = a.filter((F) => F.active).length, L = a.filter((F) => F.active && F.useInChat).length, T = a.filter((F) => F.active && F.displayOnPage).length, A = Se(() => a.filter((F) => {
|
|
8985
9028
|
if (h === "active" && !F.active || h === "inactive" && F.active) return !1;
|
|
8986
9029
|
if (x) {
|
|
8987
9030
|
const Q = x.toLowerCase();
|
|
@@ -8998,7 +9041,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
8998
9041
|
{ label: "Total FAQs", value: R },
|
|
8999
9042
|
{ label: "Active", value: j, variant: "success" },
|
|
9000
9043
|
{ label: "In Chat", value: L },
|
|
9001
|
-
{ label: "On Page", value:
|
|
9044
|
+
{ label: "On Page", value: T }
|
|
9002
9045
|
]
|
|
9003
9046
|
}
|
|
9004
9047
|
),
|
|
@@ -9011,7 +9054,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9011
9054
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header-right", children: /* @__PURE__ */ d(
|
|
9012
9055
|
"button",
|
|
9013
9056
|
{
|
|
9014
|
-
className: "cedros-
|
|
9057
|
+
className: "cedros-admin__button cedros-admin__button--primary",
|
|
9015
9058
|
onClick: () => {
|
|
9016
9059
|
C(), u(!0);
|
|
9017
9060
|
},
|
|
@@ -9051,7 +9094,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9051
9094
|
l && /* @__PURE__ */ o("div", { className: "cedros-admin__form-container", style: { marginBottom: "1.5rem" }, children: /* @__PURE__ */ d("form", { onSubmit: I, className: "cedros-admin__form", children: [
|
|
9052
9095
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-header", children: [
|
|
9053
9096
|
/* @__PURE__ */ o("h4", { children: p ? "Edit FAQ" : "Add New FAQ" }),
|
|
9054
|
-
/* @__PURE__ */ o("button", { type: "button", className: "cedros-
|
|
9097
|
+
/* @__PURE__ */ o("button", { type: "button", className: "cedros-admin__button--icon", onClick: C, children: K.close })
|
|
9055
9098
|
] }),
|
|
9056
9099
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-group", children: [
|
|
9057
9100
|
/* @__PURE__ */ o("label", { className: "cedros-admin__label", children: "Question *" }),
|
|
@@ -9139,12 +9182,12 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9139
9182
|
/* @__PURE__ */ o("span", { className: "cedros-admin__hint", children: "Choose where this FAQ should appear." })
|
|
9140
9183
|
] }),
|
|
9141
9184
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-actions", children: [
|
|
9142
|
-
/* @__PURE__ */ o("button", { type: "button", className: "cedros-
|
|
9185
|
+
/* @__PURE__ */ o("button", { type: "button", className: "cedros-admin__button", onClick: C, children: "Cancel" }),
|
|
9143
9186
|
/* @__PURE__ */ o(
|
|
9144
9187
|
"button",
|
|
9145
9188
|
{
|
|
9146
9189
|
type: "submit",
|
|
9147
|
-
className: "cedros-
|
|
9190
|
+
className: "cedros-admin__button cedros-admin__button--primary",
|
|
9148
9191
|
disabled: f || !O.question.trim() || !O.answer.trim(),
|
|
9149
9192
|
children: f ? K.loading : p ? "Update FAQ" : "Create FAQ"
|
|
9150
9193
|
}
|
|
@@ -9183,7 +9226,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9183
9226
|
/* @__PURE__ */ o(
|
|
9184
9227
|
"button",
|
|
9185
9228
|
{
|
|
9186
|
-
className: "cedros-
|
|
9229
|
+
className: "cedros-admin__button--icon",
|
|
9187
9230
|
onClick: () => z(F),
|
|
9188
9231
|
title: F.active ? "Deactivate" : "Activate",
|
|
9189
9232
|
children: F.active ? K.eyeOff : K.eye
|
|
@@ -9192,8 +9235,8 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9192
9235
|
/* @__PURE__ */ o(
|
|
9193
9236
|
"button",
|
|
9194
9237
|
{
|
|
9195
|
-
className: "cedros-
|
|
9196
|
-
onClick: () =>
|
|
9238
|
+
className: "cedros-admin__button--icon",
|
|
9239
|
+
onClick: () => E(F),
|
|
9197
9240
|
title: "Edit",
|
|
9198
9241
|
children: K.edit
|
|
9199
9242
|
}
|
|
@@ -9201,7 +9244,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9201
9244
|
/* @__PURE__ */ o(
|
|
9202
9245
|
"button",
|
|
9203
9246
|
{
|
|
9204
|
-
className: "cedros-
|
|
9247
|
+
className: "cedros-admin__button--icon cedros-admin__btn--danger",
|
|
9205
9248
|
onClick: () => w(F.id),
|
|
9206
9249
|
title: "Delete",
|
|
9207
9250
|
children: K.trash
|
|
@@ -9211,11 +9254,11 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9211
9254
|
k === F.id && /* @__PURE__ */ o("div", { className: "cedros-admin__confirm-overlay", children: /* @__PURE__ */ d("div", { className: "cedros-admin__confirm-dialog", children: [
|
|
9212
9255
|
/* @__PURE__ */ o("p", { children: "Delete this FAQ?" }),
|
|
9213
9256
|
/* @__PURE__ */ d("div", { className: "cedros-admin__confirm-actions", children: [
|
|
9214
|
-
/* @__PURE__ */ o("button", { className: "cedros-
|
|
9257
|
+
/* @__PURE__ */ o("button", { className: "cedros-admin__button", onClick: () => w(null), children: "Cancel" }),
|
|
9215
9258
|
/* @__PURE__ */ o(
|
|
9216
9259
|
"button",
|
|
9217
9260
|
{
|
|
9218
|
-
className: "cedros-
|
|
9261
|
+
className: "cedros-admin__button cedros-admin__button--danger",
|
|
9219
9262
|
onClick: () => M(F.id),
|
|
9220
9263
|
children: "Delete"
|
|
9221
9264
|
}
|
|
@@ -9426,8 +9469,8 @@ function y1({
|
|
|
9426
9469
|
}) {
|
|
9427
9470
|
const [f, g] = H(a), [x, y] = H(!0), [h, _] = H(/* @__PURE__ */ new Set()), k = J((z) => {
|
|
9428
9471
|
_((C) => {
|
|
9429
|
-
const
|
|
9430
|
-
return
|
|
9472
|
+
const E = new Set(C);
|
|
9473
|
+
return E.has(z) ? E.delete(z) : E.add(z), E;
|
|
9431
9474
|
});
|
|
9432
9475
|
}, []), w = qp(), b = sh(), O = ih(m, w?.mode ?? null, b) === "dark" ? "cedros-admin--dark" : "", { authManager: P } = oh({
|
|
9433
9476
|
serverUrl: e,
|
|
@@ -9454,7 +9497,7 @@ function y1({
|
|
|
9454
9497
|
/* @__PURE__ */ o("nav", { className: "cedros-admin__nav", children: Hl.map((z) => {
|
|
9455
9498
|
const C = z.sections.filter((R) => r.includes(R.id));
|
|
9456
9499
|
if (C.length === 0) return null;
|
|
9457
|
-
const
|
|
9500
|
+
const E = z.collapsible && h.has(z.label);
|
|
9458
9501
|
return /* @__PURE__ */ d("div", { className: "cedros-admin__nav-group", children: [
|
|
9459
9502
|
z.collapsible ? /* @__PURE__ */ d(
|
|
9460
9503
|
"button",
|
|
@@ -9462,14 +9505,14 @@ function y1({
|
|
|
9462
9505
|
type: "button",
|
|
9463
9506
|
className: "cedros-admin__nav-label cedros-admin__nav-label--collapsible",
|
|
9464
9507
|
onClick: () => k(z.label),
|
|
9465
|
-
"aria-expanded": !
|
|
9508
|
+
"aria-expanded": !E,
|
|
9466
9509
|
children: [
|
|
9467
9510
|
z.label,
|
|
9468
|
-
/* @__PURE__ */ o("span", { className: `cedros-admin__nav-label-icon ${
|
|
9511
|
+
/* @__PURE__ */ o("span", { className: `cedros-admin__nav-label-icon ${E ? "" : "cedros-admin__nav-label-icon--expanded"}`, children: K.chevronRight })
|
|
9469
9512
|
]
|
|
9470
9513
|
}
|
|
9471
9514
|
) : /* @__PURE__ */ o("span", { className: "cedros-admin__nav-label", children: z.label }),
|
|
9472
|
-
!
|
|
9515
|
+
!E && C.map((R) => /* @__PURE__ */ d(
|
|
9473
9516
|
"button",
|
|
9474
9517
|
{
|
|
9475
9518
|
type: "button",
|
|
@@ -9626,11 +9669,11 @@ const Mt = (e) => Vp(async () => {
|
|
|
9626
9669
|
{ id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
|
|
9627
9670
|
],
|
|
9628
9671
|
components: {
|
|
9629
|
-
products: Mt(() => import("./sections-
|
|
9672
|
+
products: Mt(() => import("./sections-Dl8qjlql.mjs").then((e) => ({ default: e.ProductsSection }))),
|
|
9630
9673
|
subscriptions: Mt(() => Promise.resolve().then(() => Hf).then((e) => ({ default: e.SubscriptionsSection }))),
|
|
9631
|
-
transactions: Mt(() => import("./sections-
|
|
9632
|
-
coupons: Mt(() => import("./sections-
|
|
9633
|
-
refunds: Mt(() => import("./sections-
|
|
9674
|
+
transactions: Mt(() => import("./sections-Dl8qjlql.mjs").then((e) => ({ default: e.TransactionsSection }))),
|
|
9675
|
+
coupons: Mt(() => import("./sections-Dl8qjlql.mjs").then((e) => ({ default: e.CouponsSection }))),
|
|
9676
|
+
refunds: Mt(() => import("./sections-Dl8qjlql.mjs").then((e) => ({ default: e.RefundsSection }))),
|
|
9634
9677
|
storefront: Mt(() => Promise.resolve().then(() => Qf).then((e) => ({ default: e.StorefrontSection }))),
|
|
9635
9678
|
"ai-settings": Mt(() => Promise.resolve().then(() => Jf).then((e) => ({ default: e.AISettingsSection }))),
|
|
9636
9679
|
faqs: Mt(() => Promise.resolve().then(() => rh).then((e) => ({ default: e.FAQSection }))),
|
|
@@ -9864,8 +9907,8 @@ function _1({
|
|
|
9864
9907
|
}) {
|
|
9865
9908
|
const { status: y, error: h, sessionId: _, processSubscription: k } = ch(), w = pn(), { t: b, translations: S } = Vn(), O = u || b("ui.subscribe"), P = w.unstyled ? x : `${w.className} cedros-theme__stripe-button ${x}`.trim(), N = h && typeof h != "string" ? h?.code ?? null : null, M = h ? typeof h == "string" ? h : ((L) => {
|
|
9866
9909
|
if (!L || !S) return "";
|
|
9867
|
-
const
|
|
9868
|
-
return
|
|
9910
|
+
const T = S.errors[L];
|
|
9911
|
+
return T ? T.action ? `${T.message} ${T.action}` : T.message : "";
|
|
9869
9912
|
})(N) : null, z = J(async () => {
|
|
9870
9913
|
fe().debug("[SubscribeButton] executeSubscription:", {
|
|
9871
9914
|
resource: e,
|
|
@@ -9900,7 +9943,7 @@ function _1({
|
|
|
9900
9943
|
m,
|
|
9901
9944
|
f,
|
|
9902
9945
|
g
|
|
9903
|
-
]), C = Se(() => `subscribe-${e}-${t}`, [e, t]),
|
|
9946
|
+
]), C = Se(() => `subscribe-${e}-${t}`, [e, t]), E = Se(
|
|
9904
9947
|
() => lr(C, z),
|
|
9905
9948
|
[C, z]
|
|
9906
9949
|
), R = y === "loading", j = p || R;
|
|
@@ -9908,7 +9951,7 @@ function _1({
|
|
|
9908
9951
|
/* @__PURE__ */ o(
|
|
9909
9952
|
"button",
|
|
9910
9953
|
{
|
|
9911
|
-
onClick:
|
|
9954
|
+
onClick: E,
|
|
9912
9955
|
disabled: j,
|
|
9913
9956
|
className: w.unstyled ? x : "cedros-theme__button cedros-theme__stripe",
|
|
9914
9957
|
type: "button",
|
|
@@ -10104,13 +10147,13 @@ function x1({
|
|
|
10104
10147
|
l,
|
|
10105
10148
|
u,
|
|
10106
10149
|
p
|
|
10107
|
-
]),
|
|
10108
|
-
() => lr(
|
|
10150
|
+
]), E = Se(() => `credits-subscribe-${e}-${t}`, [e, t]), R = Se(
|
|
10151
|
+
() => lr(E, C, {
|
|
10109
10152
|
cooldownMs: 200,
|
|
10110
10153
|
deduplicationWindowMs: 0
|
|
10111
10154
|
}),
|
|
10112
|
-
[
|
|
10113
|
-
), j = x === "loading" || x === "checking", L = h === "active" || h === "trialing",
|
|
10155
|
+
[E, C]
|
|
10156
|
+
), j = x === "loading" || x === "checking", L = h === "active" || h === "trialing", T = c || j || L;
|
|
10114
10157
|
let A = N;
|
|
10115
10158
|
if (j)
|
|
10116
10159
|
A = S("ui.processing");
|
|
@@ -10124,7 +10167,7 @@ function x1({
|
|
|
10124
10167
|
"button",
|
|
10125
10168
|
{
|
|
10126
10169
|
onClick: R,
|
|
10127
|
-
disabled:
|
|
10170
|
+
disabled: T,
|
|
10128
10171
|
className: b.unstyled ? m : "cedros-theme__button cedros-theme__credits",
|
|
10129
10172
|
type: "button",
|
|
10130
10173
|
children: A
|
|
@@ -11358,11 +11401,11 @@ function Ah(e) {
|
|
|
11358
11401
|
if (e && (e === "in_stock" || e === "low" || e === "out_of_stock" || e === "backorder"))
|
|
11359
11402
|
return e;
|
|
11360
11403
|
}
|
|
11361
|
-
function
|
|
11404
|
+
function Eh(e) {
|
|
11362
11405
|
if (e && (e === "physical" || e === "digital"))
|
|
11363
11406
|
return e;
|
|
11364
11407
|
}
|
|
11365
|
-
function
|
|
11408
|
+
function Th(e) {
|
|
11366
11409
|
const t = [];
|
|
11367
11410
|
if (Array.isArray(e))
|
|
11368
11411
|
for (const n of e)
|
|
@@ -11386,7 +11429,7 @@ function Eh(e) {
|
|
|
11386
11429
|
return t.flatMap((n) => n.split(",")).map((n) => n.trim().toUpperCase()).filter(Boolean);
|
|
11387
11430
|
}
|
|
11388
11431
|
function to(e) {
|
|
11389
|
-
const t = Ph(e.fiatCurrency), n = e.images && e.images.length ? e.images : e.imageUrl ? [{ url: e.imageUrl, alt: e.title }] : [], r = e.effectiveFiatAmountCents ?? e.fiatAmountCents ?? 0, a = e.compareAtAmountCents, s = e.metadata?.shippingCountries ?? e.metadata?.shipping_countries, i =
|
|
11432
|
+
const t = Ph(e.fiatCurrency), n = e.images && e.images.length ? e.images : e.imageUrl ? [{ url: e.imageUrl, alt: e.title }] : [], r = e.effectiveFiatAmountCents ?? e.fiatAmountCents ?? 0, a = e.compareAtAmountCents, s = e.metadata?.shippingCountries ?? e.metadata?.shipping_countries, i = Th(s);
|
|
11390
11433
|
return {
|
|
11391
11434
|
id: e.id,
|
|
11392
11435
|
slug: e.slug ?? e.id,
|
|
@@ -11400,7 +11443,7 @@ function to(e) {
|
|
|
11400
11443
|
inventoryStatus: Ah(e.inventoryStatus),
|
|
11401
11444
|
inventoryQuantity: typeof e.inventoryQuantity == "number" ? e.inventoryQuantity : void 0,
|
|
11402
11445
|
compareAtPrice: typeof a == "number" ? a / 100 : void 0,
|
|
11403
|
-
shippingProfile:
|
|
11446
|
+
shippingProfile: Eh(e.shippingProfile),
|
|
11404
11447
|
checkoutRequirements: e.checkoutRequirements,
|
|
11405
11448
|
fulfillment: e.fulfillment,
|
|
11406
11449
|
attributes: i.length ? {
|
|
@@ -12109,10 +12152,10 @@ function id(e) {
|
|
|
12109
12152
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
12110
12153
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
12111
12154
|
}
|
|
12112
|
-
function
|
|
12155
|
+
function Eg(e) {
|
|
12113
12156
|
return new RegExp(`^${id(e)}$`);
|
|
12114
12157
|
}
|
|
12115
|
-
function
|
|
12158
|
+
function Tg(e) {
|
|
12116
12159
|
const t = id({ precision: e.precision }), n = ["Z"];
|
|
12117
12160
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
12118
12161
|
const r = `${t}(?:${n.join("|")})`;
|
|
@@ -12121,7 +12164,7 @@ function Eg(e) {
|
|
|
12121
12164
|
const Ig = (e) => {
|
|
12122
12165
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
12123
12166
|
return new RegExp(`^${t}$`);
|
|
12124
|
-
}, Rg = /^-?\d+$/, Og = /^-?\d+(?:\.\d+)?$/, Mg = /^[^A-Z]*$/, Dg = /^[^a-z]*$/,
|
|
12167
|
+
}, Rg = /^-?\d+$/, Og = /^-?\d+(?:\.\d+)?$/, Mg = /^[^A-Z]*$/, Dg = /^[^a-z]*$/, kt = /* @__PURE__ */ Y("$ZodCheck", (e, t) => {
|
|
12125
12168
|
var n;
|
|
12126
12169
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
12127
12170
|
}), cd = {
|
|
@@ -12129,7 +12172,7 @@ const Ig = (e) => {
|
|
|
12129
12172
|
bigint: "bigint",
|
|
12130
12173
|
object: "date"
|
|
12131
12174
|
}, ld = /* @__PURE__ */ Y("$ZodCheckLessThan", (e, t) => {
|
|
12132
|
-
|
|
12175
|
+
kt.init(e, t);
|
|
12133
12176
|
const n = cd[typeof t.value];
|
|
12134
12177
|
e._zod.onattach.push((r) => {
|
|
12135
12178
|
const a = r._zod.bag, s = (t.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -12146,7 +12189,7 @@ const Ig = (e) => {
|
|
|
12146
12189
|
});
|
|
12147
12190
|
};
|
|
12148
12191
|
}), dd = /* @__PURE__ */ Y("$ZodCheckGreaterThan", (e, t) => {
|
|
12149
|
-
|
|
12192
|
+
kt.init(e, t);
|
|
12150
12193
|
const n = cd[typeof t.value];
|
|
12151
12194
|
e._zod.onattach.push((r) => {
|
|
12152
12195
|
const a = r._zod.bag, s = (t.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -12163,7 +12206,7 @@ const Ig = (e) => {
|
|
|
12163
12206
|
});
|
|
12164
12207
|
};
|
|
12165
12208
|
}), Lg = /* @__PURE__ */ Y("$ZodCheckMultipleOf", (e, t) => {
|
|
12166
|
-
|
|
12209
|
+
kt.init(e, t), e._zod.onattach.push((n) => {
|
|
12167
12210
|
var r;
|
|
12168
12211
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
12169
12212
|
}), e._zod.check = (n) => {
|
|
@@ -12179,7 +12222,7 @@ const Ig = (e) => {
|
|
|
12179
12222
|
});
|
|
12180
12223
|
};
|
|
12181
12224
|
}), $g = /* @__PURE__ */ Y("$ZodCheckNumberFormat", (e, t) => {
|
|
12182
|
-
|
|
12225
|
+
kt.init(e, t), t.format = t.format || "float64";
|
|
12183
12226
|
const n = t.format?.includes("int"), r = n ? "int" : "number", [a, s] = Hh[t.format];
|
|
12184
12227
|
e._zod.onattach.push((i) => {
|
|
12185
12228
|
const c = i._zod.bag;
|
|
@@ -12241,7 +12284,7 @@ const Ig = (e) => {
|
|
|
12241
12284
|
};
|
|
12242
12285
|
}), zg = /* @__PURE__ */ Y("$ZodCheckMaxLength", (e, t) => {
|
|
12243
12286
|
var n;
|
|
12244
|
-
|
|
12287
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12245
12288
|
const a = r.value;
|
|
12246
12289
|
return !Bs(a) && a.length !== void 0;
|
|
12247
12290
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12264,7 +12307,7 @@ const Ig = (e) => {
|
|
|
12264
12307
|
};
|
|
12265
12308
|
}), Fg = /* @__PURE__ */ Y("$ZodCheckMinLength", (e, t) => {
|
|
12266
12309
|
var n;
|
|
12267
|
-
|
|
12310
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12268
12311
|
const a = r.value;
|
|
12269
12312
|
return !Bs(a) && a.length !== void 0;
|
|
12270
12313
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12287,7 +12330,7 @@ const Ig = (e) => {
|
|
|
12287
12330
|
};
|
|
12288
12331
|
}), Bg = /* @__PURE__ */ Y("$ZodCheckLengthEquals", (e, t) => {
|
|
12289
12332
|
var n;
|
|
12290
|
-
|
|
12333
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12291
12334
|
const a = r.value;
|
|
12292
12335
|
return !Bs(a) && a.length !== void 0;
|
|
12293
12336
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12310,7 +12353,7 @@ const Ig = (e) => {
|
|
|
12310
12353
|
};
|
|
12311
12354
|
}), Zo = /* @__PURE__ */ Y("$ZodCheckStringFormat", (e, t) => {
|
|
12312
12355
|
var n, r;
|
|
12313
|
-
|
|
12356
|
+
kt.init(e, t), e._zod.onattach.push((a) => {
|
|
12314
12357
|
const s = a._zod.bag;
|
|
12315
12358
|
s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
|
|
12316
12359
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (a) => {
|
|
@@ -12342,7 +12385,7 @@ const Ig = (e) => {
|
|
|
12342
12385
|
}), Wg = /* @__PURE__ */ Y("$ZodCheckUpperCase", (e, t) => {
|
|
12343
12386
|
t.pattern ?? (t.pattern = Dg), Zo.init(e, t);
|
|
12344
12387
|
}), Vg = /* @__PURE__ */ Y("$ZodCheckIncludes", (e, t) => {
|
|
12345
|
-
|
|
12388
|
+
kt.init(e, t);
|
|
12346
12389
|
const n = Vo(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
12347
12390
|
t.pattern = r, e._zod.onattach.push((a) => {
|
|
12348
12391
|
const s = a._zod.bag;
|
|
@@ -12359,7 +12402,7 @@ const Ig = (e) => {
|
|
|
12359
12402
|
});
|
|
12360
12403
|
};
|
|
12361
12404
|
}), Hg = /* @__PURE__ */ Y("$ZodCheckStartsWith", (e, t) => {
|
|
12362
|
-
|
|
12405
|
+
kt.init(e, t);
|
|
12363
12406
|
const n = new RegExp(`^${Vo(t.prefix)}.*`);
|
|
12364
12407
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
12365
12408
|
const a = r._zod.bag;
|
|
@@ -12376,7 +12419,7 @@ const Ig = (e) => {
|
|
|
12376
12419
|
});
|
|
12377
12420
|
};
|
|
12378
12421
|
}), qg = /* @__PURE__ */ Y("$ZodCheckEndsWith", (e, t) => {
|
|
12379
|
-
|
|
12422
|
+
kt.init(e, t);
|
|
12380
12423
|
const n = new RegExp(`.*${Vo(t.suffix)}$`);
|
|
12381
12424
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
12382
12425
|
const a = r._zod.bag;
|
|
@@ -12393,7 +12436,7 @@ const Ig = (e) => {
|
|
|
12393
12436
|
});
|
|
12394
12437
|
};
|
|
12395
12438
|
}), Zg = /* @__PURE__ */ Y("$ZodCheckOverwrite", (e, t) => {
|
|
12396
|
-
|
|
12439
|
+
kt.init(e, t), e._zod.check = (n) => {
|
|
12397
12440
|
n.value = t.tx(n.value);
|
|
12398
12441
|
};
|
|
12399
12442
|
});
|
|
@@ -12583,11 +12626,11 @@ const Qg = {
|
|
|
12583
12626
|
}), sy = /* @__PURE__ */ Y("$ZodKSUID", (e, t) => {
|
|
12584
12627
|
t.pattern ?? (t.pattern = hg), $e.init(e, t);
|
|
12585
12628
|
}), iy = /* @__PURE__ */ Y("$ZodISODateTime", (e, t) => {
|
|
12586
|
-
t.pattern ?? (t.pattern =
|
|
12629
|
+
t.pattern ?? (t.pattern = Tg(t)), $e.init(e, t);
|
|
12587
12630
|
}), cy = /* @__PURE__ */ Y("$ZodISODate", (e, t) => {
|
|
12588
12631
|
t.pattern ?? (t.pattern = Ag), $e.init(e, t);
|
|
12589
12632
|
}), ly = /* @__PURE__ */ Y("$ZodISOTime", (e, t) => {
|
|
12590
|
-
t.pattern ?? (t.pattern =
|
|
12633
|
+
t.pattern ?? (t.pattern = Eg(t)), $e.init(e, t);
|
|
12591
12634
|
}), dy = /* @__PURE__ */ Y("$ZodISODuration", (e, t) => {
|
|
12592
12635
|
t.pattern ?? (t.pattern = yg), $e.init(e, t);
|
|
12593
12636
|
}), uy = /* @__PURE__ */ Y("$ZodIPv4", (e, t) => {
|
|
@@ -13018,7 +13061,7 @@ function pc(e, t, n) {
|
|
|
13018
13061
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
|
|
13019
13062
|
return e.value = i.data, e;
|
|
13020
13063
|
}
|
|
13021
|
-
const
|
|
13064
|
+
const Ey = /* @__PURE__ */ Y("$ZodEnum", (e, t) => {
|
|
13022
13065
|
Ge.init(e, t);
|
|
13023
13066
|
const n = Xl(t.entries), r = new Set(n);
|
|
13024
13067
|
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((a) => Wh.has(typeof a)).map((a) => typeof a == "string" ? Vo(a) : a.toString()).join("|")})$`), e._zod.parse = (a, s) => {
|
|
@@ -13030,7 +13073,7 @@ const Ty = /* @__PURE__ */ Y("$ZodEnum", (e, t) => {
|
|
|
13030
13073
|
inst: e
|
|
13031
13074
|
}), a;
|
|
13032
13075
|
};
|
|
13033
|
-
}),
|
|
13076
|
+
}), Ty = /* @__PURE__ */ Y("$ZodTransform", (e, t) => {
|
|
13034
13077
|
Ge.init(e, t), e._zod.parse = (n, r) => {
|
|
13035
13078
|
if (r.direction === "backward")
|
|
13036
13079
|
throw new Yl(e.constructor.name);
|
|
@@ -13139,7 +13182,7 @@ function yc(e) {
|
|
|
13139
13182
|
return e.value = Object.freeze(e.value), e;
|
|
13140
13183
|
}
|
|
13141
13184
|
const Fy = /* @__PURE__ */ Y("$ZodCustom", (e, t) => {
|
|
13142
|
-
|
|
13185
|
+
kt.init(e, t), Ge.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
13143
13186
|
const r = n.value, a = t.fn(r);
|
|
13144
13187
|
if (a instanceof Promise)
|
|
13145
13188
|
return a.then((s) => vc(s, n, r, e));
|
|
@@ -13550,7 +13593,7 @@ function gd(e, t) {
|
|
|
13550
13593
|
});
|
|
13551
13594
|
}
|
|
13552
13595
|
// @__NO_SIDE_EFFECTS__
|
|
13553
|
-
function
|
|
13596
|
+
function Eo(e, t) {
|
|
13554
13597
|
return new Fg({
|
|
13555
13598
|
check: "min_length",
|
|
13556
13599
|
...he(t),
|
|
@@ -13645,7 +13688,7 @@ function Av() {
|
|
|
13645
13688
|
return /* @__PURE__ */ pr((e) => jh(e));
|
|
13646
13689
|
}
|
|
13647
13690
|
// @__NO_SIDE_EFFECTS__
|
|
13648
|
-
function
|
|
13691
|
+
function Ev(e, t, n) {
|
|
13649
13692
|
return new e({
|
|
13650
13693
|
type: "array",
|
|
13651
13694
|
element: t,
|
|
@@ -13656,7 +13699,7 @@ function Tv(e, t, n) {
|
|
|
13656
13699
|
});
|
|
13657
13700
|
}
|
|
13658
13701
|
// @__NO_SIDE_EFFECTS__
|
|
13659
|
-
function
|
|
13702
|
+
function Tv(e, t, n) {
|
|
13660
13703
|
return new e({
|
|
13661
13704
|
type: "custom",
|
|
13662
13705
|
check: "custom",
|
|
@@ -13678,7 +13721,7 @@ function Iv(e) {
|
|
|
13678
13721
|
}
|
|
13679
13722
|
// @__NO_SIDE_EFFECTS__
|
|
13680
13723
|
function Rv(e, t) {
|
|
13681
|
-
const n = new
|
|
13724
|
+
const n = new kt({
|
|
13682
13725
|
check: "custom",
|
|
13683
13726
|
...he(t)
|
|
13684
13727
|
});
|
|
@@ -13858,8 +13901,8 @@ function wd(e, t) {
|
|
|
13858
13901
|
value: {
|
|
13859
13902
|
...t["~standard"],
|
|
13860
13903
|
jsonSchema: {
|
|
13861
|
-
input:
|
|
13862
|
-
output:
|
|
13904
|
+
input: To(t, "input", e.processors),
|
|
13905
|
+
output: To(t, "output", e.processors)
|
|
13863
13906
|
}
|
|
13864
13907
|
},
|
|
13865
13908
|
enumerable: !1,
|
|
@@ -13914,7 +13957,7 @@ function dt(e, t) {
|
|
|
13914
13957
|
const Ov = (e, t = {}) => (n) => {
|
|
13915
13958
|
const r = vd({ ...n, processors: t });
|
|
13916
13959
|
return ot(e, r), bd(r, e), wd(r, e);
|
|
13917
|
-
},
|
|
13960
|
+
}, To = (e, t, n = {}) => (r) => {
|
|
13918
13961
|
const { libraryOptions: a, target: s } = r ?? {}, i = vd({ ...a ?? {}, target: s, io: t, processors: n });
|
|
13919
13962
|
return ot(e, i), bd(i, e), wd(i, e);
|
|
13920
13963
|
}, Mv = {
|
|
@@ -14092,8 +14135,8 @@ const ib = (e, t) => {
|
|
|
14092
14135
|
Parent: Error
|
|
14093
14136
|
}), cb = /* @__PURE__ */ Ws(Ot), lb = /* @__PURE__ */ Vs(Ot), db = /* @__PURE__ */ Ho(Ot), ub = /* @__PURE__ */ qo(Ot), mb = /* @__PURE__ */ rg(Ot), pb = /* @__PURE__ */ og(Ot), fb = /* @__PURE__ */ ag(Ot), hb = /* @__PURE__ */ sg(Ot), gb = /* @__PURE__ */ ig(Ot), yb = /* @__PURE__ */ cg(Ot), vb = /* @__PURE__ */ lg(Ot), bb = /* @__PURE__ */ dg(Ot), Qe = /* @__PURE__ */ Y("ZodType", (e, t) => (Ge.init(e, t), Object.assign(e["~standard"], {
|
|
14094
14137
|
jsonSchema: {
|
|
14095
|
-
input:
|
|
14096
|
-
output:
|
|
14138
|
+
input: To(e, "input"),
|
|
14139
|
+
output: To(e, "output")
|
|
14097
14140
|
}
|
|
14098
14141
|
}), e.toJSONSchema = Ov(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Sn(t, {
|
|
14099
14142
|
checks: [
|
|
@@ -14102,7 +14145,7 @@ const ib = (e, t) => {
|
|
|
14102
14145
|
]
|
|
14103
14146
|
}), {
|
|
14104
14147
|
parent: !0
|
|
14105
|
-
}), e.with = e.check, e.clone = (n, r) => Cn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => cb(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => db(e, n, r), e.parseAsync = async (n, r) => lb(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ub(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => mb(e, n, r), e.decode = (n, r) => pb(e, n, r), e.encodeAsync = async (n, r) => fb(e, n, r), e.decodeAsync = async (n, r) => hb(e, n, r), e.safeEncode = (n, r) => gb(e, n, r), e.safeDecode = (n, r) => yb(e, n, r), e.safeEncodeAsync = async (n, r) => vb(e, n, r), e.safeDecodeAsync = async (n, r) => bb(e, n, r), e.refine = (n, r) => e.check(p0(n, r)), e.superRefine = (n) => e.check(f0(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ pr(n)), e.optional = () => Pc(e), e.exactOptional = () => e0(e), e.nullable = () => Ac(e), e.nullish = () => Pc(Ac(e)), e.nonoptional = (n) => s0(e, n), e.array = () => Vb(e), e.or = (n) => Zb([e, n]), e.and = (n) => Qb(e, n), e.transform = (n) =>
|
|
14148
|
+
}), e.with = e.check, e.clone = (n, r) => Cn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => cb(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => db(e, n, r), e.parseAsync = async (n, r) => lb(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ub(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => mb(e, n, r), e.decode = (n, r) => pb(e, n, r), e.encodeAsync = async (n, r) => fb(e, n, r), e.decodeAsync = async (n, r) => hb(e, n, r), e.safeEncode = (n, r) => gb(e, n, r), e.safeDecode = (n, r) => yb(e, n, r), e.safeEncodeAsync = async (n, r) => vb(e, n, r), e.safeDecodeAsync = async (n, r) => bb(e, n, r), e.refine = (n, r) => e.check(p0(n, r)), e.superRefine = (n) => e.check(f0(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ pr(n)), e.optional = () => Pc(e), e.exactOptional = () => e0(e), e.nullable = () => Ac(e), e.nullish = () => Pc(Ac(e)), e.nonoptional = (n) => s0(e, n), e.array = () => Vb(e), e.or = (n) => Zb([e, n]), e.and = (n) => Qb(e, n), e.transform = (n) => Ec(e, Xb(n)), e.default = (n) => r0(e, n), e.prefault = (n) => a0(e, n), e.catch = (n) => c0(e, n), e.pipe = (n) => Ec(e, n), e.readonly = () => u0(e), e.describe = (n) => {
|
|
14106
14149
|
const r = e.clone();
|
|
14107
14150
|
return Ir.add(r, { description: n }), r;
|
|
14108
14151
|
}, Object.defineProperty(e, "description", {
|
|
@@ -14118,9 +14161,9 @@ const ib = (e, t) => {
|
|
|
14118
14161
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), xd = /* @__PURE__ */ Y("_ZodString", (e, t) => {
|
|
14119
14162
|
Hs.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (r, a, s) => Dv(e, r, a);
|
|
14120
14163
|
const n = e._zod.bag;
|
|
14121
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ vv(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ _v(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ xv(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ kv(...r)), e.min = (...r) => e.check(/* @__PURE__ */
|
|
14164
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ vv(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ _v(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ xv(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ kv(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Eo(...r)), e.max = (...r) => e.check(/* @__PURE__ */ gd(...r)), e.length = (...r) => e.check(/* @__PURE__ */ yd(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Eo(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ bv(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ wv(r)), e.trim = () => e.check(/* @__PURE__ */ Cv()), e.normalize = (...r) => e.check(/* @__PURE__ */ Sv(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Nv()), e.toUpperCase = () => e.check(/* @__PURE__ */ Pv()), e.slugify = () => e.check(/* @__PURE__ */ Av());
|
|
14122
14165
|
}), wb = /* @__PURE__ */ Y("ZodString", (e, t) => {
|
|
14123
|
-
Hs.init(e, t), xd.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Wy(_b, n)), e.url = (n) => e.check(/* @__PURE__ */ Gy(xb, n)), e.jwt = (n) => e.check(/* @__PURE__ */ lv($b, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Qy(kb, n)), e.guid = (n) => e.check(/* @__PURE__ */ wc(Sc, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Vy(oo, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Hy(oo, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ qy(oo, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Zy(oo, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yy(Sb, n)), e.guid = (n) => e.check(/* @__PURE__ */ wc(Sc, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ky(Cb, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Xy(Nb, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Jy(Pb, n)), e.base64 = (n) => e.check(/* @__PURE__ */ sv(Mb, n)), e.base64url = (n) => e.check(/* @__PURE__ */ iv(Db, n)), e.xid = (n) => e.check(/* @__PURE__ */ ev(Ab, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ tv(
|
|
14166
|
+
Hs.init(e, t), xd.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Wy(_b, n)), e.url = (n) => e.check(/* @__PURE__ */ Gy(xb, n)), e.jwt = (n) => e.check(/* @__PURE__ */ lv($b, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Qy(kb, n)), e.guid = (n) => e.check(/* @__PURE__ */ wc(Sc, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Vy(oo, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Hy(oo, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ qy(oo, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Zy(oo, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yy(Sb, n)), e.guid = (n) => e.check(/* @__PURE__ */ wc(Sc, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ky(Cb, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Xy(Nb, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Jy(Pb, n)), e.base64 = (n) => e.check(/* @__PURE__ */ sv(Mb, n)), e.base64url = (n) => e.check(/* @__PURE__ */ iv(Db, n)), e.xid = (n) => e.check(/* @__PURE__ */ ev(Ab, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ tv(Eb, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ nv(Tb, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ rv(Ib, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ ov(Rb, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ av(Ob, n)), e.e164 = (n) => e.check(/* @__PURE__ */ cv(Lb, n)), e.datetime = (n) => e.check(eb(n)), e.date = (n) => e.check(nb(n)), e.time = (n) => e.check(ob(n)), e.duration = (n) => e.check(sb(n));
|
|
14124
14167
|
});
|
|
14125
14168
|
function ut(e) {
|
|
14126
14169
|
return /* @__PURE__ */ Uy(wb, e);
|
|
@@ -14147,9 +14190,9 @@ const Be = /* @__PURE__ */ Y("ZodStringFormat", (e, t) => {
|
|
|
14147
14190
|
oy.init(e, t), Be.init(e, t);
|
|
14148
14191
|
}), Ab = /* @__PURE__ */ Y("ZodXID", (e, t) => {
|
|
14149
14192
|
ay.init(e, t), Be.init(e, t);
|
|
14150
|
-
}),
|
|
14193
|
+
}), Eb = /* @__PURE__ */ Y("ZodKSUID", (e, t) => {
|
|
14151
14194
|
sy.init(e, t), Be.init(e, t);
|
|
14152
|
-
}),
|
|
14195
|
+
}), Tb = /* @__PURE__ */ Y("ZodIPv4", (e, t) => {
|
|
14153
14196
|
uy.init(e, t), Be.init(e, t);
|
|
14154
14197
|
}), Ib = /* @__PURE__ */ Y("ZodIPv6", (e, t) => {
|
|
14155
14198
|
my.init(e, t), Be.init(e, t);
|
|
@@ -14192,10 +14235,10 @@ function Ub(e) {
|
|
|
14192
14235
|
return /* @__PURE__ */ yv(jb, e);
|
|
14193
14236
|
}
|
|
14194
14237
|
const Wb = /* @__PURE__ */ Y("ZodArray", (e, t) => {
|
|
14195
|
-
Sy.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => Uv(e, n, r, a), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */
|
|
14238
|
+
Sy.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => Uv(e, n, r, a), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Eo(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Eo(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ gd(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ yd(n, r)), e.unwrap = () => e.element;
|
|
14196
14239
|
});
|
|
14197
14240
|
function Vb(e, t) {
|
|
14198
|
-
return /* @__PURE__ */
|
|
14241
|
+
return /* @__PURE__ */ Ev(Wb, e, t);
|
|
14199
14242
|
}
|
|
14200
14243
|
const Hb = /* @__PURE__ */ Y("ZodObject", (e, t) => {
|
|
14201
14244
|
Ny.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => Wv(e, n, r, a), Ie(e, "shape", () => t.shape), e.keyof = () => Yb(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Nc() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Nc() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ub() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Gh(e, n), e.safeExtend = (n) => Qh(e, n), e.merge = (n) => Yh(e, n), e.pick = (n) => qh(e, n), e.omit = (n) => Zh(e, n), e.partial = (...n) => Kh(Cd, e, n[0]), e.required = (...n) => Xh(Nd, e, n[0]);
|
|
@@ -14229,7 +14272,7 @@ function Qb(e, t) {
|
|
|
14229
14272
|
});
|
|
14230
14273
|
}
|
|
14231
14274
|
const us = /* @__PURE__ */ Y("ZodEnum", (e, t) => {
|
|
14232
|
-
|
|
14275
|
+
Ey.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (r, a, s) => Fv(e, r, a), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
14233
14276
|
const n = new Set(Object.keys(t.entries));
|
|
14234
14277
|
e.extract = (r, a) => {
|
|
14235
14278
|
const s = {};
|
|
@@ -14268,7 +14311,7 @@ function Yb(e, t) {
|
|
|
14268
14311
|
});
|
|
14269
14312
|
}
|
|
14270
14313
|
const Kb = /* @__PURE__ */ Y("ZodTransform", (e, t) => {
|
|
14271
|
-
|
|
14314
|
+
Ty.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => jv(e, n), e._zod.parse = (n, r) => {
|
|
14272
14315
|
if (r.direction === "backward")
|
|
14273
14316
|
throw new Yl(e.constructor.name);
|
|
14274
14317
|
n.addIssue = (s) => {
|
|
@@ -14363,7 +14406,7 @@ function c0(e, t) {
|
|
|
14363
14406
|
const l0 = /* @__PURE__ */ Y("ZodPipe", (e, t) => {
|
|
14364
14407
|
$y.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => Kv(e, n, r, a), e.in = t.in, e.out = t.out;
|
|
14365
14408
|
});
|
|
14366
|
-
function
|
|
14409
|
+
function Ec(e, t) {
|
|
14367
14410
|
return new l0({
|
|
14368
14411
|
type: "pipe",
|
|
14369
14412
|
in: e,
|
|
@@ -14384,7 +14427,7 @@ const m0 = /* @__PURE__ */ Y("ZodCustom", (e, t) => {
|
|
|
14384
14427
|
Fy.init(e, t), Qe.init(e, t), e._zod.processJSONSchema = (n, r, a) => Bv(e, n);
|
|
14385
14428
|
});
|
|
14386
14429
|
function p0(e, t = {}) {
|
|
14387
|
-
return /* @__PURE__ */
|
|
14430
|
+
return /* @__PURE__ */ Tv(m0, e, t);
|
|
14388
14431
|
}
|
|
14389
14432
|
function f0(e) {
|
|
14390
14433
|
return /* @__PURE__ */ Iv(e);
|
|
@@ -14410,9 +14453,9 @@ function h0(e) {
|
|
|
14410
14453
|
shippingMethodId: ut().optional()
|
|
14411
14454
|
});
|
|
14412
14455
|
}
|
|
14413
|
-
const
|
|
14456
|
+
const Tc = { none: 0, optional: 1, required: 2 };
|
|
14414
14457
|
function Fa(e, t) {
|
|
14415
|
-
return
|
|
14458
|
+
return Tc[e] >= Tc[t] ? e : t;
|
|
14416
14459
|
}
|
|
14417
14460
|
function g0(e) {
|
|
14418
14461
|
if (!e) return null;
|
|
@@ -14581,7 +14624,7 @@ function Ad() {
|
|
|
14581
14624
|
createCheckoutSession: _
|
|
14582
14625
|
};
|
|
14583
14626
|
}
|
|
14584
|
-
function
|
|
14627
|
+
function Ed({ children: e }) {
|
|
14585
14628
|
const t = Ad();
|
|
14586
14629
|
return /* @__PURE__ */ o(Pd.Provider, { value: t, children: e });
|
|
14587
14630
|
}
|
|
@@ -14624,7 +14667,7 @@ function Qo(e) {
|
|
|
14624
14667
|
};
|
|
14625
14668
|
}, [t.adapter, e.category, e.search, e.sort, e.page, e.pageSize, l]), { data: n, isLoading: a, error: i };
|
|
14626
14669
|
}
|
|
14627
|
-
function
|
|
14670
|
+
function Td(e) {
|
|
14628
14671
|
const { config: t } = Fe(), [n, r] = v.useState(null), [a, s] = v.useState(!0), [i, c] = v.useState(null);
|
|
14629
14672
|
return v.useEffect(() => {
|
|
14630
14673
|
let l = !1;
|
|
@@ -15214,7 +15257,7 @@ function Dd() {
|
|
|
15214
15257
|
}, [t]), { config: n, isLoading: a };
|
|
15215
15258
|
}
|
|
15216
15259
|
const Rc = /* @__PURE__ */ new Map();
|
|
15217
|
-
function
|
|
15260
|
+
function E0(e) {
|
|
15218
15261
|
return e.productId ? `id:${e.productId}` : e.name ? `name:${e.name}` : "";
|
|
15219
15262
|
}
|
|
15220
15263
|
function Ld(e = {}) {
|
|
@@ -15231,7 +15274,7 @@ function Ld(e = {}) {
|
|
|
15231
15274
|
g("AI recommendations not available");
|
|
15232
15275
|
return;
|
|
15233
15276
|
}
|
|
15234
|
-
const _ =
|
|
15277
|
+
const _ = E0(h), k = Rc.get(_);
|
|
15235
15278
|
if (k) {
|
|
15236
15279
|
c(k.relatedProductIds), u(k.reasoning), g(null);
|
|
15237
15280
|
return;
|
|
@@ -15266,7 +15309,7 @@ function ze(e, t) {
|
|
|
15266
15309
|
function Lt(e) {
|
|
15267
15310
|
return typeof e == "string" && e.trim().length > 0;
|
|
15268
15311
|
}
|
|
15269
|
-
async function
|
|
15312
|
+
async function T0(e, t = {}) {
|
|
15270
15313
|
const n = t.pageSize ?? 10, r = await e.listCategories();
|
|
15271
15314
|
ze(Array.isArray(r), "listCategories() must return an array");
|
|
15272
15315
|
for (const i of r)
|
|
@@ -15708,7 +15751,7 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
15708
15751
|
"left-bottom"
|
|
15709
15752
|
], S = () => [...b(), ie, se], O = () => ["auto", "hidden", "clip", "visible", "scroll"], P = () => ["auto", "contain", "none"], N = () => [ie, se, l], I = () => [Xn, "full", "auto", ...N()], M = () => [hn, "none", "subgrid", ie, se], z = () => ["auto", {
|
|
15710
15753
|
span: ["full", hn, ie, se]
|
|
15711
|
-
}, hn, ie, se], C = () => [hn, "auto", ie, se],
|
|
15754
|
+
}, hn, ie, se], C = () => [hn, "auto", ie, se], E = () => ["auto", "min", "max", "fr", ie, se], R = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], j = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], L = () => ["auto", ...N()], T = () => [Xn, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...N()], A = () => [e, ie, se], F = () => [...b(), Bc, Fc, {
|
|
15712
15755
|
position: [ie, se]
|
|
15713
15756
|
}], Q = () => ["no-repeat", {
|
|
15714
15757
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -16097,14 +16140,14 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
16097
16140
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
16098
16141
|
*/
|
|
16099
16142
|
"auto-cols": [{
|
|
16100
|
-
"auto-cols":
|
|
16143
|
+
"auto-cols": E()
|
|
16101
16144
|
}],
|
|
16102
16145
|
/**
|
|
16103
16146
|
* Grid Auto Rows
|
|
16104
16147
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
16105
16148
|
*/
|
|
16106
16149
|
"auto-rows": [{
|
|
16107
|
-
"auto-rows":
|
|
16150
|
+
"auto-rows": E()
|
|
16108
16151
|
}],
|
|
16109
16152
|
/**
|
|
16110
16153
|
* Gap
|
|
@@ -16353,14 +16396,14 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
16353
16396
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
16354
16397
|
*/
|
|
16355
16398
|
size: [{
|
|
16356
|
-
size:
|
|
16399
|
+
size: T()
|
|
16357
16400
|
}],
|
|
16358
16401
|
/**
|
|
16359
16402
|
* Width
|
|
16360
16403
|
* @see https://tailwindcss.com/docs/width
|
|
16361
16404
|
*/
|
|
16362
16405
|
w: [{
|
|
16363
|
-
w: [c, "screen", ...
|
|
16406
|
+
w: [c, "screen", ...T()]
|
|
16364
16407
|
}],
|
|
16365
16408
|
/**
|
|
16366
16409
|
* Min-Width
|
|
@@ -16372,7 +16415,7 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
16372
16415
|
"screen",
|
|
16373
16416
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
16374
16417
|
"none",
|
|
16375
|
-
...
|
|
16418
|
+
...T()
|
|
16376
16419
|
]
|
|
16377
16420
|
}],
|
|
16378
16421
|
/**
|
|
@@ -16390,7 +16433,7 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
16390
16433
|
{
|
|
16391
16434
|
screen: [i]
|
|
16392
16435
|
},
|
|
16393
|
-
...
|
|
16436
|
+
...T()
|
|
16394
16437
|
]
|
|
16395
16438
|
}],
|
|
16396
16439
|
/**
|
|
@@ -16398,21 +16441,21 @@ const Mc = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Dc = Bd, X
|
|
|
16398
16441
|
* @see https://tailwindcss.com/docs/height
|
|
16399
16442
|
*/
|
|
16400
16443
|
h: [{
|
|
16401
|
-
h: ["screen", "lh", ...
|
|
16444
|
+
h: ["screen", "lh", ...T()]
|
|
16402
16445
|
}],
|
|
16403
16446
|
/**
|
|
16404
16447
|
* Min-Height
|
|
16405
16448
|
* @see https://tailwindcss.com/docs/min-height
|
|
16406
16449
|
*/
|
|
16407
16450
|
"min-h": [{
|
|
16408
|
-
"min-h": ["screen", "lh", "none", ...
|
|
16451
|
+
"min-h": ["screen", "lh", "none", ...T()]
|
|
16409
16452
|
}],
|
|
16410
16453
|
/**
|
|
16411
16454
|
* Max-Height
|
|
16412
16455
|
* @see https://tailwindcss.com/docs/max-height
|
|
16413
16456
|
*/
|
|
16414
16457
|
"max-h": [{
|
|
16415
|
-
"max-h": ["screen", "lh", ...
|
|
16458
|
+
"max-h": ["screen", "lh", ...T()]
|
|
16416
16459
|
}],
|
|
16417
16460
|
// ------------------
|
|
16418
16461
|
// --- Typography ---
|
|
@@ -18283,7 +18326,7 @@ const pt = v.forwardRef(
|
|
|
18283
18326
|
)
|
|
18284
18327
|
);
|
|
18285
18328
|
pt.displayName = "Label";
|
|
18286
|
-
var
|
|
18329
|
+
var Ew = [
|
|
18287
18330
|
"a",
|
|
18288
18331
|
"button",
|
|
18289
18332
|
"div",
|
|
@@ -18301,7 +18344,7 @@ var Tw = [
|
|
|
18301
18344
|
"span",
|
|
18302
18345
|
"svg",
|
|
18303
18346
|
"ul"
|
|
18304
|
-
],
|
|
18347
|
+
], Tw = Ew.reduce((e, t) => {
|
|
18305
18348
|
const n = /* @__PURE__ */ zd(`Primitive.${t}`), r = v.forwardRef((a, s) => {
|
|
18306
18349
|
const { asChild: i, ...c } = a, l = i ? n : t;
|
|
18307
18350
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(l, { ...c, ref: s });
|
|
@@ -18310,7 +18353,7 @@ var Tw = [
|
|
|
18310
18353
|
}, {}), Iw = "Separator", jc = "horizontal", Rw = ["horizontal", "vertical"], tu = v.forwardRef((e, t) => {
|
|
18311
18354
|
const { decorative: n, orientation: r = jc, ...a } = e, s = Ow(r) ? r : jc, c = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
18312
18355
|
return /* @__PURE__ */ o(
|
|
18313
|
-
|
|
18356
|
+
Tw.div,
|
|
18314
18357
|
{
|
|
18315
18358
|
"data-orientation": s,
|
|
18316
18359
|
...c,
|
|
@@ -19143,14 +19186,14 @@ const C_ = (e) => ({
|
|
|
19143
19186
|
}, g = ai(a), x = oi(g), y = await i.getDimensions(u), h = g === "y", _ = h ? "top" : "left", k = h ? "bottom" : "right", w = h ? "clientHeight" : "clientWidth", b = s.reference[x] + s.reference[g] - f[g] - s.floating[x], S = f[g] - s.reference[g], O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
19144
19187
|
let P = O ? O[w] : 0;
|
|
19145
19188
|
(!P || !await (i.isElement == null ? void 0 : i.isElement(O))) && (P = c.floating[w] || s.floating[x]);
|
|
19146
|
-
const N = b / 2 - S / 2, I = P / 2 - y[x] / 2 - 1, M = wn(m[_], I), z = wn(m[k], I), C = M,
|
|
19189
|
+
const N = b / 2 - S / 2, I = P / 2 - y[x] / 2 - 1, M = wn(m[_], I), z = wn(m[k], I), C = M, E = P - y[x] - z, R = P / 2 - y[x] / 2 + N, j = hs(C, R, E), L = !l.arrow && vr(a) != null && R !== j && s.reference[x] / 2 - (R < C ? M : z) - y[x] / 2 < 0, T = L ? R < C ? R - C : R - E : 0;
|
|
19147
19190
|
return {
|
|
19148
|
-
[g]: f[g] +
|
|
19191
|
+
[g]: f[g] + T,
|
|
19149
19192
|
data: {
|
|
19150
19193
|
[g]: j,
|
|
19151
|
-
centerOffset: R - j -
|
|
19194
|
+
centerOffset: R - j - T,
|
|
19152
19195
|
...L && {
|
|
19153
|
-
alignmentOffset:
|
|
19196
|
+
alignmentOffset: T
|
|
19154
19197
|
}
|
|
19155
19198
|
},
|
|
19156
19199
|
reset: L
|
|
@@ -19206,12 +19249,12 @@ const C_ = (e) => ({
|
|
|
19206
19249
|
placement: j
|
|
19207
19250
|
}
|
|
19208
19251
|
};
|
|
19209
|
-
let L = (C = M.filter((
|
|
19252
|
+
let L = (C = M.filter((T) => T.overflows[0] <= 0).sort((T, A) => T.overflows[1] - A.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
19210
19253
|
if (!L)
|
|
19211
19254
|
switch (g) {
|
|
19212
19255
|
case "bestFit": {
|
|
19213
|
-
var
|
|
19214
|
-
const
|
|
19256
|
+
var E;
|
|
19257
|
+
const T = (E = M.filter((A) => {
|
|
19215
19258
|
if (O) {
|
|
19216
19259
|
const F = Kt(A.placement);
|
|
19217
19260
|
return F === k || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -19219,8 +19262,8 @@ const C_ = (e) => ({
|
|
|
19219
19262
|
F === "y";
|
|
19220
19263
|
}
|
|
19221
19264
|
return !0;
|
|
19222
|
-
}).map((A) => [A.placement, A.overflows.filter((F) => F > 0).reduce((F, Q) => F + Q, 0)]).sort((A, F) => A[1] - F[1])[0]) == null ? void 0 :
|
|
19223
|
-
|
|
19265
|
+
}).map((A) => [A.placement, A.overflows.filter((F) => F > 0).reduce((F, Q) => F + Q, 0)]).sort((A, F) => A[1] - F[1])[0]) == null ? void 0 : E[0];
|
|
19266
|
+
T && (L = T);
|
|
19224
19267
|
break;
|
|
19225
19268
|
}
|
|
19226
19269
|
case "initialPlacement":
|
|
@@ -19318,7 +19361,7 @@ async function A_(e, t) {
|
|
|
19318
19361
|
y: g * p
|
|
19319
19362
|
};
|
|
19320
19363
|
}
|
|
19321
|
-
const
|
|
19364
|
+
const E_ = function(e) {
|
|
19322
19365
|
return e === void 0 && (e = 0), {
|
|
19323
19366
|
name: "offset",
|
|
19324
19367
|
options: e,
|
|
@@ -19340,7 +19383,7 @@ const T_ = function(e) {
|
|
|
19340
19383
|
};
|
|
19341
19384
|
}
|
|
19342
19385
|
};
|
|
19343
|
-
},
|
|
19386
|
+
}, T_ = function(e) {
|
|
19344
19387
|
return e === void 0 && (e = {}), {
|
|
19345
19388
|
name: "shift",
|
|
19346
19389
|
options: e,
|
|
@@ -19462,8 +19505,8 @@ const T_ = function(e) {
|
|
|
19462
19505
|
const k = y - p.top - p.bottom, w = x - p.left - p.right, b = wn(y - p[h], k), S = wn(x - p[_], w), O = !t.middlewareData.shift;
|
|
19463
19506
|
let P = b, N = S;
|
|
19464
19507
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = w), (r = t.middlewareData.shift) != null && r.enabled.y && (P = k), O && !f) {
|
|
19465
|
-
const M = At(p.left, 0), z = At(p.right, 0), C = At(p.top, 0),
|
|
19466
|
-
g ? N = x - 2 * (M !== 0 || z !== 0 ? M + z : At(p.left, p.right)) : P = y - 2 * (C !== 0 ||
|
|
19508
|
+
const M = At(p.left, 0), z = At(p.right, 0), C = At(p.top, 0), E = At(p.bottom, 0);
|
|
19509
|
+
g ? N = x - 2 * (M !== 0 || z !== 0 ? M + z : At(p.left, p.right)) : P = y - 2 * (C !== 0 || E !== 0 ? C + E : At(p.top, p.bottom));
|
|
19467
19510
|
}
|
|
19468
19511
|
await l({
|
|
19469
19512
|
...t,
|
|
@@ -19485,7 +19528,7 @@ function Ko() {
|
|
|
19485
19528
|
function br(e) {
|
|
19486
19529
|
return lu(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
19487
19530
|
}
|
|
19488
|
-
function
|
|
19531
|
+
function Et(e) {
|
|
19489
19532
|
var t;
|
|
19490
19533
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
19491
19534
|
}
|
|
@@ -19494,16 +19537,16 @@ function on(e) {
|
|
|
19494
19537
|
return (t = (lu(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
19495
19538
|
}
|
|
19496
19539
|
function lu(e) {
|
|
19497
|
-
return Ko() ? e instanceof Node || e instanceof
|
|
19540
|
+
return Ko() ? e instanceof Node || e instanceof Et(e).Node : !1;
|
|
19498
19541
|
}
|
|
19499
19542
|
function jt(e) {
|
|
19500
|
-
return Ko() ? e instanceof Element || e instanceof
|
|
19543
|
+
return Ko() ? e instanceof Element || e instanceof Et(e).Element : !1;
|
|
19501
19544
|
}
|
|
19502
19545
|
function nn(e) {
|
|
19503
|
-
return Ko() ? e instanceof HTMLElement || e instanceof
|
|
19546
|
+
return Ko() ? e instanceof HTMLElement || e instanceof Et(e).HTMLElement : !1;
|
|
19504
19547
|
}
|
|
19505
19548
|
function nl(e) {
|
|
19506
|
-
return !Ko() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
19549
|
+
return !Ko() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Et(e).ShadowRoot;
|
|
19507
19550
|
}
|
|
19508
19551
|
const O_ = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
19509
19552
|
function Qr(e) {
|
|
@@ -19553,7 +19596,7 @@ function ir(e) {
|
|
|
19553
19596
|
return j_.has(br(e));
|
|
19554
19597
|
}
|
|
19555
19598
|
function Ut(e) {
|
|
19556
|
-
return
|
|
19599
|
+
return Et(e).getComputedStyle(e);
|
|
19557
19600
|
}
|
|
19558
19601
|
function Jo(e) {
|
|
19559
19602
|
return jt(e) ? {
|
|
@@ -19583,7 +19626,7 @@ function du(e) {
|
|
|
19583
19626
|
function Ur(e, t, n) {
|
|
19584
19627
|
var r;
|
|
19585
19628
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
19586
|
-
const a = du(e), s = a === ((r = e.ownerDocument) == null ? void 0 : r.body), i =
|
|
19629
|
+
const a = du(e), s = a === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Et(a);
|
|
19587
19630
|
if (s) {
|
|
19588
19631
|
const c = ys(i);
|
|
19589
19632
|
return t.concat(i, i.visualViewport || [], Qr(a) ? a : [], c && n ? Ur(c) : []);
|
|
@@ -19623,14 +19666,14 @@ function ar(e) {
|
|
|
19623
19666
|
}
|
|
19624
19667
|
const U_ = /* @__PURE__ */ Jt(0);
|
|
19625
19668
|
function mu(e) {
|
|
19626
|
-
const t =
|
|
19669
|
+
const t = Et(e);
|
|
19627
19670
|
return !ii() || !t.visualViewport ? U_ : {
|
|
19628
19671
|
x: t.visualViewport.offsetLeft,
|
|
19629
19672
|
y: t.visualViewport.offsetTop
|
|
19630
19673
|
};
|
|
19631
19674
|
}
|
|
19632
19675
|
function W_(e, t, n) {
|
|
19633
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
19676
|
+
return t === void 0 && (t = !1), !n || t && n !== Et(e) ? !1 : t;
|
|
19634
19677
|
}
|
|
19635
19678
|
function zn(e, t, n, r) {
|
|
19636
19679
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
@@ -19640,11 +19683,11 @@ function zn(e, t, n, r) {
|
|
|
19640
19683
|
const c = W_(s, n, r) ? mu(s) : Jt(0);
|
|
19641
19684
|
let l = (a.left + c.x) / i.x, u = (a.top + c.y) / i.y, p = a.width / i.x, m = a.height / i.y;
|
|
19642
19685
|
if (s) {
|
|
19643
|
-
const f =
|
|
19686
|
+
const f = Et(s), g = r && jt(r) ? Et(r) : r;
|
|
19644
19687
|
let x = f, y = ys(x);
|
|
19645
19688
|
for (; y && r && g !== x; ) {
|
|
19646
19689
|
const h = ar(y), _ = y.getBoundingClientRect(), k = Ut(y), w = _.left + (y.clientLeft + parseFloat(k.paddingLeft)) * h.x, b = _.top + (y.clientTop + parseFloat(k.paddingTop)) * h.y;
|
|
19647
|
-
l *= h.x, u *= h.y, p *= h.x, m *= h.y, l += w, u += b, x =
|
|
19690
|
+
l *= h.x, u *= h.y, p *= h.x, m *= h.y, l += w, u += b, x = Et(y), y = ys(x);
|
|
19648
19691
|
}
|
|
19649
19692
|
}
|
|
19650
19693
|
return Do({
|
|
@@ -19708,7 +19751,7 @@ function q_(e) {
|
|
|
19708
19751
|
}
|
|
19709
19752
|
const rl = 25;
|
|
19710
19753
|
function Z_(e, t) {
|
|
19711
|
-
const n =
|
|
19754
|
+
const n = Et(e), r = on(e), a = n.visualViewport;
|
|
19712
19755
|
let s = r.clientWidth, i = r.clientHeight, c = 0, l = 0;
|
|
19713
19756
|
if (a) {
|
|
19714
19757
|
s = a.width, i = a.height;
|
|
@@ -19837,7 +19880,7 @@ function al(e, t) {
|
|
|
19837
19880
|
return on(e) === n && (n = n.ownerDocument.body), n;
|
|
19838
19881
|
}
|
|
19839
19882
|
function hu(e, t) {
|
|
19840
|
-
const n =
|
|
19883
|
+
const n = Et(e);
|
|
19841
19884
|
if (Xo(e))
|
|
19842
19885
|
return n;
|
|
19843
19886
|
if (!nn(e)) {
|
|
@@ -19966,7 +20009,7 @@ function ox(e, t, n, r) {
|
|
|
19966
20009
|
}), m?.(), (_ = g) == null || _.disconnect(), g = null, l && cancelAnimationFrame(x);
|
|
19967
20010
|
};
|
|
19968
20011
|
}
|
|
19969
|
-
const ax =
|
|
20012
|
+
const ax = E_, sx = T_, ix = N_, cx = R_, lx = P_, sl = C_, dx = I_, ux = (e, t, n) => {
|
|
19970
20013
|
const r = /* @__PURE__ */ new Map(), a = {
|
|
19971
20014
|
platform: nx,
|
|
19972
20015
|
...n
|
|
@@ -20051,7 +20094,7 @@ function fx(e) {
|
|
|
20051
20094
|
A !== O.current && (O.current = A, y(A));
|
|
20052
20095
|
}, []), w = v.useCallback((A) => {
|
|
20053
20096
|
A !== P.current && (P.current = A, _(A));
|
|
20054
|
-
}, []), b = s || x, S = i || h, O = v.useRef(null), P = v.useRef(null), N = v.useRef(p), I = l != null, M = qa(l), z = qa(a), C = qa(u),
|
|
20097
|
+
}, []), b = s || x, S = i || h, O = v.useRef(null), P = v.useRef(null), N = v.useRef(p), I = l != null, M = qa(l), z = qa(a), C = qa(u), E = v.useCallback(() => {
|
|
20055
20098
|
if (!O.current || !P.current)
|
|
20056
20099
|
return;
|
|
20057
20100
|
const A = {
|
|
@@ -20085,10 +20128,10 @@ function fx(e) {
|
|
|
20085
20128
|
}), []), wo(() => {
|
|
20086
20129
|
if (b && (O.current = b), S && (P.current = S), b && S) {
|
|
20087
20130
|
if (M.current)
|
|
20088
|
-
return M.current(b, S,
|
|
20089
|
-
|
|
20131
|
+
return M.current(b, S, E);
|
|
20132
|
+
E();
|
|
20090
20133
|
}
|
|
20091
|
-
}, [b, S,
|
|
20134
|
+
}, [b, S, E, M, I]);
|
|
20092
20135
|
const j = v.useMemo(() => ({
|
|
20093
20136
|
reference: O,
|
|
20094
20137
|
floating: P,
|
|
@@ -20097,7 +20140,7 @@ function fx(e) {
|
|
|
20097
20140
|
}), [k, w]), L = v.useMemo(() => ({
|
|
20098
20141
|
reference: b,
|
|
20099
20142
|
floating: S
|
|
20100
|
-
}), [b, S]),
|
|
20143
|
+
}), [b, S]), T = v.useMemo(() => {
|
|
20101
20144
|
const A = {
|
|
20102
20145
|
position: n,
|
|
20103
20146
|
left: 0,
|
|
@@ -20120,11 +20163,11 @@ function fx(e) {
|
|
|
20120
20163
|
}, [n, c, L.floating, p.x, p.y]);
|
|
20121
20164
|
return v.useMemo(() => ({
|
|
20122
20165
|
...p,
|
|
20123
|
-
update:
|
|
20166
|
+
update: E,
|
|
20124
20167
|
refs: j,
|
|
20125
20168
|
elements: L,
|
|
20126
|
-
floatingStyles:
|
|
20127
|
-
}), [p,
|
|
20169
|
+
floatingStyles: T
|
|
20170
|
+
}), [p, E, j, L, T]);
|
|
20128
20171
|
}
|
|
20129
20172
|
const hx = (e) => {
|
|
20130
20173
|
function t(n) {
|
|
@@ -20240,12 +20283,12 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20240
20283
|
updatePositionStrategy: g = "optimized",
|
|
20241
20284
|
onPlaced: x,
|
|
20242
20285
|
...y
|
|
20243
|
-
} = e, h = _u(di, n), [_, k] = v.useState(null), w = Le(t, (B) => k(B)), [b, S] = v.useState(null), O = Cx(b), P = O?.width ?? 0, N = O?.height ?? 0, I = r + (s !== "center" ? "-" + s : ""), M = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], C = z.length > 0,
|
|
20286
|
+
} = e, h = _u(di, n), [_, k] = v.useState(null), w = Le(t, (B) => k(B)), [b, S] = v.useState(null), O = Cx(b), P = O?.width ?? 0, N = O?.height ?? 0, I = r + (s !== "center" ? "-" + s : ""), M = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], C = z.length > 0, E = {
|
|
20244
20287
|
padding: M,
|
|
20245
|
-
boundary: z.filter(
|
|
20288
|
+
boundary: z.filter(Tx),
|
|
20246
20289
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
20247
20290
|
altBoundary: C
|
|
20248
|
-
}, { refs: R, floatingStyles: j, placement: L, isPositioned:
|
|
20291
|
+
}, { refs: R, floatingStyles: j, placement: L, isPositioned: T, middlewareData: A } = fx({
|
|
20249
20292
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
20250
20293
|
strategy: "fixed",
|
|
20251
20294
|
placement: I,
|
|
@@ -20261,11 +20304,11 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20261
20304
|
mainAxis: !0,
|
|
20262
20305
|
crossAxis: !1,
|
|
20263
20306
|
limiter: m === "partial" ? vx() : void 0,
|
|
20264
|
-
...
|
|
20307
|
+
...E
|
|
20265
20308
|
}),
|
|
20266
|
-
l && bx({ ...
|
|
20309
|
+
l && bx({ ...E }),
|
|
20267
20310
|
wx({
|
|
20268
|
-
...
|
|
20311
|
+
...E,
|
|
20269
20312
|
apply: ({ elements: B, rects: ne, availableWidth: ge, availableHeight: Z }) => {
|
|
20270
20313
|
const { width: oe, height: ue } = ne.reference, ye = B.floating.style;
|
|
20271
20314
|
ye.setProperty("--radix-popper-available-width", `${ge}px`), ye.setProperty("--radix-popper-available-height", `${Z}px`), ye.setProperty("--radix-popper-anchor-width", `${oe}px`), ye.setProperty("--radix-popper-anchor-height", `${ue}px`);
|
|
@@ -20273,12 +20316,12 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20273
20316
|
}),
|
|
20274
20317
|
b && xx({ element: b, padding: c }),
|
|
20275
20318
|
Ix({ arrowWidth: P, arrowHeight: N }),
|
|
20276
|
-
f && _x({ strategy: "referenceHidden", ...
|
|
20319
|
+
f && _x({ strategy: "referenceHidden", ...E })
|
|
20277
20320
|
]
|
|
20278
20321
|
}), [F, Q] = Au(L), ee = bn(x);
|
|
20279
20322
|
at(() => {
|
|
20280
|
-
|
|
20281
|
-
}, [
|
|
20323
|
+
T && ee?.();
|
|
20324
|
+
}, [T, ee]);
|
|
20282
20325
|
const $ = A.arrow?.x, W = A.arrow?.y, X = A.arrow?.centerOffset !== 0, [q, de] = v.useState();
|
|
20283
20326
|
return at(() => {
|
|
20284
20327
|
_ && de(window.getComputedStyle(_).zIndex);
|
|
@@ -20289,7 +20332,7 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20289
20332
|
"data-radix-popper-content-wrapper": "",
|
|
20290
20333
|
style: {
|
|
20291
20334
|
...j,
|
|
20292
|
-
transform:
|
|
20335
|
+
transform: T ? j.transform : "translate(0, -200%)",
|
|
20293
20336
|
// keep off the page when measuring
|
|
20294
20337
|
minWidth: "max-content",
|
|
20295
20338
|
zIndex: q,
|
|
@@ -20326,7 +20369,7 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20326
20369
|
...y.style,
|
|
20327
20370
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
20328
20371
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
20329
|
-
animation:
|
|
20372
|
+
animation: T ? void 0 : "none"
|
|
20330
20373
|
}
|
|
20331
20374
|
}
|
|
20332
20375
|
)
|
|
@@ -20337,13 +20380,13 @@ var di = "PopperContent", [Px, Ax] = bu(di), Cu = v.forwardRef(
|
|
|
20337
20380
|
}
|
|
20338
20381
|
);
|
|
20339
20382
|
Cu.displayName = di;
|
|
20340
|
-
var Nu = "PopperArrow",
|
|
20383
|
+
var Nu = "PopperArrow", Ex = {
|
|
20341
20384
|
top: "bottom",
|
|
20342
20385
|
right: "left",
|
|
20343
20386
|
bottom: "top",
|
|
20344
20387
|
left: "right"
|
|
20345
20388
|
}, Pu = v.forwardRef(function(t, n) {
|
|
20346
|
-
const { __scopePopper: r, ...a } = t, s = Ax(Nu, r), i =
|
|
20389
|
+
const { __scopePopper: r, ...a } = t, s = Ax(Nu, r), i = Ex[s.placedSide];
|
|
20347
20390
|
return (
|
|
20348
20391
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
20349
20392
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -20388,7 +20431,7 @@ var Nu = "PopperArrow", Tx = {
|
|
|
20388
20431
|
);
|
|
20389
20432
|
});
|
|
20390
20433
|
Pu.displayName = Nu;
|
|
20391
|
-
function
|
|
20434
|
+
function Tx(e) {
|
|
20392
20435
|
return e !== null;
|
|
20393
20436
|
}
|
|
20394
20437
|
var Ix = (e) => ({
|
|
@@ -20505,7 +20548,7 @@ function qx(e) {
|
|
|
20505
20548
|
const t = v.useRef({ value: e, previous: e });
|
|
20506
20549
|
return v.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
20507
20550
|
}
|
|
20508
|
-
var
|
|
20551
|
+
var Eu = Object.freeze({
|
|
20509
20552
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
20510
20553
|
position: "absolute",
|
|
20511
20554
|
border: 0,
|
|
@@ -20523,7 +20566,7 @@ var Tu = Object.freeze({
|
|
|
20523
20566
|
{
|
|
20524
20567
|
...e,
|
|
20525
20568
|
ref: t,
|
|
20526
|
-
style: { ...
|
|
20569
|
+
style: { ...Eu, ...e.style }
|
|
20527
20570
|
}
|
|
20528
20571
|
)
|
|
20529
20572
|
);
|
|
@@ -20533,13 +20576,13 @@ var Qx = function(e) {
|
|
|
20533
20576
|
return null;
|
|
20534
20577
|
var t = Array.isArray(e) ? e[0] : e;
|
|
20535
20578
|
return t.ownerDocument.body;
|
|
20536
|
-
}, Jn = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), uo = {}, Za = 0,
|
|
20537
|
-
return e && (e.host ||
|
|
20579
|
+
}, Jn = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), uo = {}, Za = 0, Tu = function(e) {
|
|
20580
|
+
return e && (e.host || Tu(e.parentNode));
|
|
20538
20581
|
}, Yx = function(e, t) {
|
|
20539
20582
|
return t.map(function(n) {
|
|
20540
20583
|
if (e.contains(n))
|
|
20541
20584
|
return n;
|
|
20542
|
-
var r =
|
|
20585
|
+
var r = Tu(n);
|
|
20543
20586
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
20544
20587
|
}).filter(function(n) {
|
|
20545
20588
|
return !!n;
|
|
@@ -20950,14 +20993,14 @@ var er = vs ? { passive: !1 } : !1, _k = function(e) {
|
|
|
20950
20993
|
return e && "current" in e ? e.current : e;
|
|
20951
20994
|
}, Ak = function(e, t) {
|
|
20952
20995
|
return e[0] === t[0] && e[1] === t[1];
|
|
20953
|
-
},
|
|
20996
|
+
}, Ek = function(e) {
|
|
20954
20997
|
return `
|
|
20955
20998
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
20956
20999
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
20957
21000
|
`);
|
|
20958
|
-
},
|
|
21001
|
+
}, Tk = 0, tr = [];
|
|
20959
21002
|
function Ik(e) {
|
|
20960
|
-
var t = v.useRef([]), n = v.useRef([0, 0]), r = v.useRef(), a = v.useState(
|
|
21003
|
+
var t = v.useRef([]), n = v.useRef([0, 0]), r = v.useRef(), a = v.useState(Tk++)[0], s = v.useState(Du)[0], i = v.useRef(e);
|
|
20961
21004
|
v.useEffect(function() {
|
|
20962
21005
|
i.current = e;
|
|
20963
21006
|
}, [e]), v.useEffect(function() {
|
|
@@ -21037,7 +21080,7 @@ function Ik(e) {
|
|
|
21037
21080
|
return v.createElement(
|
|
21038
21081
|
v.Fragment,
|
|
21039
21082
|
null,
|
|
21040
|
-
x ? v.createElement(s, { styles:
|
|
21083
|
+
x ? v.createElement(s, { styles: Ek(a) }) : null,
|
|
21041
21084
|
g ? v.createElement(wk, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
21042
21085
|
);
|
|
21043
21086
|
}
|
|
@@ -21080,7 +21123,7 @@ var Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Dk = [" ", "Enter"], Fn = "Sele
|
|
|
21080
21123
|
defaultProp: c,
|
|
21081
21124
|
onChange: l,
|
|
21082
21125
|
caller: Fn
|
|
21083
|
-
}), z = v.useRef(null), C = h ? x || !!h.closest("form") : !0, [
|
|
21126
|
+
}), z = v.useRef(null), C = h ? x || !!h.closest("form") : !0, [E, R] = v.useState(/* @__PURE__ */ new Set()), j = Array.from(E).map((L) => L.props.value).join(";");
|
|
21084
21127
|
return /* @__PURE__ */ o(Rx, { ...y, children: /* @__PURE__ */ d(
|
|
21085
21128
|
$k,
|
|
21086
21129
|
{
|
|
@@ -21106,11 +21149,11 @@ var Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Dk = [" ", "Enter"], Fn = "Sele
|
|
|
21106
21149
|
{
|
|
21107
21150
|
scope: e.__scopeSelect,
|
|
21108
21151
|
onNativeOptionAdd: v.useCallback((L) => {
|
|
21109
|
-
R((
|
|
21152
|
+
R((T) => new Set(T).add(L));
|
|
21110
21153
|
}, []),
|
|
21111
21154
|
onNativeOptionRemove: v.useCallback((L) => {
|
|
21112
|
-
R((
|
|
21113
|
-
const A = new Set(
|
|
21155
|
+
R((T) => {
|
|
21156
|
+
const A = new Set(T);
|
|
21114
21157
|
return A.delete(L), A;
|
|
21115
21158
|
});
|
|
21116
21159
|
}, []),
|
|
@@ -21131,7 +21174,7 @@ var Mk = [" ", "Enter", "ArrowUp", "ArrowDown"], Dk = [" ", "Enter"], Fn = "Sele
|
|
|
21131
21174
|
form: x,
|
|
21132
21175
|
children: [
|
|
21133
21176
|
I === void 0 ? /* @__PURE__ */ o("option", { value: "" }) : null,
|
|
21134
|
-
Array.from(
|
|
21177
|
+
Array.from(E)
|
|
21135
21178
|
]
|
|
21136
21179
|
},
|
|
21137
21180
|
j
|
|
@@ -21251,7 +21294,7 @@ var $t = 10, [Zu, An] = wr(Bn), Uk = "SelectContentImpl", Wk = /* @__PURE__ */ $
|
|
|
21251
21294
|
..._
|
|
21252
21295
|
} = e, k = Pn(Bn, n), [w, b] = v.useState(null), [S, O] = v.useState(null), P = Le(t, (B) => b(B)), [N, I] = v.useState(null), [M, z] = v.useState(
|
|
21253
21296
|
null
|
|
21254
|
-
), C = ra(n), [
|
|
21297
|
+
), C = ra(n), [E, R] = v.useState(!1), j = v.useRef(!1);
|
|
21255
21298
|
v.useEffect(() => {
|
|
21256
21299
|
if (w) return Iu(w);
|
|
21257
21300
|
}, [w]), au();
|
|
@@ -21262,13 +21305,13 @@ var $t = 10, [Zu, An] = wr(Bn), Uk = "SelectContentImpl", Wk = /* @__PURE__ */ $
|
|
|
21262
21305
|
if (ue === oe || (ue?.scrollIntoView({ block: "nearest" }), ue === ne && S && (S.scrollTop = 0), ue === Z && S && (S.scrollTop = S.scrollHeight), ue?.focus(), document.activeElement !== oe)) return;
|
|
21263
21306
|
},
|
|
21264
21307
|
[C, S]
|
|
21265
|
-
),
|
|
21308
|
+
), T = v.useCallback(
|
|
21266
21309
|
() => L([N, w]),
|
|
21267
21310
|
[L, N, w]
|
|
21268
21311
|
);
|
|
21269
21312
|
v.useEffect(() => {
|
|
21270
|
-
|
|
21271
|
-
}, [
|
|
21313
|
+
E && T();
|
|
21314
|
+
}, [E, T]);
|
|
21272
21315
|
const { onOpenChange: A, triggerPointerDownPosRef: F } = k;
|
|
21273
21316
|
v.useEffect(() => {
|
|
21274
21317
|
if (w) {
|
|
@@ -21329,10 +21372,10 @@ var $t = 10, [Zu, An] = wr(Bn), Uk = "SelectContentImpl", Wk = /* @__PURE__ */ $
|
|
|
21329
21372
|
selectedItem: N,
|
|
21330
21373
|
onItemLeave: W,
|
|
21331
21374
|
itemTextRefCallback: X,
|
|
21332
|
-
focusSelectedItem:
|
|
21375
|
+
focusSelectedItem: T,
|
|
21333
21376
|
selectedItemText: M,
|
|
21334
21377
|
position: r,
|
|
21335
|
-
isPositioned:
|
|
21378
|
+
isPositioned: E,
|
|
21336
21379
|
searchRef: Q,
|
|
21337
21380
|
children: /* @__PURE__ */ o(mi, { as: Wk, allowPinchZoom: !0, children: /* @__PURE__ */ o(
|
|
21338
21381
|
ni,
|
|
@@ -21418,14 +21461,14 @@ var Vk = "SelectItemAlignedPosition", Qu = v.forwardRef((e, t) => {
|
|
|
21418
21461
|
]);
|
|
21419
21462
|
c.style.minWidth = Me + "px", c.style.right = Xe + "px";
|
|
21420
21463
|
}
|
|
21421
|
-
const z = f(), C = window.innerHeight - $t * 2,
|
|
21464
|
+
const z = f(), C = window.innerHeight - $t * 2, E = y.scrollHeight, R = window.getComputedStyle(u), j = parseInt(R.borderTopWidth, 10), L = parseInt(R.paddingTop, 10), T = parseInt(R.borderBottomWidth, 10), A = parseInt(R.paddingBottom, 10), F = j + L + E + A + T, Q = Math.min(h.offsetHeight * 5, F), ee = window.getComputedStyle(y), $ = parseInt(ee.paddingTop, 10), W = parseInt(ee.paddingBottom, 10), X = P.top + P.height / 2 - $t, q = C - X, de = h.offsetHeight / 2, B = h.offsetTop + de, ne = j + L + B, ge = F - ne;
|
|
21422
21465
|
if (ne <= X) {
|
|
21423
21466
|
const oe = z.length > 0 && h === z[z.length - 1].ref.current;
|
|
21424
21467
|
c.style.bottom = "0px";
|
|
21425
21468
|
const ue = u.clientHeight - y.offsetTop - y.offsetHeight, ye = Math.max(
|
|
21426
21469
|
q,
|
|
21427
21470
|
de + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
21428
|
-
(oe ? W : 0) + ue +
|
|
21471
|
+
(oe ? W : 0) + ue + T
|
|
21429
21472
|
), Me = ne + ye;
|
|
21430
21473
|
c.style.height = Me + "px";
|
|
21431
21474
|
} else {
|
|
@@ -21804,7 +21847,7 @@ var rS = "SelectBubbleInput", am = v.forwardRef(
|
|
|
21804
21847
|
Ce.select,
|
|
21805
21848
|
{
|
|
21806
21849
|
...n,
|
|
21807
|
-
style: { ...
|
|
21850
|
+
style: { ...Eu, ...n.style },
|
|
21808
21851
|
ref: s,
|
|
21809
21852
|
defaultValue: t
|
|
21810
21853
|
}
|
|
@@ -22158,7 +22201,7 @@ var NS = v.forwardRef(
|
|
|
22158
22201
|
),
|
|
22159
22202
|
/* @__PURE__ */ d(Re, { children: [
|
|
22160
22203
|
/* @__PURE__ */ o(AS, { titleId: c.titleId }),
|
|
22161
|
-
/* @__PURE__ */ o(
|
|
22204
|
+
/* @__PURE__ */ o(TS, { contentRef: l, descriptionId: c.descriptionId })
|
|
22162
22205
|
] })
|
|
22163
22206
|
] });
|
|
22164
22207
|
}
|
|
@@ -22207,14 +22250,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
22207
22250
|
return v.useEffect(() => {
|
|
22208
22251
|
e && (document.getElementById(e) || console.error(n));
|
|
22209
22252
|
}, [n, e]), null;
|
|
22210
|
-
},
|
|
22211
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pm(
|
|
22253
|
+
}, ES = "DialogDescriptionWarning", TS = ({ contentRef: e, descriptionId: t }) => {
|
|
22254
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pm(ES).contentName}}.`;
|
|
22212
22255
|
return v.useEffect(() => {
|
|
22213
22256
|
const a = e.current?.getAttribute("aria-describedby");
|
|
22214
22257
|
t && a && (document.getElementById(t) || console.warn(r));
|
|
22215
22258
|
}, [r, e, t]), null;
|
|
22216
|
-
}, Am = pm,
|
|
22217
|
-
const yi = Am, IS =
|
|
22259
|
+
}, Am = pm, Em = hm, Tm = ym, sa = vm, ia = bm, ca = _m, la = km, Im = Cm;
|
|
22260
|
+
const yi = Am, IS = Em, Rm = Tm, RS = Im, vi = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
22218
22261
|
sa,
|
|
22219
22262
|
{
|
|
22220
22263
|
ref: n,
|
|
@@ -22267,7 +22310,7 @@ const wi = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
|
22267
22310
|
}
|
|
22268
22311
|
));
|
|
22269
22312
|
wi.displayName = la.displayName;
|
|
22270
|
-
const ma = Am, pa =
|
|
22313
|
+
const ma = Am, pa = Em, Mm = Im, Dm = Tm, _i = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
22271
22314
|
sa,
|
|
22272
22315
|
{
|
|
22273
22316
|
ref: n,
|
|
@@ -22742,7 +22785,7 @@ var nC = v.forwardRef((e, t) => {
|
|
|
22742
22785
|
if (N.target === N.currentTarget && I && !_) {
|
|
22743
22786
|
const M = new CustomEvent(Ka, KS);
|
|
22744
22787
|
if (N.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
|
|
22745
|
-
const z = b().filter((L) => L.focusable), C = z.find((L) => L.active),
|
|
22788
|
+
const z = b().filter((L) => L.focusable), C = z.find((L) => L.active), E = z.find((L) => L.id === y), j = [C, E, ...z].filter(
|
|
22746
22789
|
Boolean
|
|
22747
22790
|
).map((L) => L.ref.current);
|
|
22748
22791
|
cp(j, p);
|
|
@@ -22983,7 +23026,7 @@ function vp(e, t) {
|
|
|
22983
23026
|
return `${e}-content-${t}`;
|
|
22984
23027
|
}
|
|
22985
23028
|
var uC = dp, bp = mp, wp = fp, _p = gp;
|
|
22986
|
-
const
|
|
23029
|
+
const Ei = uC, wa = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
22987
23030
|
bp,
|
|
22988
23031
|
{
|
|
22989
23032
|
ref: n,
|
|
@@ -23324,23 +23367,23 @@ class kC {
|
|
|
23324
23367
|
}, this.getActiveToasts = () => this.toasts.filter((t) => !this.dismissedToasts.has(t.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
23325
23368
|
}
|
|
23326
23369
|
}
|
|
23327
|
-
const
|
|
23370
|
+
const xt = new kC(), SC = (e, t) => {
|
|
23328
23371
|
const n = t?.id || Ns++;
|
|
23329
|
-
return
|
|
23372
|
+
return xt.addToast({
|
|
23330
23373
|
title: e,
|
|
23331
23374
|
...t,
|
|
23332
23375
|
id: n
|
|
23333
23376
|
}), n;
|
|
23334
|
-
}, CC = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", NC = SC, PC = () =>
|
|
23335
|
-
success:
|
|
23336
|
-
info:
|
|
23337
|
-
warning:
|
|
23338
|
-
error:
|
|
23339
|
-
custom:
|
|
23340
|
-
message:
|
|
23341
|
-
promise:
|
|
23342
|
-
dismiss:
|
|
23343
|
-
loading:
|
|
23377
|
+
}, CC = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", NC = SC, PC = () => xt.toasts, AC = () => xt.getActiveToasts(), EC = Object.assign(NC, {
|
|
23378
|
+
success: xt.success,
|
|
23379
|
+
info: xt.info,
|
|
23380
|
+
warning: xt.warning,
|
|
23381
|
+
error: xt.error,
|
|
23382
|
+
custom: xt.custom,
|
|
23383
|
+
message: xt.message,
|
|
23384
|
+
promise: xt.promise,
|
|
23385
|
+
dismiss: xt.dismiss,
|
|
23386
|
+
loading: xt.loading
|
|
23344
23387
|
}, {
|
|
23345
23388
|
getHistory: PC,
|
|
23346
23389
|
getToasts: AC
|
|
@@ -23349,7 +23392,7 @@ pC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;
|
|
|
23349
23392
|
function ho(e) {
|
|
23350
23393
|
return e.label !== void 0;
|
|
23351
23394
|
}
|
|
23352
|
-
const
|
|
23395
|
+
const TC = 3, IC = "24px", RC = "16px", pl = 4e3, OC = 356, MC = 14, DC = 45, LC = 200;
|
|
23353
23396
|
function Gt(...e) {
|
|
23354
23397
|
return e.filter(Boolean).join(" ");
|
|
23355
23398
|
}
|
|
@@ -23359,7 +23402,7 @@ function $C(e) {
|
|
|
23359
23402
|
}
|
|
23360
23403
|
const zC = (e) => {
|
|
23361
23404
|
var t, n, r, a, s, i, c, l, u;
|
|
23362
|
-
const { invert: p, toast: m, unstyled: f, interacting: g, setHeights: x, visibleToasts: y, heights: h, index: _, toasts: k, expanded: w, removeToast: b, defaultRichColors: S, closeButton: O, style: P, cancelButtonStyle: N, actionButtonStyle: I, className: M = "", descriptionClassName: z = "", duration: C, position:
|
|
23405
|
+
const { invert: p, toast: m, unstyled: f, interacting: g, setHeights: x, visibleToasts: y, heights: h, index: _, toasts: k, expanded: w, removeToast: b, defaultRichColors: S, closeButton: O, style: P, cancelButtonStyle: N, actionButtonStyle: I, className: M = "", descriptionClassName: z = "", duration: C, position: E, gap: R, expandByDefault: j, classNames: L, icons: T, closeButtonAriaLabel: A = "Close toast" } = e, [F, Q] = V.useState(null), [ee, $] = V.useState(null), [W, X] = V.useState(!1), [q, de] = V.useState(!1), [B, ne] = V.useState(!1), [ge, Z] = V.useState(!1), [oe, ue] = V.useState(!1), [ye, Me] = V.useState(0), [Ye, Ke] = V.useState(0), Xe = V.useRef(m.duration || C || pl), St = V.useRef(null), et = V.useRef(null), qt = _ === 0, gt = _ + 1 <= y, re = m.type, _e = m.dismissible !== !1, we = m.className || "", yt = m.descriptionClassName || "", Ct = V.useMemo(() => h.findIndex((be) => be.toastId === m.id) || 0, [
|
|
23363
23406
|
h,
|
|
23364
23407
|
m.id
|
|
23365
23408
|
]), vt = V.useMemo(() => {
|
|
@@ -23371,13 +23414,13 @@ const zC = (e) => {
|
|
|
23371
23414
|
]), U = V.useMemo(() => m.duration || C || pl, [
|
|
23372
23415
|
m.duration,
|
|
23373
23416
|
C
|
|
23374
|
-
]), ae = V.useRef(0), me = V.useRef(0),
|
|
23417
|
+
]), ae = V.useRef(0), me = V.useRef(0), Ee = V.useRef(0), Te = V.useRef(null), [je, qn] = E.split("-"), Tt = V.useMemo(() => h.reduce((be, We, Ne) => Ne >= Ct ? be : be + We.height, 0), [
|
|
23375
23418
|
h,
|
|
23376
|
-
|
|
23377
|
-
]), an = xC(), xr = m.invert || p,
|
|
23378
|
-
me.current = V.useMemo(() =>
|
|
23379
|
-
|
|
23380
|
-
|
|
23419
|
+
Ct
|
|
23420
|
+
]), an = xC(), xr = m.invert || p, En = re === "loading";
|
|
23421
|
+
me.current = V.useMemo(() => Ct * R + Tt, [
|
|
23422
|
+
Ct,
|
|
23423
|
+
Tt
|
|
23381
23424
|
]), V.useEffect(() => {
|
|
23382
23425
|
Xe.current = U;
|
|
23383
23426
|
}, [
|
|
@@ -23440,11 +23483,11 @@ const zC = (e) => {
|
|
|
23440
23483
|
if (m.promise && re === "loading" || m.duration === 1 / 0 || m.type === "loading") return;
|
|
23441
23484
|
let be;
|
|
23442
23485
|
return w || g || an ? (() => {
|
|
23443
|
-
if (
|
|
23486
|
+
if (Ee.current < ae.current) {
|
|
23444
23487
|
const Ve = (/* @__PURE__ */ new Date()).getTime() - ae.current;
|
|
23445
23488
|
Xe.current = Xe.current - Ve;
|
|
23446
23489
|
}
|
|
23447
|
-
|
|
23490
|
+
Ee.current = (/* @__PURE__ */ new Date()).getTime();
|
|
23448
23491
|
})() : (() => {
|
|
23449
23492
|
Xe.current !== 1 / 0 && (ae.current = (/* @__PURE__ */ new Date()).getTime(), be = setTimeout(() => {
|
|
23450
23493
|
m.onAutoClose == null || m.onAutoClose.call(m, m), Zt();
|
|
@@ -23465,19 +23508,19 @@ const zC = (e) => {
|
|
|
23465
23508
|
]);
|
|
23466
23509
|
function Zn() {
|
|
23467
23510
|
var be;
|
|
23468
|
-
if (
|
|
23511
|
+
if (T?.loading) {
|
|
23469
23512
|
var We;
|
|
23470
23513
|
return /* @__PURE__ */ V.createElement("div", {
|
|
23471
23514
|
className: Gt(L?.loader, m == null || (We = m.classNames) == null ? void 0 : We.loader, "sonner-loader"),
|
|
23472
23515
|
"data-visible": re === "loading"
|
|
23473
|
-
},
|
|
23516
|
+
}, T.loading);
|
|
23474
23517
|
}
|
|
23475
23518
|
return /* @__PURE__ */ V.createElement(gC, {
|
|
23476
23519
|
className: Gt(L?.loader, m == null || (be = m.classNames) == null ? void 0 : be.loader),
|
|
23477
23520
|
visible: re === "loading"
|
|
23478
23521
|
});
|
|
23479
23522
|
}
|
|
23480
|
-
const Gn = m.icon ||
|
|
23523
|
+
const Gn = m.icon || T?.[re] || fC(re);
|
|
23481
23524
|
var Xr, fn;
|
|
23482
23525
|
return /* @__PURE__ */ V.createElement("li", {
|
|
23483
23526
|
tabIndex: 0,
|
|
@@ -23513,10 +23556,10 @@ const zC = (e) => {
|
|
|
23513
23556
|
...m.style
|
|
23514
23557
|
},
|
|
23515
23558
|
onDragEnd: () => {
|
|
23516
|
-
ne(!1), Q(null),
|
|
23559
|
+
ne(!1), Q(null), Te.current = null;
|
|
23517
23560
|
},
|
|
23518
23561
|
onPointerDown: (be) => {
|
|
23519
|
-
be.button !== 2 && (
|
|
23562
|
+
be.button !== 2 && (En || !_e || (St.current = /* @__PURE__ */ new Date(), Me(me.current), be.target.setPointerCapture(be.pointerId), be.target.tagName !== "BUTTON" && (ne(!0), Te.current = {
|
|
23520
23563
|
x: be.clientX,
|
|
23521
23564
|
y: be.clientY
|
|
23522
23565
|
})));
|
|
@@ -23524,56 +23567,56 @@ const zC = (e) => {
|
|
|
23524
23567
|
onPointerUp: () => {
|
|
23525
23568
|
var be, We, Ne;
|
|
23526
23569
|
if (ge || !_e) return;
|
|
23527
|
-
|
|
23528
|
-
const Ve = Number(((be = et.current) == null ? void 0 : be.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Qn = Number(((We = et.current) == null ? void 0 : We.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), He = (/* @__PURE__ */ new Date()).getTime() - ((Ne =
|
|
23529
|
-
if (Math.abs(st) >= DC ||
|
|
23570
|
+
Te.current = null;
|
|
23571
|
+
const Ve = Number(((be = et.current) == null ? void 0 : be.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Qn = Number(((We = et.current) == null ? void 0 : We.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), He = (/* @__PURE__ */ new Date()).getTime() - ((Ne = St.current) == null ? void 0 : Ne.getTime()), st = F === "x" ? Ve : Qn, Tn = Math.abs(st) / He;
|
|
23572
|
+
if (Math.abs(st) >= DC || Tn > 0.11) {
|
|
23530
23573
|
Me(me.current), m.onDismiss == null || m.onDismiss.call(m, m), $(F === "x" ? Ve > 0 ? "right" : "left" : Qn > 0 ? "down" : "up"), Zt(), Z(!0);
|
|
23531
23574
|
return;
|
|
23532
23575
|
} else {
|
|
23533
|
-
var bt,
|
|
23534
|
-
(bt = et.current) == null || bt.style.setProperty("--swipe-amount-x", "0px"), (
|
|
23576
|
+
var bt, Nt;
|
|
23577
|
+
(bt = et.current) == null || bt.style.setProperty("--swipe-amount-x", "0px"), (Nt = et.current) == null || Nt.style.setProperty("--swipe-amount-y", "0px");
|
|
23535
23578
|
}
|
|
23536
23579
|
ue(!1), ne(!1), Q(null);
|
|
23537
23580
|
},
|
|
23538
23581
|
onPointerMove: (be) => {
|
|
23539
23582
|
var We, Ne, Ve;
|
|
23540
|
-
if (!
|
|
23541
|
-
const He = be.clientY -
|
|
23542
|
-
var
|
|
23543
|
-
const bt = (
|
|
23583
|
+
if (!Te.current || !_e || ((We = window.getSelection()) == null ? void 0 : We.toString().length) > 0) return;
|
|
23584
|
+
const He = be.clientY - Te.current.y, st = be.clientX - Te.current.x;
|
|
23585
|
+
var Tn;
|
|
23586
|
+
const bt = (Tn = e.swipeDirections) != null ? Tn : $C(E);
|
|
23544
23587
|
!F && (Math.abs(st) > 1 || Math.abs(He) > 1) && Q(Math.abs(st) > Math.abs(He) ? "x" : "y");
|
|
23545
|
-
let
|
|
23588
|
+
let Nt = {
|
|
23546
23589
|
x: 0,
|
|
23547
23590
|
y: 0
|
|
23548
23591
|
};
|
|
23549
|
-
const
|
|
23592
|
+
const Pt = (ct) => 1 / (1.5 + Math.abs(ct) / 20);
|
|
23550
23593
|
if (F === "y") {
|
|
23551
23594
|
if (bt.includes("top") || bt.includes("bottom"))
|
|
23552
23595
|
if (bt.includes("top") && He < 0 || bt.includes("bottom") && He > 0)
|
|
23553
|
-
|
|
23596
|
+
Nt.y = He;
|
|
23554
23597
|
else {
|
|
23555
|
-
const ct = He *
|
|
23556
|
-
|
|
23598
|
+
const ct = He * Pt(He);
|
|
23599
|
+
Nt.y = Math.abs(ct) < Math.abs(He) ? ct : He;
|
|
23557
23600
|
}
|
|
23558
23601
|
} else if (F === "x" && (bt.includes("left") || bt.includes("right")))
|
|
23559
23602
|
if (bt.includes("left") && st < 0 || bt.includes("right") && st > 0)
|
|
23560
|
-
|
|
23603
|
+
Nt.x = st;
|
|
23561
23604
|
else {
|
|
23562
|
-
const ct = st *
|
|
23563
|
-
|
|
23605
|
+
const ct = st * Pt(st);
|
|
23606
|
+
Nt.x = Math.abs(ct) < Math.abs(st) ? ct : st;
|
|
23564
23607
|
}
|
|
23565
|
-
(Math.abs(
|
|
23608
|
+
(Math.abs(Nt.x) > 0 || Math.abs(Nt.y) > 0) && ue(!0), (Ne = et.current) == null || Ne.style.setProperty("--swipe-amount-x", `${Nt.x}px`), (Ve = et.current) == null || Ve.style.setProperty("--swipe-amount-y", `${Nt.y}px`);
|
|
23566
23609
|
}
|
|
23567
23610
|
}, vt && !m.jsx && re !== "loading" ? /* @__PURE__ */ V.createElement("button", {
|
|
23568
23611
|
"aria-label": A,
|
|
23569
|
-
"data-disabled":
|
|
23612
|
+
"data-disabled": En,
|
|
23570
23613
|
"data-close-button": !0,
|
|
23571
|
-
onClick:
|
|
23614
|
+
onClick: En || !_e ? () => {
|
|
23572
23615
|
} : () => {
|
|
23573
23616
|
Zt(), m.onDismiss == null || m.onDismiss.call(m, m);
|
|
23574
23617
|
},
|
|
23575
23618
|
className: Gt(L?.closeButton, m == null || (r = m.classNames) == null ? void 0 : r.closeButton)
|
|
23576
|
-
}, (fn =
|
|
23619
|
+
}, (fn = T?.close) != null ? fn : _C) : null, (re || m.icon || m.promise) && m.icon !== null && (T?.[re] !== null || m.icon) ? /* @__PURE__ */ V.createElement("div", {
|
|
23577
23620
|
"data-icon": "",
|
|
23578
23621
|
className: Gt(L?.icon, m == null || (a = m.classNames) == null ? void 0 : a.icon)
|
|
23579
23622
|
}, m.promise || m.type === "loading" && !m.icon ? m.icon || Zn() : null, m.type !== "loading" ? Gn : null) : null, /* @__PURE__ */ V.createElement("div", {
|
|
@@ -23639,7 +23682,7 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23639
23682
|
const { id: r, invert: a, position: s = "bottom-right", hotkey: i = [
|
|
23640
23683
|
"altKey",
|
|
23641
23684
|
"KeyT"
|
|
23642
|
-
], expand: c, closeButton: l, className: u, offset: p, mobileOffset: m, theme: f = "light", richColors: g, duration: x, style: y, visibleToasts: h =
|
|
23685
|
+
], expand: c, closeButton: l, className: u, offset: p, mobileOffset: m, theme: f = "light", richColors: g, duration: x, style: y, visibleToasts: h = TC, toastOptions: _, dir: k = fl(), gap: w = MC, icons: b, containerAriaLabel: S = "Notifications" } = t, [O, P] = V.useState([]), N = V.useMemo(() => r ? O.filter((W) => W.toasterId === r) : O.filter((W) => !W.toasterId), [
|
|
23643
23686
|
O,
|
|
23644
23687
|
r
|
|
23645
23688
|
]), I = V.useMemo(() => Array.from(new Set([
|
|
@@ -23647,13 +23690,13 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23647
23690
|
].concat(N.filter((W) => W.position).map((W) => W.position)))), [
|
|
23648
23691
|
N,
|
|
23649
23692
|
s
|
|
23650
|
-
]), [M, z] = V.useState([]), [C,
|
|
23693
|
+
]), [M, z] = V.useState([]), [C, E] = V.useState(!1), [R, j] = V.useState(!1), [L, T] = V.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), A = V.useRef(null), F = i.join("+").replace(/Key/g, "").replace(/Digit/g, ""), Q = V.useRef(null), ee = V.useRef(!1), $ = V.useCallback((W) => {
|
|
23651
23694
|
P((X) => {
|
|
23652
23695
|
var q;
|
|
23653
|
-
return (q = X.find((de) => de.id === W.id)) != null && q.delete ||
|
|
23696
|
+
return (q = X.find((de) => de.id === W.id)) != null && q.delete || xt.dismiss(W.id), X.filter(({ id: de }) => de !== W.id);
|
|
23654
23697
|
});
|
|
23655
23698
|
}, []);
|
|
23656
|
-
return V.useEffect(() =>
|
|
23699
|
+
return V.useEffect(() => xt.subscribe((W) => {
|
|
23657
23700
|
if (W.dismiss) {
|
|
23658
23701
|
requestAnimationFrame(() => {
|
|
23659
23702
|
P((X) => X.map((q) => q.id === W.id ? {
|
|
@@ -23685,19 +23728,19 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23685
23728
|
O
|
|
23686
23729
|
]), V.useEffect(() => {
|
|
23687
23730
|
if (f !== "system") {
|
|
23688
|
-
|
|
23731
|
+
T(f);
|
|
23689
23732
|
return;
|
|
23690
23733
|
}
|
|
23691
|
-
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
23734
|
+
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? T("dark") : T("light")), typeof window > "u") return;
|
|
23692
23735
|
const W = window.matchMedia("(prefers-color-scheme: dark)");
|
|
23693
23736
|
try {
|
|
23694
23737
|
W.addEventListener("change", ({ matches: X }) => {
|
|
23695
|
-
|
|
23738
|
+
T(X ? "dark" : "light");
|
|
23696
23739
|
});
|
|
23697
23740
|
} catch {
|
|
23698
23741
|
W.addListener(({ matches: q }) => {
|
|
23699
23742
|
try {
|
|
23700
|
-
|
|
23743
|
+
T(q ? "dark" : "light");
|
|
23701
23744
|
} catch (de) {
|
|
23702
23745
|
console.error(de);
|
|
23703
23746
|
}
|
|
@@ -23706,7 +23749,7 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23706
23749
|
}, [
|
|
23707
23750
|
f
|
|
23708
23751
|
]), V.useEffect(() => {
|
|
23709
|
-
O.length <= 1 &&
|
|
23752
|
+
O.length <= 1 && E(!1);
|
|
23710
23753
|
}, [
|
|
23711
23754
|
O
|
|
23712
23755
|
]), V.useEffect(() => {
|
|
@@ -23714,9 +23757,9 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23714
23757
|
var q;
|
|
23715
23758
|
if (i.every((ne) => X[ne] || X.code === ne)) {
|
|
23716
23759
|
var B;
|
|
23717
|
-
|
|
23760
|
+
E(!0), (B = A.current) == null || B.focus();
|
|
23718
23761
|
}
|
|
23719
|
-
X.code === "Escape" && (document.activeElement === A.current || (q = A.current) != null && q.contains(document.activeElement)) &&
|
|
23762
|
+
X.code === "Escape" && (document.activeElement === A.current || (q = A.current) != null && q.contains(document.activeElement)) && E(!1);
|
|
23720
23763
|
};
|
|
23721
23764
|
return document.addEventListener("keydown", W), () => document.removeEventListener("keydown", W);
|
|
23722
23765
|
}, [
|
|
@@ -23767,12 +23810,12 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23767
23810
|
onFocus: (ne) => {
|
|
23768
23811
|
ne.target instanceof HTMLElement && ne.target.dataset.dismissible === "false" || ee.current || (ee.current = !0, Q.current = ne.relatedTarget);
|
|
23769
23812
|
},
|
|
23770
|
-
onMouseEnter: () =>
|
|
23771
|
-
onMouseMove: () =>
|
|
23813
|
+
onMouseEnter: () => E(!0),
|
|
23814
|
+
onMouseMove: () => E(!0),
|
|
23772
23815
|
onMouseLeave: () => {
|
|
23773
|
-
R ||
|
|
23816
|
+
R || E(!1);
|
|
23774
23817
|
},
|
|
23775
|
-
onDragEnd: () =>
|
|
23818
|
+
onDragEnd: () => E(!1),
|
|
23776
23819
|
onPointerDown: (ne) => {
|
|
23777
23820
|
ne.target instanceof HTMLElement && ne.target.dataset.dismissible === "false" || j(!0);
|
|
23778
23821
|
},
|
|
@@ -23810,19 +23853,19 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23810
23853
|
});
|
|
23811
23854
|
})) : null;
|
|
23812
23855
|
}));
|
|
23813
|
-
}),
|
|
23856
|
+
}), Ti = v.createContext(null);
|
|
23814
23857
|
function jC() {
|
|
23815
|
-
const e = v.useContext(
|
|
23858
|
+
const e = v.useContext(Ti);
|
|
23816
23859
|
if (!e) throw new Error("useToast must be used within ToastProvider");
|
|
23817
23860
|
return e;
|
|
23818
23861
|
}
|
|
23819
23862
|
function _a() {
|
|
23820
|
-
return v.useContext(
|
|
23863
|
+
return v.useContext(Ti);
|
|
23821
23864
|
}
|
|
23822
23865
|
function UC({ children: e }) {
|
|
23823
23866
|
const t = v.useCallback((n) => {
|
|
23824
23867
|
const r = n.title ?? "", a = n.description;
|
|
23825
|
-
|
|
23868
|
+
EC(r || a || "Notification", {
|
|
23826
23869
|
description: r ? a : void 0,
|
|
23827
23870
|
duration: n.durationMs ?? 5e3,
|
|
23828
23871
|
action: n.actionLabel && n.onAction ? {
|
|
@@ -23831,7 +23874,7 @@ function UC({ children: e }) {
|
|
|
23831
23874
|
} : void 0
|
|
23832
23875
|
});
|
|
23833
23876
|
}, []);
|
|
23834
|
-
return /* @__PURE__ */ d(
|
|
23877
|
+
return /* @__PURE__ */ d(Ti.Provider, { value: { toast: t }, children: [
|
|
23835
23878
|
e,
|
|
23836
23879
|
/* @__PURE__ */ o(
|
|
23837
23880
|
BC,
|
|
@@ -23867,7 +23910,7 @@ let {
|
|
|
23867
23910
|
create: Ps
|
|
23868
23911
|
} = Object, {
|
|
23869
23912
|
apply: As,
|
|
23870
|
-
construct:
|
|
23913
|
+
construct: Es
|
|
23871
23914
|
} = typeof Reflect < "u" && Reflect;
|
|
23872
23915
|
ft || (ft = function(t) {
|
|
23873
23916
|
return t;
|
|
@@ -23880,7 +23923,7 @@ As || (As = function(t, n) {
|
|
|
23880
23923
|
a[s - 2] = arguments[s];
|
|
23881
23924
|
return t.apply(n, a);
|
|
23882
23925
|
});
|
|
23883
|
-
|
|
23926
|
+
Es || (Es = function(t) {
|
|
23884
23927
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
23885
23928
|
r[a - 1] = arguments[a];
|
|
23886
23929
|
return new t(...r);
|
|
@@ -23898,7 +23941,7 @@ function YC(e) {
|
|
|
23898
23941
|
return function() {
|
|
23899
23942
|
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
23900
23943
|
n[r] = arguments[r];
|
|
23901
|
-
return
|
|
23944
|
+
return Es(e, n);
|
|
23902
23945
|
};
|
|
23903
23946
|
}
|
|
23904
23947
|
function ke(e, t) {
|
|
@@ -23962,7 +24005,7 @@ var _l = /* @__PURE__ */ Object.freeze({
|
|
|
23962
24005
|
MUSTACHE_EXPR: eN,
|
|
23963
24006
|
TMPLIT_EXPR: nN
|
|
23964
24007
|
});
|
|
23965
|
-
const
|
|
24008
|
+
const Er = {
|
|
23966
24009
|
element: 1,
|
|
23967
24010
|
text: 3,
|
|
23968
24011
|
// Deprecated
|
|
@@ -24006,7 +24049,7 @@ const Tr = {
|
|
|
24006
24049
|
function Np() {
|
|
24007
24050
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cN();
|
|
24008
24051
|
const t = (pe) => Np(pe);
|
|
24009
|
-
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
24052
|
+
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== Er.document || !e.Element)
|
|
24010
24053
|
return t.isSupported = !1, t;
|
|
24011
24054
|
let {
|
|
24012
24055
|
document: n
|
|
@@ -24039,11 +24082,11 @@ function Np() {
|
|
|
24039
24082
|
t.isSupported = typeof kp == "function" && typeof w == "function" && O && O.createHTMLDocument !== void 0;
|
|
24040
24083
|
const {
|
|
24041
24084
|
MUSTACHE_EXPR: C,
|
|
24042
|
-
ERB_EXPR:
|
|
24085
|
+
ERB_EXPR: E,
|
|
24043
24086
|
TMPLIT_EXPR: R,
|
|
24044
24087
|
DATA_ATTR: j,
|
|
24045
24088
|
ARIA_ATTR: L,
|
|
24046
|
-
IS_SCRIPT_OR_DATA:
|
|
24089
|
+
IS_SCRIPT_OR_DATA: T,
|
|
24047
24090
|
ATTR_WHITESPACE: A,
|
|
24048
24091
|
CUSTOM_ELEMENT: F
|
|
24049
24092
|
} = _l;
|
|
@@ -24087,16 +24130,16 @@ function Np() {
|
|
|
24087
24130
|
value: null
|
|
24088
24131
|
}
|
|
24089
24132
|
}));
|
|
24090
|
-
let ge = !0, Z = !0, oe = !1, ue = !0, ye = !1, Me = !0, Ye = !1, Ke = !1, Xe = !1,
|
|
24133
|
+
let ge = !0, Z = !0, oe = !1, ue = !0, ye = !1, Me = !0, Ye = !1, Ke = !1, Xe = !1, St = !1, et = !1, qt = !1, gt = !0, re = !1;
|
|
24091
24134
|
const _e = "user-content-";
|
|
24092
|
-
let we = !0, yt = !1,
|
|
24135
|
+
let we = !0, yt = !1, Ct = {}, vt = null;
|
|
24093
24136
|
const U = ke({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
24094
24137
|
let ae = null;
|
|
24095
24138
|
const me = ke({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
24096
|
-
let
|
|
24097
|
-
const
|
|
24098
|
-
let an =
|
|
24099
|
-
const Zt = ke({}, [je, qn,
|
|
24139
|
+
let Ee = null;
|
|
24140
|
+
const Te = ke({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), je = "http://www.w3.org/1998/Math/MathML", qn = "http://www.w3.org/2000/svg", Tt = "http://www.w3.org/1999/xhtml";
|
|
24141
|
+
let an = Tt, xr = !1, En = null;
|
|
24142
|
+
const Zt = ke({}, [je, qn, Tt], Xa);
|
|
24100
24143
|
let Zn = ke({}, ["mi", "mo", "mn", "ms", "mtext"]), Gn = ke({}, ["annotation-xml"]);
|
|
24101
24144
|
const Xr = ke({}, ["title", "style", "font", "a", "script"]);
|
|
24102
24145
|
let fn = null;
|
|
@@ -24108,7 +24151,7 @@ function Np() {
|
|
|
24108
24151
|
let D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
24109
24152
|
if (!(Ve && Ve === D)) {
|
|
24110
24153
|
if ((!D || typeof D != "object") && (D = {}), D = Qt(D), fn = // eslint-disable-next-line unicorn/prefer-includes
|
|
24111
|
-
be.indexOf(D.PARSER_MEDIA_TYPE) === -1 ? We : D.PARSER_MEDIA_TYPE, Ne = fn === "application/xhtml+xml" ? Xa : ko, ee = zt(D, "ALLOWED_TAGS") ? ke({}, D.ALLOWED_TAGS, Ne) : $, W = zt(D, "ALLOWED_ATTR") ? ke({}, D.ALLOWED_ATTR, Ne) : X,
|
|
24154
|
+
be.indexOf(D.PARSER_MEDIA_TYPE) === -1 ? We : D.PARSER_MEDIA_TYPE, Ne = fn === "application/xhtml+xml" ? Xa : ko, ee = zt(D, "ALLOWED_TAGS") ? ke({}, D.ALLOWED_TAGS, Ne) : $, W = zt(D, "ALLOWED_ATTR") ? ke({}, D.ALLOWED_ATTR, Ne) : X, En = zt(D, "ALLOWED_NAMESPACES") ? ke({}, D.ALLOWED_NAMESPACES, Xa) : Zt, Ee = zt(D, "ADD_URI_SAFE_ATTR") ? ke(Qt(Te), D.ADD_URI_SAFE_ATTR, Ne) : Te, ae = zt(D, "ADD_DATA_URI_TAGS") ? ke(Qt(me), D.ADD_DATA_URI_TAGS, Ne) : me, vt = zt(D, "FORBID_CONTENTS") ? ke({}, D.FORBID_CONTENTS, Ne) : U, de = zt(D, "FORBID_TAGS") ? ke({}, D.FORBID_TAGS, Ne) : Qt({}), B = zt(D, "FORBID_ATTR") ? ke({}, D.FORBID_ATTR, Ne) : Qt({}), Ct = zt(D, "USE_PROFILES") ? D.USE_PROFILES : !1, ge = D.ALLOW_ARIA_ATTR !== !1, Z = D.ALLOW_DATA_ATTR !== !1, oe = D.ALLOW_UNKNOWN_PROTOCOLS || !1, ue = D.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ye = D.SAFE_FOR_TEMPLATES || !1, Me = D.SAFE_FOR_XML !== !1, Ye = D.WHOLE_DOCUMENT || !1, St = D.RETURN_DOM || !1, et = D.RETURN_DOM_FRAGMENT || !1, qt = D.RETURN_TRUSTED_TYPE || !1, Xe = D.FORCE_BODY || !1, gt = D.SANITIZE_DOM !== !1, re = D.SANITIZE_NAMED_PROPS || !1, we = D.KEEP_CONTENT !== !1, yt = D.IN_PLACE || !1, Q = D.ALLOWED_URI_REGEXP || Sp, an = D.NAMESPACE || Tt, Zn = D.MATHML_TEXT_INTEGRATION_POINTS || Zn, Gn = D.HTML_INTEGRATION_POINTS || Gn, q = D.CUSTOM_ELEMENT_HANDLING || {}, D.CUSTOM_ELEMENT_HANDLING && He(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (q.tagNameCheck = D.CUSTOM_ELEMENT_HANDLING.tagNameCheck), D.CUSTOM_ELEMENT_HANDLING && He(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (q.attributeNameCheck = D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), D.CUSTOM_ELEMENT_HANDLING && typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ye && (Z = !1), et && (St = !0), Ct && (ee = ke({}, vl), W = [], Ct.html === !0 && (ke(ee, yl), ke(W, bl)), Ct.svg === !0 && (ke(ee, es), ke(W, rs), ke(W, yo)), Ct.svgFilters === !0 && (ke(ee, ts), ke(W, rs), ke(W, yo)), Ct.mathMl === !0 && (ke(ee, ns), ke(W, wl), ke(W, yo))), D.ADD_TAGS && (typeof D.ADD_TAGS == "function" ? ne.tagCheck = D.ADD_TAGS : (ee === $ && (ee = Qt(ee)), ke(ee, D.ADD_TAGS, Ne))), D.ADD_ATTR && (typeof D.ADD_ATTR == "function" ? ne.attributeCheck = D.ADD_ATTR : (W === X && (W = Qt(W)), ke(W, D.ADD_ATTR, Ne))), D.ADD_URI_SAFE_ATTR && ke(Ee, D.ADD_URI_SAFE_ATTR, Ne), D.FORBID_CONTENTS && (vt === U && (vt = Qt(vt)), ke(vt, D.FORBID_CONTENTS, Ne)), D.ADD_FORBID_CONTENTS && (vt === U && (vt = Qt(vt)), ke(vt, D.ADD_FORBID_CONTENTS, Ne)), we && (ee["#text"] = !0), Ye && ke(ee, ["html", "head", "body"]), ee.table && (ke(ee, ["tbody"]), delete de.tbody), D.TRUSTED_TYPES_POLICY) {
|
|
24112
24155
|
if (typeof D.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
24113
24156
|
throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
24114
24157
|
if (typeof D.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -24118,15 +24161,15 @@ function Np() {
|
|
|
24118
24161
|
b === void 0 && (b = lN(g, a)), b !== null && typeof S == "string" && (S = b.createHTML(""));
|
|
24119
24162
|
ft && ft(D), Ve = D;
|
|
24120
24163
|
}
|
|
24121
|
-
},
|
|
24164
|
+
}, Tn = ke({}, [...es, ...ts, ...XC]), bt = ke({}, [...ns, ...JC]), Nt = function(D) {
|
|
24122
24165
|
let te = w(D);
|
|
24123
24166
|
(!te || !te.tagName) && (te = {
|
|
24124
24167
|
namespaceURI: an,
|
|
24125
24168
|
tagName: "template"
|
|
24126
24169
|
});
|
|
24127
24170
|
const ce = ko(D.tagName), De = ko(te.tagName);
|
|
24128
|
-
return
|
|
24129
|
-
},
|
|
24171
|
+
return En[D.namespaceURI] ? D.namespaceURI === qn ? te.namespaceURI === Tt ? ce === "svg" : te.namespaceURI === je ? ce === "svg" && (De === "annotation-xml" || Zn[De]) : !!Tn[ce] : D.namespaceURI === je ? te.namespaceURI === Tt ? ce === "math" : te.namespaceURI === qn ? ce === "math" && Gn[De] : !!bt[ce] : D.namespaceURI === Tt ? te.namespaceURI === qn && !Gn[De] || te.namespaceURI === je && !Zn[De] ? !1 : !bt[ce] && (Xr[ce] || !Tn[ce]) : !!(fn === "application/xhtml+xml" && En[D.namespaceURI]) : !1;
|
|
24172
|
+
}, Pt = function(D) {
|
|
24130
24173
|
Cr(t.removed, {
|
|
24131
24174
|
element: D
|
|
24132
24175
|
});
|
|
@@ -24148,9 +24191,9 @@ function Np() {
|
|
|
24148
24191
|
});
|
|
24149
24192
|
}
|
|
24150
24193
|
if (te.removeAttribute(D), D === "is")
|
|
24151
|
-
if (
|
|
24194
|
+
if (St || et)
|
|
24152
24195
|
try {
|
|
24153
|
-
|
|
24196
|
+
Pt(te);
|
|
24154
24197
|
} catch {
|
|
24155
24198
|
}
|
|
24156
24199
|
else
|
|
@@ -24166,9 +24209,9 @@ function Np() {
|
|
|
24166
24209
|
const qe = Ja(D, /^[\r\n\t ]+/);
|
|
24167
24210
|
ce = qe && qe[0];
|
|
24168
24211
|
}
|
|
24169
|
-
fn === "application/xhtml+xml" && an ===
|
|
24212
|
+
fn === "application/xhtml+xml" && an === Tt && (D = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + D + "</body></html>");
|
|
24170
24213
|
const De = b ? b.createHTML(D) : D;
|
|
24171
|
-
if (an ===
|
|
24214
|
+
if (an === Tt)
|
|
24172
24215
|
try {
|
|
24173
24216
|
te = new f().parseFromString(De, fn);
|
|
24174
24217
|
} catch {
|
|
@@ -24181,7 +24224,7 @@ function Np() {
|
|
|
24181
24224
|
}
|
|
24182
24225
|
}
|
|
24183
24226
|
const it = te.body || te.documentElement;
|
|
24184
|
-
return D && ce && it.insertBefore(n.createTextNode(ce), it.childNodes[0] || null), an ===
|
|
24227
|
+
return D && ce && it.insertBefore(n.createTextNode(ce), it.childNodes[0] || null), an === Tt ? I.call(te, Ye ? "html" : "body")[0] : Ye ? te.documentElement : it;
|
|
24185
24228
|
}, ji = function(D) {
|
|
24186
24229
|
return P.call(
|
|
24187
24230
|
D.ownerDocument || D,
|
|
@@ -24203,13 +24246,13 @@ function Np() {
|
|
|
24203
24246
|
const Wi = function(D) {
|
|
24204
24247
|
let te = null;
|
|
24205
24248
|
if (sn(z.beforeSanitizeElements, D, null), Na(D))
|
|
24206
|
-
return
|
|
24249
|
+
return Pt(D), !0;
|
|
24207
24250
|
const ce = Ne(D.nodeName);
|
|
24208
24251
|
if (sn(z.uponSanitizeElement, D, {
|
|
24209
24252
|
tagName: ce,
|
|
24210
24253
|
allowedTags: ee
|
|
24211
|
-
}), Me && D.hasChildNodes() && !Ui(D.firstElementChild) && lt(/<[/\w!]/g, D.innerHTML) && lt(/<[/\w!]/g, D.textContent) || D.nodeType ===
|
|
24212
|
-
return
|
|
24254
|
+
}), Me && D.hasChildNodes() && !Ui(D.firstElementChild) && lt(/<[/\w!]/g, D.innerHTML) && lt(/<[/\w!]/g, D.textContent) || D.nodeType === Er.progressingInstruction || Me && D.nodeType === Er.comment && lt(/<[/\w]/g, D.data))
|
|
24255
|
+
return Pt(D), !0;
|
|
24213
24256
|
if (!(ne.tagCheck instanceof Function && ne.tagCheck(ce)) && (!ee[ce] || de[ce])) {
|
|
24214
24257
|
if (!de[ce] && Hi(ce) && (q.tagNameCheck instanceof RegExp && lt(q.tagNameCheck, ce) || q.tagNameCheck instanceof Function && q.tagNameCheck(ce)))
|
|
24215
24258
|
return !1;
|
|
@@ -24223,9 +24266,9 @@ function Np() {
|
|
|
24223
24266
|
}
|
|
24224
24267
|
}
|
|
24225
24268
|
}
|
|
24226
|
-
return
|
|
24269
|
+
return Pt(D), !0;
|
|
24227
24270
|
}
|
|
24228
|
-
return D instanceof l && !
|
|
24271
|
+
return D instanceof l && !Nt(D) || (ce === "noscript" || ce === "noembed" || ce === "noframes") && lt(/<\/no(script|embed|frames)/i, D.innerHTML) ? (Pt(D), !0) : (ye && D.nodeType === Er.text && (te = D.textContent, go([C, E, R], (De) => {
|
|
24229
24272
|
te = Nr(te, De, " ");
|
|
24230
24273
|
}), D.textContent !== te && (Cr(t.removed, {
|
|
24231
24274
|
element: D.cloneNode()
|
|
@@ -24245,10 +24288,10 @@ function Np() {
|
|
|
24245
24288
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
24246
24289
|
te === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && lt(q.tagNameCheck, ce) || q.tagNameCheck instanceof Function && q.tagNameCheck(ce)))
|
|
24247
24290
|
) return !1;
|
|
24248
|
-
} else if (!
|
|
24291
|
+
} else if (!Ee[te]) {
|
|
24249
24292
|
if (!lt(Q, Nr(ce, A, ""))) {
|
|
24250
24293
|
if (!((te === "src" || te === "xlink:href" || te === "href") && D !== "script" && GC(ce, "data:") === 0 && ae[D])) {
|
|
24251
|
-
if (!(oe && !lt(
|
|
24294
|
+
if (!(oe && !lt(T, Nr(ce, A, "")))) {
|
|
24252
24295
|
if (ce)
|
|
24253
24296
|
return !1;
|
|
24254
24297
|
}
|
|
@@ -24301,7 +24344,7 @@ function Np() {
|
|
|
24301
24344
|
ct(qe, D);
|
|
24302
24345
|
continue;
|
|
24303
24346
|
}
|
|
24304
|
-
ye && go([C,
|
|
24347
|
+
ye && go([C, E, R], (Gi) => {
|
|
24305
24348
|
rt = Nr(rt, Gi, " ");
|
|
24306
24349
|
});
|
|
24307
24350
|
const Zi = Ne(D.nodeName);
|
|
@@ -24322,7 +24365,7 @@ function Np() {
|
|
|
24322
24365
|
}
|
|
24323
24366
|
if (rt !== Pa)
|
|
24324
24367
|
try {
|
|
24325
|
-
wt ? D.setAttributeNS(wt, qe, rt) : D.setAttribute(qe, rt), Na(D) ?
|
|
24368
|
+
wt ? D.setAttributeNS(wt, qe, rt) : D.setAttribute(qe, rt), Na(D) ? Pt(D) : gl(t.removed);
|
|
24326
24369
|
} catch {
|
|
24327
24370
|
ct(qe, D);
|
|
24328
24371
|
}
|
|
@@ -24352,21 +24395,21 @@ function Np() {
|
|
|
24352
24395
|
throw Pr("root node is forbidden and cannot be sanitized in-place");
|
|
24353
24396
|
}
|
|
24354
24397
|
} else if (pe instanceof c)
|
|
24355
|
-
te = Ca("<!---->"), ce = te.ownerDocument.importNode(pe, !0), ce.nodeType ===
|
|
24398
|
+
te = Ca("<!---->"), ce = te.ownerDocument.importNode(pe, !0), ce.nodeType === Er.element && ce.nodeName === "BODY" || ce.nodeName === "HTML" ? te = ce : te.appendChild(ce);
|
|
24356
24399
|
else {
|
|
24357
|
-
if (!
|
|
24400
|
+
if (!St && !ye && !Ye && // eslint-disable-next-line unicorn/prefer-includes
|
|
24358
24401
|
pe.indexOf("<") === -1)
|
|
24359
24402
|
return b && qt ? b.createHTML(pe) : pe;
|
|
24360
24403
|
if (te = Ca(pe), !te)
|
|
24361
|
-
return
|
|
24404
|
+
return St ? null : qt ? S : "";
|
|
24362
24405
|
}
|
|
24363
|
-
te && Xe &&
|
|
24406
|
+
te && Xe && Pt(te.firstChild);
|
|
24364
24407
|
const qe = ji(yt ? pe : te);
|
|
24365
24408
|
for (; De = qe.nextNode(); )
|
|
24366
24409
|
Wi(De), qi(De), De.content instanceof s && Wp(De.content);
|
|
24367
24410
|
if (yt)
|
|
24368
24411
|
return pe;
|
|
24369
|
-
if (
|
|
24412
|
+
if (St) {
|
|
24370
24413
|
if (et)
|
|
24371
24414
|
for (it = N.call(te.ownerDocument); te.firstChild; )
|
|
24372
24415
|
it.appendChild(te.firstChild);
|
|
@@ -24376,7 +24419,7 @@ function Np() {
|
|
|
24376
24419
|
}
|
|
24377
24420
|
let wt = Ye ? te.outerHTML : te.innerHTML;
|
|
24378
24421
|
return Ye && ee["!doctype"] && te.ownerDocument && te.ownerDocument.doctype && te.ownerDocument.doctype.name && lt(Cp, te.ownerDocument.doctype.name) && (wt = "<!DOCTYPE " + te.ownerDocument.doctype.name + `>
|
|
24379
|
-
` + wt), ye && go([C,
|
|
24422
|
+
` + wt), ye && go([C, E, R], (cn) => {
|
|
24380
24423
|
wt = Nr(wt, cn, " ");
|
|
24381
24424
|
}), b && qt ? b.createHTML(wt) : wt;
|
|
24382
24425
|
}, t.setConfig = function() {
|
|
@@ -24693,21 +24736,21 @@ function kl(e, t) {
|
|
|
24693
24736
|
(n) => Object.entries(t).every(([r, a]) => n.options[r] === a)
|
|
24694
24737
|
) ?? null;
|
|
24695
24738
|
}
|
|
24696
|
-
function
|
|
24739
|
+
function Ep(e) {
|
|
24697
24740
|
return e.inventoryStatus === "out_of_stock" || typeof e.inventoryQuantity == "number" && e.inventoryQuantity <= 0;
|
|
24698
24741
|
}
|
|
24699
24742
|
function gN(e) {
|
|
24700
24743
|
return e.inventoryStatus === "low" || typeof e.inventoryQuantity == "number" && e.inventoryQuantity > 0 && e.inventoryQuantity <= 5;
|
|
24701
24744
|
}
|
|
24702
24745
|
function yN(e) {
|
|
24703
|
-
const t =
|
|
24746
|
+
const t = Ep(e), n = !t && gN(e), r = typeof e.inventoryQuantity == "number" ? e.inventoryQuantity : void 0;
|
|
24704
24747
|
return { isOutOfStock: t, isLow: n, quantity: r };
|
|
24705
24748
|
}
|
|
24706
24749
|
function vN(e, t, n, r) {
|
|
24707
24750
|
const a = { ...t, [n]: r }, s = e.filter(
|
|
24708
24751
|
(i) => Object.entries(a).every(([c, l]) => i.options[c] === l)
|
|
24709
24752
|
);
|
|
24710
|
-
return s.length === 0 ? !1 : s.some((i) => !
|
|
24753
|
+
return s.length === 0 ? !1 : s.some((i) => !Ep(i));
|
|
24711
24754
|
}
|
|
24712
24755
|
function Ri({
|
|
24713
24756
|
product: e,
|
|
@@ -24889,7 +24932,7 @@ function Mi({
|
|
|
24889
24932
|
] })
|
|
24890
24933
|
] }) });
|
|
24891
24934
|
}
|
|
24892
|
-
function
|
|
24935
|
+
function Ts({
|
|
24893
24936
|
categories: e,
|
|
24894
24937
|
activeSlug: t,
|
|
24895
24938
|
onSelect: n,
|
|
@@ -25307,7 +25350,7 @@ function zi({
|
|
|
25307
25350
|
] })
|
|
25308
25351
|
] });
|
|
25309
25352
|
}
|
|
25310
|
-
function
|
|
25353
|
+
function Tp({
|
|
25311
25354
|
onCheckout: e,
|
|
25312
25355
|
className: t
|
|
25313
25356
|
}) {
|
|
@@ -25539,7 +25582,7 @@ function Zr({
|
|
|
25539
25582
|
),
|
|
25540
25583
|
children: [
|
|
25541
25584
|
/* @__PURE__ */ o(fa, { className: "space-y-0", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-3", children: [
|
|
25542
|
-
/* @__PURE__ */ o(
|
|
25585
|
+
/* @__PURE__ */ o(Ei, { value: c, onValueChange: (u) => l(u), children: /* @__PURE__ */ d(wa, { className: "h-9", children: [
|
|
25543
25586
|
/* @__PURE__ */ o(qr, { value: "cart", className: "text-sm", children: "Cart" }),
|
|
25544
25587
|
/* @__PURE__ */ o(qr, { value: "chat", className: "text-sm", children: "Chat" })
|
|
25545
25588
|
] }) }),
|
|
@@ -25559,7 +25602,7 @@ function Zr({
|
|
|
25559
25602
|
/* @__PURE__ */ o("div", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: "Get help finding a product or ask us any questions. We’re both your shopping assistant and support chat." }),
|
|
25560
25603
|
/* @__PURE__ */ o("div", { className: "mt-3 min-h-0 flex-1", children: /* @__PURE__ */ o(_N, { className: "h-full" }) })
|
|
25561
25604
|
] }) : /* @__PURE__ */ o(
|
|
25562
|
-
|
|
25605
|
+
Tp,
|
|
25563
25606
|
{
|
|
25564
25607
|
onCheckout: () => {
|
|
25565
25608
|
a(), r?.(!1);
|
|
@@ -26129,7 +26172,7 @@ function zp({
|
|
|
26129
26172
|
const g = Md({ items: c.items }), [x, y] = v.useState(!1), h = v.useMemo(
|
|
26130
26173
|
() => i.checkout.paymentMethods && i.checkout.paymentMethods.length ? i.checkout.paymentMethods : [{ id: "card", label: "Card", ctaLabel: "Pay now" }],
|
|
26131
26174
|
[i.checkout.paymentMethods]
|
|
26132
|
-
), _ = v.useMemo(() => h.filter((
|
|
26175
|
+
), _ = v.useMemo(() => h.filter((E) => !(E.id === "card" && !u.card || E.id === "crypto" && !u.crypto || E.id === "credits" && !u.credits || E.id === "crypto" && !m)), [m, h, u]), [k, w] = v.useState((_[0] ?? h[0]).id);
|
|
26133
26176
|
v.useEffect(() => {
|
|
26134
26177
|
_.length && (_.some((C) => C.id === k) || w(_[0].id));
|
|
26135
26178
|
}, [k, _]), v.useEffect(() => {
|
|
@@ -26137,8 +26180,8 @@ function zp({
|
|
|
26137
26180
|
}, [k]);
|
|
26138
26181
|
const b = _.find((C) => C.id === k) ?? h.find((C) => C.id === k) ?? h[0], S = b.description ?? (k === "crypto" ? "Pay using a connected wallet." : void 0), O = k === "crypto" && !m, P = p || l.status === "validating" || l.status === "creating_session" || l.status === "redirecting" || g.isVerifying, N = t ?? b.ctaLabel ?? (i.checkout.mode === "none" ? "Continue to payment" : "Pay now"), I = v.useCallback(
|
|
26139
26182
|
async (C) => {
|
|
26140
|
-
const
|
|
26141
|
-
if (!
|
|
26183
|
+
const E = await g.verify();
|
|
26184
|
+
if (!E.ok && E.issues.length > 0) {
|
|
26142
26185
|
y(!0);
|
|
26143
26186
|
return;
|
|
26144
26187
|
}
|
|
@@ -26149,7 +26192,7 @@ function zp({
|
|
|
26149
26192
|
return /* @__PURE__ */ d("div", { className: G("space-y-3", e), children: [
|
|
26150
26193
|
_.length > 1 ? /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
26151
26194
|
/* @__PURE__ */ o("div", { className: "text-xs font-medium text-neutral-600 dark:text-neutral-400", children: "Payment method" }),
|
|
26152
|
-
/* @__PURE__ */ o(
|
|
26195
|
+
/* @__PURE__ */ o(Ei, { value: k, onValueChange: w, children: /* @__PURE__ */ o(wa, { className: "w-full", children: _.map((C) => /* @__PURE__ */ o(qr, { value: C.id, className: "flex-1", disabled: P, children: C.label }, C.id)) }) })
|
|
26153
26196
|
] }) : null,
|
|
26154
26197
|
l.error ? /* @__PURE__ */ o("div", { className: "rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800 dark:border-red-900/40 dark:bg-red-950/30 dark:text-red-200", children: l.error }) : null,
|
|
26155
26198
|
z ? /* @__PURE__ */ o("div", { className: "space-y-3", children: a ? a(z) : s ?? /* @__PURE__ */ o("div", { className: "rounded-lg border border-neutral-200 bg-neutral-50 p-4 text-sm text-neutral-700 dark:border-neutral-800 dark:bg-neutral-900/40 dark:text-neutral-300", children: "Checkout session created. Provide `renderCustom` to render a custom payment UI." }) }) : M ? /* @__PURE__ */ o("div", { className: "space-y-3", children: n ? n(M) : r ?? /* @__PURE__ */ o("div", { className: "rounded-lg border border-neutral-200 bg-neutral-50 p-4 text-sm text-neutral-700 dark:border-neutral-800 dark:bg-neutral-900/40 dark:text-neutral-300", children: "Embedded checkout session created. Provide `renderEmbedded` to render your payment UI." }) }) : /* @__PURE__ */ o(
|
|
@@ -26173,11 +26216,11 @@ function zp({
|
|
|
26173
26216
|
y(C), C || g.reset();
|
|
26174
26217
|
},
|
|
26175
26218
|
issues: g.result?.issues ?? [],
|
|
26176
|
-
onRemoveItem: (C,
|
|
26177
|
-
c.removeItem(C,
|
|
26219
|
+
onRemoveItem: (C, E) => {
|
|
26220
|
+
c.removeItem(C, E);
|
|
26178
26221
|
},
|
|
26179
|
-
onUpdateQuantity: (C,
|
|
26180
|
-
c.setQty(C,
|
|
26222
|
+
onUpdateQuantity: (C, E, R) => {
|
|
26223
|
+
c.setQty(C, E, R);
|
|
26181
26224
|
}
|
|
26182
26225
|
}
|
|
26183
26226
|
)
|
|
@@ -26454,7 +26497,7 @@ function jp({
|
|
|
26454
26497
|
}) {
|
|
26455
26498
|
return /* @__PURE__ */ o("div", { className: G("grid gap-4", n), children: e.map((r) => /* @__PURE__ */ o(Bp, { order: r, onView: t }, r.id)) });
|
|
26456
26499
|
}
|
|
26457
|
-
function
|
|
26500
|
+
function EN(e) {
|
|
26458
26501
|
switch (e) {
|
|
26459
26502
|
case "paid":
|
|
26460
26503
|
return "default";
|
|
@@ -26503,7 +26546,7 @@ function Up({
|
|
|
26503
26546
|
] })
|
|
26504
26547
|
] }),
|
|
26505
26548
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 sm:justify-end", children: [
|
|
26506
|
-
/* @__PURE__ */ o(Mn, { variant:
|
|
26549
|
+
/* @__PURE__ */ o(Mn, { variant: EN(e.status), className: "capitalize", children: a }),
|
|
26507
26550
|
t ? /* @__PURE__ */ o(le, { type: "button", variant: "outline", size: "sm", className: "h-8", onClick: t, children: "Back" }) : null
|
|
26508
26551
|
] })
|
|
26509
26552
|
] }),
|
|
@@ -26537,7 +26580,7 @@ function Bi(e) {
|
|
|
26537
26580
|
const n = e.attributes?.shippingCountries;
|
|
26538
26581
|
return typeof n == "string" && n.trim() && (t.shippingCountries = n), Object.keys(t).length ? t : void 0;
|
|
26539
26582
|
}
|
|
26540
|
-
function
|
|
26583
|
+
function TN(e) {
|
|
26541
26584
|
return /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...e, children: /* @__PURE__ */ o("path", { d: "M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z" }) });
|
|
26542
26585
|
}
|
|
26543
26586
|
const IN = {
|
|
@@ -26581,7 +26624,7 @@ function ON({
|
|
|
26581
26624
|
sort: S,
|
|
26582
26625
|
page: w,
|
|
26583
26626
|
pageSize: 24
|
|
26584
|
-
}), C = v.useMemo(() => RN(I?.items ?? []), [I?.items]), { settings:
|
|
26627
|
+
}), C = v.useMemo(() => RN(I?.items ?? []), [I?.items]), { settings: E } = fr(), R = E.catalog.filters, j = E.catalog.sort, L = v.useMemo(() => {
|
|
26585
26628
|
const B = [];
|
|
26586
26629
|
return j.featured && B.push({ value: "featured", label: "Featured" }), j.priceAsc && B.push({ value: "price_asc", label: "Price: Low to High" }), j.priceDesc && B.push({ value: "price_desc", label: "Price: High to Low" }), B.length === 0 && B.push({ value: "featured", label: "Featured" }), B;
|
|
26587
26630
|
}, [j]);
|
|
@@ -26597,7 +26640,7 @@ function ON({
|
|
|
26597
26640
|
},
|
|
26598
26641
|
{ includeCategory: !0 }
|
|
26599
26642
|
);
|
|
26600
|
-
const [
|
|
26643
|
+
const [T, A] = v.useState(!1), [F, Q] = v.useState(!1), [ee, $] = v.useState(null), [W, X] = v.useState(!1), q = (B) => {
|
|
26601
26644
|
k(B.slug), b(1), A(!1);
|
|
26602
26645
|
}, de = v.useCallback(
|
|
26603
26646
|
(B, ne, ge) => {
|
|
@@ -26629,7 +26672,7 @@ function ON({
|
|
|
26629
26672
|
/* @__PURE__ */ o("a", { href: i.shop, className: "text-sm font-semibold tracking-tight", children: r.brand?.name ?? "Shop" }),
|
|
26630
26673
|
/* @__PURE__ */ o("div", { className: "flex-1", children: /* @__PURE__ */ o(Li, { value: y, onChange: h }) }),
|
|
26631
26674
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 lg:hidden", children: [
|
|
26632
|
-
/* @__PURE__ */ d(ma, { open:
|
|
26675
|
+
/* @__PURE__ */ d(ma, { open: T, onOpenChange: A, children: [
|
|
26633
26676
|
/* @__PURE__ */ o(pa, { asChild: !0, children: /* @__PURE__ */ o(le, { type: "button", variant: "outline", children: "Filters" }) }),
|
|
26634
26677
|
/* @__PURE__ */ d(Yr, { side: "left", children: [
|
|
26635
26678
|
/* @__PURE__ */ o(fa, { children: /* @__PURE__ */ o(ha, { children: "Browse" }) }),
|
|
@@ -26640,7 +26683,7 @@ function ON({
|
|
|
26640
26683
|
/* @__PURE__ */ o(Ue, { className: "h-9" }),
|
|
26641
26684
|
/* @__PURE__ */ o(Ue, { className: "h-9" })
|
|
26642
26685
|
] }) : /* @__PURE__ */ d("div", { className: "space-y-6", children: [
|
|
26643
|
-
/* @__PURE__ */ o(
|
|
26686
|
+
/* @__PURE__ */ o(Ts, { categories: m, activeSlug: _, onSelect: q }),
|
|
26644
26687
|
/* @__PURE__ */ o(
|
|
26645
26688
|
Uo,
|
|
26646
26689
|
{
|
|
@@ -26754,7 +26797,7 @@ function ON({
|
|
|
26754
26797
|
},
|
|
26755
26798
|
"aria-label": "Open chat",
|
|
26756
26799
|
children: [
|
|
26757
|
-
/* @__PURE__ */ o(
|
|
26800
|
+
/* @__PURE__ */ o(TN, { className: "h-4 w-4" }),
|
|
26758
26801
|
"Chat"
|
|
26759
26802
|
]
|
|
26760
26803
|
}
|
|
@@ -26770,7 +26813,7 @@ function ON({
|
|
|
26770
26813
|
/* @__PURE__ */ o(Ue, { className: "h-9" }),
|
|
26771
26814
|
/* @__PURE__ */ o(Ue, { className: "h-9" }),
|
|
26772
26815
|
/* @__PURE__ */ o(Ue, { className: "h-9" })
|
|
26773
|
-
] }) : /* @__PURE__ */ o("div", { className: "mt-3", children: /* @__PURE__ */ o(
|
|
26816
|
+
] }) : /* @__PURE__ */ o("div", { className: "mt-3", children: /* @__PURE__ */ o(Ts, { categories: m, activeSlug: _, onSelect: q }) })
|
|
26774
26817
|
] }),
|
|
26775
26818
|
L.length > 1 && /* @__PURE__ */ d("div", { children: [
|
|
26776
26819
|
/* @__PURE__ */ o("div", { className: "text-sm font-semibold", children: "Sort" }),
|
|
@@ -26806,8 +26849,8 @@ function ON({
|
|
|
26806
26849
|
] }) }) }),
|
|
26807
26850
|
/* @__PURE__ */ d("section", { children: [
|
|
26808
26851
|
/* @__PURE__ */ o("div", { className: "flex items-end justify-between gap-3", children: /* @__PURE__ */ d("div", { children: [
|
|
26809
|
-
/* @__PURE__ */ o("h1", { className: "text-2xl font-semibold tracking-tight", children:
|
|
26810
|
-
|
|
26852
|
+
/* @__PURE__ */ o("h1", { className: "text-2xl font-semibold tracking-tight", children: E.shopPage.title || "Shop" }),
|
|
26853
|
+
E.shopPage.description && /* @__PURE__ */ o("p", { className: "mt-1 text-sm text-neutral-600 dark:text-neutral-400", children: E.shopPage.description })
|
|
26811
26854
|
] }) }),
|
|
26812
26855
|
z ? /* @__PURE__ */ o(en, { className: "mt-6", description: z }) : null,
|
|
26813
26856
|
M ? /* @__PURE__ */ o("div", { className: "mt-6 grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4", children: Array.from({ length: 8 }).map((B, ne) => /* @__PURE__ */ o(Ue, { className: "aspect-[4/5] rounded-2xl" }, ne)) }) : /* @__PURE__ */ d("div", { className: "mt-6", children: [
|
|
@@ -26821,8 +26864,8 @@ function ON({
|
|
|
26821
26864
|
onQuickView: (B) => {
|
|
26822
26865
|
$(B), X(!0);
|
|
26823
26866
|
},
|
|
26824
|
-
layout:
|
|
26825
|
-
imageCrop:
|
|
26867
|
+
layout: E.shopLayout.layout,
|
|
26868
|
+
imageCrop: E.shopLayout.imageCrop
|
|
26826
26869
|
}
|
|
26827
26870
|
),
|
|
26828
26871
|
/* @__PURE__ */ d("div", { className: "mt-8 flex items-center justify-between", children: [
|
|
@@ -26882,15 +26925,15 @@ function DN({
|
|
|
26882
26925
|
const oe = () => l(Z.matches);
|
|
26883
26926
|
return oe(), Z.addEventListener?.("change", oe), () => Z.removeEventListener?.("change", oe);
|
|
26884
26927
|
}, []);
|
|
26885
|
-
const [u, p] = v.useState(!1), [m, f] = v.useState(!1), [g, x] = v.useState("cart"), y = v.useMemo(() => Qs({ includeCategory: !1 }), []), [h, _] = v.useState(y?.search ?? ""), [k, w] = v.useState(y?.page ?? 1), [b, S] = v.useState(y?.sort ?? "featured"), [O, P] = v.useState(y?.filters ?? {}), [N, I] = v.useState(null), [M, z] = v.useState(!1), C = i.find((Z) => Z.slug === e) ?? null, { data:
|
|
26928
|
+
const [u, p] = v.useState(!1), [m, f] = v.useState(!1), [g, x] = v.useState("cart"), y = v.useMemo(() => Qs({ includeCategory: !1 }), []), [h, _] = v.useState(y?.search ?? ""), [k, w] = v.useState(y?.page ?? 1), [b, S] = v.useState(y?.sort ?? "featured"), [O, P] = v.useState(y?.filters ?? {}), [N, I] = v.useState(null), [M, z] = v.useState(!1), C = i.find((Z) => Z.slug === e) ?? null, { data: E, isLoading: R, error: j } = Qo({
|
|
26886
26929
|
category: e,
|
|
26887
26930
|
search: h.trim() || void 0,
|
|
26888
26931
|
filters: O,
|
|
26889
26932
|
sort: b,
|
|
26890
26933
|
page: k,
|
|
26891
26934
|
pageSize: 24
|
|
26892
|
-
}), L = n?.product ?? ((Z) => `/product/${Z}`),
|
|
26893
|
-
const Z =
|
|
26935
|
+
}), L = n?.product ?? ((Z) => `/product/${Z}`), T = n?.shop ?? "/shop", A = n?.cart ?? "/cart", F = n?.checkout ?? "/checkout", Q = v.useMemo(() => {
|
|
26936
|
+
const Z = E?.items ?? [], oe = /* @__PURE__ */ new Set();
|
|
26894
26937
|
let ue = Number.POSITIVE_INFINITY, ye = 0;
|
|
26895
26938
|
for (const Ke of Z) {
|
|
26896
26939
|
for (const Xe of Ke.tags ?? []) oe.add(Xe);
|
|
@@ -26898,7 +26941,7 @@ function DN({
|
|
|
26898
26941
|
}
|
|
26899
26942
|
const Me = Array.from(oe).slice(0, 12), Ye = Number.isFinite(ue) ? { min: ue, max: ye } : void 0;
|
|
26900
26943
|
return { tags: Me, price: Ye };
|
|
26901
|
-
}, [
|
|
26944
|
+
}, [E?.items]), { settings: ee } = fr(), $ = ee.catalog.filters, W = ee.catalog.sort, X = v.useMemo(() => {
|
|
26902
26945
|
const Z = [];
|
|
26903
26946
|
return W.featured && Z.push({ value: "featured", label: "Featured" }), W.priceAsc && Z.push({ value: "price_asc", label: "Price: Low to High" }), W.priceDesc && Z.push({ value: "price_desc", label: "Price: High to Low" }), Z.length === 0 && Z.push({ value: "featured", label: "Featured" }), Z;
|
|
26904
26947
|
}, [W]);
|
|
@@ -26947,7 +26990,7 @@ function DN({
|
|
|
26947
26990
|
/* @__PURE__ */ d("div", { className: "space-y-1", children: [
|
|
26948
26991
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-2", children: [
|
|
26949
26992
|
/* @__PURE__ */ o("div", { className: "text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:text-neutral-400", children: "Category" }),
|
|
26950
|
-
/* @__PURE__ */ o(le, { asChild: !0, type: "button", variant: "ghost", size: "sm", className: "h-8 px-2 text-xs", children: /* @__PURE__ */ o("a", { href:
|
|
26993
|
+
/* @__PURE__ */ o(le, { asChild: !0, type: "button", variant: "ghost", size: "sm", className: "h-8 px-2 text-xs", children: /* @__PURE__ */ o("a", { href: T, children: "All categories" }) })
|
|
26951
26994
|
] }),
|
|
26952
26995
|
/* @__PURE__ */ o("div", { className: "text-base font-semibold text-neutral-950 dark:text-neutral-50", children: C?.name ?? e }),
|
|
26953
26996
|
/* @__PURE__ */ o("div", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: C?.description ?? "Browse products in this category." })
|
|
@@ -26964,7 +27007,7 @@ function DN({
|
|
|
26964
27007
|
] }) });
|
|
26965
27008
|
return /* @__PURE__ */ d("div", { className: G("min-h-screen bg-neutral-50 text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50", t), children: [
|
|
26966
27009
|
/* @__PURE__ */ o("header", { className: "sticky top-0 z-40 border-b border-neutral-200 bg-neutral-50/80 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/70", children: /* @__PURE__ */ d("div", { className: "mx-auto flex max-w-7xl items-center gap-3 px-4 py-3", children: [
|
|
26967
|
-
/* @__PURE__ */ o("a", { href:
|
|
27010
|
+
/* @__PURE__ */ o("a", { href: T, className: "text-sm font-semibold tracking-tight", children: r.brand?.name ?? "Shop" }),
|
|
26968
27011
|
/* @__PURE__ */ o("div", { className: "flex-1", children: /* @__PURE__ */ o(Li, { value: h, onChange: _ }) }),
|
|
26969
27012
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 lg:hidden", children: [
|
|
26970
27013
|
/* @__PURE__ */ d(ma, { open: u, onOpenChange: p, children: [
|
|
@@ -27043,7 +27086,7 @@ function DN({
|
|
|
27043
27086
|
}
|
|
27044
27087
|
),
|
|
27045
27088
|
/* @__PURE__ */ d("main", { className: "mx-auto max-w-7xl px-4 py-8", children: [
|
|
27046
|
-
/* @__PURE__ */ o(Di, { items: [{ label: "Shop", href:
|
|
27089
|
+
/* @__PURE__ */ o(Di, { items: [{ label: "Shop", href: T }, { label: C?.name ?? e }] }),
|
|
27047
27090
|
/* @__PURE__ */ d("div", { className: "mt-6", children: [
|
|
27048
27091
|
/* @__PURE__ */ o("h1", { className: "text-2xl font-semibold tracking-tight", children: C?.name ?? "Category" }),
|
|
27049
27092
|
/* @__PURE__ */ o("p", { className: "mt-1 text-sm text-neutral-600 dark:text-neutral-400", children: C?.description ?? "Browse products in this category." })
|
|
@@ -27055,7 +27098,7 @@ function DN({
|
|
|
27055
27098
|
/* @__PURE__ */ o(
|
|
27056
27099
|
ka,
|
|
27057
27100
|
{
|
|
27058
|
-
products:
|
|
27101
|
+
products: E?.items ?? [],
|
|
27059
27102
|
columns: r.ui?.productGrid?.columns,
|
|
27060
27103
|
getProductHref: (Z) => L(Z.slug),
|
|
27061
27104
|
onAddToCart: (Z) => q(Z, null, 1),
|
|
@@ -27086,7 +27129,7 @@ function DN({
|
|
|
27086
27129
|
{
|
|
27087
27130
|
type: "button",
|
|
27088
27131
|
variant: "outline",
|
|
27089
|
-
disabled: !
|
|
27132
|
+
disabled: !E?.hasNextPage,
|
|
27090
27133
|
onClick: () => w((Z) => Z + 1),
|
|
27091
27134
|
children: "Next"
|
|
27092
27135
|
}
|
|
@@ -27115,7 +27158,7 @@ function $N({
|
|
|
27115
27158
|
className: t,
|
|
27116
27159
|
routes: n
|
|
27117
27160
|
}) {
|
|
27118
|
-
const r = Wt(), a = _a(), { product: s, isLoading: i, error: c } =
|
|
27161
|
+
const r = Wt(), a = _a(), { product: s, isLoading: i, error: c } = Td(e), [l, u] = v.useState(1), [p, m] = v.useState({
|
|
27119
27162
|
selectedOptions: {},
|
|
27120
27163
|
variant: null
|
|
27121
27164
|
});
|
|
@@ -27128,23 +27171,23 @@ function $N({
|
|
|
27128
27171
|
productId: s?.id,
|
|
27129
27172
|
enabled: g === "ai" && !!s?.id
|
|
27130
27173
|
}), h = v.useMemo(() => g === "by_category" && s?.categoryIds?.length ? { category: s.categoryIds[0], page: 1, pageSize: x + 1 } : { page: 1, pageSize: x + 4 }, [g, x, s?.categoryIds]), _ = Qo(h), k = v.useMemo(() => {
|
|
27131
|
-
const
|
|
27174
|
+
const E = (_.data?.items ?? []).filter((R) => R.slug !== e);
|
|
27132
27175
|
if (g === "manual" && s) {
|
|
27133
27176
|
const R = s.attributes?.relatedProductIds || s.attributes?.related_product_ids;
|
|
27134
27177
|
if (R) {
|
|
27135
27178
|
const j = LN(String(R));
|
|
27136
27179
|
if (j.length > 0) {
|
|
27137
|
-
const L = new Map(
|
|
27180
|
+
const L = new Map(E.map((A) => [A.id, A]));
|
|
27138
27181
|
return j.map((A) => L.get(A)).filter((A) => !!A).slice(0, x);
|
|
27139
27182
|
}
|
|
27140
27183
|
}
|
|
27141
27184
|
}
|
|
27142
27185
|
if (g === "ai" && y.relatedProductIds && y.relatedProductIds.length > 0) {
|
|
27143
|
-
const R = new Map(
|
|
27186
|
+
const R = new Map(E.map((L) => [L.id, L])), j = y.relatedProductIds.map((L) => R.get(L)).filter((L) => !!L);
|
|
27144
27187
|
if (j.length > 0)
|
|
27145
27188
|
return j.slice(0, x);
|
|
27146
27189
|
}
|
|
27147
|
-
return
|
|
27190
|
+
return E.slice(0, x);
|
|
27148
27191
|
}, [_.data?.items, e, g, x, s, y.relatedProductIds]), w = n?.shop ?? "/shop", b = n?.checkout ?? "/checkout", S = n?.cart ?? "/cart", O = n?.product ?? ((C) => `/product/${C}`);
|
|
27149
27192
|
if (i)
|
|
27150
27193
|
return /* @__PURE__ */ o("div", { className: G("min-h-screen bg-neutral-50 p-6 dark:bg-neutral-950", t), children: /* @__PURE__ */ d("div", { className: "mx-auto max-w-6xl", children: [
|
|
@@ -27222,13 +27265,13 @@ function $N({
|
|
|
27222
27265
|
] }),
|
|
27223
27266
|
f.sections.showSpecs && /* @__PURE__ */ d(Mr, { value: "specs", children: [
|
|
27224
27267
|
/* @__PURE__ */ o(Dr, { children: "Specs" }),
|
|
27225
|
-
/* @__PURE__ */ o(Lr, { children: /* @__PURE__ */ o("div", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: s.attributes ? /* @__PURE__ */ o("div", { className: "space-y-1", children: Object.entries(s.attributes).map(([C,
|
|
27268
|
+
/* @__PURE__ */ o(Lr, { children: /* @__PURE__ */ o("div", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: s.attributes ? /* @__PURE__ */ o("div", { className: "space-y-1", children: Object.entries(s.attributes).map(([C, E]) => /* @__PURE__ */ d("div", { children: [
|
|
27226
27269
|
/* @__PURE__ */ d("span", { className: "font-medium text-neutral-950 dark:text-neutral-50", children: [
|
|
27227
27270
|
C,
|
|
27228
27271
|
":"
|
|
27229
27272
|
] }),
|
|
27230
27273
|
" ",
|
|
27231
|
-
String(
|
|
27274
|
+
String(E)
|
|
27232
27275
|
] }, C)) }) : "No specs provided." }) })
|
|
27233
27276
|
] }),
|
|
27234
27277
|
f.sections.showShipping && /* @__PURE__ */ d(Mr, { value: "ship", children: [
|
|
@@ -27310,7 +27353,7 @@ function FN({
|
|
|
27310
27353
|
/* @__PURE__ */ o("h1", { className: "text-3xl font-semibold tracking-tight", children: "Checkout" }),
|
|
27311
27354
|
/* @__PURE__ */ o("p", { className: "mt-2 text-sm text-neutral-600 dark:text-neutral-400", children: n.checkout.mode === "none" ? "Confirm and pay." : "Enter details, then complete payment." })
|
|
27312
27355
|
] }),
|
|
27313
|
-
/* @__PURE__ */ o("div", { className: "mt-8", children: /* @__PURE__ */ o(
|
|
27356
|
+
/* @__PURE__ */ o("div", { className: "mt-8", children: /* @__PURE__ */ o(Ed, { children: c ? /* @__PURE__ */ d(Bt, { className: "rounded-2xl", children: [
|
|
27314
27357
|
/* @__PURE__ */ o(Fr, { className: "pb-4", children: /* @__PURE__ */ o(Br, { className: "text-base", children: "Sign in required" }) }),
|
|
27315
27358
|
/* @__PURE__ */ d(tn, { children: [
|
|
27316
27359
|
/* @__PURE__ */ o("div", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: "This store requires an account to complete checkout." }),
|
|
@@ -27685,18 +27728,18 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
27685
27728
|
CardTitle: Br,
|
|
27686
27729
|
CartLineItem: $i,
|
|
27687
27730
|
CartPageContent: Rp,
|
|
27688
|
-
CartPanel:
|
|
27731
|
+
CartPanel: Tp,
|
|
27689
27732
|
CartProvider: Fh,
|
|
27690
27733
|
CartSidebar: Zr,
|
|
27691
27734
|
CartSummary: zi,
|
|
27692
27735
|
CartTemplate: zN,
|
|
27693
|
-
CategoryNav:
|
|
27736
|
+
CategoryNav: Ts,
|
|
27694
27737
|
CategoryTemplate: DN,
|
|
27695
27738
|
CedrosShopProvider: _h,
|
|
27696
27739
|
CheckoutCancelPage: PN,
|
|
27697
27740
|
CheckoutForm: Dp,
|
|
27698
27741
|
CheckoutLayout: Op,
|
|
27699
|
-
CheckoutProvider:
|
|
27742
|
+
CheckoutProvider: Ed,
|
|
27700
27743
|
CheckoutReceipt: Sa,
|
|
27701
27744
|
CheckoutSuccessPage: NN,
|
|
27702
27745
|
CheckoutTemplate: FN,
|
|
@@ -27755,7 +27798,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
27755
27798
|
ShopTemplate: ON,
|
|
27756
27799
|
Skeleton: Ue,
|
|
27757
27800
|
SubscriptionTemplate: qN,
|
|
27758
|
-
Tabs:
|
|
27801
|
+
Tabs: Ei,
|
|
27759
27802
|
TabsContent: xp,
|
|
27760
27803
|
TabsList: wa,
|
|
27761
27804
|
TabsTrigger: qr,
|
|
@@ -27779,14 +27822,14 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
27779
27822
|
useOptionalToast: _a,
|
|
27780
27823
|
useOrders: Id,
|
|
27781
27824
|
usePaymentMethodsConfig: Dd,
|
|
27782
|
-
useProduct:
|
|
27825
|
+
useProduct: Td,
|
|
27783
27826
|
useProducts: Qo,
|
|
27784
27827
|
useShippingMethods: Od,
|
|
27785
27828
|
useStandaloneCheckout: y0,
|
|
27786
27829
|
useStorefrontSettings: fr,
|
|
27787
27830
|
useSubscriptionData: Rd,
|
|
27788
27831
|
useToast: jC,
|
|
27789
|
-
validateCommerceAdapterContract:
|
|
27832
|
+
validateCommerceAdapterContract: T0
|
|
27790
27833
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
27791
27834
|
export {
|
|
27792
27835
|
$l as $,
|
|
@@ -27819,7 +27862,7 @@ export {
|
|
|
27819
27862
|
Mf as _,
|
|
27820
27863
|
y1 as a,
|
|
27821
27864
|
lr as a0,
|
|
27822
|
-
|
|
27865
|
+
Tl as a1,
|
|
27823
27866
|
Ol as a2,
|
|
27824
27867
|
yf as a3,
|
|
27825
27868
|
Rl as b,
|