@zonos/elements 1.3.175 → 1.3.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CheckoutConfig-f1442a60.js +35 -0
- package/dist/cjs/{cart-93ed3002.js → cart-e648a65f.js} +11 -5
- package/dist/cjs/index.cjs.js +67 -12
- package/dist/cjs/{paypal-8b49ef07.js → paypal-2390cfb2.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +57 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +8 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/utils/api/getShippingZones.js +8 -3
- package/dist/collection/components/utils/api/getZonosSettings.js +7 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +5 -2
- package/dist/collection/scripts/_getCartInfoById.js +29 -0
- package/dist/collection/scripts/_zonosBase.js +8 -5
- package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +28 -0
- package/dist/collection/types/generated/graphql.internal.types.js +3 -0
- package/dist/esm/CheckoutConfig-5479d192.js +31 -0
- package/dist/esm/{cart-54d84646.js → cart-dc171e7f.js} +12 -6
- package/dist/esm/index.js +68 -13
- package/dist/esm/{paypal-17a320c8.js → paypal-1beec534.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +56 -3
- package/dist/esm/zonos-controller.entry.js +8 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/CheckoutConfig-5479d192.js +1 -0
- package/dist/esm-es5/cart-dc171e7f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-17a320c8.js → paypal-1beec534.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +199 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/scripts/_getCartInfoById.d.ts +7 -0
- package/dist/types/scripts/_zonosBase.d.ts +11 -1
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +166 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +20 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +155 -0
- package/dist/types/types/generated/graphql.internal.types.ts +159 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-007a4d24.entry.js +1 -0
- package/dist/zonos-elements/{p-9f8b820e.system.entry.js → p-08fa3875.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3d169241.system.entry.js → p-0a6aa4cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9779ea7.entry.js → p-0ef83bec.entry.js} +1 -1
- package/dist/zonos-elements/{p-ed8a8a44.entry.js → p-117eb67d.entry.js} +1 -1
- package/dist/zonos-elements/{p-28dcd7bb.entry.js → p-24d4f2ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-d22c15be.entry.js → p-30ff0a71.entry.js} +1 -1
- package/dist/zonos-elements/p-35bfc9d1.system.entry.js +1 -0
- package/dist/zonos-elements/p-40e5359c.system.js +1 -0
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/p-5372fed8.system.js +1 -0
- package/dist/zonos-elements/{p-c67f6666.system.entry.js → p-60ab9c4c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-655bc743.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6612e6f9.system.entry.js → p-6ef7451f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e11eecbf.system.entry.js → p-7dd0d6b4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-80dd3fb6.entry.js +1 -0
- package/dist/zonos-elements/p-8ee34712.system.js +1 -0
- package/dist/zonos-elements/{p-d98fa14c.system.entry.js → p-a334b6d8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c444f997.system.entry.js → p-a7d2a768.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-78a95cee.entry.js → p-aa651c8f.entry.js} +1 -1
- package/dist/zonos-elements/{p-8e436df2.system.entry.js → p-bdf93de1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f80f24a0.js → p-d53968eb.js} +2 -2
- package/dist/zonos-elements/p-e3f9a12b.js +1 -0
- package/dist/zonos-elements/{p-0ee9b22a.entry.js → p-e9f8edbb.entry.js} +1 -1
- package/dist/zonos-elements/{p-8964d8f8.system.js → p-ef7d14a3.system.js} +1 -1
- package/dist/zonos-elements/p-f4d9f007.entry.js +1 -0
- package/dist/zonos-elements/{p-a450910c.entry.js → p-f4eaf289.entry.js} +1 -1
- package/dist/zonos-elements/p-fe253cc1.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/CheckoutConfig-fb59baa3.js +0 -90
- package/dist/esm/CheckoutConfig-63b3ed06.js +0 -86
- package/dist/esm-es5/CheckoutConfig-63b3ed06.js +0 -1
- package/dist/esm-es5/cart-54d84646.js +0 -1
- package/dist/zonos-elements/p-19ac0f84.system.entry.js +0 -1
- package/dist/zonos-elements/p-416ac901.entry.js +0 -1
- package/dist/zonos-elements/p-4a87a92c.entry.js +0 -1
- package/dist/zonos-elements/p-75b771cf.js +0 -1
- package/dist/zonos-elements/p-84dd312c.system.js +0 -1
- package/dist/zonos-elements/p-869bbedc.js +0 -1
- package/dist/zonos-elements/p-b86b82eb.entry.js +0 -1
- package/dist/zonos-elements/p-c10f4e56.system.js +0 -1
- package/dist/zonos-elements/p-d74ab632.system.entry.js +0 -1
- package/dist/zonos-elements/p-e0d3aeae.system.js +0 -1
|
@@ -3049,6 +3049,7 @@ export type ZonosAttribution = (typeof zonosAttribution)[keyof typeof zonosAttri
|
|
|
3049
3049
|
export type OrganizationQuery = {
|
|
3050
3050
|
organization: {
|
|
3051
3051
|
id: string;
|
|
3052
|
+
name: string;
|
|
3052
3053
|
references: {
|
|
3053
3054
|
storeId: number | null;
|
|
3054
3055
|
} | null;
|
|
@@ -3640,6 +3641,157 @@ export type ExchangeRateCreateMutation = {
|
|
|
3640
3641
|
type: ExchangeRateType;
|
|
3641
3642
|
} | null;
|
|
3642
3643
|
};
|
|
3644
|
+
export type CartCheckoutWorkflowQuery = {
|
|
3645
|
+
cartCheckoutWorkflow: {
|
|
3646
|
+
appearanceSettings: {
|
|
3647
|
+
colorPrimary: string;
|
|
3648
|
+
colorSecondary: string;
|
|
3649
|
+
createdAt: string;
|
|
3650
|
+
createdBy: string;
|
|
3651
|
+
fontFamily: string;
|
|
3652
|
+
id: string;
|
|
3653
|
+
logoUrl: string;
|
|
3654
|
+
mode: Mode;
|
|
3655
|
+
organization: string;
|
|
3656
|
+
style: ElementsUiStyle;
|
|
3657
|
+
theme: ElementsUiTheme;
|
|
3658
|
+
updatedAt: string;
|
|
3659
|
+
updatedBy: string;
|
|
3660
|
+
zonosAttribution: ZonosAttribution | null;
|
|
3661
|
+
};
|
|
3662
|
+
cart: {
|
|
3663
|
+
adjustments: Array<{
|
|
3664
|
+
amount: number;
|
|
3665
|
+
currencyCode: CurrencyCode;
|
|
3666
|
+
description: string | null;
|
|
3667
|
+
productId: string | null;
|
|
3668
|
+
sku: string | null;
|
|
3669
|
+
type: CartAdjustmentType;
|
|
3670
|
+
}>;
|
|
3671
|
+
createdAt: string;
|
|
3672
|
+
id: string;
|
|
3673
|
+
items: Array<{
|
|
3674
|
+
amount: number;
|
|
3675
|
+
attributes: Array<{
|
|
3676
|
+
key: string | null;
|
|
3677
|
+
value: string | null;
|
|
3678
|
+
} | null> | null;
|
|
3679
|
+
countryOfOrigin: CountryCode | null;
|
|
3680
|
+
currencyCode: CurrencyCode;
|
|
3681
|
+
description: string | null;
|
|
3682
|
+
id: string;
|
|
3683
|
+
imageUrl: string | null;
|
|
3684
|
+
itemType: ItemType | null;
|
|
3685
|
+
measurements: Array<{
|
|
3686
|
+
type: ItemMeasurementType;
|
|
3687
|
+
unitOfMeasure: ItemUnitOfMeasure;
|
|
3688
|
+
value: number;
|
|
3689
|
+
} | null> | null;
|
|
3690
|
+
name: string | null;
|
|
3691
|
+
productId: string;
|
|
3692
|
+
quantity: number;
|
|
3693
|
+
sku: string | null;
|
|
3694
|
+
}>;
|
|
3695
|
+
metadata: Array<{
|
|
3696
|
+
key: string;
|
|
3697
|
+
value: string;
|
|
3698
|
+
}>;
|
|
3699
|
+
organization: {
|
|
3700
|
+
id: string;
|
|
3701
|
+
name: string;
|
|
3702
|
+
references: {
|
|
3703
|
+
storeId: number | null;
|
|
3704
|
+
} | null;
|
|
3705
|
+
} | null;
|
|
3706
|
+
};
|
|
3707
|
+
checkoutSettings: {
|
|
3708
|
+
allowedCharacterSets: AllowedCharacterSets;
|
|
3709
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
3710
|
+
successRedirectUrl: string;
|
|
3711
|
+
captureDelay: number;
|
|
3712
|
+
createdAt: string;
|
|
3713
|
+
createdBy: string;
|
|
3714
|
+
customHTML: string;
|
|
3715
|
+
defaultCartExpiration: number;
|
|
3716
|
+
disabledCountries: Array<CountryCode> | null;
|
|
3717
|
+
externalPaymentMethods: Array<{
|
|
3718
|
+
status: ExternalPaymentMethodStatus;
|
|
3719
|
+
type: ExternalPaymentMethodType;
|
|
3720
|
+
}> | null;
|
|
3721
|
+
externalServiceTokens: Array<{
|
|
3722
|
+
token: string;
|
|
3723
|
+
type: ExternalServiceTokenType;
|
|
3724
|
+
}>;
|
|
3725
|
+
id: string;
|
|
3726
|
+
mode: Mode;
|
|
3727
|
+
orderNotifications: {
|
|
3728
|
+
abandonedCart: {
|
|
3729
|
+
delay: number;
|
|
3730
|
+
discountPercent: number;
|
|
3731
|
+
status: {
|
|
3732
|
+
active: NotificationActiveStatus;
|
|
3733
|
+
sendCopiesTo: Array<string>;
|
|
3734
|
+
};
|
|
3735
|
+
};
|
|
3736
|
+
orderCancelled: {
|
|
3737
|
+
active: NotificationActiveStatus;
|
|
3738
|
+
sendCopiesTo: Array<string>;
|
|
3739
|
+
};
|
|
3740
|
+
orderShipped: {
|
|
3741
|
+
active: NotificationActiveStatus;
|
|
3742
|
+
sendCopiesTo: Array<string>;
|
|
3743
|
+
};
|
|
3744
|
+
};
|
|
3745
|
+
organization: string;
|
|
3746
|
+
placeOrderButtonSelector: string | null;
|
|
3747
|
+
subscriptionStatus: CheckoutSubscriptionStatus;
|
|
3748
|
+
successBehavior: CheckoutSuccessBehavior;
|
|
3749
|
+
analyticsProviders: Array<{
|
|
3750
|
+
status: AnalyticsProviderStatus;
|
|
3751
|
+
type: AnalyticsProviderType;
|
|
3752
|
+
}>;
|
|
3753
|
+
updatedAt: string;
|
|
3754
|
+
updatedBy: string;
|
|
3755
|
+
visibilityStatus: CheckoutVisibilityStatus;
|
|
3756
|
+
};
|
|
3757
|
+
credentialTokenId: string;
|
|
3758
|
+
helloSettings: {
|
|
3759
|
+
allowedDomains: Array<string>;
|
|
3760
|
+
anchorElementSelector: string;
|
|
3761
|
+
cartUrlPattern: string | null;
|
|
3762
|
+
createdAt: string;
|
|
3763
|
+
createdBy: string;
|
|
3764
|
+
currencyBehavior: HelloCurrencyBehavior;
|
|
3765
|
+
currencyElementSelector: string;
|
|
3766
|
+
dutyTaxEstimationBehavior: HelloEstimateBehavior;
|
|
3767
|
+
excludedUrlPatterns: Array<string>;
|
|
3768
|
+
homepageUrlPattern: string | null;
|
|
3769
|
+
id: string;
|
|
3770
|
+
mobileLocation: HelloMobileLocation;
|
|
3771
|
+
mode: Mode;
|
|
3772
|
+
organization: string;
|
|
3773
|
+
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
3774
|
+
peekMessageDelay: number;
|
|
3775
|
+
productAddToCartElementSelector: string | null;
|
|
3776
|
+
productDetailUrlPattern: string | null;
|
|
3777
|
+
productListUrlPattern: string | null;
|
|
3778
|
+
productDescriptionElementSelector: string | null;
|
|
3779
|
+
productPriceElementSelector: string | null;
|
|
3780
|
+
productTitleElementSelector: string | null;
|
|
3781
|
+
restrictionBehavior: HelloRestrictionBehavior;
|
|
3782
|
+
updatedAt: string;
|
|
3783
|
+
updatedBy: string;
|
|
3784
|
+
};
|
|
3785
|
+
onlineStoreSettings: {
|
|
3786
|
+
allowedDomains: Array<string>;
|
|
3787
|
+
url: string;
|
|
3788
|
+
};
|
|
3789
|
+
organizationId: string;
|
|
3790
|
+
shippingZones: Array<{
|
|
3791
|
+
countryCodes: Array<CountryCode> | null;
|
|
3792
|
+
} | null> | null;
|
|
3793
|
+
};
|
|
3794
|
+
};
|
|
3643
3795
|
export type GetCheckoutSessionQuery = {
|
|
3644
3796
|
checkoutSession: {
|
|
3645
3797
|
landedCost: {
|
|
@@ -4355,6 +4507,9 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
4355
4507
|
cartCalculateLandedCost(variables?: {
|
|
4356
4508
|
[x: string]: never;
|
|
4357
4509
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CartCalculateLandedCostMutation>;
|
|
4510
|
+
cartCheckoutWorkflow(variables?: {
|
|
4511
|
+
[x: string]: never;
|
|
4512
|
+
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CartCheckoutWorkflowQuery>;
|
|
4358
4513
|
cartCreate(variables?: {
|
|
4359
4514
|
[x: string]: never;
|
|
4360
4515
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CartCreateMutation>;
|
|
@@ -3746,6 +3746,7 @@ export type ZonosAttribution =
|
|
|
3746
3746
|
export type OrganizationQuery = {
|
|
3747
3747
|
organization: {
|
|
3748
3748
|
id: string;
|
|
3749
|
+
name: string;
|
|
3749
3750
|
references: { storeId: number | null } | null;
|
|
3750
3751
|
} | null;
|
|
3751
3752
|
};
|
|
@@ -4270,6 +4271,150 @@ export type ExchangeRateCreateMutation = {
|
|
|
4270
4271
|
} | null;
|
|
4271
4272
|
};
|
|
4272
4273
|
|
|
4274
|
+
export type CartCheckoutWorkflowQuery = {
|
|
4275
|
+
cartCheckoutWorkflow: {
|
|
4276
|
+
appearanceSettings: {
|
|
4277
|
+
colorPrimary: string;
|
|
4278
|
+
colorSecondary: string;
|
|
4279
|
+
createdAt: string;
|
|
4280
|
+
createdBy: string;
|
|
4281
|
+
fontFamily: string;
|
|
4282
|
+
id: string;
|
|
4283
|
+
logoUrl: string;
|
|
4284
|
+
mode: Mode;
|
|
4285
|
+
organization: string;
|
|
4286
|
+
style: ElementsUiStyle;
|
|
4287
|
+
theme: ElementsUiTheme;
|
|
4288
|
+
updatedAt: string;
|
|
4289
|
+
updatedBy: string;
|
|
4290
|
+
zonosAttribution: ZonosAttribution | null;
|
|
4291
|
+
};
|
|
4292
|
+
cart: {
|
|
4293
|
+
adjustments: Array<{
|
|
4294
|
+
amount: number;
|
|
4295
|
+
currencyCode: CurrencyCode;
|
|
4296
|
+
description: string | null;
|
|
4297
|
+
productId: string | null;
|
|
4298
|
+
sku: string | null;
|
|
4299
|
+
type: CartAdjustmentType;
|
|
4300
|
+
}>;
|
|
4301
|
+
createdAt: string;
|
|
4302
|
+
id: string;
|
|
4303
|
+
items: Array<{
|
|
4304
|
+
amount: number;
|
|
4305
|
+
attributes: Array<{
|
|
4306
|
+
key: string | null;
|
|
4307
|
+
value: string | null;
|
|
4308
|
+
} | null> | null;
|
|
4309
|
+
countryOfOrigin: CountryCode | null;
|
|
4310
|
+
currencyCode: CurrencyCode;
|
|
4311
|
+
description: string | null;
|
|
4312
|
+
id: string;
|
|
4313
|
+
imageUrl: string | null;
|
|
4314
|
+
itemType: ItemType | null;
|
|
4315
|
+
measurements: Array<{
|
|
4316
|
+
type: ItemMeasurementType;
|
|
4317
|
+
unitOfMeasure: ItemUnitOfMeasure;
|
|
4318
|
+
value: number;
|
|
4319
|
+
} | null> | null;
|
|
4320
|
+
name: string | null;
|
|
4321
|
+
productId: string;
|
|
4322
|
+
quantity: number;
|
|
4323
|
+
sku: string | null;
|
|
4324
|
+
}>;
|
|
4325
|
+
metadata: Array<{ key: string; value: string }>;
|
|
4326
|
+
organization: {
|
|
4327
|
+
id: string;
|
|
4328
|
+
name: string;
|
|
4329
|
+
references: { storeId: number | null } | null;
|
|
4330
|
+
} | null;
|
|
4331
|
+
};
|
|
4332
|
+
checkoutSettings: {
|
|
4333
|
+
allowedCharacterSets: AllowedCharacterSets;
|
|
4334
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
4335
|
+
successRedirectUrl: string;
|
|
4336
|
+
captureDelay: number;
|
|
4337
|
+
createdAt: string;
|
|
4338
|
+
createdBy: string;
|
|
4339
|
+
customHTML: string;
|
|
4340
|
+
defaultCartExpiration: number;
|
|
4341
|
+
disabledCountries: Array<CountryCode> | null;
|
|
4342
|
+
externalPaymentMethods: Array<{
|
|
4343
|
+
status: ExternalPaymentMethodStatus;
|
|
4344
|
+
type: ExternalPaymentMethodType;
|
|
4345
|
+
}> | null;
|
|
4346
|
+
externalServiceTokens: Array<{
|
|
4347
|
+
token: string;
|
|
4348
|
+
type: ExternalServiceTokenType;
|
|
4349
|
+
}>;
|
|
4350
|
+
id: string;
|
|
4351
|
+
mode: Mode;
|
|
4352
|
+
orderNotifications: {
|
|
4353
|
+
abandonedCart: {
|
|
4354
|
+
delay: number;
|
|
4355
|
+
discountPercent: number;
|
|
4356
|
+
status: {
|
|
4357
|
+
active: NotificationActiveStatus;
|
|
4358
|
+
sendCopiesTo: Array<string>;
|
|
4359
|
+
};
|
|
4360
|
+
};
|
|
4361
|
+
orderCancelled: {
|
|
4362
|
+
active: NotificationActiveStatus;
|
|
4363
|
+
sendCopiesTo: Array<string>;
|
|
4364
|
+
};
|
|
4365
|
+
orderShipped: {
|
|
4366
|
+
active: NotificationActiveStatus;
|
|
4367
|
+
sendCopiesTo: Array<string>;
|
|
4368
|
+
};
|
|
4369
|
+
};
|
|
4370
|
+
organization: string;
|
|
4371
|
+
placeOrderButtonSelector: string | null;
|
|
4372
|
+
subscriptionStatus: CheckoutSubscriptionStatus;
|
|
4373
|
+
successBehavior: CheckoutSuccessBehavior;
|
|
4374
|
+
analyticsProviders: Array<{
|
|
4375
|
+
status: AnalyticsProviderStatus;
|
|
4376
|
+
type: AnalyticsProviderType;
|
|
4377
|
+
}>;
|
|
4378
|
+
updatedAt: string;
|
|
4379
|
+
updatedBy: string;
|
|
4380
|
+
visibilityStatus: CheckoutVisibilityStatus;
|
|
4381
|
+
};
|
|
4382
|
+
credentialTokenId: string;
|
|
4383
|
+
helloSettings: {
|
|
4384
|
+
allowedDomains: Array<string>;
|
|
4385
|
+
anchorElementSelector: string;
|
|
4386
|
+
cartUrlPattern: string | null;
|
|
4387
|
+
createdAt: string;
|
|
4388
|
+
createdBy: string;
|
|
4389
|
+
currencyBehavior: HelloCurrencyBehavior;
|
|
4390
|
+
currencyElementSelector: string;
|
|
4391
|
+
dutyTaxEstimationBehavior: HelloEstimateBehavior;
|
|
4392
|
+
excludedUrlPatterns: Array<string>;
|
|
4393
|
+
homepageUrlPattern: string | null;
|
|
4394
|
+
id: string;
|
|
4395
|
+
mobileLocation: HelloMobileLocation;
|
|
4396
|
+
mode: Mode;
|
|
4397
|
+
organization: string;
|
|
4398
|
+
peekMessageBehavior: HelloPeekMessageBehavior;
|
|
4399
|
+
peekMessageDelay: number;
|
|
4400
|
+
productAddToCartElementSelector: string | null;
|
|
4401
|
+
productDetailUrlPattern: string | null;
|
|
4402
|
+
productListUrlPattern: string | null;
|
|
4403
|
+
productDescriptionElementSelector: string | null;
|
|
4404
|
+
productPriceElementSelector: string | null;
|
|
4405
|
+
productTitleElementSelector: string | null;
|
|
4406
|
+
restrictionBehavior: HelloRestrictionBehavior;
|
|
4407
|
+
updatedAt: string;
|
|
4408
|
+
updatedBy: string;
|
|
4409
|
+
};
|
|
4410
|
+
onlineStoreSettings: { allowedDomains: Array<string>; url: string };
|
|
4411
|
+
organizationId: string;
|
|
4412
|
+
shippingZones: Array<{
|
|
4413
|
+
countryCodes: Array<CountryCode> | null;
|
|
4414
|
+
} | null> | null;
|
|
4415
|
+
};
|
|
4416
|
+
};
|
|
4417
|
+
|
|
4273
4418
|
export type GetCheckoutSessionQuery = {
|
|
4274
4419
|
checkoutSession: {
|
|
4275
4420
|
landedCost: {
|
|
@@ -5005,6 +5150,20 @@ export function getSdk(
|
|
|
5005
5150
|
'mutation',
|
|
5006
5151
|
);
|
|
5007
5152
|
},
|
|
5153
|
+
cartCheckoutWorkflow(
|
|
5154
|
+
variables?: { [x: string]: never },
|
|
5155
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
5156
|
+
): Promise<CartCheckoutWorkflowQuery> {
|
|
5157
|
+
return withWrapper(
|
|
5158
|
+
wrappedRequestHeaders =>
|
|
5159
|
+
client.request<CartCheckoutWorkflowQuery>('', variables, {
|
|
5160
|
+
...requestHeaders,
|
|
5161
|
+
...wrappedRequestHeaders,
|
|
5162
|
+
}),
|
|
5163
|
+
'cartCheckoutWorkflow',
|
|
5164
|
+
'query',
|
|
5165
|
+
);
|
|
5166
|
+
},
|
|
5008
5167
|
cartCreate(
|
|
5009
5168
|
variables?: { [x: string]: never },
|
|
5010
5169
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,a as n,l as o,h as t,b as r}from"./p-0fc02cde.js";import{s as i,c as l}from"./p-869bbedc.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-869bbedc.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),t="https://v1.3.175.js.zonos.com";if(!n&&(t.includes("test.")||t.includes("test-")))return t;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const s=`https://${n}.preview.js.zonos.com`;return o(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let v=null;const y=Promise.resolve().then((()=>{return e=null,null!==v||(v=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&f.test(o.src))return o}return null})();t&&e?console.warn(h):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${w}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(r("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),v;var e}));let z=!1;var g;y.catch((e=>{z||console.warn(e)}));const j=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),S="https://v1.3.175.js.zonos.com",b=j||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.175",O="https://fonts.googleapis.com",k=/^https:\/\/fonts\.googleapis\.com/;class ${}g=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1742933949936",$.isLegacyCheckout=!1,$.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.175",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.loadTimeApiInfoList=[],$.logIntervalId=null,$.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(g.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),g.doneInit)return;if(o(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),g.zonosApiKey=h,g.storeId=f,g.isNpm){o("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){o(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=g.isNpm,window.Zonos.isBigCommerce=g.isBigCommerce,window.Zonos.isLegacyCheckout=g.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!g.cartId)return void r("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!g.cartData&&g.cartId){o("Initialize cart data");const e=await i(g.cartId);if(!e)return void r("Failed to get cart data");g.cartData=e.cartData,g.zonosApiKey=e.zonosApiKey}const d=await(async()=>{const s=e(),i=n();if(!s&&!i||!window.Zonos.zonosApiKey)return null;if(o("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return o("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await t("/api/get-test-public-credential");if(c.length||!d)return r("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(o(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(r("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(g.zonosApiKey=d)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(g.cartId&&g.cartData||v){o("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${l}`,document.body.appendChild(e)}o("init zonos"),g.restoreNativeBrowserFunctions(),g.injectCustomScriptForHostedCheckout(),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),g.doneInit=!0},$.injectCustomScriptForHostedCheckout=()=>{const e=g.cartData,n=(null==e?void 0:e.metadata)||[],t=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(t||s)){if(t){o("Injecting custom header script");const e=document.createElement("script");e.textContent=t.value,document.head.appendChild(e)}if(s){o("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else o("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout})},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=g.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=g.zonosController)||void 0===n||n.updateOrganizationName(e)},$.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},$.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},$.injectController=({config:e})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=g.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;o("loading Stripe");const s=await(async(...e)=>{z=!0;const n=Date.now();return y.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(n.publishableKey);s?(window.Zonos.stripe=s,t.initCheckoutElement(s)):r("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),g.zonosController=t,o("Zonos controller injected!")},$.injectScript=({cdnType:e,isModule:n,theRestUrl:t})=>{const s=`${g.getZonosUrl(e)}/${t}`;if(document.querySelector(`script[src="${s}"]`))return void o(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{r(`Failed to load ${c.src}`);const o=m(e);o&&g.injectScript({cdnType:o,isModule:n,theRestUrl:t})},i.appendChild(c)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return b;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.175";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.175";case"vercel":return S}};return g.isNpm&&p()||n()},$.injectZonosCdn=()=>{g.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),o("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=g.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${S}/`,t.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${o}/${n}`,i.onerror=()=>{r(`Failed to load ${i.href}`);const o=m(e);o&&g.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(i)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?o("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),o("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void o("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${O}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!k.test(o.href))return o}return null})())return void o("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=O,e.appendChild(n);const t=document.createElement("link");t.rel="stylesheet",t.href=`${O}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(t),o("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=g.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=e=>{var n;o(`[FONT] injecting ${e}`);const t=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${O}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=O,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void o(`[FONT] ${t} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=e,s.appendChild(r),o(`[FONT] ${t} font injected!`)};export{$ as Zonos}
|
|
1
|
+
import{g as e,a as n,l as t,h as o,b as r}from"./p-0fc02cde.js";import{_ as i,c as l}from"./p-fe253cc1.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-fe253cc1.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.176.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const s=`https://${n}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let y=null;const v=Promise.resolve().then((()=>{return e=null,null!==y||(y=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let o=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&f.test(t.src))return t}return null})();o&&e?console.warn(h):o||(o=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${w}${n}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(r("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==o||o.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==o||o.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),y;var e}));let g=!1;v.catch((e=>{g||console.warn(e)}));const z=async({cartId:n,retries:s})=>{const r=e(),{errors:i,json:c,zonosMode:d}=await o("/api/zonos-elements/get-cart",{body:{isTestMode:r,tempCartUUID:n},headers:{"Content-Type":"application/json"},method:"POST"}),l=!c||i.length;return l&&s?(t("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:s}),await new Promise((e=>setTimeout(e,500))),z({cartId:n,retries:s-1})):l?null:Object.assign(Object.assign({},c),{zonosMode:d})};var S;const j=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),O="https://v1.3.176.js.zonos.com",b=j||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.176",k="https://fonts.googleapis.com",Z=/^https:\/\/fonts\.googleapis\.com/;class I{}S=I,I.doneInit=!1,I.cartSettings=null,I.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),I.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),I._paypalMockResponse=null,I.isBigCommerce=!1,I.releaseDate="1743432435915",I.isLegacyCheckout=!1,I.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",I.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),I.isNpm=!0,I.zonosQaUrl=null,I.zonosQaUrlApi=null,I.version="v1.3.176",I.modeAlerted=!1,I.cartData=null,I.paypal=null,I.zonosMode=null,I.getCurrentTimestamp=()=>(new Date).getTime(),I.zonosController=null,I.loadTimeApiInfoList=[],I.logIntervalId=null,I.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(S.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),S.doneInit)return;if(t(`====== ZONOS DEBUG MODE: on (${S.version}) ======`),S.zonosApiKey=h,S.storeId=f,S.isNpm){t("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){t(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=S.isNpm,window.Zonos.isBigCommerce=S.isBigCommerce,window.Zonos.isLegacyCheckout=S.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!S.cartId)return void r("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!S.cartData&&S.cartId){t("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=i(e);if(!o&&!n)return r("[ZONOS - loadZonos] invalid cart id"),null;const s=await z({cartId:e,retries:5});return t("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,window.Zonos.zonosMode=s.zonosMode,{cartData:s.cartData,settings:s.settings,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(r("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(S.cartId);if(!e)return void r("Failed to get cart data");S.cartData=e.cartData,S.zonosApiKey=e.zonosApiKey,S.cartSettings=e.settings}const d=await(async()=>{const s=e(),i=n();if(!s&&!i||!window.Zonos.zonosApiKey)return null;if(t("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return t("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await o("/api/get-test-public-credential");if(c.length||!d)return r("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(t(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(r("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(S.zonosApiKey=d)}const y=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(S.cartId&&S.cartData||y){t("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${l}`,document.body.appendChild(e)}t("init zonos"),S.restoreNativeBrowserFunctions(),S.injectCustomScriptForHostedCheckout(),S.injectZonosCdn(),S.injectZonosCss(),S.injectFonts(),S.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),S.doneInit=!0},I.injectCustomScriptForHostedCheckout=()=>{const e=S.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){t("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(s){t("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else t("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},I.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},I.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},I.showNotification=e=>{var n;null===(n=S.zonosController)||void 0===n||n.showNotification(e)},I.updateOrganizationName=e=>{var n;null===(n=S.zonosController)||void 0===n||n.updateOrganizationName(e)},I.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},I.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let t=document.querySelector(`iframe#${n}`);t||(t=document.createElement("iframe"),t.id=n,t.style.display="none",t.style.opacity="0",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",t.style.width="1px",t.style.height="1px",t.style.border="none",t.style.overflow="hidden",t.style.visibility="hidden",document.body.appendChild(t));const o=(null===(e=t.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=o,document.body.removeChild(t)},I.injectController=({config:e})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;S.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{S.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const o=document.createElement("zonos-controller");o.config=e,o.zonosApiKey=S.zonosApiKey||"",o.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;t("loading Stripe");const s=await(async(...e)=>{g=!0;const n=Date.now();return v.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(n.publishableKey);s?(window.Zonos.stripe=s,o.initCheckoutElement(s)):r("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(o),S.zonosController=o,t("Zonos controller injected!")},I.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const s=`${S.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{r(`Failed to load ${c.src}`);const t=m(e);t&&S.injectScript({cdnType:t,isModule:n,theRestUrl:o})},i.appendChild(c)},I.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return b;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.176";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.176";case"vercel":return O}};return S.isNpm&&p()||n()},I.injectZonosCdn=()=>{S.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),S.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},I.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=S.getZonosUrl(e),o=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${O}/`,o.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${n}`,i.onerror=()=>{r(`Failed to load ${i.href}`);const t=m(e);t&&S.injectStylesheet({cdnType:t,theRestUrl:n})},o.appendChild(i)},I.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(S.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},I.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void t("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${k}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!Z.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=k,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${k}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),t("Zonos font injected!")},I.setupGoogleFont=e=>{var n;null===(n=S.zonosController)||void 0===n||n.setupGoogleFont(e)},I.injectSupportGoogleFont=e=>{var n;t(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${k}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=k,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=e,s.appendChild(r),t(`[FONT] ${o} font injected!`)};export{I as Zonos}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as s,d as n,c as a}from"./p-ab68ad11.js";import{d as e}from"./p-30fdcbee.js";import{c as i}from"./p-b4b7f705.js";import{g as r}from"./p-a1cfbd0a.js";import{f as p,t as h}from"./p-e3f9a12b.js";import{b as l,l as c}from"./p-0fc02cde.js";import{d as y}from"./p-d53968eb.js";import"./p-98aa88b1.js";const m=class{constructor(o){t(this,o),this.emptyStateText=void 0,this.theme="LIGHT"}render(){return this.el.shadowRoot?(this.el.shadowRoot.innerHTML="DARK"===this.theme?'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n':'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n',o(s,{class:"zonos--elements",style:{"--zonos--font-family":e(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))):null}get el(){return n(this)}};m.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";const d=class{constructor(o){t(this,o),this.notificationArray=[]}async showNotification(t){const o=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:o,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(o)}),s.timeout)}updateTransitionClass({id:t,transitionClass:o}){this.notificationArray=this.notificationArray.map((s=>s.id===t?Object.assign(Object.assign({},s),{transitionClass:o}):s))}removeNotification(t){this.updateTransitionClass({id:t,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((o=>o.id!==t))}),300)}render(){return o(s,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:i(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":e()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((t=>o("div",{"aria-hidden":"true",class:i(["zonos--notification-item",t.type,t.transitionClass]),key:t.id,onClick:()=>{this.removeNotification(t.id)}},o("zonos-text",{textColor:"gray-0"},t.message))))))}};d.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const f=class{constructor(o){t(this,o),this.trackingSent=!1,this.titleText=void 0,this.stripe=p.stripe,this.stripeElements=p.stripeElements,this.isPaymentInfoFilled=!1}watchIsPaymentInfoFilled(){var t;this.isPaymentInfoFilled&&!this.trackingSent&&(h("checkout_paymentInfoFilled",{paymentMethod:null===(t=p.stripePaymentEventData)||void 0===t?void 0:t.value.type}),this.trackingSent=!0)}watchInitStripe(){if(!this.stripeElements)return;const t=p.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),o=this.el.querySelector(".zonos--payment-component");o?(t.mount(o),t.on("change",(t=>{t.complete&&(this.isPaymentInfoFilled=!0),p.stripePaymentEventData=t})),p.stripePaymentElement=t):l("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return o(s,{key:"3e9f3439e139f6d040bcf8fc101f19d011debdc8",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"2f22806f4f9380e610899a997ce9ed2bfe997be4",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"4d5dbd7828b3037d69adb50d4fee4ea9abf3b59b",class:"zonos--payment-component"}),o("div",{key:"32ee62f62a028da8481d95781a7368c60ae42614",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}static get watchers(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};f.style=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";const z=class{constructor(o){t(this,o),this.paypalSessionDone=a(this,"paypalSessionDone",7),this.paypalSessionFail=a(this,"paypalSessionFail",7)}async loadPaypal(){if(!window.Zonos.paypal)return void c("Paypal is not available");const t=y({onPaypalFail:()=>{c("onPaypalFail"),this.paypalSessionFail.emit()},onPaypalSessionDone:({orderId:t})=>{c("onPaypalSessionDone","info",{orderId:t}),this.paypalSessionDone.emit({orderId:t})}});if(!(null==t?void 0:t.length))return void c("There are no paypal buttons available");const o=this.el.querySelector(".zonos--payment-paypal-container");o?t.forEach((async t=>{await t.render(o)})):c("Cannot find container element for paypal buttons")}componentDidLoad(){this.loadPaypal()}render(){return o(s,{key:"7be3c38f702c8fb105c54e652774f69fbbcfd34c",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}};z.style=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";export{m as zonos_empty_state_payment,d as zonos_notification,f as zonos_payment,z as zonos_paypal_payment}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-4caffd96.system.js","./p-
|
|
1
|
+
System.register(["./p-4caffd96.system.js","./p-40e5359c.system.js","./p-5187ba8f.system.js","./p-c9e433c0.system.js","./p-1b75aa35.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){s=e.W;a=e.r;l=e.l},function(e){i=e.d},function(e){c=e.l},function(){},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.languageSelected=function(e){void s(e);t.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var o=l.selectedLocale;return t(n,{key:"cc711dba7371852eab6e20994389ae3b95bb3be7",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"47135e2b7363a3179139a7b8e23cb22435ce3299",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"3bf830e585fa6478f560c57dfa978721af47ad19",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"f693b231755087ec849f5a759b2dc43e2695b24f",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var u=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var m=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"15035421483b079dde47eeb3ddcb4dcc6edffae4",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"bf1bbdb1bb8a62841616893d8e9005002772adc4",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"a2593795816ceb851489c386231a1b90e6dd6261",class:"zonos--select-dialog-header"},t("zonos-text",{key:"e91d4a54ac0deb073c30272c5e9626168fea52b7",type:"boldLabel"},this.label),t("zonos-button",{key:"e8fdf75686b33e9958f64925ddf95fb5c89d74bb",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"ede6d09a4f6900419bf16df0ca8a2b79882bf266"})))};return e}());m.style=p}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-84dd312c.system.js","./p-5187ba8f.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-1b75aa35.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,d,h,c,u;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.F;s=o.H},function(o){a=o.r;r=o.l;l=o.E},function(o){d=o.z},function(o){h=o.c},function(o){c=o.f},function(o){u=o.g},function(){},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var m=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var p='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var x='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var z=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var C=z;var y="".concat(a("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(m({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")}));var k=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(d.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=r.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=r.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] duty free.",{threshold:e}):a("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] tax free.",{threshold:e}):a("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(n.hasInclusivePrices()){return[y]}return[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),y]};this.getNewZealandDutyTaxMessge=function(o){if(n.hasInclusivePrices()){return null}return[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:l({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=r.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return a("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return a("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return a("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return a("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=r.selectedCountryCode;var l=this.hasInclusivePrices();var m=this.getInclusivePriceMessage();var z=this.getDutyMessage();var C=this.getTaxMessage();var y=this.getAdditionalDutyTaxMessage();var k=this.animateFromLeftOverride||this.dialogRef&&u(this.dialogRef);var L=this.dialogRef&&f(this.dialogRef);var D=r.customMessages;var H=a("Welcome to [storeName]",{storeName:d.organizationName});var N=((e=D.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var V=c(N);var M=this.getCurrentPageEnum();var _=D.filter((function(o){return o.pageName===M}));return n(s,{key:"1fce2b616b062a02f97f711f674836d75ad25035",class:"zonos--elements"},n("div",{key:"caa338a462d1c0cde1727e5147268c782d6063f0",class:h(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",L&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"49968ece06cddb09bf870c7fac18999d9d43ad75"},n("div",{key:"0557a439e3676dcda4668324e0ed4701a50cb365",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"ccf16ff294f2168d1c3b3735a1b364cc71e5d392",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:x}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"7aa4d6322cf48204a4eb4aa62b2ebdaab637e96b",spacing:24},n("zonos-country-flag",{key:"1152da449f95ebd8f2cc3364c2ba742ed0696b0c",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"c449283c10a1e71f1e55d7da04ae51234bb58ccf",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"2adb9745513f6f9041509d07a9584cf421a22ee9",type:"boldSubheader"},H),n("zonos-text",{key:"ece4b349db2f121b2245090a04327927775162f0",innerHTML:V,textColor:"gray-800"})),n("zonos-v-stack",{key:"30849c1c301eed69fe3d1db06755164d852ef547",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"fbd14cc231da833e4930a52483f40c32b1e24e2d",spacing:"12px"},n("zonos-v-stack",{key:"75da2be8ba28555258e8ff50e78c5b1ffa2403ac",spacing:12},l?n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:v}),n("zonos-text",null,m)):n(i,null,n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:b}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:w}),n("zonos-text",null,C))),y===null||y===void 0?void 0:y.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:g}),n("zonos-text",{innerHTML:o}))})))),_.map((function(o){return n("zonos-custom-message",{icon:p,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"6c15ad7d36590e1b93007e3786c0e0db191b4b8d",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"fae16c45b01ed1345d439c77267d1c80ce908598"},n("zonos-country-select",{key:"a6abe0661ee91ad227877ebbb5ee21253b110ea0",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"7550bec8646301a4bd5afb94b79b18b62698891b"},n("zonos-language-select",{key:"da2e8007ebf7e33723baaf3bdd2818334090c81c",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());k.style=C}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?t(o.value):i(o.value).then(a,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-40e5359c.system.js","./p-5187ba8f.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-1b75aa35.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(o){"use strict";var e,t,n,i,s,a,r,l,d,h,c,u;return{setters:[function(o){e=o.r;t=o.c;n=o.h;i=o.F;s=o.H},function(o){a=o.r;r=o.l;l=o.E},function(o){d=o.z},function(o){h=o.c},function(o){c=o.f},function(o){u=o.g},function(){},function(){},function(){}],execute:function(){var f=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var m=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var p='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var x='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var z=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var C=z;var y="".concat(a("The low-value GST law passed July 1st, 2018 applies to this retailer.")," ").concat(m({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")}));var k=o("zonos_hello_dialog",function(){function o(o){var n=this;e(this,o);this.closeDialog=t(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(d.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=r.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.hasInclusivePrices=function(){var o;return((o=r.inclusivePricing)===null||o===void 0?void 0:o.status)==="ENABLED"};this.isNoThresholdCountry=function(o){if(!o||!n.hasTaxId()){return false}return["AU"].includes(o)};this.getDutyMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] duty free.",{threshold:e}):a("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=r.countryLandedCost;var e=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!n.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?a("Spend [threshold] tax free.",{threshold:e}):a("Taxes will apply to all orders.")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var e=o.dutyDeminimus;return[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(n.hasInclusivePrices()){return[y]}return[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:"".concat(o.vatTaxRate*100,"%")}),y]};this.getNewZealandDutyTaxMessge=function(o){if(n.hasInclusivePrices()){return null}return[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:l({amount:o.vatTaxDeminimus})})]};this.getInclusivePriceMessage=function(){var o=r.inclusivePricing;if((o===null||o===void 0?void 0:o.status)!=="ENABLED"){return null}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.tax.status==="INCLUDED"){return a("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"&&o.fee.status==="INCLUDED"){return a("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.")}if(o.duty.status==="INCLUDED"){return a("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.")}if(o.tax.status==="INCLUDED"){return a("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.")}if(o.fee.status==="INCLUDED"){return a("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.")}return null};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!n.hasTaxId()){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e;var t=r.selectedCountryCode;var l=this.hasInclusivePrices();var m=this.getInclusivePriceMessage();var z=this.getDutyMessage();var C=this.getTaxMessage();var y=this.getAdditionalDutyTaxMessage();var k=this.animateFromLeftOverride||this.dialogRef&&u(this.dialogRef);var L=this.dialogRef&&f(this.dialogRef);var D=r.customMessages;var H=a("Welcome to [storeName]",{storeName:d.organizationName});var N=((e=D.find((function(o){return o.pageName==="hello_default"})))===null||e===void 0?void 0:e.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var V=c(N);var M=this.getCurrentPageEnum();var _=D.filter((function(o){return o.pageName===M}));return n(s,{key:"1fce2b616b062a02f97f711f674836d75ad25035",class:"zonos--elements"},n("div",{key:"caa338a462d1c0cde1727e5147268c782d6063f0",class:h(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",L&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"49968ece06cddb09bf870c7fac18999d9d43ad75"},n("div",{key:"0557a439e3676dcda4668324e0ed4701a50cb365",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"ccf16ff294f2168d1c3b3735a1b364cc71e5d392",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:x}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{key:"7aa4d6322cf48204a4eb4aa62b2ebdaab637e96b",spacing:24},n("zonos-country-flag",{key:"1152da449f95ebd8f2cc3364c2ba742ed0696b0c",class:"zonos--hello-country-flag",countryCode:t}),n("zonos-v-stack",{key:"c449283c10a1e71f1e55d7da04ae51234bb58ccf",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"2adb9745513f6f9041509d07a9584cf421a22ee9",type:"boldSubheader"},H),n("zonos-text",{key:"ece4b349db2f121b2245090a04327927775162f0",innerHTML:V,textColor:"gray-800"})),n("zonos-v-stack",{key:"30849c1c301eed69fe3d1db06755164d852ef547",spacing:8},this.restrictedItems.map((function(o){var e;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{key:"fbd14cc231da833e4930a52483f40c32b1e24e2d",spacing:"12px"},n("zonos-v-stack",{key:"75da2be8ba28555258e8ff50e78c5b1ffa2403ac",spacing:12},l?n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:v}),n("zonos-text",null,m)):n(i,null,n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:b}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:w}),n("zonos-text",null,C))),y===null||y===void 0?void 0:y.map((function(o){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:g}),n("zonos-text",{innerHTML:o}))})))),_.map((function(o){return n("zonos-custom-message",{icon:p,message:o.message})}))))),n("zonos-hello-dialog-footer",{key:"6c15ad7d36590e1b93007e3786c0e0db191b4b8d",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&n("div",{key:"fae16c45b01ed1345d439c77267d1c80ce908598"},n("zonos-country-select",{key:"a6abe0661ee91ad227877ebbb5ee21253b110ea0",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"7550bec8646301a4bd5afb94b79b18b62698891b"},n("zonos-language-select",{key:"da2e8007ebf7e33723baaf3bdd2818334090c81c",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());k.style=C}}}));
|