@zonos/elements 1.3.14-alpha.0 → 1.3.15-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-5d196917.js → cart-b1c89065.js} +32 -8
- package/dist/cjs/{sendErrorLog-3e181984.js → sendErrorLog-f7172707.js} +1 -1
- package/dist/cjs/{submitGtag-44e3a996.js → submitGtag-219f4e54.js} +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +4 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
- 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-payment.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +3 -0
- package/dist/collection/components/store/checkout/cart.js +5 -10
- package/dist/collection/components/store/checkout/stripe.js +15 -8
- package/dist/collection/components/utils/hello/initHello.js +1 -3
- package/dist/collection/types/generated/graphql.customer.types.js +42 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +5 -0
- package/dist/components/stripe.js +32 -9
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-progress-tabs2.js +1 -1
- package/dist/components/zonos-checkout.js +3 -1
- package/dist/components/zonos-controller.js +2 -4
- package/dist/components/zonos-hello-dialog2.js +1 -1
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-language-select2.js +1 -1
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/esm/{cart-515aac56.js → cart-1b0aaea9.js} +32 -9
- package/dist/esm/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
- package/dist/esm/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_10.entry.js +4 -4
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-controller.entry.js +2 -4
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/{cart-515aac56.js → cart-1b0aaea9.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
- package/dist/esm-es5/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.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_3.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-payment.entry.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +2 -2
- package/dist/types/types/generated/graphql.customer.types.d.ts +94 -0
- package/dist/types/types/generated/graphql.customer.types.ts +174 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +10 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +20 -0
- package/dist/zonos-elements/{p-a583e3c6.system.entry.js → p-30d04ce6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fbd0ce6.entry.js → p-3921d516.entry.js} +1 -1
- package/dist/zonos-elements/{p-05f749dc.system.entry.js → p-393a8412.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f48a613e.system.entry.js → p-4fbc3ea7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e38990b.entry.js → p-5247c5ab.entry.js} +1 -1
- package/dist/zonos-elements/{p-816f1aee.js → p-659e81b2.js} +1 -1
- package/dist/zonos-elements/{p-bdd775f2.system.js → p-6847b4e8.system.js} +1 -1
- package/dist/zonos-elements/{p-ab06e5c8.system.entry.js → p-6a429588.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6fd110c3.entry.js +1 -0
- package/dist/zonos-elements/p-78983c23.entry.js +1 -0
- package/dist/zonos-elements/{p-aa671fa6.entry.js → p-81df5a1b.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b4225b2.entry.js → p-85c2b823.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d404058.system.js → p-86867593.system.js} +1 -1
- package/dist/zonos-elements/{p-93698719.system.entry.js → p-8cfec6b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-94226f90.system.entry.js +1 -0
- package/dist/zonos-elements/{p-aa5e2f7c.system.entry.js → p-9ee65a0b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ac1bccb6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1744bddb.entry.js → p-ae707165.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aef7d5d.system.entry.js → p-b5b09a07.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +1 -1
- package/dist/zonos-elements/{p-d9aa8599.entry.js → p-c93c8ecc.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da65d62.entry.js → p-d8c5b848.entry.js} +1 -1
- package/dist/zonos-elements/{p-3f713699.entry.js → p-def5023c.entry.js} +1 -1
- package/dist/zonos-elements/{p-8ec3995a.system.entry.js → p-e412387c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ef8affe4.js +1 -0
- package/dist/zonos-elements/{p-882ec68e.system.js → p-f28970e2.system.js} +1 -1
- package/dist/zonos-elements/{p-f0b4e58a.js → p-fe83fc20.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-17ded5a1.system.entry.js +0 -1
- package/dist/zonos-elements/p-4029034e.system.entry.js +0 -1
- package/dist/zonos-elements/p-418c056d.entry.js +0 -1
- package/dist/zonos-elements/p-ca6cf075.js +0 -1
- package/dist/zonos-elements/p-e9a41fd8.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,c){function r(o){try{u(t.next(o))}catch(o){c(o)}}function i(o){try{u(t["throw"](o))}catch(o){c(o)}}function u(o){o.done?n(o.value):s(o.value).then(r,i)}u((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},t,s,c,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(o){return function(e){return u([o,e])}}function u(i){if(t)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(n=0)),n)try{if(t=1,s&&(c=i[0]&2?s["return"]:i[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,i[1])).done)return c;if(s=0,c)i=[i[0]&2,c.value];switch(i[0]){case 0:case 1:c=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;s=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(c=n.trys,c=c.length>0&&c[c.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!c||i[1]>c[0]&&i[1]<c[3])){n.label=i[1];break}if(i[0]===6&&n.label<c[1]){n.label=c[1];c=i;break}if(c&&n.label<c[2]){n.label=c[2];n.ops.push(i);break}if(c[2])n.ops.pop();n.trys.pop();continue}i=e.call(o,n)}catch(o){i=[6,o];s=0}finally{t=c=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-2825570c.system.js","./p-2d404058.system.js","./p-520e8e63.system.js","./p-bdd775f2.system.js","./p-882ec68e.system.js","./p-23e7c655.system.js","./p-f4c38bfc.system.js","./p-fc4da55c.system.js"],(function(o){"use strict";var e,n,t,s,c,r,i,u,a,h,d,l,f,z,m,v,k,p,g,b,w,y,x,C,_,O,I,A,S,L,N,j,H,B;return{setters:[function(o){e=o.r;n=o.h;t=o.F;s=o.H},function(o){c=o.l;r=o.a;i=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;v=o.j;k=o.k;p=o.m;g=o.t;b=o.n;w=o.o;y=o.p;x=o.q},function(o){C=o.z;_=o.g;O=o.m},function(o){I=o.c;A=o.s;S=o.t},function(o){L=o.s;N=o.i},function(o){j=o.c},function(o){H=o.g},function(o){B=o.i}],execute:function(){var M=this;var E=function(o){var e=o.key,n=o.value;return n?{key:e,value:n}:null};var D=function(o){return[E({key:"brand",value:o.itemBrand}),E({key:"material",value:o.itemMaterial}),E({key:"category",value:o.itemCategory}),E({key:"color",value:o.itemColor}),E({key:"customization",value:o.itemCustomization}),E({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),E({key:"fabricContent",value:o.itemFabricContent}),E({key:"ltlClass",value:o.itemLtlClass}),E({key:"pickingLocation",value:o.itemPickingLocation}),E({key:"shipFromLocation",value:o.itemShipFromLocation}),E({key:"size",value:o.itemSize}),E({key:"status",value:o.status})].filter(Boolean)};var P=function(o){if(!o){return"POUND"}switch(o.toUpperCase()){case"KG":return"KILOGRAM";case"OZ":return"OUNCE";case"G":return"GRAM";default:return"POUND"}};var T=function(o){if(!o){return[]}var e=[];if(o.length){e.push({type:"LENGTH",unitOfMeasure:"INCH",value:o.length})}if(o.width){e.push({type:"WIDTH",unitOfMeasure:"INCH",value:o.width})}if(o.weight){e.push({type:"WEIGHT",unitOfMeasure:P(o.weightUnits),value:o.weight})}if(o.height){e.push({type:"HEIGHT",unitOfMeasure:"INCH",value:o.height})}return e};var G=function(o){var e;var n=((e=o===null||o===void 0?void 0:o.items)===null||e===void 0?void 0:e.map((function(o){return{amount:o.unitPrice||0,attributes:D(o),countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:T(o),name:o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}})))||[];return n};var Z=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){document.dispatchEvent(I("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available"));if(o){r("Checkout: not shippable country")}return false}return true};var R=function(o){var e=o.domesticRedirectedBtnSelector,n=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var t=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,r,l;var f=this;return __generator(this,(function(z){o=document.querySelector(e);s=i();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);n===null||n===void 0?void 0:n(s);t.disconnect();return[2]}r=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!r||!l){return[2]}t.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var e,n,t,s,c,i,l;return __generator(this,(function(f){t=r.value;if(!t){return[2]}u(t);if(!Z(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);i=document.querySelector("input#addressLine1Input");l={address1:(e=c.get("shippingAddress.address1"))!==null&&e!==void 0?e:i&&i.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(n=c.get("shippingAddress.stateOrProvince"))!==null&&n!==void 0?n:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void L({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));t.observe(document.body,{childList:true,subtree:true})};var U='<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 F='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>';var V=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-32)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24);z-index:2}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";var K=V;var W=o("zonos_checkout",function(){function o(o){var n=this;e(this,o);this.applyStripeTheme=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,n,t,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||C.appearance.theme;return[4,l({overrideBorderRaidus:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorPrimary,overrideSecondaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button";this.legacyCheckoutHiddenBtnSelector="#legacy-checkout-hidden-button";this.isLegacyCheckout=false}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=o.detail;void z(e);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){A("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n;return __generator(this,(function(t){switch(t.label){case 0:if(!window.Zonos.tempCartData)return[3,2];o=G(window.Zonos.tempCartData);return[4,z(o)];case 1:t.sent();return[3,5];case 2:if(!C.checkoutSettings.buildCartDetail)return[3,5];r("build cart detail");return[4,C.checkoutSettings.buildCartDetail()];case 3:e=t.sent();return[4,z(e)];case 4:t.sent();t.label=5;case 5:if(!!v.clientSecret)return[3,7];return[4,k()];case 6:n=t.sent();r("stripeStoreInitCheckoutSession: ".concat(n));if(!n){return[2,false]}t.label=7;case 7:return[4,this.applyStripeTheme()];case 8:t.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var e=C.checkoutSettings.placeOrderButtonSelector;r("attach checkout ".concat(e));if(!e){return}var n=document.querySelectorAll("".concat(e,", ").concat(this.domesticRedirectedBtnSelector));n.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}e.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,n;return __generator(this,(function(t){switch(t.label){case 0:if(!Z()){return[2]}e.preventDefault();e.stopPropagation();r("zonos checkout button clicked");v.isFetchingSession=true;this.open=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=t.sent();if(!o){throw new Error("Error building cart")}A("zonos-checkout-start");void S("checkout_open");return[3,4];case 3:n=t.sent();v.isFetchingSession=false;p({messages:[g("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:g("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));e.removeAttribute("disabled");e.setAttribute("data-zonos-checkout-attached","true");if(e.matches(o.domesticRedirectedBtnSelector)){e.dispatchEvent(I("click"));a();e.remove()}if(e.matches(o.legacyCheckoutHiddenBtnSelector)){o.isLegacyCheckout=true;e.dispatchEvent(I("click"));e.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useLegacyQueryParam=function(){var o=new URLSearchParams(window.location.search);var e={country:o.get("country"),customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};if(!e.customerAddress1||!e.customerCity||!e.customerName||!e.customerPhone||!e.customerState||!e.customerZip||!e.country){return}this.defaultAddress={address:{city:e.customerCity,country:e.country,line1:e.customerAddress1,line2:e.customerAddress2||"",postal_code:e.customerZip,state:e.customerState},name:e.customerName,phone:e.customerPhone}};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;var n=this;return __generator(this,(function(t){v.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;R({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){n.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});if(window.Zonos.tempCartData){this.useLegacyQueryParam()}o=setInterval((function(){var e=window.Zonos.internationalHideSelector;if(!e){clearInterval(o);return}var n=Z(false);var t=document.querySelectorAll(e);if(!n){t===null||t===void 0?void 0:t.forEach((function(o){var e=o;var n=e.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(e).display;e.style.display=n||"initial"}));return}t===null||t===void 0?void 0:t.forEach((function(o){var e=o;var n=e.style.display;e.setAttribute("data-zonos-checkout-original-display",n);e.style.display="none"}))}),100);e=setInterval((function(){v.stripe=window.Zonos.stripe;n.stripe=window.Zonos.stripe;if(!n.stripe){r("waiting for stripe to be loaded");return}if(n.storybookPaymentStatusOverride){clearInterval(e);return}r("init checkout");if(n.preview||n.forceDialogOpen){void n.buildCartAndInit()}else{n.attachCheckout();var o=new MutationObserver((function(){n.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(n){switch(n.label){case 0:this.submitLoading=true;return[4,b()];case 1:n.sent();o=setInterval((function(){if(f.landedCostData||!v.isFetchingLandedCost){if(f.landedCostData){w()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){w();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.paymentError=false;this.submitLoading=true;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,y()];case 2:e.sent();w();return[3,4];case 3:o=e.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n;return __generator(this,(function(t){switch(t.label){case 0:x();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:t.sent();return[2];case 2:m();if(this.isLegacyCheckout&&window.Zonos.tempCartData){o=window.Zonos.tempCartData.contShoppingURL;window.location.href=o;return[2]}e=window.location.href;n=e.split("?")[0];window.history.replaceState({},document.title,n);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();r("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=N(this.mobile);void this.applyStripeTheme();r("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=_(this.appearanceSettingsOverride.theme)}};o.prototype.componentWillLoad=function(){void this.init();this.isMobile=N(this.mobile);this.handleAppearanceSettingsOverrideChange();r("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){x();m()};o.prototype.render=function(){var o=this;var e;var r=f.step!=="finish"&&f.step!=="error"&&!v.stripeElements||v.isFetchingSession;var i=O(C.appearance,this.appearanceSettingsOverride),u=i.colorPrimary,a=i.colorSecondary,h=i.logoUrl,d=i.style;var l=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var m=u&&B(u)?"DARK":"LIGHT";var k=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(e=g.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){var e=o.preview?"".concat(h,"?timestamp=").concat(Date.now()):h;return n("div",{class:"zonos--logo"},e&&n("img",{alt:"".concat(C.organizationName," logo"),src:e,width:100}))};var _=function(){return n("zonos-v-stack",null,x(),n("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--amino-gray-0":null}),y.map((function(o){return n("zonos-custom-message",{icon:U,message:o.message})})))};var I=function(){return n("div",{class:"zonos--content",style:{"--border-radius":H(d)}},f.step!=="finish"&&f.step!=="error"&&n(t,null,n("div",{class:"zonos--left","data-theme":k,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&_(),f.step==="customer-info"&&n("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&n("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&n("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),n("div",{class:"zonos--right","data-theme":z},o.isMobile&&_(),!o.isLegacyCheckout&&n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close checkout dialog",content:F}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),n("div",{class:"flex--wrapper"},n("div",{class:"zonos--wrapper"},n("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),n("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},n("zonos-cart-items",null),o.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-cart-subtotal",null),n("zonos-custom-message",{class:"zonos--checkout-default-message",icon:U,message:b})))),!o.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-cart-subtotal",null),n("zonos-custom-message",{class:"zonos--checkout-default-message",icon:U,message:b}))))),(f.step==="finish"||f.step==="error")&&n("div",{class:"zonos--done","data-theme":z},n("div",{class:"zonos--header"},x(),n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close checkout dialog",content:F}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),n("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),n("zonos-checkout-footer",{"data-theme":z,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return n(s,{class:j(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?I():n("zonos-dialog",{borderStyle:d,height:"980px",isLoading:r,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},I()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());W.style=K}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-2825570c.system.js","./p-2d404058.system.js","./p-520e8e63.system.js","./p-fc4da55c.system.js","./p-f4c38bfc.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,h,l,v;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.r;u=t.d;s=t.u;a=t.a;c=t.j;f=t.v;d=t.b},function(t){h=t.z;l=t.b;v=t.d},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),o=n.errors,e=n.json;if(o.length){u("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null}]}return[2,{errors:[],json:e}]}}))}))};var w=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!s(t.placeOrderButtonSelector)){u('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}w()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var y=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var b=function(t){return __awaiter(m,void 0,void 0,(function(){var n,o,e,i,r;return __generator(this,(function(c){n=t.anchorElementSelector;o=y({position:"bottom-right"});e=window.Zonos.isBigCommerce?n||o:n;if(!e||!s(e)){u('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}a("Hello init complete");i=g(e);if(!i){r=new MutationObserver((function(){var t=g(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect()}),5e3)}return[2]}))}))};var z=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{visibility:hidden;opacity:0;height:0}";var k=z;var I=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){a("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}c.stripe=t;void p(h.checkoutSettings);a("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,u,s,c,f;return __generator(this,(function(d){switch(d.label){case 0:e=t||v();if(e==="Inter"){if(!t){return[2]}a("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(e))];case 1:u=d.sent(),s=u.errors,c=u.json;if(s.length>0||!c){a("Failed to load font ".concat(e),"warn");return[2]}f=c.fontUrl;(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,f);if(!t){return[2]}a("[FONT] ".concat(t," font override applied"));h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){h.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r;return __generator(this,(function(u){switch(u.label){case 0:return[4,_()];case 1:o=u.sent(),e=o.errors,i=o.json;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){a("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();l({overrideSettings:this.config,zonosSettings:i});void this.setupGoogleFont();if(h.helloSettings){void b(h.helloSettings)}return[4,f()];case 2:u.sent();r=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!r||!this.stripeInitEvent){a("Checkout failed to load -- missing publishable key","warn");return[2]}if(h.checkoutSettings.subscriptionStatus==="INACTIVE"){a('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");a("zonos controller loaded");return[2]}if(h.checkoutSettings.visibilityStatus==="DISABLED"){a("=== Checkout is disabled by store owner ===","warn");a("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:r.token});a("zonos controller loaded");return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){a("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){void d(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,h.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){h.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"e0869cf08934b9d047adef9875c9a5f50d604bdf",class:"zonos--elements"})};return t}());I.style=k}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,H as t}from"./p-2244534c.js";import{_ as s,e as i,i as n,f as r,z as a,g as l,m as h}from"./p-d41b5762.js";import{r as d,d as m,l as c,u as p,t as g,w as f,x as u,a as w,y as z,z as b,A as v,B as x}from"./p-816f1aee.js";import{c as y}from"./p-b4b7f705.js";import{g as k}from"./p-5883217a.js";import"./p-d01576d7.js";import"./p-ed2e94d2.js";var T=s,E=/\s/,C=/^\s+/,L=i,j=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&E.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},O=r,S=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,R=/^0o[0-7]+$/i,X=parseInt,A=r,B=function(){return T.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||j(o)&&"[object Symbol]"==L(o)}(o))return NaN;if(O(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=O(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=I.test(o);return t||R.test(o)?X(o.slice(2),t?2:8):S.test(o)?NaN:+o},M=Math.max,N=Math.min,$=function(o,e,t){var s,i,n,r,a,l,h=0,d=!1,m=!1,c=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function g(o){var t=o-l;return void 0===l||t>=e||t<0||m&&o-h>=n}function f(){var o=B();if(g(o))return u(o);a=setTimeout(f,function(o){var t=e-(o-l);return m?N(t,n-(o-h)):t}(o))}function u(o){return a=void 0,c&&s?p(o):(s=i=void 0,r)}function w(){var o=B(),t=g(o);if(s=arguments,i=this,l=o,t){if(void 0===a)return function(o){return h=o,a=setTimeout(f,e),d?p(o):r}(l);if(m)return clearTimeout(a),a=setTimeout(f,e),p(l)}return void 0===a&&(a=setTimeout(f,e)),r}return e=H(e)||0,A(t)&&(d=!!t.leading,n=(m="maxWait"in t)?M(H(t.maxWait)||0,e):n,c="trailing"in t?!!t.trailing:c),w.cancel=function(){void 0!==a&&clearTimeout(a),h=0,s=l=i=a=void 0},w.flush=function(){return void 0===a?r:u(B())},w};const P=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=a.helloSettings;i&&s||m("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&p(i)&&document.querySelectorAll(i)||[],l=s&&p(s)&&document.querySelectorAll(s)||[];if(r.length!==l.length)return m("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&p(t)&&document.querySelectorAll(t)||[];h&&d.length!==l.length&&m('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=l[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},F=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===a.currentHelloPage||"productList"===a.currentHelloPage)&&this.allRestrictedItems.length){const o=g("click to learn more");return`${g("productDetail"===a.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(a.currentHelloPage){case"cart":return g("Prepay duties and taxes at checkout");case"productList":case"productDetail":return g("See duty and tax thresholds");default:return`${g("Welcome to")} ${o}`}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==a.currentHelloPage&&"productList"!==a.currentHelloPage||"DISABLED"===a.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return m("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(m(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(a.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=a.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=P();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=$((()=>{const{productTitleElementSelector:o}=a.helloSettings;if(o){const o=P();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,a.currentHelloPage=(()=>{const{href:o}=window.location,{cartUrlPattern:e,homepageUrlPattern:t,productDetailUrlPattern:s,productListUrlPattern:i}=a.helloSettings;return e&&new RegExp(e).test(o)?"cart":s&&new RegExp(s).test(o)?"productDetail":i&&new RegExp(i).test(o)?"productList":t&&new RegExp(t).test(o)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void u(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.isShippableCountry=(o=!0)=>!(!c.localizationLoaded||!c.isShippableCountry&&(o&&w("Hello: not shippable country"),1)),this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=a.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[]}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&a.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){c.exchangeRate?z():m("Could not display currency. Exchange rate and format data is not available.")}async convertAndFormat(o){return b(o)}async convert(o){return v(o)}async format(o){return x(o)}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){$(this.render.bind(this),500)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=l(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=a.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return w("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i}=c,n=this.mobileLocationOverride||a.helloSettings.mobileLocation,r=window.innerWidth<768,l=this.animateFromLeftOverride||r&&n.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,d=n.includes("TOP"),m=h(a.appearance,this.appearanceSettingsOverride),{theme:p}=m,g=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(a.organizationName);const f=this.isShippableCountry()&&!!i;return e(t,{class:"zonos--hello zonos--elements","data-theme":p},f&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:y(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",d&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:y(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};F.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";export{F as zonos_hello}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o}from"./p-816f1aee.js";const e=o=>o||window.innerWidth<890,n=async({endpoint:e,errors:n,metadata:t})=>{const r="userAgentData"in window.navigator?window.navigator.userAgentData:null,s={endpoint:e,errors:n,metadata:Object.assign({href:window.location.href,userAgent:r&&r.brands.length>0?r:window.navigator.userAgent},t)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:s,method:"POST"})};export{e as i,n as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as s,F as e,H as t}from"./p-2244534c.js";import{l as c,a as n,s as i,b as a,c as r,d as h,e as u,i as d,f as l,g as m,h as z,j as k,k as p,m as g,t as f,n as v,o as b,p as y,q as w}from"./p-816f1aee.js";import{z as C,g as x,m as O}from"./p-d41b5762.js";import{c as A,s as I,t as S}from"./p-f0b4e58a.js";import{s as L,i as H}from"./p-ca6cf075.js";import{c as N}from"./p-b4b7f705.js";import{g as j}from"./p-ed2e94d2.js";import{i as M}from"./p-d01576d7.js";const B=({key:o,value:s})=>s?{key:o,value:s}:null,P=o=>[B({key:"brand",value:o.itemBrand}),B({key:"material",value:o.itemMaterial}),B({key:"category",value:o.itemCategory}),B({key:"color",value:o.itemColor}),B({key:"customization",value:o.itemCustomization}),B({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),B({key:"fabricContent",value:o.itemFabricContent}),B({key:"ltlClass",value:o.itemLtlClass}),B({key:"pickingLocation",value:o.itemPickingLocation}),B({key:"shipFromLocation",value:o.itemShipFromLocation}),B({key:"size",value:o.itemSize}),B({key:"status",value:o.status})].filter(Boolean),D=o=>{if(!o)return"POUND";switch(o.toUpperCase()){case"KG":return"KILOGRAM";case"OZ":return"OUNCE";case"G":return"GRAM";default:return"POUND"}},E=o=>{if(!o)return[];const s=[];return o.length&&s.push({type:"LENGTH",unitOfMeasure:"INCH",value:o.length}),o.width&&s.push({type:"WIDTH",unitOfMeasure:"INCH",value:o.width}),o.weight&&s.push({type:"WEIGHT",unitOfMeasure:D(o.weightUnits),value:o.weight}),o.height&&s.push({type:"HEIGHT",unitOfMeasure:"INCH",value:o.height}),s},$=(o=!0)=>!(!c.localizationLoaded||!c.isShippableCountry&&(document.dispatchEvent(A("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available")),o&&n("Checkout: not shippable country"),1)),_='<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',T='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>',G=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,e,t;const c=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||C.appearance.theme;await d({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?c:void 0})},this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button",this.legacyCheckoutHiddenBtnSelector="#legacy-checkout-hidden-button",this.isLegacyCheckout=!1}async initCartInfoHandler(o){m(o.detail)}async closeDialogHandler(){I("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||z(),l.step="customer-info"}async buildCartAndInit(){if(window.Zonos.tempCartData){const o=(o=>{var s;return(null===(s=null==o?void 0:o.items)||void 0===s?void 0:s.map((o=>({amount:o.unitPrice||0,attributes:P(o),countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:E(o),name:o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}))))||[]})(window.Zonos.tempCartData);await m(o)}else if(C.checkoutSettings.buildCartDetail){n("build cart detail");const o=await C.checkoutSettings.buildCartDetail();await m(o)}if(!k.clientSecret){const o=await p();if(n(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=C.checkoutSettings.placeOrderButtonSelector;n(`attach checkout ${o}`),o&&document.querySelectorAll(`${o}, ${this.domesticRedirectedBtnSelector}`).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if($()){o.preventDefault(),o.stopPropagation(),n("zonos checkout button clicked"),k.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");I("zonos-checkout-start"),S("checkout_open")}catch(o){k.isFetchingSession=!1,g({messages:[f("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:f("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"),o.matches(this.domesticRedirectedBtnSelector)&&(o.dispatchEvent(A("click")),r(),o.remove()),o.matches(this.legacyCheckoutHiddenBtnSelector)&&(this.isLegacyCheckout=!0,o.dispatchEvent(A("click")),o.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParam(){const o=new URLSearchParams(window.location.search),s={country:o.get("country"),customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};s.customerAddress1&&s.customerCity&&s.customerName&&s.customerPhone&&s.customerState&&s.customerZip&&s.country&&(this.defaultAddress={address:{city:s.customerCity,country:s.country,line1:s.customerAddress1,line2:s.customerAddress2||"",postal_code:s.customerZip,state:s.customerState},name:s.customerName,phone:s.customerPhone})}async init(){k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const t=document.querySelector(o),c=i();if(!t&&c){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(c),void e.disconnect()}const n=document.querySelector('select[name="shippingAddress.countryCode"]'),d=document.querySelector("#checkout-shipping-continue");n&&d&&(e.disconnect(),d.addEventListener("click",(async o=>{var s,e;const t=n.value;if(!t)return;if(a(t),!$(!1))return void r();const c=document.querySelector("form");if(!c)return;const i=new FormData(c),d=document.querySelector("input#addressLine1Input"),l={address1:null!==(s=i.get("shippingAddress.address1"))&&void 0!==s?s:d&&d.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=i.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return h("One or more shipping address field is missing",Object.entries(l)),void L({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});u({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos.tempCartData&&this.useLegacyQueryParam();const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const e=$(!1),t=document.querySelectorAll(s);e?null==t||t.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==t||t.forEach((o=>{const s=o,e=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=e||"initial"}))}),100),s=setInterval((()=>{k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(n("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):n("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await v();const o=setInterval((()=>{!l.landedCostData&&k.isFetchingLandedCost||(l.landedCostData&&b(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{b(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await y(),b()}catch(o){h(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(w(),this.preview)return l.step="customer-info",void await this.init();if(z(),this.isLegacyCheckout&&window.Zonos.tempCartData){const o=window.Zonos.tempCartData.contShoppingURL;return void(window.location.href=o)}const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}handleWindowResize(){this.isMobile=H(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=H(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=x(this.appearanceSettingsOverride.theme))}componentWillLoad(){this.init(),this.isMobile=H(this.mobile),this.handleAppearanceSettingsOverrideChange(),n(`mobile: ${this.isMobile}`)}disconnectedCallback(){w(),z()}render(){var o;const n="finish"!==l.step&&"error"!==l.step&&!k.stripeElements||k.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:h}=O(C.appearance,this.appearanceSettingsOverride),u="ENABLED"===C.appearance.zonosAttribution,d=C.appearance.theme,m=i&&M(i)?"DARK":"LIGHT",z=this.isMobile?d:m,p=this.isMobile?void 0:a,{customMessages:g}=c,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),b=g.filter((o=>o.pageName===v)),y=()=>{const o=this.preview?`${r}?timestamp=${Date.now()}`:r;return s("div",{class:"zonos--logo"},o&&s("img",{alt:`${C.organizationName} logo`,src:o,width:100}))},w=()=>s("zonos-v-stack",null,y(),s("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--amino-gray-0":null}),b.map((o=>s("zonos-custom-message",{icon:_,message:o.message})))),x=()=>s("div",{class:"zonos--content",style:{"--border-radius":j(h)}},"finish"!==l.step&&"error"!==l.step&&s(e,null,s("div",{class:"zonos--left","data-theme":z,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&w(),"customer-info"===l.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:p}),"shipping"===l.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:p}),"payment"===l.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:p})),s("div",{class:"zonos--right","data-theme":d},this.isMobile&&w(),!this.isLegacyCheckout&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:T}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null),this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:_,message:f})))),!this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:_,message:f}))))),("finish"===l.step||"error"===l.step)&&s("div",{class:"zonos--done","data-theme":d},s("div",{class:"zonos--header"},y(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:T}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:d})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",{"data-theme":d,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return s(t,{class:N(["zonos--checkout zonos--elements",u&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?x():s("zonos-dialog",{borderStyle:h,height:"980px",isLoading:n,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},x()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}}};G.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-32)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24);z-index:2}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{G as zonos_checkout}
|