@cimplify/sdk 0.66.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-J3MGY6AU.js → chunk-5HAUJBOK.js} +36 -82
  6. package/dist/chunk-E6T5VJMG.mjs +156 -0
  7. package/dist/{chunk-3G4QCENX.mjs → chunk-FVGVJ4TC.mjs} +12 -50
  8. package/dist/chunk-IQLJJW2H.js +168 -0
  9. package/dist/{chunk-227XTAEB.mjs → chunk-KNPE4WCQ.mjs} +2 -48
  10. package/dist/{chunk-H6DBPHMZ.js → chunk-NGQCWFKF.js} +4 -4
  11. package/dist/{chunk-R6363CC7.mjs → chunk-SOV4H6PQ.mjs} +509 -79
  12. package/dist/{chunk-HCZTBWU4.js → chunk-SXGFJEME.js} +12 -50
  13. package/dist/{chunk-MWI5GAUF.mjs → chunk-TAKORJP4.mjs} +2 -2
  14. package/dist/{chunk-AVQL3TSJ.js → chunk-WCSAZRNC.js} +519 -78
  15. package/dist/{client-CUrA1uQ0.d.mts → client-CBE7ksYC.d.mts} +1 -1
  16. package/dist/{client-Bo5rujc2.d.ts → client-CfeQRwhl.d.ts} +55 -21
  17. package/dist/{client-DasPHOJh.d.ts → client-DlXfZy7N.d.ts} +1 -1
  18. package/dist/{client-Dka2cGhu.d.mts → client-Dyo3dvNy.d.mts} +55 -21
  19. package/dist/index.d.mts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +104 -88
  22. package/dist/index.mjs +16 -12
  23. package/dist/mock/cli.mjs +12 -50
  24. package/dist/mock/library.js +12 -50
  25. package/dist/mock/library.mjs +12 -50
  26. package/dist/mock/msw.js +12 -50
  27. package/dist/mock/msw.mjs +12 -50
  28. package/dist/react.d.mts +44 -44
  29. package/dist/react.d.ts +44 -44
  30. package/dist/react.js +298 -175
  31. package/dist/react.mjs +240 -117
  32. package/dist/server.d.mts +2 -2
  33. package/dist/server.d.ts +2 -2
  34. package/dist/server.js +16 -9
  35. package/dist/server.mjs +11 -4
  36. package/dist/{sign-in-dr7m09nm.d.ts → sign-in-DQlIdqsi.d.mts} +14 -1
  37. package/dist/{sign-in-dr7m09nm.d.mts → sign-in-DQlIdqsi.d.ts} +14 -1
  38. package/dist/styles.css +1 -1
  39. package/dist/testing/msw.js +2 -2
  40. package/dist/testing/msw.mjs +1 -1
  41. package/dist/testing/suite.d.mts +2 -2
  42. package/dist/testing/suite.d.ts +2 -2
  43. package/dist/testing/suite.js +23 -23
  44. package/dist/testing/suite.mjs +4 -4
  45. package/dist/testing.d.mts +17 -17
  46. package/dist/testing.d.ts +17 -17
  47. package/dist/testing.js +79 -79
  48. package/dist/testing.mjs +5 -5
  49. package/package.json +1 -1
  50. package/registry/index.json +0 -9
  51. package/dist/chunk-3Z3FQH7X.mjs +0 -323
  52. package/dist/chunk-7BKKBJQM.mjs +0 -52
  53. package/dist/chunk-GDAGM26J.js +0 -338
  54. package/dist/chunk-KWYI2TTA.js +0 -60
  55. package/registry/account.json +0 -15
package/dist/react.js CHANGED
@@ -1,10 +1,9 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkGDAGM26J_js = require('./chunk-GDAGM26J.js');
5
- require('./chunk-KWYI2TTA.js');
6
- var chunkJ3MGY6AU_js = require('./chunk-J3MGY6AU.js');
7
- var chunkAVQL3TSJ_js = require('./chunk-AVQL3TSJ.js');
4
+ var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
5
+ var chunk5HAUJBOK_js = require('./chunk-5HAUJBOK.js');
6
+ var chunkWCSAZRNC_js = require('./chunk-WCSAZRNC.js');
8
7
  var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
9
8
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
10
9
  require('./chunk-OWW5GUSB.js');
@@ -1087,7 +1086,7 @@ var DEFAULT_COUNTRY = "US";
1087
1086
  function createDefaultClient() {
1088
1087
  const processRef = globalThis.process;
1089
1088
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1090
- return chunkJ3MGY6AU_js.createCimplifyClient({ publicKey: envPublicKey });
1089
+ return chunk5HAUJBOK_js.createCimplifyClient({ publicKey: envPublicKey });
1091
1090
  }
1092
1091
  function getStoredLocationId() {
1093
1092
  if (typeof window === "undefined" || !window.localStorage) {
@@ -1663,100 +1662,6 @@ function CimplifyCheckout({
1663
1662
  function cn(...inputs) {
1664
1663
  return tailwindMerge.twMerge(clsx.clsx(inputs));
1665
1664
  }
1666
- var DEFAULT_LINK_URL = "https://link.cimplify.io";
1667
- function CimplifyAccount({
1668
- client: clientProp,
1669
- linkUrl,
1670
- section,
1671
- businessId: businessIdProp,
1672
- merchantName,
1673
- appearance,
1674
- onLogout,
1675
- className
1676
- }) {
1677
- const context = useOptionalCimplify();
1678
- const client = clientProp ?? context?.client;
1679
- const resolvedLinkUrl = linkUrl || DEFAULT_LINK_URL;
1680
- const resolvedBusinessId = businessIdProp || client?.getBusinessId?.() || "";
1681
- const iframeRef = React12.useRef(null);
1682
- const [height, setHeight] = React12.useState(400);
1683
- const [isReady, setIsReady] = React12.useState(false);
1684
- const iframeSrc = React12.useMemo(() => {
1685
- const path = section ? `/elements/account/${section}` : "/elements/account";
1686
- const url = new URL(path, resolvedLinkUrl);
1687
- if (resolvedBusinessId) url.searchParams.set("businessId", resolvedBusinessId);
1688
- return url.toString();
1689
- }, [resolvedLinkUrl, section, resolvedBusinessId]);
1690
- React12.useEffect(() => {
1691
- function handleMessage(event) {
1692
- if (!event.data || typeof event.data !== "object") return;
1693
- if (iframeRef.current?.contentWindow && event.source !== iframeRef.current.contentWindow) {
1694
- return;
1695
- }
1696
- switch (event.data.type) {
1697
- case "ready":
1698
- setIsReady(true);
1699
- if (typeof event.data.height === "number") {
1700
- setHeight(event.data.height);
1701
- }
1702
- sendInit();
1703
- break;
1704
- case "height_change":
1705
- if (typeof event.data.height === "number") {
1706
- setHeight(event.data.height);
1707
- }
1708
- break;
1709
- case "logout_complete":
1710
- onLogout?.();
1711
- break;
1712
- }
1713
- }
1714
- window.addEventListener("message", handleMessage);
1715
- return () => window.removeEventListener("message", handleMessage);
1716
- }, [appearance, client, onLogout]);
1717
- function sendInit() {
1718
- const contentWindow = iframeRef.current?.contentWindow;
1719
- if (!contentWindow) return;
1720
- const token = client?.getAccessToken?.();
1721
- contentWindow.postMessage(
1722
- {
1723
- type: "init",
1724
- token: token ?? void 0,
1725
- appearance: appearance ?? void 0,
1726
- businessId: resolvedBusinessId || void 0,
1727
- merchantName: merchantName ?? void 0
1728
- },
1729
- resolvedLinkUrl
1730
- );
1731
- }
1732
- return /* @__PURE__ */ jsxRuntime.jsxs(
1733
- "div",
1734
- {
1735
- "data-cimplify-account": true,
1736
- className: cn("relative overflow-hidden", className),
1737
- children: [
1738
- !isReady && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 border-2 border-border border-t-foreground rounded-full animate-spin" }) }),
1739
- /* @__PURE__ */ jsxRuntime.jsx(
1740
- "iframe",
1741
- {
1742
- ref: iframeRef,
1743
- src: iframeSrc,
1744
- style: {
1745
- border: "none",
1746
- width: "100%",
1747
- height: `${height}px`,
1748
- display: isReady ? "block" : "none",
1749
- overflow: "hidden",
1750
- background: "transparent"
1751
- },
1752
- allow: "geolocation",
1753
- sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"
1754
- }
1755
- )
1756
- ]
1757
- }
1758
- );
1759
- }
1760
1665
  var BUTTON_BASE = "inline-flex items-center justify-center gap-2 font-semibold leading-none transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 disabled:opacity-50 disabled:cursor-not-allowed [font-family:inherit] cursor-pointer rounded-[10px]";
1761
1666
  var BUTTON_VARIANTS = {
1762
1667
  primary: "bg-foreground text-background hover:bg-foreground/90",
@@ -1988,6 +1893,17 @@ function Toast({ title, description, onUndo, onDismiss, className }) {
1988
1893
  }
1989
1894
  );
1990
1895
  }
1896
+
1897
+ // src/react/utils/avatar.ts
1898
+ function avatarGradient(seed) {
1899
+ let hash = 0;
1900
+ for (let i = 0; i < seed.length; i++) hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
1901
+ const hue = (Math.abs(hash) % 60 + 20) % 360;
1902
+ return `linear-gradient(135deg, oklch(0.78 0.10 ${hue}), oklch(0.55 0.16 ${hue - 8}))`;
1903
+ }
1904
+ function initials(name) {
1905
+ return name.trim().split(/\s+/).map((p) => p[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1906
+ }
1991
1907
  function AccountShell({ sidebar, children, className }) {
1992
1908
  return /* @__PURE__ */ jsxRuntime.jsxs(
1993
1909
  "div",
@@ -2022,15 +1938,6 @@ function AccountSidebar({ children, scopeNote, className }) {
2022
1938
  }
2023
1939
  );
2024
1940
  }
2025
- function avatarGradient(seed) {
2026
- let hash = 0;
2027
- for (let i = 0; i < seed.length; i++) hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
2028
- const hue = (Math.abs(hash) % 60 + 20) % 360;
2029
- return `linear-gradient(135deg, oklch(0.78 0.10 ${hue}), oklch(0.55 0.16 ${hue - 8}))`;
2030
- }
2031
- function initials(name) {
2032
- return name.trim().split(/\s+/).map((p) => p[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
2033
- }
2034
1941
  function AccountIdentityStrip({
2035
1942
  name,
2036
1943
  email,
@@ -2716,7 +2623,7 @@ function CimplifySignInButton({
2716
2623
  const onClick = async () => {
2717
2624
  if (busy || disabled) return;
2718
2625
  setBusy(true);
2719
- await chunkGDAGM26J_js.startSignIn({
2626
+ await chunkWCSAZRNC_js.startSignIn({
2720
2627
  ...signInOpts,
2721
2628
  onSuccess: () => {
2722
2629
  setBusy(false);
@@ -3351,6 +3258,229 @@ function useCimplifySession(options) {
3351
3258
  }, [fetchSession]);
3352
3259
  return { session, loading, refresh: fetchSession };
3353
3260
  }
3261
+ var DEFAULT_LINKS = [
3262
+ {
3263
+ label: "Your orders",
3264
+ href: "/account/orders",
3265
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3266
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" }),
3267
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 6h18" }),
3268
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 10a4 4 0 0 1-8 0" })
3269
+ ] })
3270
+ },
3271
+ {
3272
+ label: "Addresses",
3273
+ href: "/account/addresses",
3274
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3275
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 21s-7-5.5-7-11a7 7 0 0 1 14 0c0 5.5-7 11-7 11Z" }),
3276
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "10", r: "2.5" })
3277
+ ] })
3278
+ },
3279
+ {
3280
+ label: "Payment methods",
3281
+ href: "/account/payment",
3282
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3283
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
3284
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 10h20" })
3285
+ ] })
3286
+ },
3287
+ {
3288
+ label: "Account",
3289
+ href: "/account",
3290
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3291
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" }),
3292
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1" })
3293
+ ] })
3294
+ }
3295
+ ];
3296
+ var LinkIcon = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3297
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 13.5a4 4 0 0 0 5.6 0l3-3a4 4 0 0 0-5.6-5.6L11.5 6.4" }),
3298
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 10.5a4 4 0 0 0-5.6 0l-3 3a4 4 0 0 0 5.6 5.6l1.5-1.5" })
3299
+ ] });
3300
+ var ExternalIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, className: "ml-auto opacity-50", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 17 17 7M9 7h8v8" }) });
3301
+ function Avatar({ seed, name, size }) {
3302
+ return /* @__PURE__ */ jsxRuntime.jsx(
3303
+ "span",
3304
+ {
3305
+ "aria-hidden": true,
3306
+ className: "grid place-items-center rounded-full font-serif font-semibold text-white shrink-0",
3307
+ style: { width: size, height: size, fontSize: size * 0.4, background: avatarGradient(seed) },
3308
+ children: initials(name)
3309
+ }
3310
+ );
3311
+ }
3312
+ function CimplifyUserButton({
3313
+ session: controlledSession,
3314
+ sessionUri,
3315
+ links = DEFAULT_LINKS,
3316
+ identityUrl = "https://link.cimplify.io",
3317
+ signOutHref = "/auth/signout",
3318
+ onSignOut,
3319
+ clientId,
3320
+ redirectUri,
3321
+ signInLabel,
3322
+ onSignIn,
3323
+ hideName,
3324
+ align = "end",
3325
+ className
3326
+ }) {
3327
+ const controlled = controlledSession !== void 0;
3328
+ const hook = useCimplifySession({ sessionUri });
3329
+ const session = controlled ? controlledSession : hook.session;
3330
+ const loading = controlled ? false : hook.loading;
3331
+ const [open, setOpen] = React12.useState(false);
3332
+ const rootRef = React12.useRef(null);
3333
+ const menuId = React12.useId();
3334
+ React12.useEffect(() => {
3335
+ if (!open) return;
3336
+ const onDocClick = (e) => {
3337
+ if (!rootRef.current?.contains(e.target)) setOpen(false);
3338
+ };
3339
+ const onKey = (e) => {
3340
+ if (e.key === "Escape") setOpen(false);
3341
+ };
3342
+ document.addEventListener("mousedown", onDocClick);
3343
+ document.addEventListener("keydown", onKey);
3344
+ return () => {
3345
+ document.removeEventListener("mousedown", onDocClick);
3346
+ document.removeEventListener("keydown", onKey);
3347
+ };
3348
+ }, [open]);
3349
+ if (loading) {
3350
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center", className), "data-cimplify-user-button": "loading", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-8 rounded-full bg-muted/60 animate-pulse" }) });
3351
+ }
3352
+ if (!session) {
3353
+ if (!clientId || !redirectUri) return null;
3354
+ return /* @__PURE__ */ jsxRuntime.jsx(
3355
+ CimplifySignInButton,
3356
+ {
3357
+ variant: "outline",
3358
+ label: signInLabel ?? "Sign in",
3359
+ clientId,
3360
+ redirectUri,
3361
+ onSuccess: onSignIn,
3362
+ className
3363
+ }
3364
+ );
3365
+ }
3366
+ const name = session.name?.trim() || session.email || "Account";
3367
+ const seed = session.sub || name;
3368
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: rootRef, className: cn("relative inline-block", className), "data-cimplify-user-button": true, children: [
3369
+ /* @__PURE__ */ jsxRuntime.jsxs(
3370
+ "button",
3371
+ {
3372
+ type: "button",
3373
+ onClick: () => setOpen((v) => !v),
3374
+ "aria-haspopup": "menu",
3375
+ "aria-expanded": open,
3376
+ "aria-controls": menuId,
3377
+ className: cn(
3378
+ "inline-flex items-center gap-2 rounded-full border border-border bg-card p-1 pr-2.5",
3379
+ "shadow-[0_1px_2px_rgba(16,24,40,0.06)] transition-colors cursor-pointer",
3380
+ "hover:border-foreground/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
3381
+ hideName && "pr-1"
3382
+ ),
3383
+ children: [
3384
+ /* @__PURE__ */ jsxRuntime.jsx(Avatar, { seed, name, size: 28 }),
3385
+ !hideName && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[120px] truncate text-[13px] font-semibold text-foreground", children: session.name?.split(/\s+/)[0] || name }),
3386
+ /* @__PURE__ */ jsxRuntime.jsx(
3387
+ "svg",
3388
+ {
3389
+ width: "13",
3390
+ height: "13",
3391
+ viewBox: "0 0 24 24",
3392
+ fill: "none",
3393
+ stroke: "currentColor",
3394
+ strokeWidth: "2.2",
3395
+ "aria-hidden": true,
3396
+ className: cn("text-foreground/45 transition-transform", open && "rotate-180"),
3397
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" })
3398
+ }
3399
+ )
3400
+ ]
3401
+ }
3402
+ ),
3403
+ open && /* @__PURE__ */ jsxRuntime.jsxs(
3404
+ "div",
3405
+ {
3406
+ id: menuId,
3407
+ role: "menu",
3408
+ className: cn(
3409
+ "absolute top-[calc(100%+8px)] z-50 w-[280px] overflow-hidden",
3410
+ "rounded-[14px] border border-border bg-card",
3411
+ "shadow-[0_1px_2px_rgba(16,24,40,0.04),0_16px_40px_-16px_rgba(16,24,40,0.24)]",
3412
+ align === "end" ? "right-0" : "left-0"
3413
+ ),
3414
+ children: [
3415
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 border-b border-border/60 p-3.5", children: [
3416
+ /* @__PURE__ */ jsxRuntime.jsx(Avatar, { seed, name, size: 40 }),
3417
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
3418
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[14px] font-semibold text-foreground", children: name }),
3419
+ session.email && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[12px] text-foreground/55", children: session.email })
3420
+ ] })
3421
+ ] }),
3422
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-1.5", children: [
3423
+ links.map((link) => /* @__PURE__ */ jsxRuntime.jsxs(
3424
+ "a",
3425
+ {
3426
+ role: "menuitem",
3427
+ href: link.href,
3428
+ target: link.external ? "_blank" : void 0,
3429
+ rel: link.external ? "noreferrer" : void 0,
3430
+ className: "flex items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-foreground hover:bg-muted/50",
3431
+ children: [
3432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/45", children: link.icon }),
3433
+ link.label,
3434
+ link.external && ExternalIcon
3435
+ ]
3436
+ },
3437
+ link.href
3438
+ )),
3439
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-1.5 h-px bg-border/60" }),
3440
+ /* @__PURE__ */ jsxRuntime.jsxs(
3441
+ "a",
3442
+ {
3443
+ role: "menuitem",
3444
+ href: identityUrl,
3445
+ target: "_blank",
3446
+ rel: "noreferrer",
3447
+ className: "flex items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-foreground hover:bg-muted/50",
3448
+ children: [
3449
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground/45", children: LinkIcon }),
3450
+ "Manage Cimplify identity",
3451
+ ExternalIcon
3452
+ ]
3453
+ }
3454
+ ),
3455
+ /* @__PURE__ */ jsxRuntime.jsx(
3456
+ "form",
3457
+ {
3458
+ method: "post",
3459
+ action: signOutHref,
3460
+ onSubmit: onSignOut ? () => onSignOut() : void 0,
3461
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3462
+ "button",
3463
+ {
3464
+ type: "submit",
3465
+ role: "menuitem",
3466
+ className: "flex w-full items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-destructive hover:bg-destructive/10",
3467
+ children: [
3468
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
3469
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
3470
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m16 17 5-5-5-5M21 12H9" })
3471
+ ] }),
3472
+ "Sign out"
3473
+ ]
3474
+ }
3475
+ )
3476
+ }
3477
+ )
3478
+ ] })
3479
+ ]
3480
+ }
3481
+ )
3482
+ ] });
3483
+ }
3354
3484
  function Price({ amount, currency, className, prefix }) {
3355
3485
  const context = useOptionalCimplify();
3356
3486
  const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
@@ -5100,7 +5230,6 @@ function AuthElement({
5100
5230
  prefillEmail,
5101
5231
  onReady,
5102
5232
  onAuthenticated,
5103
- onRequiresOtp,
5104
5233
  onError
5105
5234
  }) {
5106
5235
  const containerRef = React12.useRef(null);
@@ -5108,29 +5237,23 @@ function AuthElement({
5108
5237
  const elements = useElements();
5109
5238
  const onReadyRef = React12.useRef(onReady);
5110
5239
  const onAuthenticatedRef = React12.useRef(onAuthenticated);
5111
- const onRequiresOtpRef = React12.useRef(onRequiresOtp);
5112
5240
  const onErrorRef = React12.useRef(onError);
5113
5241
  React12.useEffect(() => {
5114
5242
  onReadyRef.current = onReady;
5115
5243
  onAuthenticatedRef.current = onAuthenticated;
5116
- onRequiresOtpRef.current = onRequiresOtp;
5117
5244
  onErrorRef.current = onError;
5118
- }, [onReady, onAuthenticated, onRequiresOtp, onError]);
5245
+ }, [onReady, onAuthenticated, onError]);
5119
5246
  React12.useEffect(() => {
5120
5247
  if (!elements || !containerRef.current) return;
5121
- const element = elements.create(chunkAVQL3TSJ_js.ELEMENT_TYPES.AUTH, { prefillEmail });
5248
+ const element = elements.create(chunkWCSAZRNC_js.ELEMENT_TYPES.AUTH, { prefillEmail });
5122
5249
  elementRef.current = element;
5123
- element.on(chunkAVQL3TSJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5250
+ element.on(chunkWCSAZRNC_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5124
5251
  element.on(
5125
- chunkAVQL3TSJ_js.EVENT_TYPES.AUTHENTICATED,
5252
+ chunkWCSAZRNC_js.EVENT_TYPES.AUTHENTICATED,
5126
5253
  (data) => onAuthenticatedRef.current?.(data)
5127
5254
  );
5128
5255
  element.on(
5129
- chunkAVQL3TSJ_js.EVENT_TYPES.REQUIRES_OTP,
5130
- (data) => onRequiresOtpRef.current?.(data)
5131
- );
5132
- element.on(
5133
- chunkAVQL3TSJ_js.EVENT_TYPES.ERROR,
5256
+ chunkWCSAZRNC_js.EVENT_TYPES.ERROR,
5134
5257
  (data) => onErrorRef.current?.(data)
5135
5258
  );
5136
5259
  element.mount(containerRef.current);
@@ -5159,15 +5282,15 @@ function AddressElement({
5159
5282
  }, [onReady, onChange, onError]);
5160
5283
  React12.useEffect(() => {
5161
5284
  if (!elements || !containerRef.current) return;
5162
- const element = elements.create(chunkAVQL3TSJ_js.ELEMENT_TYPES.ADDRESS, { mode });
5285
+ const element = elements.create(chunkWCSAZRNC_js.ELEMENT_TYPES.ADDRESS, { mode });
5163
5286
  elementRef.current = element;
5164
- element.on(chunkAVQL3TSJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5287
+ element.on(chunkWCSAZRNC_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5165
5288
  element.on(
5166
- chunkAVQL3TSJ_js.EVENT_TYPES.CHANGE,
5289
+ chunkWCSAZRNC_js.EVENT_TYPES.CHANGE,
5167
5290
  (data) => onChangeRef.current?.(data)
5168
5291
  );
5169
5292
  element.on(
5170
- chunkAVQL3TSJ_js.EVENT_TYPES.ERROR,
5293
+ chunkWCSAZRNC_js.EVENT_TYPES.ERROR,
5171
5294
  (data) => onErrorRef.current?.(data)
5172
5295
  );
5173
5296
  element.mount(containerRef.current);
@@ -5197,15 +5320,15 @@ function PaymentElement({
5197
5320
  }, [onReady, onChange, onError]);
5198
5321
  React12.useEffect(() => {
5199
5322
  if (!elements || !containerRef.current) return;
5200
- const element = elements.create(chunkAVQL3TSJ_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
5323
+ const element = elements.create(chunkWCSAZRNC_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
5201
5324
  elementRef.current = element;
5202
- element.on(chunkAVQL3TSJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5325
+ element.on(chunkWCSAZRNC_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5203
5326
  element.on(
5204
- chunkAVQL3TSJ_js.EVENT_TYPES.CHANGE,
5327
+ chunkWCSAZRNC_js.EVENT_TYPES.CHANGE,
5205
5328
  (data) => onChangeRef.current?.(data)
5206
5329
  );
5207
5330
  element.on(
5208
- chunkAVQL3TSJ_js.EVENT_TYPES.ERROR,
5331
+ chunkWCSAZRNC_js.EVENT_TYPES.ERROR,
5209
5332
  (data) => onErrorRef.current?.(data)
5210
5333
  );
5211
5334
  element.mount(containerRef.current);
@@ -5465,7 +5588,7 @@ function VariantSelector({
5465
5588
  {
5466
5589
  "data-cimplify-variant-name": true,
5467
5590
  className: cn("flex-1 min-w-0 text-sm", classNames?.name),
5468
- children: chunkGDAGM26J_js.getVariantDisplayName(variant, productName)
5591
+ children: chunkIQLJJW2H_js.getVariantDisplayName(variant, productName)
5469
5592
  }
5470
5593
  ),
5471
5594
  /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-pricing": true, className: cn("text-sm text-muted-foreground", classNames?.pricing), children: [
@@ -6938,12 +7061,12 @@ function FieldInput({
6938
7061
  classNames?.input
6939
7062
  );
6940
7063
  switch (field.field_type) {
6941
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Text:
6942
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Url:
7064
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Text:
7065
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url:
6943
7066
  return /* @__PURE__ */ jsxRuntime.jsx(
6944
7067
  "input",
6945
7068
  {
6946
- type: field.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.Url ? "url" : "text",
7069
+ type: field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url ? "url" : "text",
6947
7070
  value: typeof value === "string" ? value : "",
6948
7071
  onChange: (e) => onValueChange(e.target.value),
6949
7072
  placeholder: field.placeholder,
@@ -6952,7 +7075,7 @@ function FieldInput({
6952
7075
  className: inputClass
6953
7076
  }
6954
7077
  );
6955
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Textarea:
7078
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Textarea:
6956
7079
  return /* @__PURE__ */ jsxRuntime.jsx(
6957
7080
  "textarea",
6958
7081
  {
@@ -6965,7 +7088,7 @@ function FieldInput({
6965
7088
  className: cn(inputClass, "resize-none", classNames?.textarea)
6966
7089
  }
6967
7090
  );
6968
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Number:
7091
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Number:
6969
7092
  return /* @__PURE__ */ jsxRuntime.jsx(
6970
7093
  "input",
6971
7094
  {
@@ -6979,7 +7102,7 @@ function FieldInput({
6979
7102
  className: inputClass
6980
7103
  }
6981
7104
  );
6982
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Select:
7105
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Select:
6983
7106
  return /* @__PURE__ */ jsxRuntime.jsxs(
6984
7107
  "select",
6985
7108
  {
@@ -6993,7 +7116,7 @@ function FieldInput({
6993
7116
  ]
6994
7117
  }
6995
7118
  );
6996
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Radio:
7119
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Radio:
6997
7120
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", classNames?.radioGroup), children: (field.options || []).map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
6998
7121
  "label",
6999
7122
  {
@@ -7018,7 +7141,7 @@ function FieldInput({
7018
7141
  },
7019
7142
  opt
7020
7143
  )) });
7021
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Checkbox:
7144
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Checkbox:
7022
7145
  return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cn("flex items-center gap-2 text-sm cursor-pointer", classNames?.checkboxLabel), children: [
7023
7146
  /* @__PURE__ */ jsxRuntime.jsx(
7024
7147
  "input",
@@ -7031,7 +7154,7 @@ function FieldInput({
7031
7154
  ),
7032
7155
  field.placeholder || field.name
7033
7156
  ] });
7034
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Color:
7157
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Color:
7035
7158
  return /* @__PURE__ */ jsxRuntime.jsx(
7036
7159
  "input",
7037
7160
  {
@@ -7041,7 +7164,7 @@ function FieldInput({
7041
7164
  className: cn("w-12 h-10 rounded-md border border-input cursor-pointer", classNames?.colorInput)
7042
7165
  }
7043
7166
  );
7044
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Date:
7167
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Date:
7045
7168
  return /* @__PURE__ */ jsxRuntime.jsx(
7046
7169
  DatePicker,
7047
7170
  {
@@ -7052,8 +7175,8 @@ function FieldInput({
7052
7175
  "aria-label": field.name
7053
7176
  }
7054
7177
  );
7055
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.File:
7056
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Image:
7178
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.File:
7179
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image:
7057
7180
  return /* @__PURE__ */ jsxRuntime.jsx(
7058
7181
  FileUploadInput,
7059
7182
  {
@@ -7064,7 +7187,7 @@ function FieldInput({
7064
7187
  classNames
7065
7188
  }
7066
7189
  );
7067
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Email:
7190
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Email:
7068
7191
  return /* @__PURE__ */ jsxRuntime.jsx(
7069
7192
  "input",
7070
7193
  {
@@ -7076,7 +7199,7 @@ function FieldInput({
7076
7199
  className: inputClass
7077
7200
  }
7078
7201
  );
7079
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.DateTime: {
7202
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateTime: {
7080
7203
  const stringValue = typeof value === "string" ? value : "";
7081
7204
  const [datePart, timePartRaw] = stringValue.includes("T") ? stringValue.split("T", 2) : [stringValue, ""];
7082
7205
  const timePart = (timePartRaw ?? "").slice(0, 5);
@@ -7115,7 +7238,7 @@ function FieldInput({
7115
7238
  )
7116
7239
  ] });
7117
7240
  }
7118
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Time:
7241
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Time:
7119
7242
  return /* @__PURE__ */ jsxRuntime.jsx(
7120
7243
  TimePicker,
7121
7244
  {
@@ -7126,7 +7249,7 @@ function FieldInput({
7126
7249
  "aria-label": field.name
7127
7250
  }
7128
7251
  );
7129
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.MultiSelect:
7252
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.MultiSelect:
7130
7253
  return /* @__PURE__ */ jsxRuntime.jsx(
7131
7254
  MultiSelectInput,
7132
7255
  {
@@ -7136,7 +7259,7 @@ function FieldInput({
7136
7259
  classNames
7137
7260
  }
7138
7261
  );
7139
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.DateRange:
7262
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateRange:
7140
7263
  return /* @__PURE__ */ jsxRuntime.jsx(
7141
7264
  DateRangeInput,
7142
7265
  {
@@ -7146,7 +7269,7 @@ function FieldInput({
7146
7269
  classNames
7147
7270
  }
7148
7271
  );
7149
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Address:
7272
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Address:
7150
7273
  return /* @__PURE__ */ jsxRuntime.jsx(
7151
7274
  AddressInput,
7152
7275
  {
@@ -7157,7 +7280,7 @@ function FieldInput({
7157
7280
  inputClass
7158
7281
  }
7159
7282
  );
7160
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Location:
7283
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Location:
7161
7284
  return /* @__PURE__ */ jsxRuntime.jsx(
7162
7285
  LocationInput,
7163
7286
  {
@@ -7168,7 +7291,7 @@ function FieldInput({
7168
7291
  inputClass
7169
7292
  }
7170
7293
  );
7171
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Phone:
7294
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Phone:
7172
7295
  return /* @__PURE__ */ jsxRuntime.jsx(
7173
7296
  PhoneInput,
7174
7297
  {
@@ -7179,7 +7302,7 @@ function FieldInput({
7179
7302
  inputClass
7180
7303
  }
7181
7304
  );
7182
- case chunkGDAGM26J_js.INPUT_FIELD_TYPE.Signature:
7305
+ case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Signature:
7183
7306
  return /* @__PURE__ */ jsxRuntime.jsx(
7184
7307
  SignatureInput,
7185
7308
  {
@@ -7212,7 +7335,7 @@ function FileUploadInput({
7212
7335
  const [isUploading, setIsUploading] = React12__default.default.useState(false);
7213
7336
  const fileUrl = typeof value === "string" ? value : void 0;
7214
7337
  const acceptedFormats = field.validation?.accepted_formats;
7215
- const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
7338
+ const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
7216
7339
  const handleFile = async (file) => {
7217
7340
  if (!onFileUpload) return;
7218
7341
  if (field.validation?.max_size_mb) {
@@ -7230,7 +7353,7 @@ function FileUploadInput({
7230
7353
  }
7231
7354
  };
7232
7355
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", classNames?.fileInput), children: fileUrl ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
7233
- field.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.Image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: fileUrl, alt: "Uploaded", className: "w-16 h-16 object-cover rounded-md border border-border" }),
7356
+ field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: fileUrl, alt: "Uploaded", className: "w-16 h-16 object-cover rounded-md border border-border" }),
7234
7357
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground truncate", children: fileUrl.split("/").pop() }) }),
7235
7358
  /* @__PURE__ */ jsxRuntime.jsx(
7236
7359
  "button",
@@ -7256,7 +7379,7 @@ function FileUploadInput({
7256
7379
  }
7257
7380
  ),
7258
7381
  isUploading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Uploading..." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7259
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: field.placeholder || `Upload ${field.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.Image ? "image" : "file"}` }),
7382
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: field.placeholder || `Upload ${field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? "image" : "file"}` }),
7260
7383
  acceptedFormats && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground/60 mt-1", children: [
7261
7384
  acceptedFormats.map((f) => f.toUpperCase()).join(", "),
7262
7385
  field.validation?.max_size_mb && ` \xB7 Max ${field.validation.max_size_mb}MB`
@@ -8878,7 +9001,7 @@ function CartLineItemRow({
8878
9001
  const isOptimistic = item.isOptimistic === true;
8879
9002
  const lineTotal = chunk7Y2O3E4D_js.parsePrice(unitPrice) * item.quantity;
8880
9003
  const imageUrl = item.product.image_url;
8881
- const variantLabel = item.variant ? chunkGDAGM26J_js.getVariantDisplayName(item.variant, item.product.name) : null;
9004
+ const variantLabel = item.variant ? chunkIQLJJW2H_js.getVariantDisplayName(item.variant, item.product.name) : null;
8882
9005
  return /* @__PURE__ */ jsxRuntime.jsxs(
8883
9006
  "div",
8884
9007
  {
@@ -8978,7 +9101,7 @@ function CartLineItemRow({
8978
9101
  input.field_name,
8979
9102
  ":"
8980
9103
  ] }),
8981
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-cimplify-cart-input-value": true, className: "text-foreground m-0 truncate", children: input.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.File || input.field_type === chunkGDAGM26J_js.INPUT_FIELD_TYPE.Image ? String(input.value).split("/").pop() || "Uploaded file" : String(input.value) })
9104
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-cimplify-cart-input-value": true, className: "text-foreground m-0 truncate", children: input.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.File || input.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? String(input.value).split("/").pop() || "Uploaded file" : String(input.value) })
8982
9105
  ] }, input.field_id)) }),
8983
9106
  (item.lineType === "service" || item.product.type === "service") && item.scheduledStart && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-info": true, className: cn("mt-1.5 flex items-center gap-1.5 text-xs text-muted-foreground", classNames?.serviceInfo), children: [
8984
9107
  /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-3.5 h-3.5 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
@@ -9699,7 +9822,7 @@ function FoodProductCard({
9699
9822
  const tags = product.tags || [];
9700
9823
  const isSignature = product.metadata?.is_signature === true;
9701
9824
  const isNew = product.metadata?.is_new === true;
9702
- const isComposite = product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Composite;
9825
+ const isComposite = product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite;
9703
9826
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
9704
9827
  /* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
9705
9828
  isSignature && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "absolute top-3 left-3 inline-flex items-center gap-1 text-[11px] font-semibold tracking-wide bg-amber-50 text-amber-700 border border-amber-200/60 px-2 py-0.5 rounded-md", children: [
@@ -10452,26 +10575,26 @@ var BUILT_IN_CARDS = {
10452
10575
  ["composite" /* Composite */]: CompositeProductCard,
10453
10576
  ["subscription" /* Subscription */]: SubscriptionCard
10454
10577
  };
10455
- var RENTAL_UNITS = /* @__PURE__ */ new Set([chunkGDAGM26J_js.DURATION_UNIT.Days, chunkGDAGM26J_js.DURATION_UNIT.Hours]);
10456
- var LEASE_UNITS = /* @__PURE__ */ new Set([chunkGDAGM26J_js.DURATION_UNIT.Weeks, chunkGDAGM26J_js.DURATION_UNIT.Months, chunkGDAGM26J_js.DURATION_UNIT.Years]);
10578
+ var RENTAL_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Days, chunkIQLJJW2H_js.DURATION_UNIT.Hours]);
10579
+ var LEASE_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Weeks, chunkIQLJJW2H_js.DURATION_UNIT.Months, chunkIQLJJW2H_js.DURATION_UNIT.Years]);
10457
10580
  function resolveCardVariant(product) {
10458
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Bundle) {
10581
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
10459
10582
  return "bundle" /* Bundle */;
10460
10583
  }
10461
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Composite) {
10584
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
10462
10585
  return "composite" /* Composite */;
10463
10586
  }
10464
10587
  if (product.quantity_pricing && product.quantity_pricing.length > 1) {
10465
10588
  return "wholesale" /* Wholesale */;
10466
10589
  }
10467
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Digital) {
10590
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
10468
10591
  return "digital" /* Digital */;
10469
10592
  }
10470
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Service) {
10593
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
10471
10594
  if (product.duration_unit && RENTAL_UNITS.has(product.duration_unit)) {
10472
10595
  return "rental" /* Rental */;
10473
10596
  }
10474
- if (product.duration_unit === chunkGDAGM26J_js.DURATION_UNIT.Nights) {
10597
+ if (product.duration_unit === chunkIQLJJW2H_js.DURATION_UNIT.Nights) {
10475
10598
  return "accommodation" /* Accommodation */;
10476
10599
  }
10477
10600
  if (product.duration_unit && LEASE_UNITS.has(product.duration_unit)) {
@@ -10482,10 +10605,10 @@ function resolveCardVariant(product) {
10482
10605
  }
10483
10606
  return "standard" /* Standard */;
10484
10607
  }
10485
- if (product.render_hint === chunkGDAGM26J_js.RENDER_HINT.Food) {
10608
+ if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
10486
10609
  return "food" /* Food */;
10487
10610
  }
10488
- if (product.render_hint === chunkGDAGM26J_js.RENDER_HINT.Physical) {
10611
+ if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
10489
10612
  return "retail" /* Retail */;
10490
10613
  }
10491
10614
  return "retail" /* Retail */;
@@ -12792,7 +12915,7 @@ function DefaultProductLayout({
12792
12915
  className
12793
12916
  }) {
12794
12917
  const [selectedVariantId, setSelectedVariantId] = React12__default.default.useState();
12795
- const images = chunkGDAGM26J_js.resolveGallery(product, selectedVariantId);
12918
+ const images = chunkIQLJJW2H_js.resolveGallery(product, selectedVariantId);
12796
12919
  const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
12797
12920
  const onSale = chunk7Y2O3E4D_js.isOnSale(product);
12798
12921
  const hasPhysicalDetails = product.sku || product.vendor || product.material;
@@ -13428,25 +13551,25 @@ function resolveTemplateKey(product) {
13428
13551
  if (typeof metaTemplate === "string" && metaTemplate.trim()) {
13429
13552
  return metaTemplate.trim();
13430
13553
  }
13431
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Bundle) {
13554
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
13432
13555
  return "bundle" /* Bundle */;
13433
13556
  }
13434
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Composite) {
13557
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
13435
13558
  return "composite" /* Composite */;
13436
13559
  }
13437
13560
  if (product.quantity_pricing && product.quantity_pricing.length > 1) {
13438
13561
  return "wholesale" /* Wholesale */;
13439
13562
  }
13440
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Service) {
13563
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
13441
13564
  return "service" /* Service */;
13442
13565
  }
13443
- if (product.type === chunkGDAGM26J_js.PRODUCT_TYPE.Digital) {
13566
+ if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
13444
13567
  return "digital" /* Digital */;
13445
13568
  }
13446
- if (product.render_hint === chunkGDAGM26J_js.RENDER_HINT.Food) {
13569
+ if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
13447
13570
  return "food" /* Food */;
13448
13571
  }
13449
- if (product.render_hint === chunkGDAGM26J_js.RENDER_HINT.Physical) {
13572
+ if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
13450
13573
  return "physical" /* Physical */;
13451
13574
  }
13452
13575
  return "default" /* Default */;
@@ -15672,7 +15795,7 @@ function SparkleIcon({ className }) {
15672
15795
 
15673
15796
  Object.defineProperty(exports, "getVariantDisplayName", {
15674
15797
  enumerable: true,
15675
- get: function () { return chunkGDAGM26J_js.getVariantDisplayName; }
15798
+ get: function () { return chunkIQLJJW2H_js.getVariantDisplayName; }
15676
15799
  });
15677
15800
  exports.AccommodationCard = AccommodationCard;
15678
15801
  exports.AccountContent = AccountContent;
@@ -15720,10 +15843,10 @@ exports.CategoryGrid = CategoryGrid;
15720
15843
  exports.ChatWidget = ChatWidget;
15721
15844
  exports.CheckIcon = CheckIcon;
15722
15845
  exports.CheckoutPage = CheckoutPage;
15723
- exports.CimplifyAccount = CimplifyAccount;
15724
15846
  exports.CimplifyCheckout = CimplifyCheckout;
15725
15847
  exports.CimplifyProvider = CimplifyProvider;
15726
15848
  exports.CimplifySignInButton = CimplifySignInButton;
15849
+ exports.CimplifyUserButton = CimplifyUserButton;
15727
15850
  exports.CollectionPage = CollectionPage;
15728
15851
  exports.CollectionTemplate = CollectionTemplate;
15729
15852
  exports.CompactCartLayout = CompactCartLayout;