@ikas/storefront 3.0.0-alpha.27 → 3.0.0-alpha.29
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/build/__api/models/CreateStripePaymentIntentResponse.d.ts +12 -0
- package/build/__api/models/CreateStripePaymentIntentResponse.js +1 -0
- package/build/__api/mutations/createStripePaymentIntent.d.ts +13 -0
- package/build/__api/mutations/createStripePaymentIntent.js +1 -0
- package/build/__api/types/index.d.ts +6 -0
- package/build/_virtual/index.js_commonjs-proxy13.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy14.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/assets/translations/checkout/en.js +1 -1
- package/build/assets/translations/checkout/tr.js +1 -1
- package/build/components/checkout/components/stripe/checkout-form.d.ts +8 -0
- package/build/components/checkout/components/stripe/checkout-form.js +1 -0
- package/build/components/checkout/components/stripe/index.d.ts +9 -0
- package/build/components/checkout/components/stripe/index.js +1 -0
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +3 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/checkout/steps/step-success/style.module.scss.js +1 -1
- package/build/ext/@stripe/react-stripe-js/dist/react-stripe.esm.js +1 -0
- package/build/ext/@stripe/stripe-js/dist/stripe.esm.js +1 -0
- package/build/ikas.cjs +1 -1
- package/build/models/data/order/index.js +1 -1
- package/build/providers/page-data-next.d.ts +4 -0
- package/build/providers/page-data-next.js +1 -1
- package/build/scripts/generators/config/content.js +1 -1
- package/build/store/checkout/index.d.ts +3 -0
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/index.js +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'../../../../ext/style-inject/dist/style-inject.es.js';var t={StepSuccess:"style-module_StepSuccess__36Zg4",SuccessTitleContainer:"style-module_SuccessTitleContainer__3fT9P",SuccessTitle:"style-module_SuccessTitle__2cVxj",SuccessSubTitle:"style-module_SuccessSubTitle__2UvWI",InfoGrid:"style-module_InfoGrid__2VYXk",InfoTitle:"style-module_InfoTitle__2Whku",InfoText:"style-module_InfoText__1LHFw",InfoTextBold:"style-module_InfoTextBold__21977",WithBorder:"style-module_WithBorder__1aBHw",CardLogoContainer:"style-module_CardLogoContainer__3tymO",PaymentLogoContainer:"style-module_PaymentLogoContainer__AN08p",Actions:"style-module_Actions__3ZXaJ",HelpText:"style-module_HelpText__39LA1",Cta:"style-module_Cta__3sxNK",OrderStatus:"style-module_OrderStatus__CPd7s",Yellow:"style-module_Yellow__1mZZm",Green:"style-module_Green__2qwNg",Red:"style-module_Red__TKRy8"};e(".style-module_StepSuccess__36Zg4 {\n padding-top: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P {\n margin-bottom: 24px;\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P .style-module_SuccessTitle__2cVxj {\n font-size: 28px;\n font-weight: 600;\n margin-left: 16px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n margin: auto;\n margin-bottom: 32px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 48px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-size: 16px;\n line-height: 24px;\n margin-bottom: 12px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk.style-module_WithBorder__1aBHw {\n border-bottom: 1px solid var(--checkout-border-color);\n padding-bottom: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_CardLogoContainer__3tymO {\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_PaymentLogoContainer__AN08p img {\n height: 20px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin: auto;\n margin-top: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 {\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n flex-wrap: wrap;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK {\n color: var(--checkout-primary-text-color);\n margin-left: 4px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n flex-direction: column;\n }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK {\n margin-left: 0;\n }\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s {\n padding: 4px 8px;\n border-radius: 6px;\n margin-top: 8px;\n font-size: 14px;\n font-weight: 500;\n display: inline-flex;\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Yellow__1mZZm {\n color: var(--checkout-warning-color);\n background-color: var(--checkout-warning-light-color);\n border: 1px solid var(--checkout-warning-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Green__2qwNg {\n color: var(--checkout-success-color);\n background-color: var(--checkout-success-light-color);\n border: 1px solid var(--checkout-success-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Red__TKRy8 {\n color: var(--checkout-error-color);\n background-color: var(--checkout-error-light-color);\n border: 1px solid var(--checkout-error-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n padding-left: 24px;\n padding-right: 24px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P .style-module_SuccessTitle__2cVxj {\n font-size: 20px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px;\n margin-left: 56px;\n }\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 24px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n margin-left: 0;\n }\n}");export{t as default};
|
|
1
|
+
import e from'../../../../ext/style-inject/dist/style-inject.es.js';var t={StepSuccess:"style-module_StepSuccess__36Zg4",SuccessTitleContainer:"style-module_SuccessTitleContainer__3fT9P",SuccessTitle:"style-module_SuccessTitle__2cVxj",SuccessSubTitle:"style-module_SuccessSubTitle__2UvWI",InfoGrid:"style-module_InfoGrid__2VYXk",InfoTitle:"style-module_InfoTitle__2Whku",InfoText:"style-module_InfoText__1LHFw",InfoTextBold:"style-module_InfoTextBold__21977",WithBorder:"style-module_WithBorder__1aBHw",CardLogoContainer:"style-module_CardLogoContainer__3tymO",PaymentLogoContainer:"style-module_PaymentLogoContainer__AN08p",Actions:"style-module_Actions__3ZXaJ",HelpText:"style-module_HelpText__39LA1",Cta:"style-module_Cta__3sxNK",OrderStatus:"style-module_OrderStatus__CPd7s",Yellow:"style-module_Yellow__1mZZm",Green:"style-module_Green__2qwNg",Red:"style-module_Red__TKRy8",withMBottom:"style-module_withMBottom__1MtfS"};e(".style-module_StepSuccess__36Zg4 {\n padding-top: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P {\n margin-bottom: 24px;\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P .style-module_SuccessTitle__2cVxj {\n font-size: 28px;\n font-weight: 600;\n margin-left: 16px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n margin: auto;\n margin-bottom: 32px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 48px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-size: 16px;\n line-height: 24px;\n margin-bottom: 12px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 600;\n color: var(--checkout-primary-text-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk.style-module_WithBorder__1aBHw {\n border-bottom: 1px solid var(--checkout-border-color);\n padding-bottom: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_CardLogoContainer__3tymO {\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_PaymentLogoContainer__AN08p img {\n height: 20px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin: auto;\n margin-top: 24px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 {\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n flex-wrap: wrap;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK {\n color: var(--checkout-primary-text-color);\n margin-left: 4px;\n}\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n flex-direction: column;\n }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ .style-module_HelpText__39LA1 .style-module_Cta__3sxNK {\n margin-left: 0;\n }\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s {\n padding: 4px 8px;\n border-radius: 6px;\n margin-top: 8px;\n font-size: 14px;\n font-weight: 500;\n display: inline-flex;\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Yellow__1mZZm {\n color: var(--checkout-warning-color);\n background-color: var(--checkout-warning-light-color);\n border: 1px solid var(--checkout-warning-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Green__2qwNg {\n color: var(--checkout-success-color);\n background-color: var(--checkout-success-light-color);\n border: 1px solid var(--checkout-success-color);\n}\n.style-module_StepSuccess__36Zg4 .style-module_OrderStatus__CPd7s.style-module_Red__TKRy8 {\n color: var(--checkout-error-color);\n background-color: var(--checkout-error-light-color);\n border: 1px solid var(--checkout-error-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n padding-left: 24px;\n padding-right: 24px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P {\n margin-bottom: 12px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessTitleContainer__3fT9P .style-module_SuccessTitle__2cVxj {\n font-size: 20px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px;\n margin-left: 56px;\n }\n}\n@media only screen and (max-width: 400px) {\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 24px;\n }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n margin-left: 0;\n }\n}\n\n.style-module_withMBottom__1MtfS {\n margin-bottom: 12px;\n}");export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import t from"../../../prop-types/index.js";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw u}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=function(t){var r=e.useRef(t);return e.useEffect((function(){r.current=t}),[t]),r.current},s=function(e){return null!==e&&"object"===r(e)},f=function e(t,r){if(!s(t)||!s(r))return t===r;var n=Array.isArray(t);if(n!==Array.isArray(r))return!1;var o="[object Object]"===Object.prototype.toString.call(t);if(o!==("[object Object]"===Object.prototype.toString.call(r)))return!1;if(!o&&!n)return t===r;var u=Object.keys(t),c=Object.keys(r);if(u.length!==c.length)return!1;for(var i={},a=0;a<u.length;a+=1)i[u[a]]=!0;for(var f=0;f<c.length;f+=1)i[c[f]]=!0;var p=Object.keys(i);if(p.length!==u.length)return!1;var l=t,y=r;return p.every((function(t){return e(l[t],y[t])}))},p=function(e,t,r){return s(e)?Object.keys(e).reduce((function(o,c){var i=!s(t)||!f(e[c],t[c]);return r.includes(c)?(i&&console.warn("Unsupported prop change: options.".concat(c," is not a mutable property.")),o):i?u(u({},o||{}),{},n({},c,e[c])):o}),null):null},l=function(e){if(null===e||s(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},y=function(e){if(function(e){return s(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(l)};var t=l(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},m=e.createContext(null);m.displayName="ElementsContext";var d=function(t){var r=t.stripe,n=t.options,o=t.children,u=e.useRef(!1),i=e.useRef(!0),s=e.useMemo((function(){return y(r)}),[r]),f=c(e.useState((function(){return{stripe:null,elements:null}})),2),l=f[0],d=f[1],v=a(r);null!==v&&v!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),u.current||("sync"===s.tag&&(u.current=!0,d({stripe:s.stripe,elements:s.stripe.elements(n)})),"async"===s.tag&&(u.current=!0,s.stripePromise.then((function(e){e&&i.current&&d({stripe:e,elements:e.elements(n)})}))));var b=a(n);return e.useEffect((function(){if(l.elements){var e=p(n,b,["clientSecret","fonts"]);e&&l.elements.update(e)}}),[n,b,l.elements]),e.useEffect((function(){return function(){i.current=!1}}),[]),e.useEffect((function(){var e=l.stripe;e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"1.7.2"}),e.registerAppInfo({name:"react-stripe-js",version:"1.7.2",url:"https://stripe.com/docs/stripe-js/react"}))}),[l.stripe]),e.createElement(m.Provider,{value:l},o)};d.propTypes={stripe:t.any,options:t.object};var v=function(t){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(e.useContext(m),t)},b=function(){return v("calls useElements()").elements},g=function(){return v("calls useStripe()").stripe};t.func.isRequired;var h=function(t){var r=e.useRef(t);return e.useEffect((function(){r.current=t}),[t]),function(){r.current&&r.current.apply(r,arguments)}},j=function(){},O=function(r,n){var o,u="".concat((o=r).charAt(0).toUpperCase()+o.slice(1),"Element"),c=n?function(t){v("mounts <".concat(u,">"));var r=t.id,n=t.className;return e.createElement("div",{id:r,className:n})}:function(t){var n=t.id,o=t.className,c=t.options,i=void 0===c?{}:c,s=t.onBlur,f=void 0===s?j:s,l=t.onFocus,y=void 0===l?j:l,m=t.onReady,d=void 0===m?j:m,b=t.onChange,g=void 0===b?j:b,O=t.onEscape,E=void 0===O?j:O,w=t.onClick,S=void 0===w?j:w,A=v("mounts <".concat(u,">")).elements,k=e.useRef(null),P=e.useRef(null),C=h(d),R=h(f),x=h(y),B=h(S),N=h(g),I=h(E);e.useLayoutEffect((function(){if(null==k.current&&A&&null!=P.current){var e=A.create(r,i);k.current=e,e.mount(P.current),e.on("ready",(function(){return C(e)})),e.on("change",N),e.on("blur",R),e.on("focus",x),e.on("escape",I),e.on("click",B)}}));var M=a(i);return e.useEffect((function(){if(k.current){var e=p(i,M,["paymentRequest"]);e&&k.current.update(e)}}),[i,M]),e.useLayoutEffect((function(){return function(){k.current&&k.current.destroy()}}),[]),e.createElement("div",{id:n,className:o,ref:P})};return c.propTypes={id:t.string,className:t.string,onChange:t.func,onBlur:t.func,onFocus:t.func,onReady:t.func,onClick:t.func,options:t.object},c.displayName=u,c.__elementType=r,c},E="undefined"==typeof window;O("auBankAccount",E),O("card",E),O("cardNumber",E),O("cardExpiry",E),O("cardCvc",E),O("fpxBank",E),O("iban",E),O("idealBank",E),O("p24Bank",E),O("epsBank",E);var w=O("payment",E);O("paymentRequestButton",E),O("linkAuthentication",E),O("shippingAddress",E),O("affirmMessage",E),O("afterpayClearpayMessage",E);export{d as Elements,w as PaymentElement,b as useElements,g as useStripe};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,n="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",t=null,i=function(i){return null!==t||(t=new Promise((function(t,o){if("undefined"!=typeof window)if(window.Stripe&&i&&console.warn(n),window.Stripe)t(window.Stripe);else try{var a=function(){for(var n=document.querySelectorAll('script[src^="'.concat(e,'"]')),t=0;t<n.length;t++){var i=n[t];if(r.test(i.src))return i}return null}();a&&i?console.warn(n):a||(a=function(r){var n=r&&!r.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src="".concat(e).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(t),t}(i)),a.addEventListener("load",(function(){window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),a.addEventListener("error",(function(){o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),t},o=function(e,r,n){if(null===e)return null;var t=e.apply(void 0,r);return function(e,r){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.29.0",startTime:r})}(t,n),t},a=Promise.resolve().then((function(){return i(null)})),s=!1;a.catch((function(e){s||console.warn(e)}));var c=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];s=!0;var t=Date.now();return a.then((function(e){return o(e,r,t)}))};export{c as loadStripe};
|