Viewing File: /home/fshjisk/myqueen/wp-content/plugins/woo-stripe-payment/assets/build/link-checkout.js
(()=>{var e={713:e=>{e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},567:e=>{"use strict";e.exports=window.jQuery}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(()=>{var e=r(318),t=e(r(713)),n=e(r(567));function i(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 a(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?i(Object(n),!0).forEach((function(r){(0,t.default)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,n.default)((function(){if("undefined"===wcStripeLinkParams)return!1;try{var e=wc_stripe.credit_card,t=e.stripe.linkAutofillModal(e.elements);(0,n.default)(document.body).on("keyup",'[name="billing_email"]',(function(e){t.launch({email:e.currentTarget.value})})),wcStripeLinkParams.launchLink&&t.launch({email:(0,n.default)('[name="billing_email"]').val()}),t.on("autofill",(function(t){var r=t.value,i=r.shippingAddress,o=void 0===i?null:i,l=r.billingAddress;if(o){var s=a({name:o.name},o.address);e.populate_shipping_fields(s)}if(l){var u=a({name:l.name},l.address);e.populate_billing_fields(u)}e.fields.toFormFields(),e.set_payment_method(e.gateway_id),e.show_new_payment_method(),e.hide_save_card(),o&&e.maybe_set_ship_to_different(),(0,n.default)('[name="terms"]').prop("checked",!0),e.fields.required("billing_phone")&&e.fields.isEmpty("billing_phone")||e.get_form().trigger("submit")}))}catch(e){console.log(e)}}))})()})();
//# sourceMappingURL=link-checkout.js.map
Back to Directory
File Manager