2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
|
|
/*! For license information please see woopay-direct-checkout.js.LICENSE.txt */
|
||
|
|
(()=>{var e={5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},s=0;s<10;s++)t["_"+String.fromCharCode(s)]=s;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var a,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var d in a=Object(arguments[c]))s.call(a,d)&&(i[d]=a[d]);if(t){r=t(a);for(var l=0;l<r.length;l++)o.call(a,r[l])&&(i[r[l]]=a[r[l]])}}return i}},1020:(e,t,s)=>{"use strict";s(5228);var o=s(1609),n=60103;if("function"==typeof Symbol&&Symbol.for){var a=Symbol.for;n=a("react.element"),a("react.fragment")}var r=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,s){var o,a={},d=null,l=null;for(o in void 0!==s&&(d=""+s),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,o)&&!c.hasOwnProperty(o)&&(a[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:n,type:e,key:d,ref:l,props:a,_owner:r.current}}},4848:(e,t,s)=>{"use strict";e.exports=s(1020)},1609:e=>{"use strict";e.exports=window.React}},t={};function s(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),s.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.data,t=window.wp.hooks,o=window.lodash,n="wc/store/cart",a=e=>new Promise((t=>{setTimeout(t,e)})),r=(e,t,s=2e3)=>{const o=Date.now(),n=()=>{if(Date.now()-o>s)return;const a=document.querySelector(e);a?t(a):requestAnimationFrame(n)};requestAnimationFrame(n)},i=e=>"undefined"!=typeof wcpayConfig?wcpayConfig[e]:c(e),c=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null};function d(e,t="",s){for(const o in e){const n=e[o],a=t?t+"["+o+"]":o;"string"==typeof n||"number"==typeof n?s.append(a,n):"object"==typeof n&&d(n,a,s)}return s}async function l(e,t,s){const o=d(t,"",new FormData),n=await fetch(e,{method:"POST",body:o,...s});return await n.json()}const u=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:"object"==typeof wcpayPaymentRequestParams&&wcpayPaymentRequestParams.hasOwnProperty(e)?wcpayPaymentRequestParams[e]:null,y=(e,t,s="wcpay_")=>e.toString().replace("%%endpoint%%",s+t);var h=s(1609);const p=window.wp.i18n;window.wp.domReady;const m=()=>{return e=void 0,t=void 0,o=function*(){var e,t,s;let o=(()=>{const e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf("tk_ai="))return s.substring(6,s.length)}})();i
|