@cimplify/sdk 0.85.0 → 0.87.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 (73) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +22 -22
  4. package/dist/advanced.mjs +3 -3
  5. package/dist/{chunk-XA3ZNR75.js → chunk-AETVRBKI.js} +1 -1
  6. package/dist/{chunk-GIFVSWYJ.mjs → chunk-APBLFZ2I.mjs} +5 -5
  7. package/dist/{chunk-HPN5R3K2.js → chunk-FWEF2DHR.js} +80 -28
  8. package/dist/{chunk-DU4IX2I2.mjs → chunk-J7JDCPNW.mjs} +2 -2
  9. package/dist/{chunk-AMZXALF6.mjs → chunk-K5EN2W2Q.mjs} +1 -1
  10. package/dist/{chunk-TD3AY34U.mjs → chunk-KFLGQGMC.mjs} +3 -3
  11. package/dist/{chunk-E6T5VJMG.mjs → chunk-OZDDHSIB.mjs} +9 -1
  12. package/dist/{chunk-GFM5JW45.js → chunk-P3352VXA.js} +62 -62
  13. package/dist/{chunk-7Y2O3E4D.js → chunk-PTPOQVXS.js} +5 -5
  14. package/dist/{chunk-A6J7W6DH.js → chunk-PWDX5N2M.js} +4 -4
  15. package/dist/{chunk-NWUEWUX2.mjs → chunk-RCGSHS2Q.mjs} +2 -2
  16. package/dist/{chunk-NWTCBGJ2.js → chunk-ROBTTS3Q.js} +7 -7
  17. package/dist/{chunk-IQLJJW2H.js → chunk-T7Z25EY4.js} +9 -0
  18. package/dist/{chunk-7BM56JET.mjs → chunk-U57TYZLD.mjs} +60 -8
  19. package/dist/{client-WKKxIiF1.d.ts → client-BIt37FjS.d.mts} +541 -542
  20. package/dist/{client-BEhIE0Dm.d.mts → client-BMOdyC1F.d.mts} +2 -2
  21. package/dist/{client-BT5gaiGR.d.ts → client-BvWtk822.d.ts} +2 -2
  22. package/dist/{client-DLtwQ-jI.d.mts → client-Dfl6WY2F.d.ts} +541 -542
  23. package/dist/{index-DZz6hdrT.d.mts → index-BxOJ3BLn.d.mts} +3 -3
  24. package/dist/{index-BrC1x2kK.d.ts → index-DW6JifS1.d.ts} +3 -3
  25. package/dist/index.d.mts +6 -6
  26. package/dist/index.d.ts +6 -6
  27. package/dist/index.js +133 -129
  28. package/dist/index.mjs +6 -6
  29. package/dist/mock/cli.mjs +5 -5
  30. package/dist/mock/library.js +5 -5
  31. package/dist/mock/library.mjs +5 -5
  32. package/dist/mock/msw.js +5 -5
  33. package/dist/mock/msw.mjs +5 -5
  34. package/dist/{payment-D1f3ZQPC.d.ts → payment-CLp__KpE.d.mts} +3 -3
  35. package/dist/{payment-Dh-6cRcV.d.mts → payment-DJrvivO_.d.ts} +3 -3
  36. package/dist/{price-CQdOJoX-.d.ts → price-B7_UzClY.d.ts} +1 -1
  37. package/dist/{price-4T7dlhxM.d.mts → price-Ddk8Vr8z.d.mts} +1 -1
  38. package/dist/product-C0Lr81ze.d.mts +5439 -0
  39. package/dist/product-C0Lr81ze.d.ts +5439 -0
  40. package/dist/react.d.mts +24 -7
  41. package/dist/react.d.ts +24 -7
  42. package/dist/react.js +224 -186
  43. package/dist/react.mjs +57 -22
  44. package/dist/{server-DjK98UW-.d.mts → server-0TnEJt8U.d.mts} +2 -2
  45. package/dist/{server-DvThXldo.d.ts → server-P2G43ENi.d.ts} +2 -2
  46. package/dist/server.d.mts +4 -4
  47. package/dist/server.d.ts +4 -4
  48. package/dist/server.js +10 -10
  49. package/dist/server.mjs +4 -4
  50. package/dist/styles.css +1 -1
  51. package/dist/testing/msw.d.mts +2 -2
  52. package/dist/testing/msw.d.ts +2 -2
  53. package/dist/testing/msw.js +3 -3
  54. package/dist/testing/msw.mjs +2 -2
  55. package/dist/testing/suite.d.mts +6 -6
  56. package/dist/testing/suite.d.ts +6 -6
  57. package/dist/testing/suite.js +25 -25
  58. package/dist/testing/suite.mjs +6 -6
  59. package/dist/testing.d.mts +5 -5
  60. package/dist/testing.d.ts +5 -5
  61. package/dist/testing.js +81 -81
  62. package/dist/testing.mjs +7 -7
  63. package/dist/utils.d.mts +4 -4
  64. package/dist/utils.d.ts +4 -4
  65. package/dist/utils.js +29 -29
  66. package/dist/utils.mjs +2 -2
  67. package/package.json +5 -2
  68. package/registry/currency-selector.json +1 -1
  69. package/registry/digital-product-card.json +1 -1
  70. package/registry/digital-product-layout.json +1 -1
  71. package/registry/product-card.json +1 -1
  72. package/dist/product-RJMIdCAf.d.mts +0 -1582
  73. package/dist/product-RJMIdCAf.d.ts +0 -1582
package/dist/react.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
5
- var chunkGFM5JW45_js = require('./chunk-GFM5JW45.js');
6
- var chunkHPN5R3K2_js = require('./chunk-HPN5R3K2.js');
7
- var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
8
- var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
4
+ var chunkT7Z25EY4_js = require('./chunk-T7Z25EY4.js');
5
+ var chunkP3352VXA_js = require('./chunk-P3352VXA.js');
6
+ var chunkFWEF2DHR_js = require('./chunk-FWEF2DHR.js');
7
+ var chunkPTPOQVXS_js = require('./chunk-PTPOQVXS.js');
8
+ var chunkAETVRBKI_js = require('./chunk-AETVRBKI.js');
9
9
  require('./chunk-OWW5GUSB.js');
10
10
  var React14 = require('react');
11
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -598,12 +598,12 @@ function attachInternalItemMetadata(item) {
598
598
  return { ...item, _lineKey: lineKeyFromItem(item) };
599
599
  }
600
600
  function calculateLineSubtotal(item) {
601
- let unitPrice = chunk7Y2O3E4D_js.parsePrice(item.product.default_price);
601
+ let unitPrice = chunkPTPOQVXS_js.parsePrice(item.product.default_price);
602
602
  if (item.variant?.price_adjustment) {
603
- unitPrice += chunk7Y2O3E4D_js.parsePrice(item.variant.price_adjustment);
603
+ unitPrice += chunkPTPOQVXS_js.parsePrice(item.variant.price_adjustment);
604
604
  }
605
605
  for (const option of item.addOnOptions || []) {
606
- if (option.default_price) unitPrice += chunk7Y2O3E4D_js.parsePrice(option.default_price);
606
+ if (option.default_price) unitPrice += chunkPTPOQVXS_js.parsePrice(option.default_price);
607
607
  }
608
608
  return roundMoney(unitPrice * item.quantity);
609
609
  }
@@ -1132,7 +1132,7 @@ var DEFAULT_COUNTRY = "US";
1132
1132
  function createDefaultClient() {
1133
1133
  const processRef = globalThis.process;
1134
1134
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1135
- return chunkGFM5JW45_js.createCimplifyClient({ publicKey: envPublicKey });
1135
+ return chunkP3352VXA_js.createCimplifyClient({ publicKey: envPublicKey });
1136
1136
  }
1137
1137
  function getStoredLocationId() {
1138
1138
  if (typeof window === "undefined" || !window.localStorage) {
@@ -1236,7 +1236,7 @@ function CimplifyProvider({
1236
1236
  const setDisplayCurrency = React14.useCallback(
1237
1237
  (currency) => {
1238
1238
  const normalized = currency?.trim().toUpperCase() || null;
1239
- if (normalized && !chunkXA3ZNR75_js.isSupportedCurrency(normalized)) {
1239
+ if (normalized && !chunkAETVRBKI_js.isSupportedCurrency(normalized)) {
1240
1240
  return;
1241
1241
  }
1242
1242
  setDisplayCurrencyOverride(normalized);
@@ -1260,7 +1260,7 @@ function CimplifyProvider({
1260
1260
  );
1261
1261
  if (cancelled) return;
1262
1262
  if (result.ok) {
1263
- setFxRate(result.value.rate);
1263
+ setFxRate(Number(result.value.rate));
1264
1264
  } else {
1265
1265
  setFxRate(null);
1266
1266
  }
@@ -1285,7 +1285,7 @@ function CimplifyProvider({
1285
1285
  const apiCredentials = resolvedClient.getCredentialsMode() === "include" ? "use-credentials" : "anonymous";
1286
1286
  preconnectOrigin(resolvedClient.getBaseUrl(), apiCredentials);
1287
1287
  preconnectOrigin(resolvedClient.getLinkApiUrl(), apiCredentials);
1288
- preconnectOrigin(chunkIQLJJW2H_js.DEFAULT_CDN_BASE_URL);
1288
+ preconnectOrigin(chunkT7Z25EY4_js.DEFAULT_CDN_BASE_URL);
1289
1289
  }
1290
1290
  const setCurrentLocation = React14.useCallback(
1291
1291
  (location) => {
@@ -1356,7 +1356,7 @@ function CimplifyProvider({
1356
1356
  client: resolvedClient,
1357
1357
  business,
1358
1358
  currency: baseCurrency,
1359
- country: business?.country_code || DEFAULT_COUNTRY,
1359
+ country: business?.default_country || DEFAULT_COUNTRY,
1360
1360
  locations,
1361
1361
  isReady,
1362
1362
  baseCurrency,
@@ -3180,19 +3180,19 @@ function toAccountLineItem(item, currency) {
3180
3180
  quantity: s.quantity,
3181
3181
  name: s.product_name,
3182
3182
  variantName: s.variant_name,
3183
- priceLabel: chunk7Y2O3E4D_js.parsePrice(s.unit_price) > 0 ? chunk7Y2O3E4D_js.formatMoney(s.unit_price, currency) : void 0
3183
+ priceLabel: chunkPTPOQVXS_js.parsePrice(s.unit_price) > 0 ? chunkPTPOQVXS_js.formatMoney(s.unit_price, currency) : void 0
3184
3184
  }));
3185
3185
  const customisations = item.composite_selections?.selections.map((s) => ({
3186
3186
  quantity: s.quantity,
3187
3187
  name: s.component_name,
3188
- priceLabel: chunk7Y2O3E4D_js.parsePrice(s.unit_price) > 0 ? `+${chunk7Y2O3E4D_js.formatMoney(s.unit_price, currency)}` : void 0
3188
+ priceLabel: chunkPTPOQVXS_js.parsePrice(s.unit_price) > 0 ? `+${chunkPTPOQVXS_js.formatMoney(s.unit_price, currency)}` : void 0
3189
3189
  }));
3190
3190
  const data = {
3191
3191
  id: item.id,
3192
3192
  name: item.product_name ?? "Item",
3193
3193
  imageUrl: item.image_url,
3194
3194
  subtitle: lineSubtitle(item),
3195
- priceLabel: chunk7Y2O3E4D_js.formatMoney(item.total_price, currency),
3195
+ priceLabel: chunkPTPOQVXS_js.formatMoney(item.total_price, currency),
3196
3196
  lineType: item.line_type,
3197
3197
  includes,
3198
3198
  customisations,
@@ -3242,20 +3242,20 @@ var PAYMENT_TONE = {
3242
3242
  function toAccountOrderView(order, opts = {}) {
3243
3243
  const currency = order.payment.currency;
3244
3244
  const rows = [
3245
- { label: "Subtotal", value: chunk7Y2O3E4D_js.formatMoney(order.pricing.subtotal, currency) }
3245
+ { label: "Subtotal", value: chunkPTPOQVXS_js.formatMoney(order.pricing.subtotal, currency) }
3246
3246
  ];
3247
- if (chunk7Y2O3E4D_js.parsePrice(order.pricing.total_discount) > 0) {
3247
+ if (chunkPTPOQVXS_js.parsePrice(order.pricing.total_discount) > 0) {
3248
3248
  rows.push({
3249
3249
  label: "Discount",
3250
- value: `\u2212${chunk7Y2O3E4D_js.formatMoney(order.pricing.total_discount, currency)}`,
3250
+ value: `\u2212${chunkPTPOQVXS_js.formatMoney(order.pricing.total_discount, currency)}`,
3251
3251
  tone: "positive"
3252
3252
  });
3253
3253
  }
3254
- if (order.pricing.tax && chunk7Y2O3E4D_js.parsePrice(order.pricing.tax) > 0) {
3255
- rows.push({ label: "Tax", value: chunk7Y2O3E4D_js.formatMoney(order.pricing.tax, currency) });
3254
+ if (order.pricing.tax && chunkPTPOQVXS_js.parsePrice(order.pricing.tax) > 0) {
3255
+ rows.push({ label: "Tax", value: chunkPTPOQVXS_js.formatMoney(order.pricing.tax, currency) });
3256
3256
  }
3257
- if (order.pricing.service_charge && chunk7Y2O3E4D_js.parsePrice(order.pricing.service_charge) > 0) {
3258
- rows.push({ label: "Service", value: chunk7Y2O3E4D_js.formatMoney(order.pricing.service_charge, currency) });
3257
+ if (order.pricing.service_charge && chunkPTPOQVXS_js.parsePrice(order.pricing.service_charge) > 0) {
3258
+ rows.push({ label: "Service", value: chunkPTPOQVXS_js.formatMoney(order.pricing.service_charge, currency) });
3259
3259
  }
3260
3260
  const placed = fmtDateTime(order.timestamps.created_at);
3261
3261
  const placedLabel = opts.placedLabel ?? [placed && `Placed ${placed}`, `${order.items.length} item${order.items.length === 1 ? "" : "s"}`].filter(Boolean).join(" \xB7 ");
@@ -3269,7 +3269,7 @@ function toAccountOrderView(order, opts = {}) {
3269
3269
  stateLabel: cap(order.payment.computed_status ?? order.payment.state),
3270
3270
  stateTone: PAYMENT_TONE[order.payment.state] ?? "muted",
3271
3271
  rows,
3272
- total: { label: "Total", value: chunk7Y2O3E4D_js.formatMoney(order.pricing.total_price, currency) }
3272
+ total: { label: "Total", value: chunkPTPOQVXS_js.formatMoney(order.pricing.total_price, currency) }
3273
3273
  },
3274
3274
  shipTo: order.customer.delivery_address ? { lines: order.customer.delivery_address } : void 0,
3275
3275
  onBack: opts.onBack
@@ -3444,7 +3444,7 @@ function CimplifySignInButton({
3444
3444
  const onClick = async () => {
3445
3445
  if (busy || disabled || !signInOpts.clientId) return;
3446
3446
  setBusy(true);
3447
- await chunkHPN5R3K2_js.startSignIn({
3447
+ await chunkFWEF2DHR_js.startSignIn({
3448
3448
  ...signInOpts,
3449
3449
  onSuccess: () => {
3450
3450
  setBusy(false);
@@ -4299,7 +4299,7 @@ function Price({
4299
4299
  const resolvedAmount = fxActive ? context.convertPrice(amount) : typeof amount === "string" ? parseFloat(amount) || 0 : amount;
4300
4300
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className, children: [
4301
4301
  prefix,
4302
- chunk7Y2O3E4D_js.formatPrice(resolvedAmount, resolvedCurrency)
4302
+ chunkPTPOQVXS_js.formatPrice(resolvedAmount, resolvedCurrency)
4303
4303
  ] });
4304
4304
  }
4305
4305
  function createCachedQuery(config) {
@@ -5332,16 +5332,16 @@ function useProductPrice(input) {
5332
5332
  if (bundleTotalPrice != null) {
5333
5333
  unitPrice = bundleTotalPrice;
5334
5334
  } else if (compositePrice) {
5335
- unitPrice = chunk7Y2O3E4D_js.parsePrice(compositePrice.final_price);
5335
+ unitPrice = chunkPTPOQVXS_js.parsePrice(compositePrice.final_price);
5336
5336
  } else {
5337
- unitPrice = chunk7Y2O3E4D_js.parsePrice(product.default_price);
5337
+ unitPrice = chunkPTPOQVXS_js.parsePrice(product.default_price);
5338
5338
  if (variant?.price_adjustment) {
5339
- unitPrice += chunk7Y2O3E4D_js.parsePrice(variant.price_adjustment);
5339
+ unitPrice += chunkPTPOQVXS_js.parsePrice(variant.price_adjustment);
5340
5340
  }
5341
5341
  if (addOnOptions) {
5342
5342
  for (const option of addOnOptions) {
5343
5343
  if (option.default_price) {
5344
- unitPrice += chunk7Y2O3E4D_js.parsePrice(option.default_price);
5344
+ unitPrice += chunkPTPOQVXS_js.parsePrice(option.default_price);
5345
5345
  }
5346
5346
  }
5347
5347
  }
@@ -6121,15 +6121,15 @@ function AuthElement({
6121
6121
  }, [onReady, onAuthenticated, onError]);
6122
6122
  React14.useEffect(() => {
6123
6123
  if (!elements || !containerRef.current) return;
6124
- const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.AUTH, { prefillEmail });
6124
+ const element = elements.create(chunkFWEF2DHR_js.ELEMENT_TYPES.AUTH, { prefillEmail });
6125
6125
  elementRef.current = element;
6126
- element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6126
+ element.on(chunkFWEF2DHR_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6127
6127
  element.on(
6128
- chunkHPN5R3K2_js.EVENT_TYPES.AUTHENTICATED,
6128
+ chunkFWEF2DHR_js.EVENT_TYPES.AUTHENTICATED,
6129
6129
  (data) => onAuthenticatedRef.current?.(data)
6130
6130
  );
6131
6131
  element.on(
6132
- chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
6132
+ chunkFWEF2DHR_js.EVENT_TYPES.ERROR,
6133
6133
  (data) => onErrorRef.current?.(data)
6134
6134
  );
6135
6135
  element.mount(containerRef.current);
@@ -6158,15 +6158,15 @@ function AddressElement({
6158
6158
  }, [onReady, onChange, onError]);
6159
6159
  React14.useEffect(() => {
6160
6160
  if (!elements || !containerRef.current) return;
6161
- const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.ADDRESS, { mode });
6161
+ const element = elements.create(chunkFWEF2DHR_js.ELEMENT_TYPES.ADDRESS, { mode });
6162
6162
  elementRef.current = element;
6163
- element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6163
+ element.on(chunkFWEF2DHR_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6164
6164
  element.on(
6165
- chunkHPN5R3K2_js.EVENT_TYPES.CHANGE,
6165
+ chunkFWEF2DHR_js.EVENT_TYPES.CHANGE,
6166
6166
  (data) => onChangeRef.current?.(data)
6167
6167
  );
6168
6168
  element.on(
6169
- chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
6169
+ chunkFWEF2DHR_js.EVENT_TYPES.ERROR,
6170
6170
  (data) => onErrorRef.current?.(data)
6171
6171
  );
6172
6172
  element.mount(containerRef.current);
@@ -6196,15 +6196,15 @@ function PaymentElement({
6196
6196
  }, [onReady, onChange, onError]);
6197
6197
  React14.useEffect(() => {
6198
6198
  if (!elements || !containerRef.current) return;
6199
- const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
6199
+ const element = elements.create(chunkFWEF2DHR_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
6200
6200
  elementRef.current = element;
6201
- element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6201
+ element.on(chunkFWEF2DHR_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6202
6202
  element.on(
6203
- chunkHPN5R3K2_js.EVENT_TYPES.CHANGE,
6203
+ chunkFWEF2DHR_js.EVENT_TYPES.CHANGE,
6204
6204
  (data) => onChangeRef.current?.(data)
6205
6205
  );
6206
6206
  element.on(
6207
- chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
6207
+ chunkFWEF2DHR_js.EVENT_TYPES.ERROR,
6208
6208
  (data) => onErrorRef.current?.(data)
6209
6209
  );
6210
6210
  element.mount(containerRef.current);
@@ -6361,7 +6361,7 @@ function VariantSelector({
6361
6361
  if (!variants || variants.length <= 1) {
6362
6362
  return null;
6363
6363
  }
6364
- basePrice != null ? chunk7Y2O3E4D_js.parsePrice(basePrice) : 0;
6364
+ basePrice != null ? chunkPTPOQVXS_js.parsePrice(basePrice) : 0;
6365
6365
  if (variantAxes && variantAxes.length > 0) {
6366
6366
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-variant-selector": true, className: cn("space-y-5", className, classNames?.root), children: variantAxes.map((axis) => {
6367
6367
  const labelId = `${idPrefix}-axis-${axis.id}`;
@@ -6467,7 +6467,7 @@ function VariantSelector({
6467
6467
  className: cn("divide-y divide-border", classNames?.list),
6468
6468
  children: variants.map((variant) => {
6469
6469
  const isSelected = selectedVariantId === variant.id;
6470
- const adjustment = chunk7Y2O3E4D_js.parsePrice(variant.price_adjustment);
6470
+ const adjustment = chunkPTPOQVXS_js.parsePrice(variant.price_adjustment);
6471
6471
  return /* @__PURE__ */ jsxRuntime.jsxs(
6472
6472
  radio.Radio.Root,
6473
6473
  {
@@ -6495,7 +6495,7 @@ function VariantSelector({
6495
6495
  {
6496
6496
  "data-cimplify-variant-name": true,
6497
6497
  className: cn("flex-1 min-w-0 text-sm", classNames?.name),
6498
- children: chunkIQLJJW2H_js.getVariantDisplayName(variant, productName)
6498
+ children: chunkT7Z25EY4_js.getVariantDisplayName(variant, productName)
6499
6499
  }
6500
6500
  ),
6501
6501
  /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-pricing": true, className: cn("text-sm text-muted-foreground", classNames?.pricing), children: [
@@ -6735,16 +6735,16 @@ function BundleSelector({
6735
6735
  }, [components, selections, onReady]);
6736
6736
  const totalPrice = React14.useMemo(() => {
6737
6737
  if (pricingType === "fixed" && bundlePrice) {
6738
- return chunk7Y2O3E4D_js.parsePrice(bundlePrice);
6738
+ return chunkPTPOQVXS_js.parsePrice(bundlePrice);
6739
6739
  }
6740
6740
  const componentsTotal = components.reduce((sum, comp) => {
6741
6741
  return sum + getComponentPrice(comp, variantChoices[comp.id]) * comp.quantity;
6742
6742
  }, 0);
6743
6743
  if (pricingType === "percentage_discount" && discountValue) {
6744
- return componentsTotal * (1 - chunk7Y2O3E4D_js.parsePrice(discountValue) / 100);
6744
+ return componentsTotal * (1 - chunkPTPOQVXS_js.parsePrice(discountValue) / 100);
6745
6745
  }
6746
6746
  if (pricingType === "fixed_discount" && discountValue) {
6747
- return componentsTotal - chunk7Y2O3E4D_js.parsePrice(discountValue);
6747
+ return componentsTotal - chunkPTPOQVXS_js.parsePrice(discountValue);
6748
6748
  }
6749
6749
  return componentsTotal;
6750
6750
  }, [components, variantChoices, pricingType, bundlePrice, discountValue]);
@@ -6806,15 +6806,15 @@ function BundleSelector({
6806
6806
  }
6807
6807
  function getComponentPrice(component, selectedVariantId) {
6808
6808
  if (!selectedVariantId || component.available_variants.length === 0) {
6809
- return chunk7Y2O3E4D_js.parsePrice(component.effective_price);
6809
+ return chunkPTPOQVXS_js.parsePrice(component.effective_price);
6810
6810
  }
6811
6811
  if (selectedVariantId === component.variant_id) {
6812
- return chunk7Y2O3E4D_js.parsePrice(component.effective_price);
6812
+ return chunkPTPOQVXS_js.parsePrice(component.effective_price);
6813
6813
  }
6814
6814
  const bakedAdj = component.variant_id ? component.available_variants.find((v) => v.id === component.variant_id) : void 0;
6815
6815
  const selectedAdj = component.available_variants.find((v) => v.id === selectedVariantId);
6816
- if (!selectedAdj) return chunk7Y2O3E4D_js.parsePrice(component.effective_price);
6817
- return chunk7Y2O3E4D_js.parsePrice(component.effective_price) - chunk7Y2O3E4D_js.parsePrice(bakedAdj?.price_adjustment ?? "0") + chunk7Y2O3E4D_js.parsePrice(selectedAdj.price_adjustment);
6816
+ if (!selectedAdj) return chunkPTPOQVXS_js.parsePrice(component.effective_price);
6817
+ return chunkPTPOQVXS_js.parsePrice(component.effective_price) - chunkPTPOQVXS_js.parsePrice(bakedAdj?.price_adjustment ?? "0") + chunkPTPOQVXS_js.parsePrice(selectedAdj.price_adjustment);
6818
6818
  }
6819
6819
  function formatDuration(minutes, unit) {
6820
6820
  if (unit === "hours" || !unit && minutes >= 60 && minutes % 60 === 0) {
@@ -6928,7 +6928,7 @@ function BundleComponentCard({
6928
6928
  className: cn("mt-3 divide-y divide-border", classNames?.variantPicker),
6929
6929
  children: component.available_variants.map((variant) => {
6930
6930
  const isSelected = selectedVariantId === variant.id;
6931
- const adjustment = chunk7Y2O3E4D_js.parsePrice(variant.price_adjustment);
6931
+ const adjustment = chunkPTPOQVXS_js.parsePrice(variant.price_adjustment);
6932
6932
  return /* @__PURE__ */ jsxRuntime.jsxs(
6933
6933
  radio.Radio.Root,
6934
6934
  {
@@ -7375,7 +7375,7 @@ function CompositeSelector({
7375
7375
  "data-cimplify-composite-summary": true,
7376
7376
  className: cn("border-t border-border pt-4 space-y-1 text-sm", classNames?.summary),
7377
7377
  children: [
7378
- chunk7Y2O3E4D_js.parsePrice(priceResult.base_price) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
7378
+ chunkPTPOQVXS_js.parsePrice(priceResult.base_price) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
7379
7379
  "div",
7380
7380
  {
7381
7381
  "data-cimplify-composite-summary-line": true,
@@ -7386,7 +7386,7 @@ function CompositeSelector({
7386
7386
  ]
7387
7387
  }
7388
7388
  ),
7389
- chunk7Y2O3E4D_js.parsePrice(priceResult.components_total) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
7389
+ chunkPTPOQVXS_js.parsePrice(priceResult.components_total) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
7390
7390
  "div",
7391
7391
  {
7392
7392
  "data-cimplify-composite-summary-line": true,
@@ -7530,7 +7530,7 @@ function BookingSummary({
7530
7530
  className,
7531
7531
  classNames
7532
7532
  }) {
7533
- const depositValue = depositAmount != null ? chunk7Y2O3E4D_js.parsePrice(depositAmount) : 0;
7533
+ const depositValue = depositAmount != null ? chunkPTPOQVXS_js.parsePrice(depositAmount) : 0;
7534
7534
  const depositDue = depositType === "percentage" ? total * depositValue / 100 : depositType === "fixed" ? depositValue : 0;
7535
7535
  const hasDeposit = depositDue > 0;
7536
7536
  const balance = Math.max(0, total - depositDue);
@@ -8082,7 +8082,7 @@ function InputField({
8082
8082
  currency,
8083
8083
  classNames
8084
8084
  }) {
8085
- const hasPriceAdjustment = field.price_adjustment != null && chunk7Y2O3E4D_js.parsePrice(field.price_adjustment) > 0;
8085
+ const hasPriceAdjustment = field.price_adjustment != null && chunkPTPOQVXS_js.parsePrice(field.price_adjustment) > 0;
8086
8086
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customer-input": true, "data-field-type": field.field_type, className: classNames?.field, children: [
8087
8087
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
8088
8088
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: cn("text-sm font-semibold", classNames?.label), children: field.name }),
@@ -8117,12 +8117,12 @@ function FieldInput({
8117
8117
  classNames?.input
8118
8118
  );
8119
8119
  switch (field.field_type) {
8120
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Text:
8121
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url:
8120
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Text:
8121
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Url:
8122
8122
  return /* @__PURE__ */ jsxRuntime.jsx(
8123
8123
  "input",
8124
8124
  {
8125
- type: field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url ? "url" : "text",
8125
+ type: field.field_type === chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Url ? "url" : "text",
8126
8126
  value: typeof value === "string" ? value : "",
8127
8127
  onChange: (e) => onValueChange(e.target.value),
8128
8128
  placeholder: field.placeholder,
@@ -8131,7 +8131,7 @@ function FieldInput({
8131
8131
  className: inputClass
8132
8132
  }
8133
8133
  );
8134
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Textarea:
8134
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Textarea:
8135
8135
  return /* @__PURE__ */ jsxRuntime.jsx(
8136
8136
  "textarea",
8137
8137
  {
@@ -8144,7 +8144,7 @@ function FieldInput({
8144
8144
  className: cn(inputClass, "resize-none", classNames?.textarea)
8145
8145
  }
8146
8146
  );
8147
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Number:
8147
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Number:
8148
8148
  return /* @__PURE__ */ jsxRuntime.jsx(
8149
8149
  "input",
8150
8150
  {
@@ -8158,7 +8158,7 @@ function FieldInput({
8158
8158
  className: inputClass
8159
8159
  }
8160
8160
  );
8161
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Select:
8161
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Select:
8162
8162
  return /* @__PURE__ */ jsxRuntime.jsxs(
8163
8163
  "select",
8164
8164
  {
@@ -8172,7 +8172,7 @@ function FieldInput({
8172
8172
  ]
8173
8173
  }
8174
8174
  );
8175
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Radio:
8175
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Radio:
8176
8176
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", classNames?.radioGroup), children: (field.options || []).map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
8177
8177
  "label",
8178
8178
  {
@@ -8197,7 +8197,7 @@ function FieldInput({
8197
8197
  },
8198
8198
  opt
8199
8199
  )) });
8200
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Checkbox:
8200
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Checkbox:
8201
8201
  return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cn("flex items-center gap-2 text-sm cursor-pointer", classNames?.checkboxLabel), children: [
8202
8202
  /* @__PURE__ */ jsxRuntime.jsx(
8203
8203
  "input",
@@ -8210,7 +8210,7 @@ function FieldInput({
8210
8210
  ),
8211
8211
  field.placeholder || field.name
8212
8212
  ] });
8213
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Color:
8213
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Color:
8214
8214
  return /* @__PURE__ */ jsxRuntime.jsx(
8215
8215
  "input",
8216
8216
  {
@@ -8220,7 +8220,7 @@ function FieldInput({
8220
8220
  className: cn("w-12 h-10 rounded-md border border-input cursor-pointer", classNames?.colorInput)
8221
8221
  }
8222
8222
  );
8223
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Date:
8223
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Date:
8224
8224
  return /* @__PURE__ */ jsxRuntime.jsx(
8225
8225
  DatePicker,
8226
8226
  {
@@ -8231,8 +8231,8 @@ function FieldInput({
8231
8231
  "aria-label": field.name
8232
8232
  }
8233
8233
  );
8234
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.File:
8235
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image:
8234
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.File:
8235
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Image:
8236
8236
  return /* @__PURE__ */ jsxRuntime.jsx(
8237
8237
  FileUploadInput,
8238
8238
  {
@@ -8243,7 +8243,7 @@ function FieldInput({
8243
8243
  classNames
8244
8244
  }
8245
8245
  );
8246
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Email:
8246
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Email:
8247
8247
  return /* @__PURE__ */ jsxRuntime.jsx(
8248
8248
  "input",
8249
8249
  {
@@ -8255,7 +8255,7 @@ function FieldInput({
8255
8255
  className: inputClass
8256
8256
  }
8257
8257
  );
8258
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateTime: {
8258
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.DateTime: {
8259
8259
  const stringValue = typeof value === "string" ? value : "";
8260
8260
  const [datePart, timePartRaw] = stringValue.includes("T") ? stringValue.split("T", 2) : [stringValue, ""];
8261
8261
  const timePart = (timePartRaw ?? "").slice(0, 5);
@@ -8294,7 +8294,7 @@ function FieldInput({
8294
8294
  )
8295
8295
  ] });
8296
8296
  }
8297
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Time:
8297
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Time:
8298
8298
  return /* @__PURE__ */ jsxRuntime.jsx(
8299
8299
  TimePicker,
8300
8300
  {
@@ -8305,7 +8305,7 @@ function FieldInput({
8305
8305
  "aria-label": field.name
8306
8306
  }
8307
8307
  );
8308
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.MultiSelect:
8308
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.MultiSelect:
8309
8309
  return /* @__PURE__ */ jsxRuntime.jsx(
8310
8310
  MultiSelectInput,
8311
8311
  {
@@ -8315,7 +8315,7 @@ function FieldInput({
8315
8315
  classNames
8316
8316
  }
8317
8317
  );
8318
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateRange:
8318
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.DateRange:
8319
8319
  return /* @__PURE__ */ jsxRuntime.jsx(
8320
8320
  DateRangeInput,
8321
8321
  {
@@ -8325,7 +8325,7 @@ function FieldInput({
8325
8325
  classNames
8326
8326
  }
8327
8327
  );
8328
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Address:
8328
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Address:
8329
8329
  return /* @__PURE__ */ jsxRuntime.jsx(
8330
8330
  AddressInput,
8331
8331
  {
@@ -8336,7 +8336,7 @@ function FieldInput({
8336
8336
  inputClass
8337
8337
  }
8338
8338
  );
8339
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Location:
8339
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Location:
8340
8340
  return /* @__PURE__ */ jsxRuntime.jsx(
8341
8341
  LocationInput,
8342
8342
  {
@@ -8347,7 +8347,7 @@ function FieldInput({
8347
8347
  inputClass
8348
8348
  }
8349
8349
  );
8350
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Phone:
8350
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Phone:
8351
8351
  return /* @__PURE__ */ jsxRuntime.jsx(
8352
8352
  PhoneInput,
8353
8353
  {
@@ -8358,7 +8358,7 @@ function FieldInput({
8358
8358
  inputClass
8359
8359
  }
8360
8360
  );
8361
- case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Signature:
8361
+ case chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Signature:
8362
8362
  return /* @__PURE__ */ jsxRuntime.jsx(
8363
8363
  SignatureInput,
8364
8364
  {
@@ -8391,7 +8391,7 @@ function FileUploadInput({
8391
8391
  const [isUploading, setIsUploading] = React14__default.default.useState(false);
8392
8392
  const fileUrl = typeof value === "string" ? value : void 0;
8393
8393
  const acceptedFormats = field.validation?.accepted_formats;
8394
- const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
8394
+ const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
8395
8395
  const handleFile = async (file) => {
8396
8396
  if (!onFileUpload) return;
8397
8397
  if (field.validation?.max_size_mb) {
@@ -8409,7 +8409,7 @@ function FileUploadInput({
8409
8409
  }
8410
8410
  };
8411
8411
  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: [
8412
- 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" }),
8412
+ field.field_type === chunkT7Z25EY4_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" }),
8413
8413
  /* @__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() }) }),
8414
8414
  /* @__PURE__ */ jsxRuntime.jsx(
8415
8415
  "button",
@@ -8435,7 +8435,7 @@ function FileUploadInput({
8435
8435
  }
8436
8436
  ),
8437
8437
  isUploading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Uploading..." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8438
- /* @__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"}` }),
8438
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: field.placeholder || `Upload ${field.field_type === chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Image ? "image" : "file"}` }),
8439
8439
  acceptedFormats && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground/60 mt-1", children: [
8440
8440
  acceptedFormats.map((f) => f.toUpperCase()).join(", "),
8441
8441
  field.validation?.max_size_mb && ` \xB7 Max ${field.validation.max_size_mb}MB`
@@ -9365,7 +9365,7 @@ function ProductCustomizer({
9365
9365
  const [selectedSlot, setSelectedSlot] = React14.useState(null);
9366
9366
  const [selectedStaffId, setSelectedStaffId] = React14.useState(null);
9367
9367
  const cart = useCart();
9368
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
9368
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
9369
9369
  const productType = product.type || "product";
9370
9370
  const isComposite = productType === "composite";
9371
9371
  const isBundle = productType === "bundle";
@@ -9419,18 +9419,18 @@ function ProductCustomizer({
9419
9419
  }, [selectedAddOnOptionIds]);
9420
9420
  const localTotalPrice = React14.useMemo(() => {
9421
9421
  if (isComposite && compositePrice) {
9422
- return chunk7Y2O3E4D_js.parsePrice(compositePrice.final_price) * quantity;
9422
+ return chunkPTPOQVXS_js.parsePrice(compositePrice.final_price) * quantity;
9423
9423
  }
9424
9424
  if (isBundle && bundleTotalPrice != null) {
9425
9425
  return bundleTotalPrice * quantity;
9426
9426
  }
9427
- let price = chunk7Y2O3E4D_js.parsePrice(product.default_price);
9427
+ let price = chunkPTPOQVXS_js.parsePrice(product.default_price);
9428
9428
  if (selectedVariant?.price_adjustment) {
9429
- price += chunk7Y2O3E4D_js.parsePrice(selectedVariant.price_adjustment);
9429
+ price += chunkPTPOQVXS_js.parsePrice(selectedVariant.price_adjustment);
9430
9430
  }
9431
9431
  for (const option of selectedAddOnOptions) {
9432
9432
  if (option.default_price) {
9433
- price += chunk7Y2O3E4D_js.parsePrice(option.default_price);
9433
+ price += chunkPTPOQVXS_js.parsePrice(option.default_price);
9434
9434
  }
9435
9435
  }
9436
9436
  return price * quantity;
@@ -9479,7 +9479,7 @@ function ProductCustomizer({
9479
9479
  const priceInfo = quote.quoted_total_price_info ?? quote.final_price_info;
9480
9480
  const perUnit = priceInfo.pre_tax_price;
9481
9481
  if (perUnit === void 0 || perUnit === null) return void 0;
9482
- return chunk7Y2O3E4D_js.parsePrice(perUnit) * quantity;
9482
+ return chunkPTPOQVXS_js.parsePrice(perUnit) * quantity;
9483
9483
  }, [quote, quantity]);
9484
9484
  const displayTotalPrice = quotedTotalPrice ?? localTotalPrice;
9485
9485
  const handleVariantChange = React14.useCallback(
@@ -9644,7 +9644,7 @@ function ProductCustomizer({
9644
9644
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.deposit_amount, currency })
9645
9645
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
9646
9646
  "Deposit required: ",
9647
- chunk7Y2O3E4D_js.parsePrice(product.deposit_amount),
9647
+ chunkPTPOQVXS_js.parsePrice(product.deposit_amount),
9648
9648
  "%"
9649
9649
  ] }) }),
9650
9650
  product.allergies && product.allergies.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-customizer-allergens": true, className: cn("flex flex-wrap gap-1.5", classNames?.allergens), children: product.allergies.map((allergen) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -9717,7 +9717,7 @@ function ProductCustomizer({
9717
9717
  ] })
9718
9718
  ] }),
9719
9719
  product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
9720
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunk7Y2O3E4D_js.getUnitPriceAtQuantity(product.quantity_pricing, quantity, chunk7Y2O3E4D_js.parsePrice(product.default_price)), currency, className: "font-medium text-foreground" }),
9720
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkPTPOQVXS_js.getUnitPriceAtQuantity(product.quantity_pricing, quantity, chunkPTPOQVXS_js.parsePrice(product.default_price)), currency, className: "font-medium text-foreground" }),
9721
9721
  " ea."
9722
9722
  ] }),
9723
9723
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -10174,9 +10174,9 @@ function CartLineItemRow({
10174
10174
  const hasComposite = item.compositeSelections && item.compositeSelections.length > 0;
10175
10175
  const hasBundle = item.bundleSelections && item.bundleSelections.length > 0;
10176
10176
  const isOptimistic = item.isOptimistic === true;
10177
- const lineTotal = chunk7Y2O3E4D_js.parsePrice(unitPrice) * item.quantity;
10177
+ const lineTotal = chunkPTPOQVXS_js.parsePrice(unitPrice) * item.quantity;
10178
10178
  const imageUrl = item.product.image_url;
10179
- const variantLabel2 = item.variant ? chunkIQLJJW2H_js.getVariantDisplayName(item.variant, item.product.name) : null;
10179
+ const variantLabel2 = item.variant ? chunkT7Z25EY4_js.getVariantDisplayName(item.variant, item.product.name) : null;
10180
10180
  return /* @__PURE__ */ jsxRuntime.jsxs(
10181
10181
  "div",
10182
10182
  {
@@ -10276,7 +10276,7 @@ function CartLineItemRow({
10276
10276
  input.field_name,
10277
10277
  ":"
10278
10278
  ] }),
10279
- /* @__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) })
10279
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-cimplify-cart-input-value": true, className: "text-foreground m-0 truncate", children: input.field_type === chunkT7Z25EY4_js.INPUT_FIELD_TYPE.File || input.field_type === chunkT7Z25EY4_js.INPUT_FIELD_TYPE.Image ? String(input.value).split("/").pop() || "Uploaded file" : String(input.value) })
10280
10280
  ] }, input.field_id)) }),
10281
10281
  (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: [
10282
10282
  /* @__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" }) }),
@@ -10407,15 +10407,15 @@ function CartSummary({
10407
10407
  ] }),
10408
10408
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: subtotal, className: "tabular-nums" })
10409
10409
  ] }),
10410
- totalDiscounts != null && chunk7Y2O3E4D_js.parsePrice(totalDiscounts) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-discount": true, className: cn("flex items-baseline justify-between", classNames?.discount), children: [
10410
+ totalDiscounts != null && chunkPTPOQVXS_js.parsePrice(totalDiscounts) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-discount": true, className: cn("flex items-baseline justify-between", classNames?.discount), children: [
10411
10411
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Discount" }),
10412
10412
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: totalDiscounts, prefix: "-", className: "tabular-nums text-primary" })
10413
10413
  ] }),
10414
10414
  deliveryFee != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-delivery-fee": true, className: cn("flex items-baseline justify-between", classNames?.deliveryFee), children: [
10415
10415
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Delivery" }),
10416
- chunk7Y2O3E4D_js.parsePrice(deliveryFee) > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: deliveryFee, className: "tabular-nums" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-primary", children: "Free" })
10416
+ chunkPTPOQVXS_js.parsePrice(deliveryFee) > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: deliveryFee, className: "tabular-nums" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-primary", children: "Free" })
10417
10417
  ] }),
10418
- serviceCharge != null && chunk7Y2O3E4D_js.parsePrice(serviceCharge) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-charge": true, className: cn("flex items-baseline justify-between", classNames?.serviceCharge), children: [
10418
+ serviceCharge != null && chunkPTPOQVXS_js.parsePrice(serviceCharge) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-charge": true, className: cn("flex items-baseline justify-between", classNames?.serviceCharge), children: [
10419
10419
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Service charge" }),
10420
10420
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: serviceCharge, className: "tabular-nums" })
10421
10421
  ] }),
@@ -10505,16 +10505,16 @@ function SaleBadge({
10505
10505
  className,
10506
10506
  classNames
10507
10507
  }) {
10508
- const onSale = chunk7Y2O3E4D_js.isOnSale(product);
10508
+ const onSale = chunkPTPOQVXS_js.isOnSale(product);
10509
10509
  const hasDeal = dealInfo !== void 0;
10510
10510
  if (!hasDeal && !onSale && !label) {
10511
10511
  return null;
10512
10512
  }
10513
10513
  let percentage = null;
10514
10514
  if (hasDeal && dealInfo.benefit_type === "percentage") {
10515
- percentage = chunk7Y2O3E4D_js.parsePrice(dealInfo.value);
10515
+ percentage = chunkPTPOQVXS_js.parsePrice(dealInfo.value);
10516
10516
  } else if (onSale) {
10517
- percentage = chunk7Y2O3E4D_js.getDiscountPercentage(product);
10517
+ percentage = chunkPTPOQVXS_js.getDiscountPercentage(product);
10518
10518
  }
10519
10519
  const badgeText = label ?? dealInfo?.label ?? (percentage != null && percentage > 0 ? `${percentage}% off` : null);
10520
10520
  if (!badgeText) {
@@ -10533,7 +10533,7 @@ function SaleBadge({
10533
10533
  "%"
10534
10534
  ] }),
10535
10535
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-label": true, className: classNames?.label, children: badgeText }),
10536
- showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunk7Y2O3E4D_js.getBasePrice(product), currency: chunk7Y2O3E4D_js.getProductCurrency(product) }) })
10536
+ showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkPTPOQVXS_js.getBasePrice(product), currency: chunkPTPOQVXS_js.getProductCurrency(product) }) })
10537
10537
  ]
10538
10538
  }
10539
10539
  );
@@ -10551,7 +10551,7 @@ function SalePrice({
10551
10551
  if (!sale) {
10552
10552
  return /* @__PURE__ */ jsxRuntime.jsx(Price, { amount, currency, className });
10553
10553
  }
10554
- const off = Math.round(chunk7Y2O3E4D_js.parsePrice(sale.percent_off));
10554
+ const off = Math.round(chunkPTPOQVXS_js.parsePrice(sale.percent_off));
10555
10555
  return /* @__PURE__ */ jsxRuntime.jsxs(
10556
10556
  "span",
10557
10557
  {
@@ -10927,7 +10927,7 @@ function ProductSheet({
10927
10927
  Price,
10928
10928
  {
10929
10929
  amount: fullProduct.default_price,
10930
- currency: chunk7Y2O3E4D_js.getProductCurrency(fullProduct),
10930
+ currency: chunkPTPOQVXS_js.getProductCurrency(fullProduct),
10931
10931
  className: classNames?.price
10932
10932
  }
10933
10933
  )
@@ -11113,10 +11113,10 @@ function SoldOutOverlay() {
11113
11113
  function SaleBadge2({ product }) {
11114
11114
  let label = null;
11115
11115
  if (product.sale) {
11116
- const off = Math.round(chunk7Y2O3E4D_js.parsePrice(product.sale.percent_off));
11116
+ const off = Math.round(chunkPTPOQVXS_js.parsePrice(product.sale.percent_off));
11117
11117
  label = product.sale.badge_text ?? (off > 0 ? `-${off}%` : null);
11118
- } else if (chunk7Y2O3E4D_js.isOnSale(product)) {
11119
- const pct = chunk7Y2O3E4D_js.getDiscountPercentage(product);
11118
+ } else if (chunkPTPOQVXS_js.isOnSale(product)) {
11119
+ const pct = chunkPTPOQVXS_js.getDiscountPercentage(product);
11120
11120
  label = pct && pct > 0 ? `-${pct}%` : null;
11121
11121
  }
11122
11122
  if (!label) return null;
@@ -11157,11 +11157,11 @@ function FoodProductCard({
11157
11157
  className
11158
11158
  }) {
11159
11159
  const image = product.image_url || product.images?.[0] || "";
11160
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11160
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11161
11161
  const tags = product.tags || [];
11162
11162
  const isSignature = product.metadata?.is_signature === true;
11163
11163
  const isNew = product.metadata?.is_new === true;
11164
- const isComposite = product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite;
11164
+ const isComposite = product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Composite;
11165
11165
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
11166
11166
  /* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
11167
11167
  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: [
@@ -11213,9 +11213,9 @@ function RetailProductCard({
11213
11213
  className
11214
11214
  }) {
11215
11215
  const image = product.image_url || product.images?.[0] || "";
11216
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11216
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11217
11217
  const outOfStock = product.inventory_status?.in_stock === false;
11218
- const onSale = chunk7Y2O3E4D_js.isOnSale(product);
11218
+ const onSale = chunkPTPOQVXS_js.isOnSale(product);
11219
11219
  const swatches = getColorSwatches(product);
11220
11220
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, disabled: outOfStock, className, children: [
11221
11221
  outOfStock && /* @__PURE__ */ jsxRuntime.jsx(SoldOutOverlay, {}),
@@ -11236,7 +11236,7 @@ function RetailProductCard({
11236
11236
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.sale.original, currency, className: "text-xs text-muted-foreground line-through" })
11237
11237
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11238
11238
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
11239
- onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunk7Y2O3E4D_js.getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" })
11239
+ onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkPTPOQVXS_js.getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" })
11240
11240
  ] }) }),
11241
11241
  swatches.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 mt-2.5", children: swatches.map((name) => /* @__PURE__ */ jsxRuntime.jsx(
11242
11242
  "span",
@@ -11251,10 +11251,10 @@ function RetailProductCard({
11251
11251
  ] });
11252
11252
  }
11253
11253
  function PriceRange({ product, currency, className }) {
11254
- const resolvedCurrency = currency ?? chunk7Y2O3E4D_js.getProductCurrency(product);
11255
- const range = chunk7Y2O3E4D_js.getPriceRange(product);
11254
+ const resolvedCurrency = currency ?? chunkPTPOQVXS_js.getProductCurrency(product);
11255
+ const range = chunkPTPOQVXS_js.getPriceRange(product);
11256
11256
  if (!range) return null;
11257
- return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children: chunk7Y2O3E4D_js.formatPriceRange(range.min, range.max, resolvedCurrency) });
11257
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children: chunkPTPOQVXS_js.formatPriceRange(range.min, range.max, resolvedCurrency) });
11258
11258
  }
11259
11259
  function WholesaleProductCard({
11260
11260
  product,
@@ -11264,7 +11264,7 @@ function WholesaleProductCard({
11264
11264
  className
11265
11265
  }) {
11266
11266
  const image = product.image_url || product.images?.[0] || "";
11267
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11267
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11268
11268
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
11269
11269
  const status = product.inventory_status;
11270
11270
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
@@ -11300,10 +11300,10 @@ function WholesaleProductCard({
11300
11300
  }
11301
11301
  var TYPE_BADGES = {
11302
11302
  download: { label: "Download", color: "bg-sky-50 text-sky-700 border-sky-200/60" },
11303
- license: { label: "License", color: "bg-blue-50 text-blue-700 border-blue-200/60" },
11304
- event_ticket: { label: "Event", color: "bg-violet-50 text-violet-700 border-violet-200/60" },
11305
- access_pass: { label: "Access", color: "bg-emerald-50 text-emerald-700 border-emerald-200/60" },
11306
- gift_card: { label: "Gift Card", color: "bg-amber-50 text-amber-700 border-amber-200/60" }
11303
+ license_key: { label: "License", color: "bg-blue-50 text-blue-700 border-blue-200/60" },
11304
+ ticket: { label: "Event", color: "bg-violet-50 text-violet-700 border-violet-200/60" },
11305
+ access_grant: { label: "Access", color: "bg-emerald-50 text-emerald-700 border-emerald-200/60" },
11306
+ redemption_code: { label: "Code", color: "bg-amber-50 text-amber-700 border-amber-200/60" }
11307
11307
  };
11308
11308
  function DigitalProductCard({
11309
11309
  product,
@@ -11312,9 +11312,9 @@ function DigitalProductCard({
11312
11312
  className
11313
11313
  }) {
11314
11314
  const image = product.image_url || product.images?.[0] || "";
11315
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11315
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11316
11316
  const typeBadge = product.digital_type ? TYPE_BADGES[product.digital_type] : null;
11317
- const isTicket = product.digital_type === "event_ticket";
11317
+ const isTicket = product.digital_type === "ticket";
11318
11318
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
11319
11319
  /* @__PURE__ */ jsxRuntime.jsx(CardImage, { src: image, alt: product.name, aspectRatio: "4/3", renderImage, children: typeBadge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `absolute top-3 left-3 text-[11px] font-semibold tracking-wide border px-2 py-0.5 rounded-md ${typeBadge.color}`, children: typeBadge.label }) }),
11320
11320
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3.5", children: [
@@ -11343,11 +11343,11 @@ function BundleProductCard({
11343
11343
  className
11344
11344
  }) {
11345
11345
  const image = product.image_url || product.images?.[0] || "";
11346
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11346
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11347
11347
  const components = product.components || [];
11348
11348
  const componentCount = components.length;
11349
- const onSale = chunk7Y2O3E4D_js.isOnSale(product);
11350
- const discount = chunk7Y2O3E4D_js.getDiscountPercentage(product);
11349
+ const onSale = chunkPTPOQVXS_js.isOnSale(product);
11350
+ const discount = chunkPTPOQVXS_js.getDiscountPercentage(product);
11351
11351
  const hasVariantChoice = components.some((c) => c.allow_variant_choice);
11352
11352
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
11353
11353
  /* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
@@ -11374,7 +11374,7 @@ function BundleProductCard({
11374
11374
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [
11375
11375
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency, className: "text-sm font-bold" }),
11376
11376
  onSale && product.bundle_price && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11377
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunk7Y2O3E4D_js.getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" }),
11377
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkPTPOQVXS_js.getBasePrice(product), currency, className: "text-xs text-muted-foreground line-through" }),
11378
11378
  discount != null && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] font-semibold text-emerald-600", children: [
11379
11379
  "Save ",
11380
11380
  discount,
@@ -11394,7 +11394,7 @@ function CompositeProductCard({
11394
11394
  className
11395
11395
  }) {
11396
11396
  const image = product.image_url || product.images?.[0] || "";
11397
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11397
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11398
11398
  const groups = product.groups || [];
11399
11399
  const groupCount = groups.length;
11400
11400
  groups.reduce((sum, g) => sum + g.components.length, 0);
@@ -11446,7 +11446,7 @@ function StandardServiceCard({
11446
11446
  className
11447
11447
  }) {
11448
11448
  const image = product.image_url || product.images?.[0] || "";
11449
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11449
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11450
11450
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
11451
11451
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
11452
11452
  /* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "16/9", renderImage, children: [
@@ -11501,7 +11501,7 @@ function CompactServiceCard({
11501
11501
  className
11502
11502
  }) {
11503
11503
  const image = product.image_url || product.images?.[0] || "";
11504
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11504
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11505
11505
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
11506
11506
  const hasBillingPlans = product.billing_plans && product.billing_plans.length > 0;
11507
11507
  const href = `/products/${product.slug}`;
@@ -11550,7 +11550,7 @@ function ScheduleServiceCard({
11550
11550
  className
11551
11551
  }) {
11552
11552
  const image = product.image_url || product.images?.[0] || "";
11553
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11553
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11554
11554
  const href = `/products/${product.slug}`;
11555
11555
  const durationLabel = product.duration_minutes != null ? formatDuration2(product.duration_minutes, product.duration_unit) : null;
11556
11556
  const displaySlots = (slots || []).slice(0, 3);
@@ -11622,7 +11622,7 @@ function RentalServiceCard({
11622
11622
  className
11623
11623
  }) {
11624
11624
  const image = product.image_url || product.images?.[0] || "";
11625
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11625
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11626
11626
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
11627
11627
  const unit = product.duration_unit ? UNIT_LABELS2[product.duration_unit] || product.duration_unit : "day";
11628
11628
  const status = product.inventory_status;
@@ -11692,7 +11692,7 @@ function AccommodationCard({
11692
11692
  className
11693
11693
  }) {
11694
11694
  const image = product.image_url || product.images?.[0] || "";
11695
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11695
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11696
11696
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
11697
11697
  const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
11698
11698
  const tags = product.tags || [];
@@ -11758,7 +11758,7 @@ function LeaseServiceCard({
11758
11758
  className
11759
11759
  }) {
11760
11760
  const image = product.image_url || product.images?.[0] || "";
11761
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11761
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11762
11762
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
11763
11763
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
11764
11764
  const unit = product.duration_unit ? UNIT_LABELS3[product.duration_unit] || product.duration_unit : "mo";
@@ -11832,7 +11832,7 @@ function SubscriptionCard({
11832
11832
  className
11833
11833
  }) {
11834
11834
  const image = product.image_url || product.images?.[0] || "";
11835
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
11835
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
11836
11836
  const plans = product.billing_plans || [];
11837
11837
  const primaryPlan = plans[0];
11838
11838
  const frequency = primaryPlan?.frequency ? FREQUENCY_LABELS2[primaryPlan.frequency] || `/${primaryPlan.frequency}` : "/mo";
@@ -11928,26 +11928,36 @@ var BUILT_IN_CARDS = {
11928
11928
  ["composite" /* Composite */]: CompositeProductCard,
11929
11929
  ["subscription" /* Subscription */]: SubscriptionCard
11930
11930
  };
11931
- var RENTAL_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Days, chunkIQLJJW2H_js.DURATION_UNIT.Hours]);
11932
- var LEASE_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Weeks, chunkIQLJJW2H_js.DURATION_UNIT.Months, chunkIQLJJW2H_js.DURATION_UNIT.Years]);
11931
+ var RENTAL_UNITS = /* @__PURE__ */ new Set([chunkT7Z25EY4_js.DURATION_UNIT.Days, chunkT7Z25EY4_js.DURATION_UNIT.Hours]);
11932
+ var LEASE_UNITS = /* @__PURE__ */ new Set([chunkT7Z25EY4_js.DURATION_UNIT.Weeks, chunkT7Z25EY4_js.DURATION_UNIT.Months, chunkT7Z25EY4_js.DURATION_UNIT.Years]);
11933
11933
  function resolveCardVariant(product) {
11934
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
11934
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Bundle) {
11935
11935
  return "bundle" /* Bundle */;
11936
11936
  }
11937
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
11937
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Composite) {
11938
11938
  return "composite" /* Composite */;
11939
11939
  }
11940
11940
  if (product.quantity_pricing && product.quantity_pricing.length > 1) {
11941
11941
  return "wholesale" /* Wholesale */;
11942
11942
  }
11943
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
11943
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Digital) {
11944
11944
  return "digital" /* Digital */;
11945
11945
  }
11946
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
11946
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Service) {
11947
+ switch (product.boundary_kind) {
11948
+ case chunkT7Z25EY4_js.BOUNDARY_KIND.CheckInOut:
11949
+ return "accommodation" /* Accommodation */;
11950
+ case chunkT7Z25EY4_js.BOUNDARY_KIND.MoveInOut:
11951
+ return "lease" /* Lease */;
11952
+ case chunkT7Z25EY4_js.BOUNDARY_KIND.PickupReturn:
11953
+ case chunkT7Z25EY4_js.BOUNDARY_KIND.DeliveryCollection:
11954
+ case chunkT7Z25EY4_js.BOUNDARY_KIND.AccessVacate:
11955
+ return "rental" /* Rental */;
11956
+ }
11947
11957
  if (product.duration_unit && RENTAL_UNITS.has(product.duration_unit)) {
11948
11958
  return "rental" /* Rental */;
11949
11959
  }
11950
- if (product.duration_unit === chunkIQLJJW2H_js.DURATION_UNIT.Nights) {
11960
+ if (product.duration_unit === chunkT7Z25EY4_js.DURATION_UNIT.Nights) {
11951
11961
  return "accommodation" /* Accommodation */;
11952
11962
  }
11953
11963
  if (product.duration_unit && LEASE_UNITS.has(product.duration_unit)) {
@@ -11958,10 +11968,10 @@ function resolveCardVariant(product) {
11958
11968
  }
11959
11969
  return "standard" /* Standard */;
11960
11970
  }
11961
- if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
11971
+ if (product.render_hint === chunkT7Z25EY4_js.RENDER_HINT.Food) {
11962
11972
  return "food" /* Food */;
11963
11973
  }
11964
- if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
11974
+ if (product.render_hint === chunkT7Z25EY4_js.RENDER_HINT.Physical) {
11965
11975
  return "retail" /* Retail */;
11966
11976
  }
11967
11977
  return "retail" /* Retail */;
@@ -12053,7 +12063,7 @@ function ProductCard({
12053
12063
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-card-body": true, className: cn("p-4 flex flex-col gap-1", classNames?.body), children: [
12054
12064
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-product-card-name": true, className: cn("font-semibold text-foreground leading-tight", classNames?.name), children: product.name }),
12055
12065
  descriptionPreview && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-product-card-description": true, className: cn("text-sm text-muted-foreground line-clamp-2", classNames?.description), children: descriptionPreview }),
12056
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency: chunk7Y2O3E4D_js.getProductCurrency(product), className: cn("text-sm font-medium text-foreground mt-1", classNames?.price) })
12066
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency: chunkPTPOQVXS_js.getProductCurrency(product), className: cn("text-sm font-medium text-foreground mt-1", classNames?.price) })
12057
12067
  ] })
12058
12068
  ] });
12059
12069
  })();
@@ -12219,6 +12229,31 @@ function ProductGrid({
12219
12229
  )
12220
12230
  ] });
12221
12231
  }
12232
+
12233
+ // src/react/utils/boundary-labels.ts
12234
+ var PRESET_LABELS = {
12235
+ check_in_out: { start: "Check-in", end: "Check-out" },
12236
+ pickup_return: { start: "Pickup", end: "Return" },
12237
+ delivery_collection: { start: "Delivery", end: "Collection" },
12238
+ access_vacate: { start: "Access", end: "Vacate" },
12239
+ move_in_out: { start: "Move-in", end: "Move-out" }
12240
+ };
12241
+ function defaultBoundaryKind(unit) {
12242
+ return unit === chunkT7Z25EY4_js.DURATION_UNIT.Nights ? chunkT7Z25EY4_js.BOUNDARY_KIND.CheckInOut : chunkT7Z25EY4_js.BOUNDARY_KIND.PickupReturn;
12243
+ }
12244
+ function resolveBoundaryKind(product) {
12245
+ return product.boundary_kind ?? defaultBoundaryKind(product.duration_unit);
12246
+ }
12247
+ function getBoundaryLabels(product) {
12248
+ const kind = resolveBoundaryKind(product);
12249
+ if (kind === chunkT7Z25EY4_js.BOUNDARY_KIND.Custom) {
12250
+ return {
12251
+ start: product.boundary_start_label?.trim() || "Start",
12252
+ end: product.boundary_end_label?.trim() || "End"
12253
+ };
12254
+ }
12255
+ return PRESET_LABELS[kind];
12256
+ }
12222
12257
  var SearchIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
12223
12258
  "svg",
12224
12259
  {
@@ -12345,7 +12380,7 @@ function SearchInput({
12345
12380
  }
12346
12381
  ),
12347
12382
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-name": true, className: classNames?.resultName, style: { flex: 1, textAlign: "left" }, children: product.name }),
12348
- product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children: chunk7Y2O3E4D_js.formatPrice(product.default_price) })
12383
+ product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children: chunkPTPOQVXS_js.formatPrice(product.default_price) })
12349
12384
  ] })
12350
12385
  },
12351
12386
  product.id
@@ -12840,19 +12875,19 @@ function OrderSummary({
12840
12875
  order.customer_notes.map((note, index) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-order-note": true, children: note }, index))
12841
12876
  ] }),
12842
12877
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-totals": true, className: classNames?.totals, children: [
12843
- order.total_discount != null && chunk7Y2O3E4D_js.parsePrice(order.total_discount) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-discount": true, children: [
12878
+ order.total_discount != null && chunkPTPOQVXS_js.parsePrice(order.total_discount) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-discount": true, children: [
12844
12879
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Discount" }),
12845
12880
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.total_discount, prefix: "-" })
12846
12881
  ] }),
12847
- order.delivery_fee != null && chunk7Y2O3E4D_js.parsePrice(order.delivery_fee) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-delivery-fee": true, children: [
12882
+ order.delivery_fee != null && chunkPTPOQVXS_js.parsePrice(order.delivery_fee) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-delivery-fee": true, children: [
12848
12883
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Delivery fee" }),
12849
12884
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.delivery_fee })
12850
12885
  ] }),
12851
- order.service_charge != null && chunk7Y2O3E4D_js.parsePrice(order.service_charge) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-service-charge": true, children: [
12886
+ order.service_charge != null && chunkPTPOQVXS_js.parsePrice(order.service_charge) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-service-charge": true, children: [
12852
12887
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Service charge" }),
12853
12888
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.service_charge })
12854
12889
  ] }),
12855
- order.tax != null && chunk7Y2O3E4D_js.parsePrice(order.tax) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-tax": true, children: [
12890
+ order.tax != null && chunkPTPOQVXS_js.parsePrice(order.tax) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-tax": true, children: [
12856
12891
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Tax" }),
12857
12892
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.tax })
12858
12893
  ] }),
@@ -13382,7 +13417,7 @@ function BookingPage({
13382
13417
  const hasStaffStep = staff && staff.length > 0;
13383
13418
  const depositType = product?.deposit_type;
13384
13419
  const depositAmount = product?.deposit_amount;
13385
- const hasDeposit = depositType !== void 0 && depositType !== "none" && depositAmount !== void 0 && chunk7Y2O3E4D_js.parsePrice(depositAmount) !== 0;
13420
+ const hasDeposit = depositType !== void 0 && depositType !== "none" && depositAmount !== void 0 && chunkPTPOQVXS_js.parsePrice(depositAmount) !== 0;
13386
13421
  const cancellationMinutes = product?.cancellation_window_minutes;
13387
13422
  const noShowFee = product?.no_show_fee;
13388
13423
  const handleSlotSelect = React14.useCallback(
@@ -13514,14 +13549,14 @@ function BookingPage({
13514
13549
  service.price && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-booking-service-price": true, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: service.price, currency }) }),
13515
13550
  hasDeposit && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-deposit-info": true, className: classNames?.depositInfo, children: [
13516
13551
  "Deposit: ",
13517
- depositType === "percentage" ? `${chunk7Y2O3E4D_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, currency })
13552
+ depositType === "percentage" ? `${chunkPTPOQVXS_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, currency })
13518
13553
  ] }),
13519
13554
  cancellationMinutes !== void 0 && cancellationMinutes > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-cancellation-policy": true, className: classNames?.cancellationPolicy, children: [
13520
13555
  "Free cancellation up to ",
13521
13556
  cancellationMinutes >= 60 ? `${Math.floor(cancellationMinutes / 60)} hour${Math.floor(cancellationMinutes / 60) !== 1 ? "s" : ""}` : `${cancellationMinutes} minute${cancellationMinutes !== 1 ? "s" : ""}`,
13522
13557
  " before"
13523
13558
  ] }),
13524
- noShowFee !== void 0 && chunk7Y2O3E4D_js.parsePrice(noShowFee) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-no-show-fee": true, className: classNames?.cancellationPolicy, children: [
13559
+ noShowFee !== void 0 && chunkPTPOQVXS_js.parsePrice(noShowFee) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-no-show-fee": true, className: classNames?.cancellationPolicy, children: [
13525
13560
  "No-show fee: ",
13526
13561
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: noShowFee, currency })
13527
13562
  ] })
@@ -13599,7 +13634,7 @@ function BookingPage({
13599
13634
  ] }),
13600
13635
  hasDeposit && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: cn(classNames?.summaryRow, classNames?.depositInfo), children: [
13601
13636
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Deposit" }),
13602
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: depositType === "percentage" ? `${chunk7Y2O3E4D_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, currency }) })
13637
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: depositType === "percentage" ? `${chunkPTPOQVXS_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, currency }) })
13603
13638
  ] })
13604
13639
  ] }),
13605
13640
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -14272,10 +14307,10 @@ function DefaultProductLayout({
14272
14307
  className
14273
14308
  }) {
14274
14309
  const [selectedVariantId, setSelectedVariantId] = React14__default.default.useState();
14275
- const images = chunkIQLJJW2H_js.resolveGallery(product, selectedVariantId);
14276
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14310
+ const images = chunkT7Z25EY4_js.resolveGallery(product, selectedVariantId);
14311
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14277
14312
  const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
14278
- const onSale = chunk7Y2O3E4D_js.isOnSale(product);
14313
+ const onSale = chunkPTPOQVXS_js.isOnSale(product);
14279
14314
  const hasPhysicalDetails = product.sku || product.vendor || product.material;
14280
14315
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "default", className: cn("space-y-8", className), children: [
14281
14316
  renderBreadcrumb?.(product),
@@ -14298,13 +14333,13 @@ function DefaultProductLayout({
14298
14333
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsxRuntime.jsx(PriceRange, { product, currency, className: "text-2xl font-extrabold" }) : product.sale ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14299
14334
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.sale.price, currency, className: "text-2xl font-extrabold" }),
14300
14335
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.sale.original, currency, className: "text-lg text-muted-foreground line-through" }),
14301
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: product.sale.badge_text ?? `${Math.round(chunk7Y2O3E4D_js.parsePrice(product.sale.percent_off))}% OFF` })
14336
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: product.sale.badge_text ?? `${Math.round(chunkPTPOQVXS_js.parsePrice(product.sale.percent_off))}% OFF` })
14302
14337
  ] }) : onSale ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14303
14338
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-extrabold" }),
14304
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunk7Y2O3E4D_js.getBasePrice(product), currency, className: "text-lg text-muted-foreground line-through" }),
14339
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkPTPOQVXS_js.getBasePrice(product), currency, className: "text-lg text-muted-foreground line-through" }),
14305
14340
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: [
14306
14341
  "Save ",
14307
- chunk7Y2O3E4D_js.getDiscountPercentage(product),
14342
+ chunkPTPOQVXS_js.getDiscountPercentage(product),
14308
14343
  "%"
14309
14344
  ] })
14310
14345
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, currency, className: "text-2xl font-semibold" }) }),
@@ -14366,7 +14401,7 @@ function FoodProductLayout({
14366
14401
  className
14367
14402
  }) {
14368
14403
  const images = product.images || (product.image_url ? [product.image_url] : []);
14369
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14404
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14370
14405
  const tags = product.tags || [];
14371
14406
  const ingredients = getMetadataStringList(product.metadata, "ingredients");
14372
14407
  const pairings = getMetadataStringList(product.metadata, "pairings");
@@ -14441,7 +14476,7 @@ function WholesaleProductLayout({
14441
14476
  className
14442
14477
  }) {
14443
14478
  const images = product.images || (product.image_url ? [product.image_url] : []);
14444
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14479
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14445
14480
  const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
14446
14481
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "wholesale", className: cn("space-y-8", className), children: [
14447
14482
  renderBreadcrumb?.(product),
@@ -14525,9 +14560,9 @@ function ServiceProductLayout({
14525
14560
  className
14526
14561
  }) {
14527
14562
  const images = product.images || (product.image_url ? [product.image_url] : []);
14528
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14563
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14529
14564
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
14530
- const depositAmount = hasDeposit ? chunk7Y2O3E4D_js.parsePrice(product.deposit_amount) : 0;
14565
+ const depositAmount = hasDeposit ? chunkPTPOQVXS_js.parsePrice(product.deposit_amount) : 0;
14531
14566
  const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
14532
14567
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "service", className: cn("space-y-8", className), children: [
14533
14568
  renderBreadcrumb?.(product),
@@ -14595,7 +14630,7 @@ function ServiceProductLayout({
14595
14630
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, currency, className: "font-medium text-foreground" }),
14596
14631
  " deposit charged at booking"
14597
14632
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14598
- chunk7Y2O3E4D_js.parsePrice(product.deposit_amount),
14633
+ chunkPTPOQVXS_js.parsePrice(product.deposit_amount),
14599
14634
  "% deposit charged at booking"
14600
14635
  ] }) })
14601
14636
  ] })
@@ -14613,10 +14648,10 @@ function ServiceProductLayout({
14613
14648
  }
14614
14649
  var DIGITAL_TYPE_LABELS = {
14615
14650
  download: "Digital download",
14616
- license: "Software license",
14617
- event_ticket: "Event ticket",
14618
- access_pass: "Access pass",
14619
- gift_card: "Gift card"
14651
+ license_key: "Software license",
14652
+ ticket: "Event ticket",
14653
+ access_grant: "Access pass",
14654
+ redemption_code: "Redemption code"
14620
14655
  };
14621
14656
  function DigitalProductLayout({
14622
14657
  product,
@@ -14627,11 +14662,11 @@ function DigitalProductLayout({
14627
14662
  className
14628
14663
  }) {
14629
14664
  const images = product.images || (product.image_url ? [product.image_url] : []);
14630
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14665
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14631
14666
  const typeLabel = product.digital_type ? DIGITAL_TYPE_LABELS[product.digital_type] || product.digital_type : "Digital product";
14632
- const isTicket = product.digital_type === "event_ticket";
14633
- const isAccessPass = product.digital_type === "access_pass";
14634
- const isDownload = product.digital_type === "download" || product.digital_type === "license";
14667
+ const isTicket = product.digital_type === "ticket";
14668
+ const isAccessPass = product.digital_type === "access_grant";
14669
+ const isDownload = product.digital_type === "download" || product.digital_type === "license_key";
14635
14670
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "digital", className: cn("space-y-8", className), children: [
14636
14671
  renderBreadcrumb?.(product),
14637
14672
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -14754,15 +14789,15 @@ function BundleProductLayout({
14754
14789
  className
14755
14790
  }) {
14756
14791
  const images = product.images || (product.image_url ? [product.image_url] : []);
14757
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14792
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14758
14793
  const components = product.components || [];
14759
- const onSale = chunk7Y2O3E4D_js.isOnSale(product);
14760
- const discount = chunk7Y2O3E4D_js.getDiscountPercentage(product);
14794
+ const onSale = chunkPTPOQVXS_js.isOnSale(product);
14795
+ const discount = chunkPTPOQVXS_js.getDiscountPercentage(product);
14761
14796
  const baseTotal = components.reduce(
14762
- (sum, c) => sum + chunk7Y2O3E4D_js.parsePrice(c.effective_price ?? 0) * (c.quantity ?? 1),
14797
+ (sum, c) => sum + chunkPTPOQVXS_js.parsePrice(c.effective_price ?? 0) * (c.quantity ?? 1),
14763
14798
  0
14764
14799
  );
14765
- const bundlePrice = chunk7Y2O3E4D_js.parsePrice(product.default_price);
14800
+ const bundlePrice = chunkPTPOQVXS_js.parsePrice(product.default_price);
14766
14801
  const savings = baseTotal > bundlePrice ? baseTotal - bundlePrice : 0;
14767
14802
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "bundle", className: cn("space-y-8", className), children: [
14768
14803
  renderBreadcrumb?.(product),
@@ -14838,7 +14873,7 @@ function CompositeProductLayout({
14838
14873
  className
14839
14874
  }) {
14840
14875
  const images = product.images || (product.image_url ? [product.image_url] : []);
14841
- const currency = chunk7Y2O3E4D_js.getProductCurrency(product);
14876
+ const currency = chunkPTPOQVXS_js.getProductCurrency(product);
14842
14877
  const groups = product.groups || [];
14843
14878
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "composite", className: cn("space-y-8", className), children: [
14844
14879
  renderBreadcrumb?.(product),
@@ -14919,25 +14954,25 @@ function resolveTemplateKey(product) {
14919
14954
  if (typeof metaTemplate === "string" && metaTemplate.trim()) {
14920
14955
  return metaTemplate.trim();
14921
14956
  }
14922
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
14957
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Bundle) {
14923
14958
  return "bundle" /* Bundle */;
14924
14959
  }
14925
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
14960
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Composite) {
14926
14961
  return "composite" /* Composite */;
14927
14962
  }
14928
14963
  if (product.quantity_pricing && product.quantity_pricing.length > 1) {
14929
14964
  return "wholesale" /* Wholesale */;
14930
14965
  }
14931
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
14966
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Service) {
14932
14967
  return "service" /* Service */;
14933
14968
  }
14934
- if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
14969
+ if (product.type === chunkT7Z25EY4_js.PRODUCT_TYPE.Digital) {
14935
14970
  return "digital" /* Digital */;
14936
14971
  }
14937
- if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
14972
+ if (product.render_hint === chunkT7Z25EY4_js.RENDER_HINT.Food) {
14938
14973
  return "food" /* Food */;
14939
14974
  }
14940
- if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
14975
+ if (product.render_hint === chunkT7Z25EY4_js.RENDER_HINT.Physical) {
14941
14976
  return "physical" /* Physical */;
14942
14977
  }
14943
14978
  return "default" /* Default */;
@@ -15261,7 +15296,7 @@ function CartDrawer({
15261
15296
  }) {
15262
15297
  const { isOpen, close } = useCartDrawer();
15263
15298
  const cart = useCart();
15264
- const subtotalNum = chunk7Y2O3E4D_js.parsePrice(cart.subtotal);
15299
+ const subtotalNum = chunkPTPOQVXS_js.parsePrice(cart.subtotal);
15265
15300
  const animatedSubtotal = useAnimatedNumber(subtotalNum);
15266
15301
  React14.useEffect(() => {
15267
15302
  if (!isOpen) return;
@@ -15655,9 +15690,9 @@ function CatalogueCollectionLayout({
15655
15690
  result = result.filter((p) => p.tags?.includes(activeCategory));
15656
15691
  }
15657
15692
  if (sortBy === "price-asc") {
15658
- result = [...result].sort((a, b) => chunk7Y2O3E4D_js.parsePrice(a.default_price) - chunk7Y2O3E4D_js.parsePrice(b.default_price));
15693
+ result = [...result].sort((a, b) => chunkPTPOQVXS_js.parsePrice(a.default_price) - chunkPTPOQVXS_js.parsePrice(b.default_price));
15659
15694
  } else if (sortBy === "price-desc") {
15660
- result = [...result].sort((a, b) => chunk7Y2O3E4D_js.parsePrice(b.default_price) - chunk7Y2O3E4D_js.parsePrice(a.default_price));
15695
+ result = [...result].sort((a, b) => chunkPTPOQVXS_js.parsePrice(b.default_price) - chunkPTPOQVXS_js.parsePrice(a.default_price));
15661
15696
  } else if (sortBy === "name") {
15662
15697
  result = [...result].sort((a, b) => a.name.localeCompare(b.name));
15663
15698
  }
@@ -16694,7 +16729,7 @@ function CurrencySelector({
16694
16729
  ),
16695
16730
  children: renderCurrency ? renderCurrency(currency, isActive, rate) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16696
16731
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-currency-label": true, className: classNames?.label, children: currency }),
16697
- showRate && baseCurrency && currency !== baseCurrency && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-currency-rate": true, className: classNames?.rate, children: isLoadingRates ? "..." : rate ? `1 ${baseCurrency} = ${rate.rate.toFixed(4)} ${currency}` : null })
16732
+ showRate && baseCurrency && currency !== baseCurrency && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-currency-rate": true, className: classNames?.rate, children: isLoadingRates ? "..." : rate ? `1 ${baseCurrency} = ${Number(rate.rate).toFixed(4)} ${currency}` : null })
16698
16733
  ] })
16699
16734
  },
16700
16735
  currency
@@ -17190,7 +17225,7 @@ function SparkleIcon({ className }) {
17190
17225
 
17191
17226
  Object.defineProperty(exports, "getVariantDisplayName", {
17192
17227
  enumerable: true,
17193
- get: function () { return chunkIQLJJW2H_js.getVariantDisplayName; }
17228
+ get: function () { return chunkT7Z25EY4_js.getVariantDisplayName; }
17194
17229
  });
17195
17230
  exports.AccommodationCard = AccommodationCard;
17196
17231
  exports.AccountContent = AccountContent;
@@ -17370,8 +17405,11 @@ exports.WholesaleProductCard = WholesaleProductCard;
17370
17405
  exports.WholesaleProductLayout = WholesaleProductLayout;
17371
17406
  exports.WishlistButton = WishlistButton;
17372
17407
  exports.cn = cn;
17408
+ exports.defaultBoundaryKind = defaultBoundaryKind;
17409
+ exports.getBoundaryLabels = getBoundaryLabels;
17373
17410
  exports.prefetchProduct = prefetchProduct;
17374
17411
  exports.prefetchProducts = prefetchProducts;
17412
+ exports.resolveBoundaryKind = resolveBoundaryKind;
17375
17413
  exports.roomToResource = roomToResource;
17376
17414
  exports.sanitizeRichTextHtml = sanitizeRichTextHtml;
17377
17415
  exports.stripHtmlToText = stripHtmlToText;