1function e(n){return(e="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})(n)}var n,r="https://js.stripe.com",t="".concat(r,"/v3"),o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,a=function(e){return o.test(e)||i.test(e)},u=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(t).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},c=null,l=null,d=null,s=function(e){return null!==c?c:(c=new Promise(function(n,t){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe,window.Stripe)n(window.Stripe);else try{var o=function(){for(var e=document.querySelectorAll('script[src^="'.concat(r,'"]')),n=0;n<e.length;n++){var t=e[n];if(a(t.src))return t}return null}();if(o&&e);else if(o){if(o&&null!==d&&null!==l){var i;o.removeEventListener("load",d),o.removeEventListener("error",l),null===(i=o.parentNode)||void 0===i||i.removeChild(o),o=u(e)}}else o=u(e);d=function(e,n){return function(){window.Stripe?e(window.Stripe):n(new Error("Stripe.js not available"))}}(n,t),l=function(e){return function(n){e(new Error("Failed to load Stripe.js",{cause:n}))}}(t),o.addEventListener("load",d),o.addEventListener("error",l)}catch(c){return void t(c)}else n(null)})).catch(function(e){return c=null,Promise.reject(e)})},f=function(n){var r="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(n),"\n");if(null===n||"object"!==e(n))throw new Error(r);if(1===Object.keys(n).length&&"boolean"==typeof n.advancedFraudSignals)return n;throw new Error(r)},p=!1,v=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];p=!0;var o=Date.now();return s(n).then(function(e){return function(e,n,r){if(null===e)return null;n[0].match(/^pk_test/),e.version;var t=e.apply(void 0,n);return function(e,n){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"5.10.0",startTime:n})}(t,r),t}(e,r,o)})};v.setLoadParameters=function(e){if(p&&n){var r=f(e);if(Object.keys(r).reduce(function(r,t){var o;return r&&e[t]===(null===(o=n)||void 0===o?void 0:o[t])},!0))return}if(p)throw new Error("You cannot change load parameters after calling loadStripe");
1n=f(e)};export{v as loadStripe};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.