@cimplify/sdk 0.45.5 → 0.46.1

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 (47) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +22 -22
  4. package/dist/advanced.mjs +3 -3
  5. package/dist/{chunk-XPXAZXF2.mjs → chunk-3HXYEK5K.mjs} +2 -2
  6. package/dist/{chunk-K6FCVLZA.js → chunk-4KNCSWE4.js} +234 -234
  7. package/dist/{chunk-RQ3ILHUQ.mjs → chunk-5LZNTG4V.mjs} +1 -1
  8. package/dist/{chunk-GVLWRI5I.js → chunk-6V67MAWO.js} +49 -25
  9. package/dist/{chunk-RR3ZJQW5.mjs → chunk-7H2DYO4T.mjs} +4 -4
  10. package/dist/{chunk-NRT6PVW5.mjs → chunk-7RRVM2X2.mjs} +1 -1
  11. package/dist/{chunk-IF22UYTT.mjs → chunk-AUS4B7PA.mjs} +2 -2
  12. package/dist/{chunk-QBQCMQ4F.js → chunk-DETRNWHF.js} +2 -2
  13. package/dist/{chunk-LLZZMHSU.js → chunk-HNPVZGTO.js} +62 -62
  14. package/dist/{chunk-BGCEKFLA.js → chunk-MN4PNKJA.js} +40 -0
  15. package/dist/{chunk-ZH6ZST5T.js → chunk-NKZ5YN5D.js} +4 -4
  16. package/dist/{chunk-IRJFDKFV.mjs → chunk-NRDRVZ62.mjs} +37 -1
  17. package/dist/{chunk-AIXUFSA6.mjs → chunk-UJ5BBLKL.mjs} +29 -5
  18. package/dist/{chunk-BN2CXGMO.js → chunk-Z3CHDA24.js} +3 -3
  19. package/dist/{client-aZInadOY.d.ts → client-B9r5rH3O.d.ts} +3 -0
  20. package/dist/{client-MUD63aYS.d.mts → client-BScRT1Rz.d.mts} +1 -1
  21. package/dist/{client-BDYBB-ME.d.ts → client-D7nI2XmP.d.ts} +1 -1
  22. package/dist/{client-CDUY-6nC.d.mts → client-DyrpQRza.d.mts} +3 -0
  23. package/dist/index.d.mts +16 -2
  24. package/dist/index.d.ts +16 -2
  25. package/dist/index.js +129 -113
  26. package/dist/index.mjs +5 -5
  27. package/dist/react.d.mts +1 -1
  28. package/dist/react.d.ts +1 -1
  29. package/dist/react.js +130 -130
  30. package/dist/react.mjs +6 -6
  31. package/dist/server.d.mts +2 -2
  32. package/dist/server.d.ts +2 -2
  33. package/dist/server.js +6 -6
  34. package/dist/server.mjs +4 -4
  35. package/dist/testing/msw.js +3 -3
  36. package/dist/testing/msw.mjs +2 -2
  37. package/dist/testing/suite.d.mts +2 -2
  38. package/dist/testing/suite.d.ts +2 -2
  39. package/dist/testing/suite.js +25 -25
  40. package/dist/testing/suite.mjs +6 -6
  41. package/dist/testing.d.mts +2 -2
  42. package/dist/testing.d.ts +2 -2
  43. package/dist/testing.js +81 -81
  44. package/dist/testing.mjs +7 -7
  45. package/dist/utils.js +29 -29
  46. package/dist/utils.mjs +2 -2
  47. package/package.json +1 -1
@@ -82,8 +82,48 @@ var INPUT_FIELD_TYPE = {
82
82
  Location: "location"
83
83
  };
84
84
 
85
+ // src/assets/url.ts
86
+ var DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
87
+ var CIMPLIFY_CDN_HOSTS = [
88
+ "storefrontassetscdn.cimplify.io",
89
+ "cdn.cimplify.io",
90
+ "static-tmp.cimplify.io"
91
+ ];
92
+ var ABSOLUTE_URL_RE = /^https?:\/\//i;
93
+ var MOCK_PASSTHROUGH_RE = /^\/(img|elements|_mock)\//;
94
+ function assetUrl(path, opts = {}) {
95
+ if (!path) return path;
96
+ if (ABSOLUTE_URL_RE.test(path)) return appendTransform(path, opts);
97
+ if (MOCK_PASSTHROUGH_RE.test(path)) return appendTransform(path, opts);
98
+ const base = (opts.base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
99
+ const normalized = path.replace(/^\/+/, "");
100
+ return appendTransform(`${base}/${normalized}`, opts);
101
+ }
102
+ function isCimplifyAsset(src, base) {
103
+ if (!src) return false;
104
+ if (!ABSOLUTE_URL_RE.test(src)) return true;
105
+ if (MOCK_PASSTHROUGH_RE.test(src)) return true;
106
+ const resolvedBase = (base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
107
+ if (resolvedBase && src.startsWith(resolvedBase)) return true;
108
+ return CIMPLIFY_CDN_HOSTS.some((host) => src.startsWith(`https://${host}/`));
109
+ }
110
+ function appendTransform(url, t) {
111
+ const params = new URLSearchParams();
112
+ if (t.w != null) params.set("w", String(t.w));
113
+ if (t.h != null) params.set("h", String(t.h));
114
+ if (t.quality != null) params.set("quality", String(t.quality));
115
+ if (t.format != null) params.set("format", t.format);
116
+ const query = params.toString();
117
+ if (!query) return url;
118
+ return `${url}${url.includes("?") ? "&" : "?"}${query}`;
119
+ }
120
+
121
+ exports.CIMPLIFY_CDN_HOSTS = CIMPLIFY_CDN_HOSTS;
122
+ exports.DEFAULT_CDN_BASE_URL = DEFAULT_CDN_BASE_URL;
85
123
  exports.DURATION_UNIT = DURATION_UNIT;
86
124
  exports.INPUT_FIELD_TYPE = INPUT_FIELD_TYPE;
87
125
  exports.PRODUCT_TYPE = PRODUCT_TYPE;
88
126
  exports.RENDER_HINT = RENDER_HINT;
127
+ exports.assetUrl = assetUrl;
89
128
  exports.getVariantDisplayName = getVariantDisplayName;
129
+ exports.isCimplifyAsset = isCimplifyAsset;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkLLZZMHSU_js = require('./chunk-LLZZMHSU.js');
4
- var chunkK6FCVLZA_js = require('./chunk-K6FCVLZA.js');
3
+ var chunkHNPVZGTO_js = require('./chunk-HNPVZGTO.js');
4
+ var chunk4KNCSWE4_js = require('./chunk-4KNCSWE4.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  var cimplifyRegistry = zod.z.registry();
@@ -595,7 +595,7 @@ async function toForwardedRequest(input, init) {
595
595
  };
596
596
  }
597
597
  function createTestClient(options = {}) {
598
- const mock = chunkK6FCVLZA_js.createMockApp(options);
598
+ const mock = chunk4KNCSWE4_js.createMockApp(options);
599
599
  let sessionToken;
600
600
  const fetchImpl = async (input, init) => {
601
601
  const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
@@ -614,7 +614,7 @@ function createTestClient(options = {}) {
614
614
  if (echoed) sessionToken = echoed;
615
615
  return res;
616
616
  };
617
- const client = chunkLLZZMHSU_js.createCimplifyClient({
617
+ const client = chunkHNPVZGTO_js.createCimplifyClient({
618
618
  baseUrl: TEST_BASE_URL,
619
619
  // Link mock lives at /v1/link on the same Hono app, so point the SDK's
620
620
  // separate Link transport at the same TEST_BASE_URL.
@@ -80,4 +80,40 @@ var INPUT_FIELD_TYPE = {
80
80
  Location: "location"
81
81
  };
82
82
 
83
- export { DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, getVariantDisplayName };
83
+ // src/assets/url.ts
84
+ var DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
85
+ var CIMPLIFY_CDN_HOSTS = [
86
+ "storefrontassetscdn.cimplify.io",
87
+ "cdn.cimplify.io",
88
+ "static-tmp.cimplify.io"
89
+ ];
90
+ var ABSOLUTE_URL_RE = /^https?:\/\//i;
91
+ var MOCK_PASSTHROUGH_RE = /^\/(img|elements|_mock)\//;
92
+ function assetUrl(path, opts = {}) {
93
+ if (!path) return path;
94
+ if (ABSOLUTE_URL_RE.test(path)) return appendTransform(path, opts);
95
+ if (MOCK_PASSTHROUGH_RE.test(path)) return appendTransform(path, opts);
96
+ const base = (opts.base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
97
+ const normalized = path.replace(/^\/+/, "");
98
+ return appendTransform(`${base}/${normalized}`, opts);
99
+ }
100
+ function isCimplifyAsset(src, base) {
101
+ if (!src) return false;
102
+ if (!ABSOLUTE_URL_RE.test(src)) return true;
103
+ if (MOCK_PASSTHROUGH_RE.test(src)) return true;
104
+ const resolvedBase = (base ?? DEFAULT_CDN_BASE_URL).replace(/\/+$/, "");
105
+ if (resolvedBase && src.startsWith(resolvedBase)) return true;
106
+ return CIMPLIFY_CDN_HOSTS.some((host) => src.startsWith(`https://${host}/`));
107
+ }
108
+ function appendTransform(url, t) {
109
+ const params = new URLSearchParams();
110
+ if (t.w != null) params.set("w", String(t.w));
111
+ if (t.h != null) params.set("h", String(t.h));
112
+ if (t.quality != null) params.set("quality", String(t.quality));
113
+ if (t.format != null) params.set("format", t.format);
114
+ const query = params.toString();
115
+ if (!query) return url;
116
+ return `${url}${url.includes("?") ? "&" : "?"}${query}`;
117
+ }
118
+
119
+ export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, assetUrl, getVariantDisplayName, isCimplifyAsset };
@@ -1,5 +1,5 @@
1
- import { isPaymentStatusRequiresAction, normalizeStatusResponse, isPaymentStatusSuccess, isPaymentStatusFailure } from './chunk-NRT6PVW5.mjs';
2
- import { CimplifyError, currencyCode, ErrorCode, enrichError, getErrorHint } from './chunk-XPXAZXF2.mjs';
1
+ import { isPaymentStatusRequiresAction, normalizeStatusResponse, isPaymentStatusSuccess, isPaymentStatusFailure } from './chunk-7RRVM2X2.mjs';
2
+ import { CimplifyError, currencyCode, ErrorCode, enrichError, getErrorHint } from './chunk-3HXYEK5K.mjs';
3
3
 
4
4
  // src/types/result.ts
5
5
  function ok(value) {
@@ -2730,6 +2730,8 @@ var CimplifyElement = class {
2730
2730
  this.iframe = null;
2731
2731
  this.container = null;
2732
2732
  this.mounted = false;
2733
+ this.ready = false;
2734
+ this.pendingMessages = [];
2733
2735
  this.pendingInit = null;
2734
2736
  this.eventHandlers = /* @__PURE__ */ new Map();
2735
2737
  this.resolvers = /* @__PURE__ */ new Map();
@@ -2771,6 +2773,8 @@ var CimplifyElement = class {
2771
2773
  }
2772
2774
  this.container = null;
2773
2775
  this.mounted = false;
2776
+ this.ready = false;
2777
+ this.pendingMessages = [];
2774
2778
  this.eventHandlers.clear();
2775
2779
  this.resolvers.forEach((entry) => clearTimeout(entry.timeoutId));
2776
2780
  this.resolvers.clear();
@@ -2811,10 +2815,28 @@ var CimplifyElement = class {
2811
2815
  this.sendMessage({ type: MESSAGE_TYPES.SET_CART, cart });
2812
2816
  }
2813
2817
  sendMessage(message) {
2814
- if (this.iframe?.contentWindow) {
2818
+ const iframe = this.iframe;
2819
+ if (!iframe || !iframe.isConnected) {
2820
+ if (iframe && !iframe.isConnected) {
2821
+ console.warn(
2822
+ "[cimplify:checkout] sendMessage DROPPED \u2014 iframe detached",
2823
+ { type: message.type }
2824
+ );
2825
+ }
2826
+ return;
2827
+ }
2828
+ if (!this.ready || !iframe.contentWindow) {
2829
+ this.pendingMessages.push(message);
2830
+ return;
2831
+ }
2832
+ iframe.contentWindow.postMessage(message, this.linkUrl);
2833
+ }
2834
+ flushPending() {
2835
+ if (!this.ready || !this.iframe?.contentWindow) return;
2836
+ const queue = this.pendingMessages;
2837
+ this.pendingMessages = [];
2838
+ for (const message of queue) {
2815
2839
  this.iframe.contentWindow.postMessage(message, this.linkUrl);
2816
- } else {
2817
- console.warn("[cimplify:checkout] sendMessage DROPPED \u2014 no contentWindow", { type: message.type, hasIframe: !!this.iframe, isConnected: this.iframe?.isConnected });
2818
2840
  }
2819
2841
  }
2820
2842
  getContentWindow() {
@@ -2879,6 +2901,7 @@ var CimplifyElement = class {
2879
2901
  if (!message) return;
2880
2902
  switch (message.type) {
2881
2903
  case MESSAGE_TYPES.READY:
2904
+ this.ready = true;
2882
2905
  if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
2883
2906
  if (this.pendingInit) {
2884
2907
  const { publicKey } = this.pendingInit;
@@ -2900,6 +2923,7 @@ var CimplifyElement = class {
2900
2923
  }
2901
2924
  this.pendingInit = null;
2902
2925
  }
2926
+ this.flushPending();
2903
2927
  this.emit(EVENT_TYPES.READY, { height: message.height });
2904
2928
  break;
2905
2929
  case MESSAGE_TYPES.HEIGHT_CHANGE:
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkQBQCMQ4F_js = require('./chunk-QBQCMQ4F.js');
3
+ var chunkDETRNWHF_js = require('./chunk-DETRNWHF.js');
4
4
 
5
5
  // src/utils/price.ts
6
6
  var CURRENCY_SYMBOLS = {
@@ -440,14 +440,14 @@ function normalizeStatusResponse(response) {
440
440
  return {
441
441
  status: "pending",
442
442
  paid: false,
443
- amount: chunkQBQCMQ4F_js.moneyFromNumber(0),
443
+ amount: chunkDETRNWHF_js.moneyFromNumber(0),
444
444
  currency: "",
445
445
  message: "No status available"
446
446
  };
447
447
  }
448
448
  const res = response;
449
449
  const normalizedStatus = normalizePaymentStatusValue(res.status ?? void 0);
450
- const normalizedAmount = typeof res.amount === "string" ? chunkQBQCMQ4F_js.money(res.amount) : typeof res.amount === "number" && Number.isFinite(res.amount) ? chunkQBQCMQ4F_js.moneyFromNumber(res.amount) : chunkQBQCMQ4F_js.moneyFromNumber(0);
450
+ const normalizedAmount = typeof res.amount === "string" ? chunkDETRNWHF_js.money(res.amount) : typeof res.amount === "number" && Number.isFinite(res.amount) ? chunkDETRNWHF_js.moneyFromNumber(res.amount) : chunkDETRNWHF_js.moneyFromNumber(0);
451
451
  const normalizedCurrency = typeof res.currency === "string" && res.currency.trim().length > 0 ? res.currency : "";
452
452
  const paidValue = res.paid === true;
453
453
  const derivedPaid = paidValue || [
@@ -2299,6 +2299,8 @@ declare class CimplifyElement {
2299
2299
  private iframe;
2300
2300
  private container;
2301
2301
  private mounted;
2302
+ private ready;
2303
+ private pendingMessages;
2302
2304
  private pendingInit;
2303
2305
  private eventHandlers;
2304
2306
  private resolvers;
@@ -2312,6 +2314,7 @@ declare class CimplifyElement {
2312
2314
  getData(): Promise<unknown>;
2313
2315
  setCart(cart: CheckoutCartData): void;
2314
2316
  sendMessage(message: ParentToIframeMessage): void;
2317
+ private flushPending;
2315
2318
  getContentWindow(): Window | null;
2316
2319
  isMounted(): boolean;
2317
2320
  private createIframe;
@@ -1,4 +1,4 @@
1
- import { C as CimplifyClient } from './client-CDUY-6nC.mjs';
1
+ import { C as CimplifyClient } from './client-DyrpQRza.mjs';
2
2
  import { C as CreateAppOptions, A as AppHandle } from './server-kakjHRgj.mjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as CimplifyClient } from './client-aZInadOY.js';
1
+ import { C as CimplifyClient } from './client-B9r5rH3O.js';
2
2
  import { C as CreateAppOptions, A as AppHandle } from './server-Bg3VtA1D.js';
3
3
 
4
4
  /**
@@ -2299,6 +2299,8 @@ declare class CimplifyElement {
2299
2299
  private iframe;
2300
2300
  private container;
2301
2301
  private mounted;
2302
+ private ready;
2303
+ private pendingMessages;
2302
2304
  private pendingInit;
2303
2305
  private eventHandlers;
2304
2306
  private resolvers;
@@ -2312,6 +2314,7 @@ declare class CimplifyElement {
2312
2314
  getData(): Promise<unknown>;
2313
2315
  setCart(cart: CheckoutCartData): void;
2314
2316
  sendMessage(message: ParentToIframeMessage): void;
2317
+ private flushPending;
2315
2318
  getContentWindow(): Window | null;
2316
2319
  isMounted(): boolean;
2317
2320
  private createIframe;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { aC as AUTHORIZATION_TYPE, aH as AUTH_MUTATION, ar as AbortablePromise, K as ActivityRecommendation, M as ActivityRecommendationsResponse, s as ActivityService, J as ActivityStateResponse, cJ as AddressData, da as AddressInfo, bf as AmountToPay, cU as AuthResponse, A as AuthService, n as AuthStatus, dc as AuthenticatedCustomer, de as AuthenticatedData, x as AutocompletePrediction, y as AutocompleteResponse, cz as AvailabilityResult, cf as AvailableSlot, ci as Booking, cs as BookingModificationType, ch as BookingStatus, cj as BookingWithDetails, bB as BufferTimes, bW as Business, c8 as BusinessHours, bV as BusinessPreferences, B as BusinessService, c7 as BusinessSettings, bU as BusinessType, c5 as BusinessWithLocations, av as CHECKOUT_MODE, aI as CHECKOUT_MUTATION, ay as CHECKOUT_STEP, aE as CONTACT_TYPE, cq as CancelBookingInput, cr as CancelBookingResult, bv as CancelOrderInput, bD as CancellationPolicy, j as CartOperations, b as CatalogueQueries, b2 as CatalogueResult, b3 as CatalogueSnapshot, c9 as CategoryInfo, $ as ChatAttachment, Z as ChatConversation, _ as ChatConversationResponse, Y as ChatMessage, a0 as ChatWidgetStarter, cn as CheckSlotAvailabilityInput, co as CheckSlotAvailabilityResult, cX as CheckoutAddressInfo, di as CheckoutCartData, dh as CheckoutCartItem, cZ as CheckoutCustomerInfo, aj as CheckoutFormData, bt as CheckoutInput, af as CheckoutMode, l as CheckoutOperations, ag as CheckoutOrderType, ah as CheckoutPaymentMethod, ak as CheckoutResult, l as CheckoutService, ap as CheckoutStatus, aq as CheckoutStatusContext, ai as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, a6 as CimplifyElement, a5 as CimplifyElements, au as ContactType, a2 as ContentType, cF as CreateAddressInput, cH as CreateMobileMoneyInput, cA as Customer, cB as CustomerAddress, cl as CustomerBooking, ck as CustomerBookingServiceItem, cD as CustomerLinkPreferences, cC as CustomerMobileMoney, bA as CustomerServicePreferences, aM as DEFAULT_COUNTRY, aL as DEFAULT_CURRENCY, aD as DEVICE_TYPE, cg as DayAvailability, bP as DeliveryFeeDetails, W as DeliveryFeeResponse, V as DeliveryService, bK as DepositResult, at as DeviceType, N as DismissMessageResponse, aa as ELEMENT_TYPES, a9 as EVENT_TYPES, d9 as ElementAppearance, dl as ElementEventHandler, ae as ElementEventType, ac as ElementOptions, ad as ElementType, df as ElementsCheckoutData, dg as ElementsCheckoutResult, dd as ElementsCustomerInfo, ab as ElementsOptions, cL as EnrollAndLinkOrderInput, cO as EnrollAndLinkOrderResult, cI as EnrollmentData, aP as Err, be as FeeBearerType, F as FetchQuoteInput, bc as FulfillmentLink, bb as FulfillmentStatus, ba as FulfillmentType, c$ as FxQuote, c_ as FxQuoteRequest, d0 as FxRateResponse, r as FxService, cm as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, dk as IframeToParentMessage, I as InventoryService, aG as LINK_MUTATION, aF as LINK_QUERY, bg as LineItem, b7 as LineType, cE as LinkData, cN as LinkEnrollResult, L as LinkService, cP as LinkSession, cM as LinkStatusResult, a3 as LiteBootstrap, q as LiteService, bZ as Location, bN as LocationBooking, bX as LocationTaxBehavior, bY as LocationTaxOverrides, c0 as LocationTimeProfile, c6 as LocationWithDetails, a8 as MESSAGE_TYPES, aB as MOBILE_MONEY_PROVIDER, cK as MobileMoneyData, cY as MobileMoneyDetails, as as MobileMoneyProvider, al as NextAction, aK as ORDER_MUTATION, aw as ORDER_TYPE, d7 as ObservabilityHooks, aO as Ok, bh as Order, b6 as OrderChannel, bs as OrderFilter, bd as OrderFulfillmentSummary, bm as OrderGroup, bq as OrderGroupDetails, bn as OrderGroupPayment, bk as OrderGroupPaymentState, bl as OrderGroupPaymentStatus, bp as OrderGroupPaymentSummary, bj as OrderGroupStatus, bi as OrderHistory, b8 as OrderLineState, b9 as OrderLineStatus, br as OrderPaymentEvent, O as OrderQueries, bo as OrderSplitDetail, b4 as OrderStatus, d8 as OrderType, o as OtpResult, ax as PAYMENT_METHOD, aJ as PAYMENT_MUTATION, az as PAYMENT_STATE, aA as PICKUP_TIME_TYPE, dj as ParentToIframeMessage, db as PaymentMethodInfo, b5 as PaymentState, cW as PickupTime, cV as PickupTimeType, z as PlaceDetailsResponse, w as PlacesService, P as PriceQuote, bF as PricingOverrides, ao as ProcessAndResolveOptions, am as ProcessCheckoutOptions, an as ProcessCheckoutResult, bO as ProviderResolutionSource, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, bw as RefundOrderInput, bS as RelatedCandidate, bR as RelatedProduct, bT as RelatedProductsEnrichment, bQ as RelationType, bz as ReminderMethod, bC as ReminderSettings, k as ReorderResult, d1 as RequestContext, d4 as RequestErrorEvent, cS as RequestOtpInput, h as RequestSource, d2 as RequestStartEvent, d3 as RequestSuccessEvent, cp as RescheduleBookingInput, ct as RescheduleBookingResult, cw as RescheduleHistoryRecord, bI as ResourceAssignment, aN as Result, d5 as RetryEvent, cR as RevokeAllSessionsResult, cQ as RevokeSessionResult, c2 as Room, bG as SchedulingMetadata, bJ as SchedulingResult, p as SchedulingService, a1 as SenderType, ca as Service, cu as ServiceAvailabilityParams, cv as ServiceAvailabilityResult, c3 as ServiceCharge, bE as ServiceNotes, bL as ServiceScheduleRequest, bx as ServiceStatus, H as SessionActivityData, d6 as SessionChangeEvent, E as SessionMessage, cd as SlotResourceInfo, ce as SlotStaffInfo, cb as Staff, bH as StaffAssignment, by as StaffRole, bM as StaffScheduleItem, cy as StockLevel, cx as StockStatus, c4 as StorefrontBootstrap, S as SubscriptionService, X as SupportService, c1 as Table, a4 as TableInfo, b_ as TimeRange, b$ as TimeRanges, cc as TimeSlot, D as TrackCategoryViewOptions, T as TrackProductViewOptions, cG as UpdateAddressInput, bu as UpdateOrderStatusInput, U as UpdateProfileInput, v as UploadInitResponse, u as UploadResult, t as UploadService, cT as VerifyOtpInput, b0 as combine, b1 as combineObject, c as createCimplifyClient, a7 as createElements, aR as err, aW as flatMap, a_ as fromPromise, aX as getOrElse, aT as isErr, aS as isOk, aV as mapError, aU as mapResult, aQ as ok, aZ as toNullable, a$ as tryCatch, aY as unwrap } from './client-CDUY-6nC.mjs';
1
+ export { aC as AUTHORIZATION_TYPE, aH as AUTH_MUTATION, ar as AbortablePromise, K as ActivityRecommendation, M as ActivityRecommendationsResponse, s as ActivityService, J as ActivityStateResponse, cJ as AddressData, da as AddressInfo, bf as AmountToPay, cU as AuthResponse, A as AuthService, n as AuthStatus, dc as AuthenticatedCustomer, de as AuthenticatedData, x as AutocompletePrediction, y as AutocompleteResponse, cz as AvailabilityResult, cf as AvailableSlot, ci as Booking, cs as BookingModificationType, ch as BookingStatus, cj as BookingWithDetails, bB as BufferTimes, bW as Business, c8 as BusinessHours, bV as BusinessPreferences, B as BusinessService, c7 as BusinessSettings, bU as BusinessType, c5 as BusinessWithLocations, av as CHECKOUT_MODE, aI as CHECKOUT_MUTATION, ay as CHECKOUT_STEP, aE as CONTACT_TYPE, cq as CancelBookingInput, cr as CancelBookingResult, bv as CancelOrderInput, bD as CancellationPolicy, j as CartOperations, b as CatalogueQueries, b2 as CatalogueResult, b3 as CatalogueSnapshot, c9 as CategoryInfo, $ as ChatAttachment, Z as ChatConversation, _ as ChatConversationResponse, Y as ChatMessage, a0 as ChatWidgetStarter, cn as CheckSlotAvailabilityInput, co as CheckSlotAvailabilityResult, cX as CheckoutAddressInfo, di as CheckoutCartData, dh as CheckoutCartItem, cZ as CheckoutCustomerInfo, aj as CheckoutFormData, bt as CheckoutInput, af as CheckoutMode, l as CheckoutOperations, ag as CheckoutOrderType, ah as CheckoutPaymentMethod, ak as CheckoutResult, l as CheckoutService, ap as CheckoutStatus, aq as CheckoutStatusContext, ai as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, a6 as CimplifyElement, a5 as CimplifyElements, au as ContactType, a2 as ContentType, cF as CreateAddressInput, cH as CreateMobileMoneyInput, cA as Customer, cB as CustomerAddress, cl as CustomerBooking, ck as CustomerBookingServiceItem, cD as CustomerLinkPreferences, cC as CustomerMobileMoney, bA as CustomerServicePreferences, aM as DEFAULT_COUNTRY, aL as DEFAULT_CURRENCY, aD as DEVICE_TYPE, cg as DayAvailability, bP as DeliveryFeeDetails, W as DeliveryFeeResponse, V as DeliveryService, bK as DepositResult, at as DeviceType, N as DismissMessageResponse, aa as ELEMENT_TYPES, a9 as EVENT_TYPES, d9 as ElementAppearance, dl as ElementEventHandler, ae as ElementEventType, ac as ElementOptions, ad as ElementType, df as ElementsCheckoutData, dg as ElementsCheckoutResult, dd as ElementsCustomerInfo, ab as ElementsOptions, cL as EnrollAndLinkOrderInput, cO as EnrollAndLinkOrderResult, cI as EnrollmentData, aP as Err, be as FeeBearerType, F as FetchQuoteInput, bc as FulfillmentLink, bb as FulfillmentStatus, ba as FulfillmentType, c$ as FxQuote, c_ as FxQuoteRequest, d0 as FxRateResponse, r as FxService, cm as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, dk as IframeToParentMessage, I as InventoryService, aG as LINK_MUTATION, aF as LINK_QUERY, bg as LineItem, b7 as LineType, cE as LinkData, cN as LinkEnrollResult, L as LinkService, cP as LinkSession, cM as LinkStatusResult, a3 as LiteBootstrap, q as LiteService, bZ as Location, bN as LocationBooking, bX as LocationTaxBehavior, bY as LocationTaxOverrides, c0 as LocationTimeProfile, c6 as LocationWithDetails, a8 as MESSAGE_TYPES, aB as MOBILE_MONEY_PROVIDER, cK as MobileMoneyData, cY as MobileMoneyDetails, as as MobileMoneyProvider, al as NextAction, aK as ORDER_MUTATION, aw as ORDER_TYPE, d7 as ObservabilityHooks, aO as Ok, bh as Order, b6 as OrderChannel, bs as OrderFilter, bd as OrderFulfillmentSummary, bm as OrderGroup, bq as OrderGroupDetails, bn as OrderGroupPayment, bk as OrderGroupPaymentState, bl as OrderGroupPaymentStatus, bp as OrderGroupPaymentSummary, bj as OrderGroupStatus, bi as OrderHistory, b8 as OrderLineState, b9 as OrderLineStatus, br as OrderPaymentEvent, O as OrderQueries, bo as OrderSplitDetail, b4 as OrderStatus, d8 as OrderType, o as OtpResult, ax as PAYMENT_METHOD, aJ as PAYMENT_MUTATION, az as PAYMENT_STATE, aA as PICKUP_TIME_TYPE, dj as ParentToIframeMessage, db as PaymentMethodInfo, b5 as PaymentState, cW as PickupTime, cV as PickupTimeType, z as PlaceDetailsResponse, w as PlacesService, P as PriceQuote, bF as PricingOverrides, ao as ProcessAndResolveOptions, am as ProcessCheckoutOptions, an as ProcessCheckoutResult, bO as ProviderResolutionSource, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, bw as RefundOrderInput, bS as RelatedCandidate, bR as RelatedProduct, bT as RelatedProductsEnrichment, bQ as RelationType, bz as ReminderMethod, bC as ReminderSettings, k as ReorderResult, d1 as RequestContext, d4 as RequestErrorEvent, cS as RequestOtpInput, h as RequestSource, d2 as RequestStartEvent, d3 as RequestSuccessEvent, cp as RescheduleBookingInput, ct as RescheduleBookingResult, cw as RescheduleHistoryRecord, bI as ResourceAssignment, aN as Result, d5 as RetryEvent, cR as RevokeAllSessionsResult, cQ as RevokeSessionResult, c2 as Room, bG as SchedulingMetadata, bJ as SchedulingResult, p as SchedulingService, a1 as SenderType, ca as Service, cu as ServiceAvailabilityParams, cv as ServiceAvailabilityResult, c3 as ServiceCharge, bE as ServiceNotes, bL as ServiceScheduleRequest, bx as ServiceStatus, H as SessionActivityData, d6 as SessionChangeEvent, E as SessionMessage, cd as SlotResourceInfo, ce as SlotStaffInfo, cb as Staff, bH as StaffAssignment, by as StaffRole, bM as StaffScheduleItem, cy as StockLevel, cx as StockStatus, c4 as StorefrontBootstrap, S as SubscriptionService, X as SupportService, c1 as Table, a4 as TableInfo, b_ as TimeRange, b$ as TimeRanges, cc as TimeSlot, D as TrackCategoryViewOptions, T as TrackProductViewOptions, cG as UpdateAddressInput, bu as UpdateOrderStatusInput, U as UpdateProfileInput, v as UploadInitResponse, u as UploadResult, t as UploadService, cT as VerifyOtpInput, b0 as combine, b1 as combineObject, c as createCimplifyClient, a7 as createElements, aR as err, aW as flatMap, a_ as fromPromise, aX as getOrElse, aT as isErr, aS as isOk, aV as mapError, aU as mapResult, aQ as ok, aZ as toNullable, a$ as tryCatch, aY as unwrap } from './client-DyrpQRza.mjs';
2
2
  import { A as ApiError } from './product-DiX-HGkT.mjs';
3
3
  export { ai as AddOn, bf as AddOnDetails, bC as AddOnGroupDetails, ak as AddOnOption, bB as AddOnOptionDetails, al as AddOnOptionPrice, aj as AddOnWithOptions, bI as AddToCartInput, Y as AddressValue, b5 as AdjustmentType, bb as AppliedDiscount, z as AttributeAppliesTo, y as AttributeType, G as AttributeValidationRules, B as AttributeVisibility, ba as BenefitType, bL as BillingFrequency, bN as BillingMarkupType, bM as BillingPlanType, at as Bundle, ax as BundleComponentData, ay as BundleComponentInfo, aA as BundleComponentVariantView, az as BundleComponentView, as as BundlePriceType, av as BundleProduct, bl as BundleSelectionData, bi as BundleSelectionInput, bk as BundleStoredSelection, au as BundleSummary, aw as BundleWithDetails, bq as Cart, bg as CartAddOn, b3 as CartChannel, br as CartItem, bE as CartItemDetails, bH as CartMutationResult, bG as CartNotice, b2 as CartStatus, bK as CartSummary, bs as CartTotals, an as Category, ao as CategorySummary, C as ChosenPrice, h as CimplifyError, ap as Collection, ar as CollectionProduct, aq as CollectionSummary, aI as ComponentGroup, aJ as ComponentGroupWithComponents, aP as ComponentPriceBreakdown, bj as ComponentSchedulingData, aN as ComponentSelectionInput, aF as ComponentSourceType, aG as Composite, aM as CompositeComponent, aL as CompositeComponentView, aK as CompositeGroupView, bn as CompositePriceBreakdown, aO as CompositePriceResult, aD as CompositePricingMode, bo as CompositeSelectionData, aN as CompositeSelectionInput, bm as CompositeStoredSelection, aH as CompositeWithDetails, a as CurrencyCode, H as CustomAttributeDefinition, J as CustomAttributeValue, a5 as CustomerInputValue, w as DURATION_UNIT, $ as DateRangeValue, aZ as Deal, aY as DealBenefitType, u as DepositType, t as DigitalProductType, bc as DiscountBreakdown, bd as DiscountDetails, a$ as DiscountValidation, bv as DisplayAddOn, bw as DisplayAddOnOption, bt as DisplayCart, bu as DisplayCartItem, D as DisplayMode, v as DurationUnit, g as ERROR_HINTS, bP as EligiblePlansQuery, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, O as FacetValue, bQ as FormattedPlanOption, aE as GroupPricingBehavior, X as INPUT_FIELD_TYPE, I as IdempotencyMismatchError, W as InputFieldType, a2 as InputFieldValidation, s as InventoryType, Q as KnowledgeArticle, bp as LineConfiguration, aS as LocationProductPrice, a0 as LocationValue, F as MeasurementValue, M as Money, q as PRODUCT_TYPE, d as Pagination, P as PaginationParams, _ as PhoneValue, aR as Price, b6 as PriceAdjustment, b9 as PriceDecisionPath, aQ as PriceEntryType, b8 as PricePathTaxInfo, b4 as PriceSource, U as Product, am as ProductAddOn, aT as ProductAvailability, aX as ProductAvailabilityNow, bO as ProductBillingPlan, a_ as ProductDealInfo, a4 as ProductInputField, L as ProductProperty, r as ProductRenderHint, aV as ProductTaxonomy, aU as ProductTimeProfile, p as ProductType, aa as ProductVariant, af as ProductVariantValue, a8 as ProductWithDetails, N as PropertyFacet, K as PropertySource, a6 as QuantityPricingTier, R as RENDER_HINT, a7 as RelatedProductView, x as SalesChannel, S as SchedulingMode, be as SelectedAddOnOption, a3 as SemanticKind, a1 as SignatureValue, bS as Subscription, bU as SubscriptionInvoice, bT as SubscriptionItem, bR as SubscriptionStatus, bV as SubscriptionWithDetails, b0 as Tag, b1 as TagsResponse, b7 as TaxPathComponent, T as TaxonomyAttributeTemplate, aW as TaxonomyWithChildren, bF as UICart, bx as UICartBusiness, bz as UICartCustomer, by as UICartLocation, bA as UICartPricing, bJ as UpdateCartItemInput, ac as VariantAxis, ah as VariantAxisSelection, ae as VariantAxisValue, aC as VariantAxisValueView, aB as VariantAxisView, ad as VariantAxisWithValues, bh as VariantDetails, bD as VariantDetailsDTO, ab as VariantDisplayAttribute, ag as VariantLocationAvailability, V as VariantStrategy, a9 as VariantView, Z as ZERO, c as currencyCode, n as enrichError, l as getErrorHint, j as isCimplifyError, k as isIdempotencyMismatchError, o as isRetryableError, i as isSupportedCurrency, m as money, b as moneyFromNumber } from './product-DiX-HGkT.mjs';
4
4
  export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, v as categorizePaymentError, B as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, u as formatPriceRange, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, t as getPriceRange, r as getProductCurrency, g as getTaxAmount, s as getUnitPriceAtQuantity, h as hasTaxInfo, n as isOnSale, y as isPaymentStatusFailure, z as isPaymentStatusRequiresAction, A as isPaymentStatusSuccess, i as isTaxInclusive, F as isValidPhoneForContext, w as normalizePaymentResponse, D as normalizePhoneToE164, x as normalizeStatusResponse, p as parsePrice, E as resolvePhoneCountryCode } from './index-3C9J8Wb-.mjs';
@@ -66,4 +66,18 @@ interface ApiResponse<T> {
66
66
  metadata?: ResponseMetadata;
67
67
  }
68
68
 
69
- export { ApiError, type ApiResponse, type CustomerGroup, type CustomerPricingInfo, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata };
69
+ declare const DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
70
+ declare const CIMPLIFY_CDN_HOSTS: readonly ["storefrontassetscdn.cimplify.io", "cdn.cimplify.io", "static-tmp.cimplify.io"];
71
+ interface AssetTransform {
72
+ w?: number;
73
+ h?: number;
74
+ quality?: number;
75
+ format?: "auto" | "webp" | "avif" | "jpeg";
76
+ }
77
+ interface AssetUrlOptions extends AssetTransform {
78
+ base?: string;
79
+ }
80
+ declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
81
+ declare function isCimplifyAsset(src: string, base?: string): boolean;
82
+
83
+ export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, assetUrl, isCimplifyAsset };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { aC as AUTHORIZATION_TYPE, aH as AUTH_MUTATION, ar as AbortablePromise, K as ActivityRecommendation, M as ActivityRecommendationsResponse, s as ActivityService, J as ActivityStateResponse, cJ as AddressData, da as AddressInfo, bf as AmountToPay, cU as AuthResponse, A as AuthService, n as AuthStatus, dc as AuthenticatedCustomer, de as AuthenticatedData, x as AutocompletePrediction, y as AutocompleteResponse, cz as AvailabilityResult, cf as AvailableSlot, ci as Booking, cs as BookingModificationType, ch as BookingStatus, cj as BookingWithDetails, bB as BufferTimes, bW as Business, c8 as BusinessHours, bV as BusinessPreferences, B as BusinessService, c7 as BusinessSettings, bU as BusinessType, c5 as BusinessWithLocations, av as CHECKOUT_MODE, aI as CHECKOUT_MUTATION, ay as CHECKOUT_STEP, aE as CONTACT_TYPE, cq as CancelBookingInput, cr as CancelBookingResult, bv as CancelOrderInput, bD as CancellationPolicy, j as CartOperations, b as CatalogueQueries, b2 as CatalogueResult, b3 as CatalogueSnapshot, c9 as CategoryInfo, $ as ChatAttachment, Z as ChatConversation, _ as ChatConversationResponse, Y as ChatMessage, a0 as ChatWidgetStarter, cn as CheckSlotAvailabilityInput, co as CheckSlotAvailabilityResult, cX as CheckoutAddressInfo, di as CheckoutCartData, dh as CheckoutCartItem, cZ as CheckoutCustomerInfo, aj as CheckoutFormData, bt as CheckoutInput, af as CheckoutMode, l as CheckoutOperations, ag as CheckoutOrderType, ah as CheckoutPaymentMethod, ak as CheckoutResult, l as CheckoutService, ap as CheckoutStatus, aq as CheckoutStatusContext, ai as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, a6 as CimplifyElement, a5 as CimplifyElements, au as ContactType, a2 as ContentType, cF as CreateAddressInput, cH as CreateMobileMoneyInput, cA as Customer, cB as CustomerAddress, cl as CustomerBooking, ck as CustomerBookingServiceItem, cD as CustomerLinkPreferences, cC as CustomerMobileMoney, bA as CustomerServicePreferences, aM as DEFAULT_COUNTRY, aL as DEFAULT_CURRENCY, aD as DEVICE_TYPE, cg as DayAvailability, bP as DeliveryFeeDetails, W as DeliveryFeeResponse, V as DeliveryService, bK as DepositResult, at as DeviceType, N as DismissMessageResponse, aa as ELEMENT_TYPES, a9 as EVENT_TYPES, d9 as ElementAppearance, dl as ElementEventHandler, ae as ElementEventType, ac as ElementOptions, ad as ElementType, df as ElementsCheckoutData, dg as ElementsCheckoutResult, dd as ElementsCustomerInfo, ab as ElementsOptions, cL as EnrollAndLinkOrderInput, cO as EnrollAndLinkOrderResult, cI as EnrollmentData, aP as Err, be as FeeBearerType, F as FetchQuoteInput, bc as FulfillmentLink, bb as FulfillmentStatus, ba as FulfillmentType, c$ as FxQuote, c_ as FxQuoteRequest, d0 as FxRateResponse, r as FxService, cm as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, dk as IframeToParentMessage, I as InventoryService, aG as LINK_MUTATION, aF as LINK_QUERY, bg as LineItem, b7 as LineType, cE as LinkData, cN as LinkEnrollResult, L as LinkService, cP as LinkSession, cM as LinkStatusResult, a3 as LiteBootstrap, q as LiteService, bZ as Location, bN as LocationBooking, bX as LocationTaxBehavior, bY as LocationTaxOverrides, c0 as LocationTimeProfile, c6 as LocationWithDetails, a8 as MESSAGE_TYPES, aB as MOBILE_MONEY_PROVIDER, cK as MobileMoneyData, cY as MobileMoneyDetails, as as MobileMoneyProvider, al as NextAction, aK as ORDER_MUTATION, aw as ORDER_TYPE, d7 as ObservabilityHooks, aO as Ok, bh as Order, b6 as OrderChannel, bs as OrderFilter, bd as OrderFulfillmentSummary, bm as OrderGroup, bq as OrderGroupDetails, bn as OrderGroupPayment, bk as OrderGroupPaymentState, bl as OrderGroupPaymentStatus, bp as OrderGroupPaymentSummary, bj as OrderGroupStatus, bi as OrderHistory, b8 as OrderLineState, b9 as OrderLineStatus, br as OrderPaymentEvent, O as OrderQueries, bo as OrderSplitDetail, b4 as OrderStatus, d8 as OrderType, o as OtpResult, ax as PAYMENT_METHOD, aJ as PAYMENT_MUTATION, az as PAYMENT_STATE, aA as PICKUP_TIME_TYPE, dj as ParentToIframeMessage, db as PaymentMethodInfo, b5 as PaymentState, cW as PickupTime, cV as PickupTimeType, z as PlaceDetailsResponse, w as PlacesService, P as PriceQuote, bF as PricingOverrides, ao as ProcessAndResolveOptions, am as ProcessCheckoutOptions, an as ProcessCheckoutResult, bO as ProviderResolutionSource, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, bw as RefundOrderInput, bS as RelatedCandidate, bR as RelatedProduct, bT as RelatedProductsEnrichment, bQ as RelationType, bz as ReminderMethod, bC as ReminderSettings, k as ReorderResult, d1 as RequestContext, d4 as RequestErrorEvent, cS as RequestOtpInput, h as RequestSource, d2 as RequestStartEvent, d3 as RequestSuccessEvent, cp as RescheduleBookingInput, ct as RescheduleBookingResult, cw as RescheduleHistoryRecord, bI as ResourceAssignment, aN as Result, d5 as RetryEvent, cR as RevokeAllSessionsResult, cQ as RevokeSessionResult, c2 as Room, bG as SchedulingMetadata, bJ as SchedulingResult, p as SchedulingService, a1 as SenderType, ca as Service, cu as ServiceAvailabilityParams, cv as ServiceAvailabilityResult, c3 as ServiceCharge, bE as ServiceNotes, bL as ServiceScheduleRequest, bx as ServiceStatus, H as SessionActivityData, d6 as SessionChangeEvent, E as SessionMessage, cd as SlotResourceInfo, ce as SlotStaffInfo, cb as Staff, bH as StaffAssignment, by as StaffRole, bM as StaffScheduleItem, cy as StockLevel, cx as StockStatus, c4 as StorefrontBootstrap, S as SubscriptionService, X as SupportService, c1 as Table, a4 as TableInfo, b_ as TimeRange, b$ as TimeRanges, cc as TimeSlot, D as TrackCategoryViewOptions, T as TrackProductViewOptions, cG as UpdateAddressInput, bu as UpdateOrderStatusInput, U as UpdateProfileInput, v as UploadInitResponse, u as UploadResult, t as UploadService, cT as VerifyOtpInput, b0 as combine, b1 as combineObject, c as createCimplifyClient, a7 as createElements, aR as err, aW as flatMap, a_ as fromPromise, aX as getOrElse, aT as isErr, aS as isOk, aV as mapError, aU as mapResult, aQ as ok, aZ as toNullable, a$ as tryCatch, aY as unwrap } from './client-aZInadOY.js';
1
+ export { aC as AUTHORIZATION_TYPE, aH as AUTH_MUTATION, ar as AbortablePromise, K as ActivityRecommendation, M as ActivityRecommendationsResponse, s as ActivityService, J as ActivityStateResponse, cJ as AddressData, da as AddressInfo, bf as AmountToPay, cU as AuthResponse, A as AuthService, n as AuthStatus, dc as AuthenticatedCustomer, de as AuthenticatedData, x as AutocompletePrediction, y as AutocompleteResponse, cz as AvailabilityResult, cf as AvailableSlot, ci as Booking, cs as BookingModificationType, ch as BookingStatus, cj as BookingWithDetails, bB as BufferTimes, bW as Business, c8 as BusinessHours, bV as BusinessPreferences, B as BusinessService, c7 as BusinessSettings, bU as BusinessType, c5 as BusinessWithLocations, av as CHECKOUT_MODE, aI as CHECKOUT_MUTATION, ay as CHECKOUT_STEP, aE as CONTACT_TYPE, cq as CancelBookingInput, cr as CancelBookingResult, bv as CancelOrderInput, bD as CancellationPolicy, j as CartOperations, b as CatalogueQueries, b2 as CatalogueResult, b3 as CatalogueSnapshot, c9 as CategoryInfo, $ as ChatAttachment, Z as ChatConversation, _ as ChatConversationResponse, Y as ChatMessage, a0 as ChatWidgetStarter, cn as CheckSlotAvailabilityInput, co as CheckSlotAvailabilityResult, cX as CheckoutAddressInfo, di as CheckoutCartData, dh as CheckoutCartItem, cZ as CheckoutCustomerInfo, aj as CheckoutFormData, bt as CheckoutInput, af as CheckoutMode, l as CheckoutOperations, ag as CheckoutOrderType, ah as CheckoutPaymentMethod, ak as CheckoutResult, l as CheckoutService, ap as CheckoutStatus, aq as CheckoutStatusContext, ai as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, a6 as CimplifyElement, a5 as CimplifyElements, au as ContactType, a2 as ContentType, cF as CreateAddressInput, cH as CreateMobileMoneyInput, cA as Customer, cB as CustomerAddress, cl as CustomerBooking, ck as CustomerBookingServiceItem, cD as CustomerLinkPreferences, cC as CustomerMobileMoney, bA as CustomerServicePreferences, aM as DEFAULT_COUNTRY, aL as DEFAULT_CURRENCY, aD as DEVICE_TYPE, cg as DayAvailability, bP as DeliveryFeeDetails, W as DeliveryFeeResponse, V as DeliveryService, bK as DepositResult, at as DeviceType, N as DismissMessageResponse, aa as ELEMENT_TYPES, a9 as EVENT_TYPES, d9 as ElementAppearance, dl as ElementEventHandler, ae as ElementEventType, ac as ElementOptions, ad as ElementType, df as ElementsCheckoutData, dg as ElementsCheckoutResult, dd as ElementsCustomerInfo, ab as ElementsOptions, cL as EnrollAndLinkOrderInput, cO as EnrollAndLinkOrderResult, cI as EnrollmentData, aP as Err, be as FeeBearerType, F as FetchQuoteInput, bc as FulfillmentLink, bb as FulfillmentStatus, ba as FulfillmentType, c$ as FxQuote, c_ as FxQuoteRequest, d0 as FxRateResponse, r as FxService, cm as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, dk as IframeToParentMessage, I as InventoryService, aG as LINK_MUTATION, aF as LINK_QUERY, bg as LineItem, b7 as LineType, cE as LinkData, cN as LinkEnrollResult, L as LinkService, cP as LinkSession, cM as LinkStatusResult, a3 as LiteBootstrap, q as LiteService, bZ as Location, bN as LocationBooking, bX as LocationTaxBehavior, bY as LocationTaxOverrides, c0 as LocationTimeProfile, c6 as LocationWithDetails, a8 as MESSAGE_TYPES, aB as MOBILE_MONEY_PROVIDER, cK as MobileMoneyData, cY as MobileMoneyDetails, as as MobileMoneyProvider, al as NextAction, aK as ORDER_MUTATION, aw as ORDER_TYPE, d7 as ObservabilityHooks, aO as Ok, bh as Order, b6 as OrderChannel, bs as OrderFilter, bd as OrderFulfillmentSummary, bm as OrderGroup, bq as OrderGroupDetails, bn as OrderGroupPayment, bk as OrderGroupPaymentState, bl as OrderGroupPaymentStatus, bp as OrderGroupPaymentSummary, bj as OrderGroupStatus, bi as OrderHistory, b8 as OrderLineState, b9 as OrderLineStatus, br as OrderPaymentEvent, O as OrderQueries, bo as OrderSplitDetail, b4 as OrderStatus, d8 as OrderType, o as OtpResult, ax as PAYMENT_METHOD, aJ as PAYMENT_MUTATION, az as PAYMENT_STATE, aA as PICKUP_TIME_TYPE, dj as ParentToIframeMessage, db as PaymentMethodInfo, b5 as PaymentState, cW as PickupTime, cV as PickupTimeType, z as PlaceDetailsResponse, w as PlacesService, P as PriceQuote, bF as PricingOverrides, ao as ProcessAndResolveOptions, am as ProcessCheckoutOptions, an as ProcessCheckoutResult, bO as ProviderResolutionSource, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, bw as RefundOrderInput, bS as RelatedCandidate, bR as RelatedProduct, bT as RelatedProductsEnrichment, bQ as RelationType, bz as ReminderMethod, bC as ReminderSettings, k as ReorderResult, d1 as RequestContext, d4 as RequestErrorEvent, cS as RequestOtpInput, h as RequestSource, d2 as RequestStartEvent, d3 as RequestSuccessEvent, cp as RescheduleBookingInput, ct as RescheduleBookingResult, cw as RescheduleHistoryRecord, bI as ResourceAssignment, aN as Result, d5 as RetryEvent, cR as RevokeAllSessionsResult, cQ as RevokeSessionResult, c2 as Room, bG as SchedulingMetadata, bJ as SchedulingResult, p as SchedulingService, a1 as SenderType, ca as Service, cu as ServiceAvailabilityParams, cv as ServiceAvailabilityResult, c3 as ServiceCharge, bE as ServiceNotes, bL as ServiceScheduleRequest, bx as ServiceStatus, H as SessionActivityData, d6 as SessionChangeEvent, E as SessionMessage, cd as SlotResourceInfo, ce as SlotStaffInfo, cb as Staff, bH as StaffAssignment, by as StaffRole, bM as StaffScheduleItem, cy as StockLevel, cx as StockStatus, c4 as StorefrontBootstrap, S as SubscriptionService, X as SupportService, c1 as Table, a4 as TableInfo, b_ as TimeRange, b$ as TimeRanges, cc as TimeSlot, D as TrackCategoryViewOptions, T as TrackProductViewOptions, cG as UpdateAddressInput, bu as UpdateOrderStatusInput, U as UpdateProfileInput, v as UploadInitResponse, u as UploadResult, t as UploadService, cT as VerifyOtpInput, b0 as combine, b1 as combineObject, c as createCimplifyClient, a7 as createElements, aR as err, aW as flatMap, a_ as fromPromise, aX as getOrElse, aT as isErr, aS as isOk, aV as mapError, aU as mapResult, aQ as ok, aZ as toNullable, a$ as tryCatch, aY as unwrap } from './client-B9r5rH3O.js';
2
2
  import { A as ApiError } from './product-DiX-HGkT.js';
3
3
  export { ai as AddOn, bf as AddOnDetails, bC as AddOnGroupDetails, ak as AddOnOption, bB as AddOnOptionDetails, al as AddOnOptionPrice, aj as AddOnWithOptions, bI as AddToCartInput, Y as AddressValue, b5 as AdjustmentType, bb as AppliedDiscount, z as AttributeAppliesTo, y as AttributeType, G as AttributeValidationRules, B as AttributeVisibility, ba as BenefitType, bL as BillingFrequency, bN as BillingMarkupType, bM as BillingPlanType, at as Bundle, ax as BundleComponentData, ay as BundleComponentInfo, aA as BundleComponentVariantView, az as BundleComponentView, as as BundlePriceType, av as BundleProduct, bl as BundleSelectionData, bi as BundleSelectionInput, bk as BundleStoredSelection, au as BundleSummary, aw as BundleWithDetails, bq as Cart, bg as CartAddOn, b3 as CartChannel, br as CartItem, bE as CartItemDetails, bH as CartMutationResult, bG as CartNotice, b2 as CartStatus, bK as CartSummary, bs as CartTotals, an as Category, ao as CategorySummary, C as ChosenPrice, h as CimplifyError, ap as Collection, ar as CollectionProduct, aq as CollectionSummary, aI as ComponentGroup, aJ as ComponentGroupWithComponents, aP as ComponentPriceBreakdown, bj as ComponentSchedulingData, aN as ComponentSelectionInput, aF as ComponentSourceType, aG as Composite, aM as CompositeComponent, aL as CompositeComponentView, aK as CompositeGroupView, bn as CompositePriceBreakdown, aO as CompositePriceResult, aD as CompositePricingMode, bo as CompositeSelectionData, aN as CompositeSelectionInput, bm as CompositeStoredSelection, aH as CompositeWithDetails, a as CurrencyCode, H as CustomAttributeDefinition, J as CustomAttributeValue, a5 as CustomerInputValue, w as DURATION_UNIT, $ as DateRangeValue, aZ as Deal, aY as DealBenefitType, u as DepositType, t as DigitalProductType, bc as DiscountBreakdown, bd as DiscountDetails, a$ as DiscountValidation, bv as DisplayAddOn, bw as DisplayAddOnOption, bt as DisplayCart, bu as DisplayCartItem, D as DisplayMode, v as DurationUnit, g as ERROR_HINTS, bP as EligiblePlansQuery, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, O as FacetValue, bQ as FormattedPlanOption, aE as GroupPricingBehavior, X as INPUT_FIELD_TYPE, I as IdempotencyMismatchError, W as InputFieldType, a2 as InputFieldValidation, s as InventoryType, Q as KnowledgeArticle, bp as LineConfiguration, aS as LocationProductPrice, a0 as LocationValue, F as MeasurementValue, M as Money, q as PRODUCT_TYPE, d as Pagination, P as PaginationParams, _ as PhoneValue, aR as Price, b6 as PriceAdjustment, b9 as PriceDecisionPath, aQ as PriceEntryType, b8 as PricePathTaxInfo, b4 as PriceSource, U as Product, am as ProductAddOn, aT as ProductAvailability, aX as ProductAvailabilityNow, bO as ProductBillingPlan, a_ as ProductDealInfo, a4 as ProductInputField, L as ProductProperty, r as ProductRenderHint, aV as ProductTaxonomy, aU as ProductTimeProfile, p as ProductType, aa as ProductVariant, af as ProductVariantValue, a8 as ProductWithDetails, N as PropertyFacet, K as PropertySource, a6 as QuantityPricingTier, R as RENDER_HINT, a7 as RelatedProductView, x as SalesChannel, S as SchedulingMode, be as SelectedAddOnOption, a3 as SemanticKind, a1 as SignatureValue, bS as Subscription, bU as SubscriptionInvoice, bT as SubscriptionItem, bR as SubscriptionStatus, bV as SubscriptionWithDetails, b0 as Tag, b1 as TagsResponse, b7 as TaxPathComponent, T as TaxonomyAttributeTemplate, aW as TaxonomyWithChildren, bF as UICart, bx as UICartBusiness, bz as UICartCustomer, by as UICartLocation, bA as UICartPricing, bJ as UpdateCartItemInput, ac as VariantAxis, ah as VariantAxisSelection, ae as VariantAxisValue, aC as VariantAxisValueView, aB as VariantAxisView, ad as VariantAxisWithValues, bh as VariantDetails, bD as VariantDetailsDTO, ab as VariantDisplayAttribute, ag as VariantLocationAvailability, V as VariantStrategy, a9 as VariantView, Z as ZERO, c as currencyCode, n as enrichError, l as getErrorHint, j as isCimplifyError, k as isIdempotencyMismatchError, o as isRetryableError, i as isSupportedCurrency, m as money, b as moneyFromNumber } from './product-DiX-HGkT.js';
4
4
  export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, v as categorizePaymentError, B as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, u as formatPriceRange, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, t as getPriceRange, r as getProductCurrency, g as getTaxAmount, s as getUnitPriceAtQuantity, h as hasTaxInfo, n as isOnSale, y as isPaymentStatusFailure, z as isPaymentStatusRequiresAction, A as isPaymentStatusSuccess, i as isTaxInclusive, F as isValidPhoneForContext, w as normalizePaymentResponse, D as normalizePhoneToE164, x as normalizeStatusResponse, p as parsePrice, E as resolvePhoneCountryCode } from './index-DC_ZcSgO.js';
@@ -66,4 +66,18 @@ interface ApiResponse<T> {
66
66
  metadata?: ResponseMetadata;
67
67
  }
68
68
 
69
- export { ApiError, type ApiResponse, type CustomerGroup, type CustomerPricingInfo, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata };
69
+ declare const DEFAULT_CDN_BASE_URL = "https://storefrontassetscdn.cimplify.io";
70
+ declare const CIMPLIFY_CDN_HOSTS: readonly ["storefrontassetscdn.cimplify.io", "cdn.cimplify.io", "static-tmp.cimplify.io"];
71
+ interface AssetTransform {
72
+ w?: number;
73
+ h?: number;
74
+ quality?: number;
75
+ format?: "auto" | "webp" | "avif" | "jpeg";
76
+ }
77
+ interface AssetUrlOptions extends AssetTransform {
78
+ base?: string;
79
+ }
80
+ declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
81
+ declare function isCimplifyAsset(src: string, base?: string): boolean;
82
+
83
+ export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, assetUrl, isCimplifyAsset };