@cedros/pay-react 1.1.14 → 1.1.16
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-FGF9nfl8.js → index-BU0vgA-7.js} +5 -5
- package/dist/{index-CdyuXqXT.mjs → index-DWXEBUbu.mjs} +168 -106
- 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-CL3lbNui.js} +1 -1
- package/dist/{sections-Dsma4UNK.mjs → sections-DnmB0qdx.mjs} +1 -1
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +1 -1
- package/package.json +1 -1
|
@@ -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 ? T("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(
|
|
@@ -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" });
|
|
@@ -4580,7 +4580,7 @@ function Mf({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
4580
4580
|
const Ee = ae(me), je = ae(Te);
|
|
4581
4581
|
return typeof Ee == "number" && typeof je == "number" ? (Ee - je) * U : String(Ee).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) {
|
|
@@ -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 ?? "—" }) }),
|
|
@@ -5008,7 +5008,26 @@ const Ds = {
|
|
|
5008
5008
|
fields: {
|
|
5009
5009
|
enabled: { hidden: !0 },
|
|
5010
5010
|
// Shown in header toggle
|
|
5011
|
-
|
|
5011
|
+
secret_key: {
|
|
5012
|
+
description: "Stripe Dashboard → Developers → API keys → Secret key. Use the test key (sk_test_...) for testing, or the live key (sk_live_...) for production."
|
|
5013
|
+
},
|
|
5014
|
+
publishable_key: {
|
|
5015
|
+
description: "Stripe Dashboard → Developers → API keys → Publishable key. Starts with pk_test_... or pk_live_..."
|
|
5016
|
+
},
|
|
5017
|
+
mode: {
|
|
5018
|
+
type: "dropdown",
|
|
5019
|
+
options: ["test", "live"],
|
|
5020
|
+
description: 'Use "test" mode with test API keys during development, then switch to "live" with live keys for real payments.'
|
|
5021
|
+
},
|
|
5022
|
+
webhook_url: {
|
|
5023
|
+
description: "The full URL Stripe sends webhook events to. Default is your server URL + /webhook/stripe (e.g. https://example.com/webhook/stripe). Only change this if you've customized the route in your cedros-pay server."
|
|
5024
|
+
},
|
|
5025
|
+
webhook_secret: {
|
|
5026
|
+
description: 'Stripe Dashboard → Developers → Webhooks → "Create an event destination" → select events: checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.paid, invoice.payment_failed → Continue → choose "Webhook endpoint" → enter your webhook URL (shown above) → after creating, click the endpoint and "Click to reveal" the signing secret. Starts with whsec_...'
|
|
5027
|
+
},
|
|
5028
|
+
tax_rate_id: {
|
|
5029
|
+
description: `Stripe Dashboard → More → Product catalog → Tax rates → "+ New" → set the percentage, region, and whether tax is inclusive or exclusive → Save → copy the tax rate ID from the detail page (starts with txr_...). Leave empty if you don't collect tax.`
|
|
5030
|
+
},
|
|
5012
5031
|
success_url: { hidden: !0 },
|
|
5013
5032
|
// Library provides default pages
|
|
5014
5033
|
cancel_url: { hidden: !0 }
|
|
@@ -5058,7 +5077,22 @@ const Ds = {
|
|
|
5058
5077
|
description: "Server keypair(s) used to sign and pay for transactions. Required for gasless payments.",
|
|
5059
5078
|
showWhen: "gasless_enabled"
|
|
5060
5079
|
},
|
|
5061
|
-
|
|
5080
|
+
rounding_mode: {
|
|
5081
|
+
type: "dropdown",
|
|
5082
|
+
options: ["nearest", "up", "down"],
|
|
5083
|
+
description: "How to round fractional token amounts: nearest (default), up (always round up), or down (always round down)."
|
|
5084
|
+
},
|
|
5085
|
+
network: { hidden: !0 },
|
|
5086
|
+
ws_url: { hidden: !0 },
|
|
5087
|
+
// Derived from rpc_url
|
|
5088
|
+
skip_preflight: { hidden: !0 },
|
|
5089
|
+
// Always false; not a user decision
|
|
5090
|
+
commitment: { hidden: !0 },
|
|
5091
|
+
// Internal Solana parameter
|
|
5092
|
+
compute_unit_limit: { hidden: !0 },
|
|
5093
|
+
// Internal Solana parameter
|
|
5094
|
+
compute_unit_price: { hidden: !0 }
|
|
5095
|
+
// Internal Solana parameter
|
|
5062
5096
|
}
|
|
5063
5097
|
},
|
|
5064
5098
|
paywall: {
|
|
@@ -5244,16 +5278,22 @@ const Ds = {
|
|
|
5244
5278
|
// Shown in header toggle when relevant
|
|
5245
5279
|
base_url: { hidden: !0 },
|
|
5246
5280
|
// Deployment setting
|
|
5247
|
-
timeout: { hidden: !0 }
|
|
5281
|
+
timeout: { hidden: !0 },
|
|
5248
5282
|
// Developer setting
|
|
5283
|
+
jwt_issuer: { hidden: !0 },
|
|
5284
|
+
// Internal auth config
|
|
5285
|
+
jwt_audience: { hidden: !0 }
|
|
5286
|
+
// Internal auth config
|
|
5249
5287
|
}
|
|
5250
5288
|
},
|
|
5251
|
-
|
|
5289
|
+
shop: {
|
|
5252
5290
|
label: "Storefront",
|
|
5253
5291
|
description: "Product pages & display settings",
|
|
5254
5292
|
secrets: [],
|
|
5255
5293
|
icon: "🏪",
|
|
5256
5294
|
fields: {
|
|
5295
|
+
enabled: { hidden: !0 },
|
|
5296
|
+
// Shown in StorefrontSection header toggle
|
|
5257
5297
|
"relatedProducts.mode": {
|
|
5258
5298
|
type: "dropdown",
|
|
5259
5299
|
options: ["most_recent", "by_category", "manual", "ai"]
|
|
@@ -6145,7 +6185,7 @@ function Ll({
|
|
|
6145
6185
|
] }),
|
|
6146
6186
|
I && /* @__PURE__ */ o("p", { className: "cedros-admin__text-muted", style: { marginTop: "0.25rem" }, children: I })
|
|
6147
6187
|
] }),
|
|
6148
|
-
c && u &&
|
|
6188
|
+
c && u && /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
6149
6189
|
/* @__PURE__ */ o("span", { style: { fontSize: "0.875rem", color: E ? "var(--cedros-admin-text, #171717)" : "var(--cedros-admin-muted, #737373)" }, children: E ? "Enabled" : "Disabled" }),
|
|
6150
6190
|
/* @__PURE__ */ o(
|
|
6151
6191
|
"button",
|
|
@@ -6992,6 +7032,7 @@ const Hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6992
7032
|
__proto__: null,
|
|
6993
7033
|
SubscriptionsSection: zl
|
|
6994
7034
|
}, Symbol.toStringTag, { value: "Module" })), Ea = {
|
|
7035
|
+
enabled: !0,
|
|
6995
7036
|
relatedProducts: {
|
|
6996
7037
|
mode: "most_recent",
|
|
6997
7038
|
maxItems: 4,
|
|
@@ -7202,11 +7243,32 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7202
7243
|
K.loading,
|
|
7203
7244
|
" Loading storefront settings..."
|
|
7204
7245
|
] }) }) : /* @__PURE__ */ d("div", { className: "cedros-admin__storefront-settings", children: [
|
|
7205
|
-
/* @__PURE__ */ d("div", { className: "cedros-admin__page-header", children: [
|
|
7206
|
-
/* @__PURE__ */
|
|
7207
|
-
|
|
7246
|
+
/* @__PURE__ */ d("div", { className: "cedros-admin__page-header", style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
|
|
7247
|
+
/* @__PURE__ */ d("div", { children: [
|
|
7248
|
+
/* @__PURE__ */ o("h2", { className: "cedros-admin__page-title", children: "Storefront" }),
|
|
7249
|
+
/* @__PURE__ */ o("p", { className: "cedros-admin__page-description", children: "Configure catalog filters, product layouts, and checkout settings." })
|
|
7250
|
+
] }),
|
|
7251
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem", flexShrink: 0 }, children: [
|
|
7252
|
+
/* @__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" }),
|
|
7253
|
+
/* @__PURE__ */ o(_t, { checked: s.enabled, onChange: (C) => i((T) => ({ ...T, enabled: C })) })
|
|
7254
|
+
] })
|
|
7208
7255
|
] }),
|
|
7209
|
-
/* @__PURE__ */
|
|
7256
|
+
!s.enabled && /* @__PURE__ */ o(
|
|
7257
|
+
"div",
|
|
7258
|
+
{
|
|
7259
|
+
style: {
|
|
7260
|
+
padding: "0.75rem 1rem",
|
|
7261
|
+
marginBottom: "1rem",
|
|
7262
|
+
backgroundColor: "var(--cedros-admin-warning-bg, #fef3c7)",
|
|
7263
|
+
border: "1px solid var(--cedros-admin-warning-border, #f59e0b)",
|
|
7264
|
+
borderRadius: "0.375rem",
|
|
7265
|
+
fontSize: "0.875rem",
|
|
7266
|
+
color: "var(--cedros-admin-warning-text, #92400e)"
|
|
7267
|
+
},
|
|
7268
|
+
children: "The storefront is disabled. Enable it using the toggle above to activate your store."
|
|
7269
|
+
}
|
|
7270
|
+
),
|
|
7271
|
+
/* @__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
7272
|
Zf.map((C) => /* @__PURE__ */ o(
|
|
7211
7273
|
"button",
|
|
7212
7274
|
{
|
|
@@ -7261,7 +7323,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7261
7323
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7262
7324
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7263
7325
|
/* @__PURE__ */ o(
|
|
7264
|
-
|
|
7326
|
+
_t,
|
|
7265
7327
|
{
|
|
7266
7328
|
checked: s.catalog.filters.tags,
|
|
7267
7329
|
onChange: (C) => b("tags", C)
|
|
@@ -7274,7 +7336,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7274
7336
|
] }),
|
|
7275
7337
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7276
7338
|
/* @__PURE__ */ o(
|
|
7277
|
-
|
|
7339
|
+
_t,
|
|
7278
7340
|
{
|
|
7279
7341
|
checked: s.catalog.filters.priceRange,
|
|
7280
7342
|
onChange: (C) => b("priceRange", C)
|
|
@@ -7287,7 +7349,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7287
7349
|
] }),
|
|
7288
7350
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7289
7351
|
/* @__PURE__ */ o(
|
|
7290
|
-
|
|
7352
|
+
_t,
|
|
7291
7353
|
{
|
|
7292
7354
|
checked: s.catalog.filters.inStock,
|
|
7293
7355
|
onChange: (C) => b("inStock", C)
|
|
@@ -7306,7 +7368,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7306
7368
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7307
7369
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7308
7370
|
/* @__PURE__ */ o(
|
|
7309
|
-
|
|
7371
|
+
_t,
|
|
7310
7372
|
{
|
|
7311
7373
|
checked: s.catalog.sort.featured,
|
|
7312
7374
|
onChange: (C) => S("featured", C)
|
|
@@ -7319,7 +7381,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7319
7381
|
] }),
|
|
7320
7382
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7321
7383
|
/* @__PURE__ */ o(
|
|
7322
|
-
|
|
7384
|
+
_t,
|
|
7323
7385
|
{
|
|
7324
7386
|
checked: s.catalog.sort.priceAsc,
|
|
7325
7387
|
onChange: (C) => S("priceAsc", C)
|
|
@@ -7332,7 +7394,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7332
7394
|
] }),
|
|
7333
7395
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7334
7396
|
/* @__PURE__ */ o(
|
|
7335
|
-
|
|
7397
|
+
_t,
|
|
7336
7398
|
{
|
|
7337
7399
|
checked: s.catalog.sort.priceDesc,
|
|
7338
7400
|
onChange: (C) => S("priceDesc", C)
|
|
@@ -7604,7 +7666,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7604
7666
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7605
7667
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7606
7668
|
/* @__PURE__ */ o(
|
|
7607
|
-
|
|
7669
|
+
_t,
|
|
7608
7670
|
{
|
|
7609
7671
|
checked: s.sections.showDescription,
|
|
7610
7672
|
onChange: (C) => I("showDescription", C)
|
|
@@ -7617,7 +7679,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7617
7679
|
] }),
|
|
7618
7680
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7619
7681
|
/* @__PURE__ */ o(
|
|
7620
|
-
|
|
7682
|
+
_t,
|
|
7621
7683
|
{
|
|
7622
7684
|
checked: s.sections.showSpecs,
|
|
7623
7685
|
onChange: (C) => I("showSpecs", C)
|
|
@@ -7630,7 +7692,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7630
7692
|
] }),
|
|
7631
7693
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7632
7694
|
/* @__PURE__ */ o(
|
|
7633
|
-
|
|
7695
|
+
_t,
|
|
7634
7696
|
{
|
|
7635
7697
|
checked: s.sections.showShipping,
|
|
7636
7698
|
onChange: (C) => I("showShipping", C)
|
|
@@ -7643,7 +7705,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7643
7705
|
] }),
|
|
7644
7706
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7645
7707
|
/* @__PURE__ */ o(
|
|
7646
|
-
|
|
7708
|
+
_t,
|
|
7647
7709
|
{
|
|
7648
7710
|
checked: s.sections.showRelatedProducts,
|
|
7649
7711
|
onChange: (C) => I("showRelatedProducts", C)
|
|
@@ -7663,7 +7725,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7663
7725
|
/* @__PURE__ */ o("p", { style: { marginBottom: "1rem", fontSize: 14, opacity: 0.7 }, children: "Configure checkout and cart page features." }),
|
|
7664
7726
|
/* @__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
7727
|
/* @__PURE__ */ o(
|
|
7666
|
-
|
|
7728
|
+
_t,
|
|
7667
7729
|
{
|
|
7668
7730
|
checked: s.checkout.promoCodes,
|
|
7669
7731
|
onChange: (C) => O("promoCodes", C)
|
|
@@ -7681,7 +7743,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7681
7743
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7682
7744
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7683
7745
|
/* @__PURE__ */ o(
|
|
7684
|
-
|
|
7746
|
+
_t,
|
|
7685
7747
|
{
|
|
7686
7748
|
checked: s.inventory.preCheckoutVerification,
|
|
7687
7749
|
onChange: (C) => M("preCheckoutVerification", C)
|
|
@@ -7694,7 +7756,7 @@ function Fl({ serverUrl: e, apiKey: t, authManager: n }) {
|
|
|
7694
7756
|
] }),
|
|
7695
7757
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7696
7758
|
/* @__PURE__ */ o(
|
|
7697
|
-
|
|
7759
|
+
_t,
|
|
7698
7760
|
{
|
|
7699
7761
|
checked: s.inventory.holdsEnabled,
|
|
7700
7762
|
onChange: (C) => M("holdsEnabled", C)
|
|
@@ -7754,7 +7816,7 @@ function Gf({ status: e, error: t }) {
|
|
|
7754
7816
|
}
|
|
7755
7817
|
);
|
|
7756
7818
|
}
|
|
7757
|
-
function
|
|
7819
|
+
function _t({
|
|
7758
7820
|
checked: e,
|
|
7759
7821
|
onChange: t,
|
|
7760
7822
|
disabled: n = !1
|
|
@@ -7802,7 +7864,7 @@ const Qf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7802
7864
|
__proto__: null,
|
|
7803
7865
|
StorefrontSection: Fl
|
|
7804
7866
|
}, Symbol.toStringTag, { value: "Module" })), Oa = [
|
|
7805
|
-
{ id: "not_set", label: "
|
|
7867
|
+
{ id: "not_set", label: "Disabled", provider: null },
|
|
7806
7868
|
{ id: "gemini-2.5-flash", label: "Gemini 2.5 Flash", provider: "gemini" },
|
|
7807
7869
|
{ id: "gemini-2.5-pro", label: "Gemini 2.5 Pro", provider: "gemini" },
|
|
7808
7870
|
{ id: "openai-4o", label: "OpenAI 4o", provider: "openai" },
|
|
@@ -9011,7 +9073,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9011
9073
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header-right", children: /* @__PURE__ */ d(
|
|
9012
9074
|
"button",
|
|
9013
9075
|
{
|
|
9014
|
-
className: "cedros-
|
|
9076
|
+
className: "cedros-admin__button cedros-admin__button--primary",
|
|
9015
9077
|
onClick: () => {
|
|
9016
9078
|
C(), u(!0);
|
|
9017
9079
|
},
|
|
@@ -9051,7 +9113,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9051
9113
|
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
9114
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-header", children: [
|
|
9053
9115
|
/* @__PURE__ */ o("h4", { children: p ? "Edit FAQ" : "Add New FAQ" }),
|
|
9054
|
-
/* @__PURE__ */ o("button", { type: "button", className: "cedros-
|
|
9116
|
+
/* @__PURE__ */ o("button", { type: "button", className: "cedros-admin__button--icon", onClick: C, children: K.close })
|
|
9055
9117
|
] }),
|
|
9056
9118
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-group", children: [
|
|
9057
9119
|
/* @__PURE__ */ o("label", { className: "cedros-admin__label", children: "Question *" }),
|
|
@@ -9139,12 +9201,12 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9139
9201
|
/* @__PURE__ */ o("span", { className: "cedros-admin__hint", children: "Choose where this FAQ should appear." })
|
|
9140
9202
|
] }),
|
|
9141
9203
|
/* @__PURE__ */ d("div", { className: "cedros-admin__form-actions", children: [
|
|
9142
|
-
/* @__PURE__ */ o("button", { type: "button", className: "cedros-
|
|
9204
|
+
/* @__PURE__ */ o("button", { type: "button", className: "cedros-admin__button", onClick: C, children: "Cancel" }),
|
|
9143
9205
|
/* @__PURE__ */ o(
|
|
9144
9206
|
"button",
|
|
9145
9207
|
{
|
|
9146
9208
|
type: "submit",
|
|
9147
|
-
className: "cedros-
|
|
9209
|
+
className: "cedros-admin__button cedros-admin__button--primary",
|
|
9148
9210
|
disabled: f || !O.question.trim() || !O.answer.trim(),
|
|
9149
9211
|
children: f ? K.loading : p ? "Update FAQ" : "Create FAQ"
|
|
9150
9212
|
}
|
|
@@ -9183,7 +9245,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9183
9245
|
/* @__PURE__ */ o(
|
|
9184
9246
|
"button",
|
|
9185
9247
|
{
|
|
9186
|
-
className: "cedros-
|
|
9248
|
+
className: "cedros-admin__button--icon",
|
|
9187
9249
|
onClick: () => z(F),
|
|
9188
9250
|
title: F.active ? "Deactivate" : "Activate",
|
|
9189
9251
|
children: F.active ? K.eyeOff : K.eye
|
|
@@ -9192,7 +9254,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9192
9254
|
/* @__PURE__ */ o(
|
|
9193
9255
|
"button",
|
|
9194
9256
|
{
|
|
9195
|
-
className: "cedros-
|
|
9257
|
+
className: "cedros-admin__button--icon",
|
|
9196
9258
|
onClick: () => T(F),
|
|
9197
9259
|
title: "Edit",
|
|
9198
9260
|
children: K.edit
|
|
@@ -9201,7 +9263,7 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9201
9263
|
/* @__PURE__ */ o(
|
|
9202
9264
|
"button",
|
|
9203
9265
|
{
|
|
9204
|
-
className: "cedros-
|
|
9266
|
+
className: "cedros-admin__button--icon cedros-admin__btn--danger",
|
|
9205
9267
|
onClick: () => w(F.id),
|
|
9206
9268
|
title: "Delete",
|
|
9207
9269
|
children: K.trash
|
|
@@ -9211,11 +9273,11 @@ function Wl({ serverUrl: e, apiKey: t, pageSize: n = 20, authManager: r }) {
|
|
|
9211
9273
|
k === F.id && /* @__PURE__ */ o("div", { className: "cedros-admin__confirm-overlay", children: /* @__PURE__ */ d("div", { className: "cedros-admin__confirm-dialog", children: [
|
|
9212
9274
|
/* @__PURE__ */ o("p", { children: "Delete this FAQ?" }),
|
|
9213
9275
|
/* @__PURE__ */ d("div", { className: "cedros-admin__confirm-actions", children: [
|
|
9214
|
-
/* @__PURE__ */ o("button", { className: "cedros-
|
|
9276
|
+
/* @__PURE__ */ o("button", { className: "cedros-admin__button", onClick: () => w(null), children: "Cancel" }),
|
|
9215
9277
|
/* @__PURE__ */ o(
|
|
9216
9278
|
"button",
|
|
9217
9279
|
{
|
|
9218
|
-
className: "cedros-
|
|
9280
|
+
className: "cedros-admin__button cedros-admin__button--danger",
|
|
9219
9281
|
onClick: () => M(F.id),
|
|
9220
9282
|
children: "Delete"
|
|
9221
9283
|
}
|
|
@@ -9626,11 +9688,11 @@ const Mt = (e) => Vp(async () => {
|
|
|
9626
9688
|
{ id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
|
|
9627
9689
|
],
|
|
9628
9690
|
components: {
|
|
9629
|
-
products: Mt(() => import("./sections-
|
|
9691
|
+
products: Mt(() => import("./sections-DnmB0qdx.mjs").then((e) => ({ default: e.ProductsSection }))),
|
|
9630
9692
|
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-
|
|
9693
|
+
transactions: Mt(() => import("./sections-DnmB0qdx.mjs").then((e) => ({ default: e.TransactionsSection }))),
|
|
9694
|
+
coupons: Mt(() => import("./sections-DnmB0qdx.mjs").then((e) => ({ default: e.CouponsSection }))),
|
|
9695
|
+
refunds: Mt(() => import("./sections-DnmB0qdx.mjs").then((e) => ({ default: e.RefundsSection }))),
|
|
9634
9696
|
storefront: Mt(() => Promise.resolve().then(() => Qf).then((e) => ({ default: e.StorefrontSection }))),
|
|
9635
9697
|
"ai-settings": Mt(() => Promise.resolve().then(() => Jf).then((e) => ({ default: e.AISettingsSection }))),
|
|
9636
9698
|
faqs: Mt(() => Promise.resolve().then(() => rh).then((e) => ({ default: e.FAQSection }))),
|
|
@@ -12121,7 +12183,7 @@ function Eg(e) {
|
|
|
12121
12183
|
const Ig = (e) => {
|
|
12122
12184
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
12123
12185
|
return new RegExp(`^${t}$`);
|
|
12124
|
-
}, Rg = /^-?\d+$/, Og = /^-?\d+(?:\.\d+)?$/, Mg = /^[^A-Z]*$/, Dg = /^[^a-z]*$/,
|
|
12186
|
+
}, Rg = /^-?\d+$/, Og = /^-?\d+(?:\.\d+)?$/, Mg = /^[^A-Z]*$/, Dg = /^[^a-z]*$/, kt = /* @__PURE__ */ Y("$ZodCheck", (e, t) => {
|
|
12125
12187
|
var n;
|
|
12126
12188
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
12127
12189
|
}), cd = {
|
|
@@ -12129,7 +12191,7 @@ const Ig = (e) => {
|
|
|
12129
12191
|
bigint: "bigint",
|
|
12130
12192
|
object: "date"
|
|
12131
12193
|
}, ld = /* @__PURE__ */ Y("$ZodCheckLessThan", (e, t) => {
|
|
12132
|
-
|
|
12194
|
+
kt.init(e, t);
|
|
12133
12195
|
const n = cd[typeof t.value];
|
|
12134
12196
|
e._zod.onattach.push((r) => {
|
|
12135
12197
|
const a = r._zod.bag, s = (t.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -12146,7 +12208,7 @@ const Ig = (e) => {
|
|
|
12146
12208
|
});
|
|
12147
12209
|
};
|
|
12148
12210
|
}), dd = /* @__PURE__ */ Y("$ZodCheckGreaterThan", (e, t) => {
|
|
12149
|
-
|
|
12211
|
+
kt.init(e, t);
|
|
12150
12212
|
const n = cd[typeof t.value];
|
|
12151
12213
|
e._zod.onattach.push((r) => {
|
|
12152
12214
|
const a = r._zod.bag, s = (t.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -12163,7 +12225,7 @@ const Ig = (e) => {
|
|
|
12163
12225
|
});
|
|
12164
12226
|
};
|
|
12165
12227
|
}), Lg = /* @__PURE__ */ Y("$ZodCheckMultipleOf", (e, t) => {
|
|
12166
|
-
|
|
12228
|
+
kt.init(e, t), e._zod.onattach.push((n) => {
|
|
12167
12229
|
var r;
|
|
12168
12230
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
12169
12231
|
}), e._zod.check = (n) => {
|
|
@@ -12179,7 +12241,7 @@ const Ig = (e) => {
|
|
|
12179
12241
|
});
|
|
12180
12242
|
};
|
|
12181
12243
|
}), $g = /* @__PURE__ */ Y("$ZodCheckNumberFormat", (e, t) => {
|
|
12182
|
-
|
|
12244
|
+
kt.init(e, t), t.format = t.format || "float64";
|
|
12183
12245
|
const n = t.format?.includes("int"), r = n ? "int" : "number", [a, s] = Hh[t.format];
|
|
12184
12246
|
e._zod.onattach.push((i) => {
|
|
12185
12247
|
const c = i._zod.bag;
|
|
@@ -12241,7 +12303,7 @@ const Ig = (e) => {
|
|
|
12241
12303
|
};
|
|
12242
12304
|
}), zg = /* @__PURE__ */ Y("$ZodCheckMaxLength", (e, t) => {
|
|
12243
12305
|
var n;
|
|
12244
|
-
|
|
12306
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12245
12307
|
const a = r.value;
|
|
12246
12308
|
return !Bs(a) && a.length !== void 0;
|
|
12247
12309
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12264,7 +12326,7 @@ const Ig = (e) => {
|
|
|
12264
12326
|
};
|
|
12265
12327
|
}), Fg = /* @__PURE__ */ Y("$ZodCheckMinLength", (e, t) => {
|
|
12266
12328
|
var n;
|
|
12267
|
-
|
|
12329
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12268
12330
|
const a = r.value;
|
|
12269
12331
|
return !Bs(a) && a.length !== void 0;
|
|
12270
12332
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12287,7 +12349,7 @@ const Ig = (e) => {
|
|
|
12287
12349
|
};
|
|
12288
12350
|
}), Bg = /* @__PURE__ */ Y("$ZodCheckLengthEquals", (e, t) => {
|
|
12289
12351
|
var n;
|
|
12290
|
-
|
|
12352
|
+
kt.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
12291
12353
|
const a = r.value;
|
|
12292
12354
|
return !Bs(a) && a.length !== void 0;
|
|
12293
12355
|
}), e._zod.onattach.push((r) => {
|
|
@@ -12310,7 +12372,7 @@ const Ig = (e) => {
|
|
|
12310
12372
|
};
|
|
12311
12373
|
}), Zo = /* @__PURE__ */ Y("$ZodCheckStringFormat", (e, t) => {
|
|
12312
12374
|
var n, r;
|
|
12313
|
-
|
|
12375
|
+
kt.init(e, t), e._zod.onattach.push((a) => {
|
|
12314
12376
|
const s = a._zod.bag;
|
|
12315
12377
|
s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
|
|
12316
12378
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (a) => {
|
|
@@ -12342,7 +12404,7 @@ const Ig = (e) => {
|
|
|
12342
12404
|
}), Wg = /* @__PURE__ */ Y("$ZodCheckUpperCase", (e, t) => {
|
|
12343
12405
|
t.pattern ?? (t.pattern = Dg), Zo.init(e, t);
|
|
12344
12406
|
}), Vg = /* @__PURE__ */ Y("$ZodCheckIncludes", (e, t) => {
|
|
12345
|
-
|
|
12407
|
+
kt.init(e, t);
|
|
12346
12408
|
const n = Vo(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
12347
12409
|
t.pattern = r, e._zod.onattach.push((a) => {
|
|
12348
12410
|
const s = a._zod.bag;
|
|
@@ -12359,7 +12421,7 @@ const Ig = (e) => {
|
|
|
12359
12421
|
});
|
|
12360
12422
|
};
|
|
12361
12423
|
}), Hg = /* @__PURE__ */ Y("$ZodCheckStartsWith", (e, t) => {
|
|
12362
|
-
|
|
12424
|
+
kt.init(e, t);
|
|
12363
12425
|
const n = new RegExp(`^${Vo(t.prefix)}.*`);
|
|
12364
12426
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
12365
12427
|
const a = r._zod.bag;
|
|
@@ -12376,7 +12438,7 @@ const Ig = (e) => {
|
|
|
12376
12438
|
});
|
|
12377
12439
|
};
|
|
12378
12440
|
}), qg = /* @__PURE__ */ Y("$ZodCheckEndsWith", (e, t) => {
|
|
12379
|
-
|
|
12441
|
+
kt.init(e, t);
|
|
12380
12442
|
const n = new RegExp(`.*${Vo(t.suffix)}$`);
|
|
12381
12443
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
12382
12444
|
const a = r._zod.bag;
|
|
@@ -12393,7 +12455,7 @@ const Ig = (e) => {
|
|
|
12393
12455
|
});
|
|
12394
12456
|
};
|
|
12395
12457
|
}), Zg = /* @__PURE__ */ Y("$ZodCheckOverwrite", (e, t) => {
|
|
12396
|
-
|
|
12458
|
+
kt.init(e, t), e._zod.check = (n) => {
|
|
12397
12459
|
n.value = t.tx(n.value);
|
|
12398
12460
|
};
|
|
12399
12461
|
});
|
|
@@ -13139,7 +13201,7 @@ function yc(e) {
|
|
|
13139
13201
|
return e.value = Object.freeze(e.value), e;
|
|
13140
13202
|
}
|
|
13141
13203
|
const Fy = /* @__PURE__ */ Y("$ZodCustom", (e, t) => {
|
|
13142
|
-
|
|
13204
|
+
kt.init(e, t), Ge.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
13143
13205
|
const r = n.value, a = t.fn(r);
|
|
13144
13206
|
if (a instanceof Promise)
|
|
13145
13207
|
return a.then((s) => vc(s, n, r, e));
|
|
@@ -13678,7 +13740,7 @@ function Iv(e) {
|
|
|
13678
13740
|
}
|
|
13679
13741
|
// @__NO_SIDE_EFFECTS__
|
|
13680
13742
|
function Rv(e, t) {
|
|
13681
|
-
const n = new
|
|
13743
|
+
const n = new kt({
|
|
13682
13744
|
check: "custom",
|
|
13683
13745
|
...he(t)
|
|
13684
13746
|
});
|
|
@@ -23324,23 +23386,23 @@ class kC {
|
|
|
23324
23386
|
}, this.getActiveToasts = () => this.toasts.filter((t) => !this.dismissedToasts.has(t.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
23325
23387
|
}
|
|
23326
23388
|
}
|
|
23327
|
-
const
|
|
23389
|
+
const xt = new kC(), SC = (e, t) => {
|
|
23328
23390
|
const n = t?.id || Ns++;
|
|
23329
|
-
return
|
|
23391
|
+
return xt.addToast({
|
|
23330
23392
|
title: e,
|
|
23331
23393
|
...t,
|
|
23332
23394
|
id: n
|
|
23333
23395
|
}), 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:
|
|
23396
|
+
}, 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(), TC = Object.assign(NC, {
|
|
23397
|
+
success: xt.success,
|
|
23398
|
+
info: xt.info,
|
|
23399
|
+
warning: xt.warning,
|
|
23400
|
+
error: xt.error,
|
|
23401
|
+
custom: xt.custom,
|
|
23402
|
+
message: xt.message,
|
|
23403
|
+
promise: xt.promise,
|
|
23404
|
+
dismiss: xt.dismiss,
|
|
23405
|
+
loading: xt.loading
|
|
23344
23406
|
}, {
|
|
23345
23407
|
getHistory: PC,
|
|
23346
23408
|
getToasts: AC
|
|
@@ -23359,7 +23421,7 @@ function $C(e) {
|
|
|
23359
23421
|
}
|
|
23360
23422
|
const zC = (e) => {
|
|
23361
23423
|
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: T, gap: R, expandByDefault: j, classNames: L, icons: E, 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),
|
|
23424
|
+
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: T, gap: R, expandByDefault: j, classNames: L, icons: E, 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
23425
|
h,
|
|
23364
23426
|
m.id
|
|
23365
23427
|
]), vt = V.useMemo(() => {
|
|
@@ -23371,12 +23433,12 @@ const zC = (e) => {
|
|
|
23371
23433
|
]), U = V.useMemo(() => m.duration || C || pl, [
|
|
23372
23434
|
m.duration,
|
|
23373
23435
|
C
|
|
23374
|
-
]), ae = V.useRef(0), me = V.useRef(0), Te = V.useRef(0), Ee = V.useRef(null), [je, qn] = T.split("-"), Et = V.useMemo(() => h.reduce((be, We, Ne) => Ne >=
|
|
23436
|
+
]), ae = V.useRef(0), me = V.useRef(0), Te = V.useRef(0), Ee = V.useRef(null), [je, qn] = T.split("-"), Et = V.useMemo(() => h.reduce((be, We, Ne) => Ne >= Ct ? be : be + We.height, 0), [
|
|
23375
23437
|
h,
|
|
23376
|
-
|
|
23438
|
+
Ct
|
|
23377
23439
|
]), an = xC(), xr = m.invert || p, Tn = re === "loading";
|
|
23378
|
-
me.current = V.useMemo(() =>
|
|
23379
|
-
|
|
23440
|
+
me.current = V.useMemo(() => Ct * R + Et, [
|
|
23441
|
+
Ct,
|
|
23380
23442
|
Et
|
|
23381
23443
|
]), V.useEffect(() => {
|
|
23382
23444
|
Xe.current = U;
|
|
@@ -23516,7 +23578,7 @@ const zC = (e) => {
|
|
|
23516
23578
|
ne(!1), Q(null), Ee.current = null;
|
|
23517
23579
|
},
|
|
23518
23580
|
onPointerDown: (be) => {
|
|
23519
|
-
be.button !== 2 && (Tn || !_e || (
|
|
23581
|
+
be.button !== 2 && (Tn || !_e || (St.current = /* @__PURE__ */ new Date(), Me(me.current), be.target.setPointerCapture(be.pointerId), be.target.tagName !== "BUTTON" && (ne(!0), Ee.current = {
|
|
23520
23582
|
x: be.clientX,
|
|
23521
23583
|
y: be.clientY
|
|
23522
23584
|
})));
|
|
@@ -23525,13 +23587,13 @@ const zC = (e) => {
|
|
|
23525
23587
|
var be, We, Ne;
|
|
23526
23588
|
if (ge || !_e) return;
|
|
23527
23589
|
Ee.current = null;
|
|
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 =
|
|
23590
|
+
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, En = Math.abs(st) / He;
|
|
23529
23591
|
if (Math.abs(st) >= DC || En > 0.11) {
|
|
23530
23592
|
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
23593
|
return;
|
|
23532
23594
|
} else {
|
|
23533
|
-
var bt,
|
|
23534
|
-
(bt = et.current) == null || bt.style.setProperty("--swipe-amount-x", "0px"), (
|
|
23595
|
+
var bt, Nt;
|
|
23596
|
+
(bt = et.current) == null || bt.style.setProperty("--swipe-amount-x", "0px"), (Nt = et.current) == null || Nt.style.setProperty("--swipe-amount-y", "0px");
|
|
23535
23597
|
}
|
|
23536
23598
|
ue(!1), ne(!1), Q(null);
|
|
23537
23599
|
},
|
|
@@ -23542,27 +23604,27 @@ const zC = (e) => {
|
|
|
23542
23604
|
var En;
|
|
23543
23605
|
const bt = (En = e.swipeDirections) != null ? En : $C(T);
|
|
23544
23606
|
!F && (Math.abs(st) > 1 || Math.abs(He) > 1) && Q(Math.abs(st) > Math.abs(He) ? "x" : "y");
|
|
23545
|
-
let
|
|
23607
|
+
let Nt = {
|
|
23546
23608
|
x: 0,
|
|
23547
23609
|
y: 0
|
|
23548
23610
|
};
|
|
23549
|
-
const
|
|
23611
|
+
const Pt = (ct) => 1 / (1.5 + Math.abs(ct) / 20);
|
|
23550
23612
|
if (F === "y") {
|
|
23551
23613
|
if (bt.includes("top") || bt.includes("bottom"))
|
|
23552
23614
|
if (bt.includes("top") && He < 0 || bt.includes("bottom") && He > 0)
|
|
23553
|
-
|
|
23615
|
+
Nt.y = He;
|
|
23554
23616
|
else {
|
|
23555
|
-
const ct = He *
|
|
23556
|
-
|
|
23617
|
+
const ct = He * Pt(He);
|
|
23618
|
+
Nt.y = Math.abs(ct) < Math.abs(He) ? ct : He;
|
|
23557
23619
|
}
|
|
23558
23620
|
} else if (F === "x" && (bt.includes("left") || bt.includes("right")))
|
|
23559
23621
|
if (bt.includes("left") && st < 0 || bt.includes("right") && st > 0)
|
|
23560
|
-
|
|
23622
|
+
Nt.x = st;
|
|
23561
23623
|
else {
|
|
23562
|
-
const ct = st *
|
|
23563
|
-
|
|
23624
|
+
const ct = st * Pt(st);
|
|
23625
|
+
Nt.x = Math.abs(ct) < Math.abs(st) ? ct : st;
|
|
23564
23626
|
}
|
|
23565
|
-
(Math.abs(
|
|
23627
|
+
(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
23628
|
}
|
|
23567
23629
|
}, vt && !m.jsx && re !== "loading" ? /* @__PURE__ */ V.createElement("button", {
|
|
23568
23630
|
"aria-label": A,
|
|
@@ -23650,10 +23712,10 @@ const BC = /* @__PURE__ */ V.forwardRef(function(t, n) {
|
|
|
23650
23712
|
]), [M, z] = V.useState([]), [C, T] = V.useState(!1), [R, j] = V.useState(!1), [L, E] = 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
23713
|
P((X) => {
|
|
23652
23714
|
var q;
|
|
23653
|
-
return (q = X.find((de) => de.id === W.id)) != null && q.delete ||
|
|
23715
|
+
return (q = X.find((de) => de.id === W.id)) != null && q.delete || xt.dismiss(W.id), X.filter(({ id: de }) => de !== W.id);
|
|
23654
23716
|
});
|
|
23655
23717
|
}, []);
|
|
23656
|
-
return V.useEffect(() =>
|
|
23718
|
+
return V.useEffect(() => xt.subscribe((W) => {
|
|
23657
23719
|
if (W.dismiss) {
|
|
23658
23720
|
requestAnimationFrame(() => {
|
|
23659
23721
|
P((X) => X.map((q) => q.id === W.id ? {
|
|
@@ -24087,9 +24149,9 @@ function Np() {
|
|
|
24087
24149
|
value: null
|
|
24088
24150
|
}
|
|
24089
24151
|
}));
|
|
24090
|
-
let ge = !0, Z = !0, oe = !1, ue = !0, ye = !1, Me = !0, Ye = !1, Ke = !1, Xe = !1,
|
|
24152
|
+
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
24153
|
const _e = "user-content-";
|
|
24092
|
-
let we = !0, yt = !1,
|
|
24154
|
+
let we = !0, yt = !1, Ct = {}, vt = null;
|
|
24093
24155
|
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
24156
|
let ae = null;
|
|
24095
24157
|
const me = ke({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
@@ -24108,7 +24170,7 @@ function Np() {
|
|
|
24108
24170
|
let D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
24109
24171
|
if (!(Ve && Ve === D)) {
|
|
24110
24172
|
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, Tn = zt(D, "ALLOWED_NAMESPACES") ? ke({}, D.ALLOWED_NAMESPACES, Xa) : Zt, Te = zt(D, "ADD_URI_SAFE_ATTR") ? ke(Qt(Ee), D.ADD_URI_SAFE_ATTR, Ne) : Ee, 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({}),
|
|
24173
|
+
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, Tn = zt(D, "ALLOWED_NAMESPACES") ? ke({}, D.ALLOWED_NAMESPACES, Xa) : Zt, Te = zt(D, "ADD_URI_SAFE_ATTR") ? ke(Qt(Ee), D.ADD_URI_SAFE_ATTR, Ne) : Ee, 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 || Et, 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(Te, 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
24174
|
if (typeof D.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
24113
24175
|
throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
24114
24176
|
if (typeof D.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -24118,7 +24180,7 @@ function Np() {
|
|
|
24118
24180
|
b === void 0 && (b = lN(g, a)), b !== null && typeof S == "string" && (S = b.createHTML(""));
|
|
24119
24181
|
ft && ft(D), Ve = D;
|
|
24120
24182
|
}
|
|
24121
|
-
}, En = ke({}, [...es, ...ts, ...XC]), bt = ke({}, [...ns, ...JC]),
|
|
24183
|
+
}, En = ke({}, [...es, ...ts, ...XC]), bt = ke({}, [...ns, ...JC]), Nt = function(D) {
|
|
24122
24184
|
let te = w(D);
|
|
24123
24185
|
(!te || !te.tagName) && (te = {
|
|
24124
24186
|
namespaceURI: an,
|
|
@@ -24126,7 +24188,7 @@ function Np() {
|
|
|
24126
24188
|
});
|
|
24127
24189
|
const ce = ko(D.tagName), De = ko(te.tagName);
|
|
24128
24190
|
return Tn[D.namespaceURI] ? D.namespaceURI === qn ? te.namespaceURI === Et ? ce === "svg" : te.namespaceURI === je ? ce === "svg" && (De === "annotation-xml" || Zn[De]) : !!En[ce] : D.namespaceURI === je ? te.namespaceURI === Et ? ce === "math" : te.namespaceURI === qn ? ce === "math" && Gn[De] : !!bt[ce] : D.namespaceURI === Et ? te.namespaceURI === qn && !Gn[De] || te.namespaceURI === je && !Zn[De] ? !1 : !bt[ce] && (Xr[ce] || !En[ce]) : !!(fn === "application/xhtml+xml" && Tn[D.namespaceURI]) : !1;
|
|
24129
|
-
},
|
|
24191
|
+
}, Pt = function(D) {
|
|
24130
24192
|
Cr(t.removed, {
|
|
24131
24193
|
element: D
|
|
24132
24194
|
});
|
|
@@ -24148,9 +24210,9 @@ function Np() {
|
|
|
24148
24210
|
});
|
|
24149
24211
|
}
|
|
24150
24212
|
if (te.removeAttribute(D), D === "is")
|
|
24151
|
-
if (
|
|
24213
|
+
if (St || et)
|
|
24152
24214
|
try {
|
|
24153
|
-
|
|
24215
|
+
Pt(te);
|
|
24154
24216
|
} catch {
|
|
24155
24217
|
}
|
|
24156
24218
|
else
|
|
@@ -24203,13 +24265,13 @@ function Np() {
|
|
|
24203
24265
|
const Wi = function(D) {
|
|
24204
24266
|
let te = null;
|
|
24205
24267
|
if (sn(z.beforeSanitizeElements, D, null), Na(D))
|
|
24206
|
-
return
|
|
24268
|
+
return Pt(D), !0;
|
|
24207
24269
|
const ce = Ne(D.nodeName);
|
|
24208
24270
|
if (sn(z.uponSanitizeElement, D, {
|
|
24209
24271
|
tagName: ce,
|
|
24210
24272
|
allowedTags: ee
|
|
24211
24273
|
}), Me && D.hasChildNodes() && !Ui(D.firstElementChild) && lt(/<[/\w!]/g, D.innerHTML) && lt(/<[/\w!]/g, D.textContent) || D.nodeType === Tr.progressingInstruction || Me && D.nodeType === Tr.comment && lt(/<[/\w]/g, D.data))
|
|
24212
|
-
return
|
|
24274
|
+
return Pt(D), !0;
|
|
24213
24275
|
if (!(ne.tagCheck instanceof Function && ne.tagCheck(ce)) && (!ee[ce] || de[ce])) {
|
|
24214
24276
|
if (!de[ce] && Hi(ce) && (q.tagNameCheck instanceof RegExp && lt(q.tagNameCheck, ce) || q.tagNameCheck instanceof Function && q.tagNameCheck(ce)))
|
|
24215
24277
|
return !1;
|
|
@@ -24223,9 +24285,9 @@ function Np() {
|
|
|
24223
24285
|
}
|
|
24224
24286
|
}
|
|
24225
24287
|
}
|
|
24226
|
-
return
|
|
24288
|
+
return Pt(D), !0;
|
|
24227
24289
|
}
|
|
24228
|
-
return D instanceof l && !
|
|
24290
|
+
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 === Tr.text && (te = D.textContent, go([C, T, R], (De) => {
|
|
24229
24291
|
te = Nr(te, De, " ");
|
|
24230
24292
|
}), D.textContent !== te && (Cr(t.removed, {
|
|
24231
24293
|
element: D.cloneNode()
|
|
@@ -24322,7 +24384,7 @@ function Np() {
|
|
|
24322
24384
|
}
|
|
24323
24385
|
if (rt !== Pa)
|
|
24324
24386
|
try {
|
|
24325
|
-
wt ? D.setAttributeNS(wt, qe, rt) : D.setAttribute(qe, rt), Na(D) ?
|
|
24387
|
+
wt ? D.setAttributeNS(wt, qe, rt) : D.setAttribute(qe, rt), Na(D) ? Pt(D) : gl(t.removed);
|
|
24326
24388
|
} catch {
|
|
24327
24389
|
ct(qe, D);
|
|
24328
24390
|
}
|
|
@@ -24354,19 +24416,19 @@ function Np() {
|
|
|
24354
24416
|
} else if (pe instanceof c)
|
|
24355
24417
|
te = Ca("<!---->"), ce = te.ownerDocument.importNode(pe, !0), ce.nodeType === Tr.element && ce.nodeName === "BODY" || ce.nodeName === "HTML" ? te = ce : te.appendChild(ce);
|
|
24356
24418
|
else {
|
|
24357
|
-
if (!
|
|
24419
|
+
if (!St && !ye && !Ye && // eslint-disable-next-line unicorn/prefer-includes
|
|
24358
24420
|
pe.indexOf("<") === -1)
|
|
24359
24421
|
return b && qt ? b.createHTML(pe) : pe;
|
|
24360
24422
|
if (te = Ca(pe), !te)
|
|
24361
|
-
return
|
|
24423
|
+
return St ? null : qt ? S : "";
|
|
24362
24424
|
}
|
|
24363
|
-
te && Xe &&
|
|
24425
|
+
te && Xe && Pt(te.firstChild);
|
|
24364
24426
|
const qe = ji(yt ? pe : te);
|
|
24365
24427
|
for (; De = qe.nextNode(); )
|
|
24366
24428
|
Wi(De), qi(De), De.content instanceof s && Wp(De.content);
|
|
24367
24429
|
if (yt)
|
|
24368
24430
|
return pe;
|
|
24369
|
-
if (
|
|
24431
|
+
if (St) {
|
|
24370
24432
|
if (et)
|
|
24371
24433
|
for (it = N.call(te.ownerDocument); te.firstChild; )
|
|
24372
24434
|
it.appendChild(te.firstChild);
|