PageSourceSearch

https://www.reitsport-dohm.de/theme/299d5169f06bda1388b32bbf84ff83…/mollie-payments.js?1788965600

js reitsport-dohm.de collected 2026-10-04 16:08:21 UTC 34,054 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,t):e}function o(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function s(e,t){try{return t in e}catch(e){return!1}}function l(e,i,a){(a=a||{}).arrayMerge=a.arrayMerge||o,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=n;var d,c,u=Array.isArray(i);return u!==Array.isArray(e)?n(i,a):u?a.arrayMerge(e,i,a):(c={},(d=a).isMergeableObject(e)&&r(e).forEach(function(t){c[t]=n(e[t],d)}),r(i).forEach(function(t){(!s(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(s(e,t)&&d.isMergeableObject(i[t])?c[t]=(function(e,t){if(!t.customMerge)return l;var i=t.customMerge(e);return"function"==typeof i?i:l})(t,d)(e[t],i[t],d):c[t]=n(i[t],d))}),c)}l.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return l(e,i,t)},{})},e.exports=l},289(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._el=e,e.$emitter=this,this._listeners=[]}return e.prototype.publish=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i=!1);var n=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(n),n},e.prototype.subscribe=function(e,t,i){void 0===i&&(i={});var n=this,o=e.split("."),r=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){var s=r;r=function(t){n.unsubscribe(e),s(t)}}return this.el.addEventListener(o[0],r),this.listeners.push({splitEventName:o,opts:i,cb:r}),!0},e.prototype.unsubscribe=function(e){var t=this,i=e.split(".");return this.listeners=this.listeners.reduce(function(e,n){return n.splitEventName.sort().toString()===i.sort().toString()?t.el.removeEventListener(n.splitEventName[0],n.cb):e.push(n),e},[]),!0},e.prototype.reset=function(){var e=this;return this.listeners.forEach(function(t){e.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0},Object.defineProperty(e.prototype,"el",{get:function(){return this._el},set:function(e){this._el=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listeners",{get:function(){return this._listeners},set:function(e){this._listeners=e},enumerable:!1,configurable:!0}),e}();t.default=i},949(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(289)),r=n(i(156)),s=function(){function e(e,t,i){void 0===t&&(t={}),void 0===i&&(i=!1),this.el=e,this.$emitter=new o.default(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}return e.prototype._init=function(){this._initialized||(this.init(),this._initialized=!0)},e.prototype._update=function(){this._initialized&&this.update()},e.prototype.update=function(){},e.prototype._registerInstance=function(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)},e.prototype._getPluginName=function(e){return!1===e?this.constructor.name:e},e.prototype._mergeOptions=function(e){var t=this._pluginName.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase(),i=this.parseJsonOrFail(t);let n="";"function"==typeof this.el.getAttribute&&(n=this.el.getAttribute("data-".concat(t,"-options"))||"");var o=[this.constructor.options,this.options,e];i&&o.push(window.PluginConfigManager.get(this._pluginName,i));try{n&&o.push(JSON.parse(n))}catch(e){throw Error("The data attribute 'data-".concat(t,"-options' could not be parsed to json: ").concat(e.message||""))}return r.default.all(o.filter(function(e){return e instanceof Object&&!(e instanceof Array)}).map(function(e){return e||{}}))},e.prototype.parseJsonOrFail=function(e){if("function"!=typeof this.el.getAttribute)return"";let t=this.el.getAttribute("data-".concat(e,"-config"))||"";try{return JSON.parse(t)}catch(e){return t}},e}();t.default=s}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};
1return e[n].call(r.exports,r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n=i(156),o=i.n(n);let r="application/json";class s{get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;this.send("GET",e,null,t,i,n)}post(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:r;this.send("POST",e,t,i,n,o)}send(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r,l=new XMLHttpRequest;l.open(e,t),l.setRequestHeader("Content-Type",s),l.onload=function(){if(!n||"function"!=typeof n)return;let e=l.getResponseHeader("content-type"),t="response"in l?l.response:l.responseText;e.indexOf("application/json")>-1?n(JSON.parse(t)):n(t)},l.onerror=function(){o&&"function"==typeof n&&o()},l.send(i)}}var l=i(949),a=i.n(l);class d extends a(){}let c="d-none";class u extends d{static #e=this.options={newCardMandateOption:null,mollieCreditCardFormClass:".mollie-components-credit-card",mollieCreditCardMandateInput:'input[name="mollieCreditCardMandate"]',mollieShouldSaveCardDetailInput:'input[name="mollieShouldSaveCardDetail"]'};init(){this.client=new s,this._fixShopUrl()}registerMandateEvents(){let{newCardMandateOption:e}=this.options;e&&(this.mollieCreditCarfFormEl=document.querySelector(this.options.mollieCreditCardFormClass),this.mollieCreditCardMandateEls=document.querySelectorAll(this.options.mollieCreditCardMandateInput),this.mollieCreditCarfFormEl&&this.mollieCreditCardMandateEls&&this._registerRadioButtonsEvent())}_fixShopUrl(){null!=this.options.shopUrl&&"/"===this.options.shopUrl.substr(-1)&&(this.options.shopUrl=this.options.shopUrl.substr(0,this.options.shopUrl.length-1))}_registerRadioButtonsEvent(){this.onMandateInputChange(this.getMandateCheckedValue()),this.mollieCreditCardMandateEls.forEach(e=>{e.addEventListener("change",()=>{this.onMandateInputChange(this.getMandateCheckedValue())})})}getMandateCheckedValue(){let e=document.querySelector(`${this.options.mollieCreditCardMandateInput}:checked`);return e&&e.value?e.value:null}isValidSelectedMandate(e){return e&&e!==this.options.newCardMandateOption}shouldSaveCardDetail(){let e=document.querySelector(this.options.mollieShouldSaveCardDetailInput);return!!e&&e.checked}onMandateInputChange(e){if(e===this.options.newCardMandateOption){this.mollieCreditCarfFormEl.classList.remove(c);return}null!==e&&this.mollieCreditCarfFormEl.classList.add(c)}}let p="error";class h extends u{static #e=this.options=o()(u.options,{customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0});init(){super.init();let e=this,t=null,i=document.querySelector("div.mollie-components-controller");i&&i.remove(),this.getElements(),this._componentsContainer&&this._cardHolder&&(t=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode})),this.createComponentsInputs(t,[this.getInputFields().cardHolder,this.getInputFields().cardNumber,this.getInputFields().expiryDate,this.getInputFields().verificationCode]),this._paymentForm.addEventListener("submit",i=>{e.submitForm(i,t,this._paymentForm)}),this.registerMandateEvents()}getElements(){this._cardHolder=document.querySelector("#cardHolder"),this._componentsContainer=document.querySelector("div.mollie-components-credit-card"),this._paymentForm=document.querySelector("#confirmPaymentForm"),this._radioInputs=document.querySelectorAll('#confirmPaymentForm input[type="radio"]'),this._submitButton=document.querySelector('#confirmPaymentForm button[type="submit"]'),this._creditCardRadioInput=document.querySelector('#confirmPaymentForm input[type="radio"].creditcard')}getDefaultProperties(){return{styles:{base:{backgroundColor:"#fff",fontSize:"14px",padding:"10px 10px","::placeholder":{color:"rgba(68, 68, 68, 0.2)"}},valid:{color:"#090"},invalid:{backgroundColor:"#fff1f3"}}}}getInputFields(){return{cardHolder:{name:"cardHolder",id:"#cardHolder",errors:"cardHolderError"},cardNumber:{name:"cardNumber",id:"#cardNumber",errors:"cardNumberError"},expiryDate:{name:"expiryDate",id:"#expiryDate",errors:"expiryDateError"},verificationCode:{name:"verificationCode",id:"#verificationCode",errors:"verificationCodeError"}}}createComponentsInputs(e,t){let i=this;t.forEach((t,n,o)=>{let r=e.createComponent(t.name,i.getDefaultProperties());
1r.mount(t.id),o[n][t.name]=r,r.addEventListener("change",e=>{let i=document.getElementById(`${t.name}`),n=document.getElementById(`${t.errors}`);e.error&&e.touched?(i.classList.add(p),n.textContent=e.error):(i.classList.remove(p),n.textContent="")}),r.addEventListener("focus",()=>{i.setFocus(`${t.id}`,!0)}),r.addEventListener("blur",()=>{i.setFocus(`${t.id}`,!1)})})}setFocus(e,t){document.querySelector(e).classList.toggle("is-focused",t)}disableForm(){this._submitButton&&(this._submitButton.disabled=!0)}enableForm(){this._submitButton&&(this._submitButton.disabled=!1)}async submitForm(e,t,i){if(!e.defaultPrevented&&(void 0!==this._creditCardRadioInput&&null!==this._creditCardRadioInput&&!1!==this._creditCardRadioInput.checked||!i)&&this._creditCardRadioInput&&!0===this._creditCardRadioInput.checked){e.preventDefault(),this.disableForm();let n=this.getMandateCheckedValue();if(this.isValidSelectedMandate(n)){this.client.post(this.options.shopUrl+"/mollie/components/store-mandate-id/"+this.options.customerId+"/"+n,null,()=>{i.submit()},()=>{i.submit()},"application/json; charset=utf-8");return}let o=document.getElementById(`${this.getInputFields().verificationCode.errors}`);o.textContent="";let{token:r,error:s}=await t.createToken();if(s){this.enableForm(),o.textContent=s.message;return}s||this.client.post(this.options.shopUrl+"/mollie/components/store-card-token/"+this.options.customerId+"/"+r,JSON.stringify({shouldSaveCardDetail:this.shouldSaveCardDetail()}),()=>{document.getElementById("cardToken").setAttribute("value",r),i.submit()},()=>{i.submit()},"application/json; charset=utf-8")}}}class m{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return m.isIPhoneDevice()||m.isIPadDevice()}static isNativeWindowsBrowser(){return m.isIEBrowser()||m.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":m.isTouchDevice(),"is-ios":m.isIOSDevice(),"is-native-windows":m.isNativeWindowsBrowser(),"is-iphone":m.isIPhoneDevice(),"is-ipad":m.isIPadDevice(),"is-ie":m.isIEBrowser(),"is-edge":m.isEdgeBrowser()}}}class y{constructor(e){this.csrf=e}isActive(){return void 0!==this.csrf&&!1!==this.csrf.enabled&&"ajax"===this.csrf.mode}}class f{constructor(e){this._document=e}getPaymentForm(){return this._document.querySelector("#changePaymentForm")}getConfirmForm(){return this._document.querySelector("#confirmOrderForm")}getSubmitButton(){let e=this._document.querySelector("#confirmFormSubmit");return null===e&&(e=this._document.querySelector('#confirmOrderForm button[type="submit"]')),e}}let g="error";class v extends u{static #e=this.options=o()(u.options,{paymentId:null,customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0});init(){super.init();try{let e=new f(document);this._paymentForm=e.getPaymentForm(),this._confirmForm=e.getConfirmForm(),this._confirmFormButton=e.getSubmitButton()}catch(e){console.error("Mollie Credit Card components: Required HTML elements not found on this page!");return}this._initializeComponentInstance(),this._registerEvents(),this.registerMandateEvents()}_initializeComponentInstance(){let e=document.querySelector("#cardHolder");document.querySelector("div.mollie-components-credit-card")&&e&&!window.mollieComponentsObject&&(window.mollieComponentsObject=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode}),window.mollieComponents={}),this.createComponentsInputs()}_registerEvents(){null!==this._confirmForm&&this._confirmForm.addEventListener("submit",this.submitForm.bind(this))}_reactivateFormSubmit(){this._confirmForm.dispatchEvent(new CustomEvent("removeLoader"))}getDefaultProperties(){return{styles:{base:{backgroundColor:"#fff",fontSize:"14px",padding:"10px 10px","::placeholder":{color:"rgba(68, 68, 68, 0.2)"}},valid:{color:"#090"},invalid:{backgroundColor:"#fff1f3"}}}}getInputFields(){return{cardHolder:{name:"cardHolder",id:"#cardHolder",errors:"cardHolderError"},cardNumber:{name:"cardNumber",id:"#cardNumber",errors:"cardNumberError"},expiryDate:{name:"expiryDate",id:"#expiryDate",errors:"expiryDateError"},verificationCode:{name:"verificationCode",id:"#verificationCode",errors:"verificationCodeError"}}}createComponentsInputs(){let e=this,t=[this.getInputFields().cardHolder,this.getInputFields().cardNumber,this.getInputFields().expiryDate,this.getInputFields().verificationCode];window.mollieComponentsObject&&t.forEach((t,i,n)=>{let o=this._mountMollieComponent(t.id,t.name);n[i][t.name]=o,o.addEventListener("change",e=>{let i=document.getElementById(`${t.name}`),n=document.getElementById(`${t.errors}`);e.error&&e.touched?(i.classList.add(g),n.textContent=e.error):(i.classList.remove(g),n.textContent="")}),o.addEventListener("focus",()=>{e.setFocus(`${t.id}`,!0)}),o.addEventListener("blur",()=>{e.setFocus(`${t.id}`,!1)})})}_mountMollieComponent(e,t){return window.mollieComponents[t]?window.mollieComponents[t].unmount():window.mollieComponents[t]=window.mollieComponentsObject.createComponent(t,this.getDefaultProperties()),window.mollieComponents[t].mount(e),window.mollieComponents[t]}setFocus(e,t){document.querySelector(e).classList.toggle("is-focused",t)}async submitForm(e){if(e.defaultPrevented)return;let t=this,i=this._confirmForm,n=document.querySelector(`#changePaymentForm input[type="radio"][value="${this.options.paymentId}"]`);if((null==n||!1===n.checked)&&this._confirmForm||n&&!1===n.checked)return;e.preventDefault();let o=this.getMandateCheckedValue();if(this.isValidSelectedMandate(o)){this.client.post(t.options.shopUrl+"/mollie/components/store-mandate-id/"+t.options.customerId+"/"+o,null,()=>{t.continueShopwareCheckout(i)},()=>{t.continueShopwareCheckout(i)},"application/json; charset=utf-8");return}let r=document.getElementById(`${this.getInputFields().verificationCode.errors}`);r.textContent="";let{token:s,error:l}=await window.mollieComponentsObject.createToken();if(l){r.textContent=l.message,this._reactivateFormSubmit(),r.scrollIntoView();return}this.client.post(t.options.shopUrl+"/mollie/components/store-card-token/"+t.options.customerId+"/"+s,JSON.stringify({shouldSaveCardDetail:this.shouldSaveCardDetail()}),function(){t.continueShopwareCheckout(i)},function(){t.continueShopwareCheckout(i)},"application/json; charset=utf-8")}continueShopwareCheckout(e){if(m.isIEBrowser()){let t=document.getElementById("tos");null!=t&&e.insertAdjacentElement("beforeend",function(e,t){let i=document.createElement("input");return i.type="checkbox",i.name="tos",i.checked=t,i.style.display="none",i}(0,t.checked))}new y(window.csrf).isActive()||e.submit()}}class C{constructor(e){this._document=e}findClosestShopwareBuyButton(e){let t=this.findClosestBuyBox(e);return null===t?null:t.querySelector(".btn-buy")}findClosestApplePayContainer(e){return e.closest(".mollie-apple-pay-direct")}findClosestBuyBox(e){let t=e.closest(".product-action");return null===t&&(t=e.closest(".product-detail-form-container")),null===t&&(t=e.closest(".offcanvas-cart-actions")),null===t&&(t=e.closest(".checkout-aside-container")),null===t&&(t=e.closest(".checkout-main")),t}findAllExpressButtons(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=".mollie-express-button";return null!==t&&(i+=t),e.querySelectorAll(i)}findApplePayButtons(){return this._document.querySelectorAll(".mollie-express-button.js-apple-pay")}findApplePayContainers(){return this._document.querySelectorAll(".js-apple-pay-container")}findPayPalExpressButtons(){return this._document.querySelectorAll(".mollie-paypal-button")}findClosestPrivacyBox(e){let t=this.findClosestBuyBox(e);return null===t?null:t.querySelector(".mollie-privacy-note")}getPrivacyBoxCheckbox(e){return e.querySelector('input[name="acceptedDataProtection"]')}}let _="d-none",b="is-invalid";class S{constructor(e){this._repoBuyBox=new C,this._document=e}initCheckbox(){let e=this._document.querySelectorAll(".mollie-privacy-note:not(.observed)");for(let t=0;t<e.length;t++){let i=e[t];i.classList.remove(_),i.classList.add("observed");let n=this._repoBuyBox.findClosestBuyBox(i),o=this._repoBuyBox.findAllExpressButtons(n,null);if(0===o.length){i.classList.add(_);continue}for(let e=0;e<o.length;
1e++){let t=o[e];new MutationObserver(e=>{let t=o.length;i.classList.remove(_),e.forEach(e=>{e.target.classList.contains(_)&&t--}),t<=0&&i.classList.add(_)}).observe(t,{attributes:!0,attributeFilter:["class"]})}}}validateForExpressButton(e){let t=this._repoBuyBox.findClosestPrivacyBox(e);if(!(t instanceof HTMLDivElement))return!0;let i=this._repoBuyBox.getPrivacyBoxCheckbox(t),n=+!!i.checked;return i.classList.remove(b),0!==n||(i.classList.add(b),!1)}}class E{addEventListenerOnce(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"click",n="__handler_"+i;e[n]||(e.addEventListener(i,t),e[n]=!0)}}class P{register(e,t){let i=window.PluginManager.getPluginList().OffCanvasCart.get("instances");if(i)for(let n=0;n<i.length;n++){let o=i[n];o["_"+t+"_subscribed"]||(o.$emitter.subscribe("registerEvents",e),o["_"+t+"_subscribed"]=!0)}}}let w="loading";class B{constructor(){this._repoBuyBox=new C}addItemToCart(e){let t=this._repoBuyBox.findClosestShopwareBuyButton(e);if(!(t instanceof HTMLButtonElement))return;let i=t.closest("form");if(!(i instanceof HTMLFormElement)||e.classList.contains(w))return;let n=i.elements,o=[];e.classList.add(w);for(let e=0;e<n.length;e++){let t=n[e];("radio"!==t.type||t.checked)&&t.name&&"redirectTo"!==t.name&&o.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))}o.push("isExpressCheckout=1");let r=i.action,s=i.method,l=new XMLHttpRequest;l.open(s,r,!1),l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.onreadystatechange=()=>{if(l.readyState===XMLHttpRequest.DONE&&(e.classList.remove(w),l.status>=400))throw Error(`Request failed with status ${l.status}`)},l.send(o.join("&"))}}class M{constructor(){this.APPLE_PAY_VERSION=3,this.client=new s}create(e,t,i,n,o,r,s){let l=this;var a=["name","email","postalAddress"];1===n&&a.push("phone");let d=!1;null!==r&&(d=r.value);let c=new ApplePaySession(this.APPLE_PAY_VERSION,{countryCode:t,currencyCode:i,requiredShippingContactFields:a,supportedNetworks:["amex","maestro","masterCard","visa","vPay"],merchantCapabilities:["supports3DS"],total:{label:"",amount:0}});return c.onvalidatemerchant=function(e){l.client.post(o+"/mollie/apple-pay/validate",JSON.stringify({validationUrl:e.validationURL}),t=>{if(!1===t.success)throw Error("Validation failed for URL: "+e.validationURL);let i=JSON.parse(t.session);c.completeMerchantValidation(i)},()=>{c.abort()})},c.onshippingcontactselected=function(e){var t="";void 0!==e.shippingContact.countryCode&&(t=e.shippingContact.countryCode),l.client.post(o+"/mollie/apple-pay/shipping-methods",JSON.stringify({countryCode:t}),e=>{e.success?c.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS,e.shippingmethods,e.cart.total,e.cart.items):c.completeShippingContactSelection(ApplePaySession.STATUS_FAILURE,[],{label:"",amount:0,pending:!0},[])},()=>{c.abort()})},c.onshippingmethodselected=function(e){l.client.post(o+"/mollie/apple-pay/set-shipping",JSON.stringify({identifier:e.shippingMethod.identifier}),e=>{e.success?c.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS,e.cart.total,e.cart.items):c.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE,{label:"",amount:0,pending:!0},[])},()=>{c.abort()})},c.onpaymentauthorized=function(e){var t=e.payment.token;t=JSON.stringify(t),c.completePayment(ApplePaySession.STATUS_SUCCESS),l.finishPayment(o+"/mollie/apple-pay/start-payment",t,e.payment,d),s.classList.remove("processed")},c.oncancel=function(){e&&l.client.post(o+"/mollie/apple-pay/restore-cart"),s.classList.remove("processed")},c}finishPayment(e,t,i,n){let o=function(e,t){let i=document.createElement("input");return i.type="hidden",i.name=e,i.value=t,i},r=document.createElement("form");r.action=e,r.method="POST";let s=i.shippingContact.addressLines[0];i.shippingContact.addressLines.length>1&&(s+=" "+i.shippingContact.addressLines[1]),r.insertAdjacentElement("beforeend",o("email",i.shippingContact.emailAddress)),r.insertAdjacentElement("beforeend",o("lastname",i.shippingContact.familyName)),r.insertAdjacentElement("beforeend",o("firstname",i.shippingContact.givenName)),r.insertAdjacentElement("beforeend",o("street",s)),r.insertAdjacentElement("beforeend",o("postalCode",i.shippingContact.postalCode)),r.insertAdjacentElement("beforeend",o("city",i.shippingContact.locality)),r.insertAdjacentElement("beforeend",o("acceptedDataProtection",n)),void 0!==i.shippingContact.phoneNumber&&i.shippingContact.phoneNumber.length>0&&r.insertAdjacentElement("beforeend",o("phone",i.shippingContact.phoneNumber)),r.insertAdjacentElement("beforeend",o("countryCode",i.shippingContact.countryCode)),r.insertAdjacentElement("beforeend",o("paymentToken",t)),document.body.insertAdjacentElement("beforeend",r),r.submit()}}class A{constructor(){this._repoBuyBox=new C}isCheckoutPossible(e){let t=this._repoBuyBox.findClosestShopwareBuyButton(e);return!(t instanceof HTMLButtonElement)||!t.hasAttribute("disabled")}}class I{constructor(e,t){this._countryCode=e.querySelector('input[name="countryCode"]').value,this._currency=e.querySelector('input[name="currency"]').value,this._mode=e.querySelector('input[name="mode"]').value,this._withPhone=parseInt(e.querySelector('input[name="withPhone"]').value),this._dataProtection=e.querySelector('input[name="acceptedDataProtection"]'),this._isProductMode="productMode"===this._mode;let i=t.getAttribute("data-shop-url");"/"===i.slice(-1)&&(i=i.slice(0,-1)),this._shopSlug=i}isProductMode(){return this._isProductMode}getCountryCode(){return this._countryCode}getCurrency(){return this._currency}getMode(){return this._mode}getWithPhone(){return this._withPhone}getDataProtection(){return this._dataProtection}getShopSlug(){return this._shopSlug}}let x="d-none";class L extends d{init(){this._privacySection=new S(document),this._eventUtils=new E,this._cartService=new B,this._productBoxValidator=new A,this._repoBuyBox=new C(document),new P().register(this.initCurrentPage.bind(this),"mollie-apple-pay-direct"),this.initCurrentPage()}initCurrentPage(){if(this._applePayButtons=this._repoBuyBox.findApplePayButtons(),this._applePayContainers=this._repoBuyBox.findApplePayContainers(),!window.ApplePaySession||!window.ApplePaySession.canMakePayments()||this._applePayButtons.length<=0){this.hideApplePayFeature();return}if(this._privacySection.initCheckbox(),this.showApplePayFeature(),this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++){let t=this._applePayButtons[e];this._eventUtils.addEventListenerOnce(t,this.onApplePayButtonClicked.bind(this),"click"),this.updateButtonVisibility(t),this._repoBuyBox.findClosestBuyBox(t).addEventListener("change",()=>{this.updateButtonVisibility(t)})}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(x)):(e.hidden=!0,e.classList.add(x))}
1showApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.remove(x);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.remove(x)}hideApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.add(x);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.add(x)}onApplePayButtonClicked(e){let t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t)||!this._privacySection.validateForExpressButton(t))return;let i=new I(this._repoBuyBox.findClosestApplePayContainer(t),t);i.isProductMode()&&this._cartService.addItemToCart(t),new M().create(i.isProductMode(),i.getCountryCode(),i.getCurrency(),i.getWithPhone(),i.getShopSlug(),i.getDataProtection(),t).begin()}}class F extends d{static #e=this.options={shopUrl:null,hideAlways:!1,applePayId:null,hideApplePayOption:!1};init(){!(!this.options.hideAlways&&window.ApplePaySession&&window.ApplePaySession.canMakePayments())&&(this.hideApplePay(".payment-method-input.applepay"),this.hideApplePay("#paymentMethod"+this.options.applePayId),this.options.hideApplePayOption&&this.hideApplePaySelect(this.options.applePayId))}hideApplePay(e){let t=document.querySelector(e),i=this.getClosest(t,".payment-method");i&&i.classList&&i.remove()}hideApplePaySelect(e){let t=document.querySelector('option[value="'+e+'"]');null!==t&&t.remove()}getShopUrl(){let e=this.options.shopUrl;if(void 0===e)return"";for(;"/"===e.substr(-1);)e=e.substr(0,e.length-1);return e}getClosest(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){let t=(this.document||this.ownerDocument).querySelectorAll(e),i=t.length;for(;--i>=0&&t.item(i)!==this;);return i>-1});e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null}}let O="d-none";class k extends d{static #e=this.options={shopUrl:null,customerId:null,mollieMandateContainerClass:".mollie-credit-card-mandate",mollieMandateDataId:"data-mollie-credit-card-mandate-id",mollieMandateRemoveButtonClass:".mollie-credit-card-mandate-remove",mollieMandateRemoveModalButtonClass:".mollie-credit-card-mandate-remove-modal-button",mollieMandateDeleteAlertSuccessId:"#mollieCreditCardMandateDeleteSuccess",mollieMandateDeleteAlertErrorId:"#mollieCreditCardMandateDeleteError"};init(){if(!this.options.shopUrl)throw Error(`The "shopUrl" option for the plugin "${this._pluginName}" is not defined.`);if(!this.options.customerId)throw Error(`The "customerId" option for the plugin "${this._pluginName}" is not defined.`);this.mollieMandateDeleteAlertEl=document.querySelector(this.options.mollieMandateDeleteAlertSuccessId),this.mollieMandateDeleteAlertEl&&(this.mollieMandateDeleteAlertErrorEl=document.querySelector(this.options.mollieMandateDeleteAlertErrorId),this.mollieMandateDeleteAlertErrorEl&&(this.client=new s,this.registerEvents()))}registerEvents(){let e=document.querySelectorAll(this.options.mollieMandateRemoveButtonClass);if(!e||0===e.length)return;let t=document.querySelectorAll(this.options.mollieMandateRemoveModalButtonClass);t&&0!==t.length&&(e.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),this.onRemoveButtonClick(e)})}),t.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.onConfirmRemoveButtonClick()})}))}onRemoveButtonClick(e){this.currentContainerEl=e.closest(this.options.mollieMandateContainerClass),this.currentContainerEl&&(this.currentMandateId=this.currentContainerEl.getAttribute(this.options.mollieMandateDataId))}onConfirmRemoveButtonClick(){let{currentContainerEl:e,currentMandateId:t}=this;e&&t&&this.deleteMandate(t).then(t=>{let{success:i}=t;i?(this.mollieMandateDeleteAlertErrorEl.classList.add(O),this.mollieMandateDeleteAlertEl.classList.remove(O),e.remove()):(this.mollieMandateDeleteAlertEl.classList.add(O),this.mollieMandateDeleteAlertErrorEl.classList.remove(O))})}deleteMandate(e){return new Promise(t=>{this.client.post(this.options.shopUrl+"/mollie/components/revoke-mandate/"+this.options.customerId+"/"+e,"",e=>{t({success:e&&e.success})},()=>{t({success:!1})},"application/json; charset=utf-8")})}}let D="d-none";class q extends d{init(){this._container=document.querySelector("div.mollie-pos-terminals"),void 0!==this._container&&null!==this._container&&(this.initControls(),null!==this._paymentForm&&null!==this._dropdownTerminals&&(this.registerEvents(),this.updateDropdownVisibility(this._posRadioInput,this._container,this._dropdownTerminals),this.updateTerminal(this._shopUrl,this._customerId,this._posRadioInput,this._dropdownTerminals,function(){})))}initControls(){this._shopUrl=this._container.getAttribute("data-shop-url"),"/"===this._shopUrl.substr(-1)&&(this._shopUrl=this._shopUrl.substr(0,this._shopUrl.length-1)),this._customerId=this._container.getAttribute("data-customer-id"),this._dropdownTerminals=document.querySelector("#posTerminals"),this._paymentForm=d
1ocument.querySelector("#changePaymentForm"),void 0!==this._paymentForm&&null!==this._paymentForm&&(this._radioInputs=this._paymentForm.querySelectorAll('input[type="radio"]'),this._posRadioInput=this._paymentForm.querySelector('input[type="radio"].pointofsale'))}registerEvents(){if(null===this._paymentForm)return;let e=this._shopUrl,t=this._customerId,i=this._container,n=this._radioInputs,o=this._posRadioInput,r=this._dropdownTerminals;n.forEach(e=>{e.addEventListener("change",()=>{this.updateDropdownVisibility(o,i,r)})}),r.addEventListener("change",async()=>{this.updateTerminal(e,t,o,r,function(){})})}updateDropdownVisibility(e,t,i){let n=!1;void 0===e||!1===e.checked?t.classList.add(D):(t.classList.remove(D),n=!0),void 0!==i&&(i.required=n)}updateTerminal(e,t,i,n,o){if(void 0===i){o("POS Radio Input not defined");return}if(null===i){o("POS Radio Input not found");return}if(!1===i.checked){o("POS payment not active");return}if(void 0===n){o("POS terminals not defined");return}if(null===n){o("POS terminals not found");return}if(""===n.value){o("no POS terminal selected");return}new s().post(e+"/mollie/pos/store-terminal/"+t+"/"+n.value,"",function(){o("terminal updated successfully")},function(){o("error when updating terminal")},"application/json; charset=utf-8")}constructor(...e){super(...e),this._shopUrl="",this._customerId="",this._dropdownTerminals=null,this._container=null,this._paymentForm=null,this._radioInputs=null,this._posRadioInput=null}}let j="d-none";class T extends d{init(){this._privacySection=new S(document),this._eventUtils=new E,this._cartService=new B,this._productBoxValidator=new A,this._repoBuyBox=new C(document),new P().register(this.bindEvents.bind(this),"mollie-paypal-express"),this.bindEvents()}bindEvents(){let e=this._repoBuyBox.findPayPalExpressButtons();if(0!==e.length){this._privacySection.initCheckbox();for(let t=0;t<e.length;t++){let i=e[t];this._eventUtils.addEventListenerOnce(i,this.onExpressCheckout.bind(this),"click"),this.updateButtonVisibility(i),this._repoBuyBox.findClosestBuyBox(i).addEventListener("change",()=>{this.updateButtonVisibility(i)})}}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(j)):(e.hidden=!0,e.classList.add(j))}onExpressCheckout(e){let t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t)||!this._privacySection.validateForExpressButton(t))return;this._cartService.addItemToCart(t);let i=t.getAttribute("data-form-action"),n=document.createElement("form");n.setAttribute("action",i),n.setAttribute("method","POST"),document.body.insertAdjacentElement("beforeend",n),n.submit()}}let U="d-none",N="invalid";class R extends d{init(){let e=document.getElementById("molliePayPhone");if(null===e)return;let t=document.querySelector(".mollie-phone-field"),i=document.querySelector('.mollie-phone-field [data-form-validation-invalid-phone="true"]');e.addEventListener("focus",e=>{t.classList.add("was-validated"),e.target.removeAttribute(N),i.classList.add(U)}),e.addEventListener("blur",e=>{let t=e.target.form;return!1===t.reportValidity()&&(e.target.setAttribute(N,!0),i.classList.remove(U)),t.reportValidity()})}}window.addEventListener("pageshow",function(e){e.persisted&&window.location.reload()}),void 0!==window.mollie_javascript_use_shopware&&"1"===window.mollie_javascript_use_shopware&&new class{register(){let e=window.PluginManager;e.register("MollieApplePayDirect",L),e.register("PayPalExpressPlugin",T),e.register("MollieApplePayPaymentMethod",F,"[data-mollie-template-applepay-account]"),e.register("MollieApplePayPaymentMethod",F,"[data-mollie-template-applepay-checkout]"),e.register("MollieCreditCardComponents",h,"[data-mollie-template-creditcard-components]"),e.register("MollieCreditCardComponentsSw64",v,"[data-mollie-template-creditcard-components-sw64]"),e.register("MollieCreditCardMandateManage",k,"[data-mollie-credit-card-mandate-manage]"),e.register("MolliePosTerminal",q,"[data-mollie-template-pos-terminal]"),e.register("MolliePhonePlugin",R,"[data-mollie-phone-validation]")}}().register()})();

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.