PageSourceSearch

https://schulteufer.de/theme/ea56c8fdc093b3e6898be3636819d006/js/mollie-payments/mollie-payments.js?1791294908

js schulteufer.de collected 2026-10-10 00:48:31 UTC 26,992 bytes, 1 lines download raw bytes

1(()=>{var j="application/json",f=class{get(e,t=null,o=null,n=j){return this.send("GET",e,null,t,o,n)}post(e,t=null,o=null,n=null,i=j){return this.send("POST",e,t,o,n,i)}send(e,t,o=null,n=null,i=null,s=j){return fetch(t,{method:e,headers:{"Content-Type":s},body:o}).then(l=>(l.headers.get("content-type")||"").includes("application/json")?l.json():l.text()).then(l=>{typeof n=="function"&&n(l)}).catch(l=>{typeof i=="function"&&i(l)})}};var c=class{static options={};constructor(e,t={},o="Plugin"){this.el=e,this._pluginName=o,this._listeners=[],this.options=this._mergeOptions(t),this.init()}_addListener(e,t,o,n=!1){!e||typeof e.addEventListener!="function"||(e.addEventListener(t,o,n),this._listeners.push({target:e,type:t,handler:o,options:n}))}destroy(){this._listeners.forEach(function(e){e.target.removeEventListener(e.type,e.handler,e.options)}),this._listeners=[]}_mergeOptions(e){let t=this._pluginName.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase(),o={};if(this.el&&typeof this.el.getAttribute=="function"){let n=this.el.getAttribute(`data-${t}-options`);if(n)try{o=JSON.parse(n)}catch(i){console.error(`[MolliePlugin] Could not parse data-${t}-options`,i)}}return Object.assign({},this.constructor.options,e,o)}init(){}};var H="d-none",v=class extends c{static options={newCardMandateOption:null,mollieCreditCardFormClass:".mollie-components-credit-card",mollieCreditCardMandateInput:'input[name="mandateId"]',mollieShouldSaveCardDetailInput:'input[name="mollieShouldSaveCardDetail"]'};init(){this.client=new f,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(){this.options.shopUrl!=null&&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?null:e.value}isValidSelectedMandate(e){return e&&e!==this.options.newCardMandateOption}shouldSaveCardDetail(){let e=document.querySelector(this.options.mollieShouldSaveCardDetailInput);return e?e.checked:!1}onMandateInputChange(e){if(e===this.options.newCardMandateOption){this.mollieCreditCarfFormEl.classList.remove(H);return}e!==null&&this.mollieCreditCarfFormEl.classList.add(H)}};var L=class{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 e===null&&(e=this._document.querySelector('#confirmOrderForm button[type="submit"]')),e}};var Q="#cardHolder",ee="div.mollie-components-credit-card",te='#changePaymentForm input[type="radio"]',$="error",oe="is-focused",M=class extends v{static options={...v.options,paymentId:null,customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0};init(){super.init();try{let e=new L(document);this._paymentForm=e.getPaymentForm(),this._confirmForm=e.getConfirmForm(),this._confirmFormButton=e.getSubmitButton()}catch{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(Q);document.querySelector(ee)&&e&&!window.mollieComponentsObject&&(window.mollieComponentsObject=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode}),window.mollieComponents={}),this.createComponentsInputs()}_registerEvents(){this._confirmForm!==null&&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((o,n,i)=>{let s=this._mountMollieComponent(o.id,o.name);i[n][o.name]=s,s.addEventListener("change",l=>{let a=document.getElementById(`${o.name}`),p=document.getElementById(`${o.errors}`);l.error&&l.touched?(a.classList.add($),p.textContent=l.error):(a.classList.remove($),p.textContent="")}),s.addEventListener("focus",()=>{e.setFocus(`${o.id}`,!0)}),s.addEventListener("blur",()=>{e.setFocus(`${o.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(oe,t)}async submitForm(e){if(e.defaultPrevented)return;let t=this,o=this._confirmForm,n=document.querySelector(`${te}[value="${this.options.paymentId}"]`);if((n==null||n.checked===!1)&&this._confirmForm||n&&n.checked===!1)return;e.preventDefault();let i=this.getMandateCheckedValue();if(this.isValidSelectedMandate(i)){this.client.post(t.options.shopUrl+"/mollie/components/store-mandate-id/"+t.options.customerId+"/"+i,null,()=>{t.continueShopwareCheckout(o)},()=>{t.continueShopwareCheckout(o)},"application/json; charset=utf-8");return}let s=document.getElementById(`${this.getInputFields().verificationCode.errors}`);s.textContent="";let{token:l,error:a}=await window.mollieComponentsObject.createToken();if(a){s.textContent=a.message,this._reactivateFormSubmit(),s.scrollIntoView();return}document.getElementById("cardToken").setAttribute("value",l),t.continueShopwareCheckout(o)}continueShopwareCheckout(e){e.submit()}};var h=class{constructor(e){this._document=e}findClosestShopwareBuyButton(e){let t=this.findClosestBuyBox(e);return t===null?null:t.querySelector(".btn-buy")}findClosestApplePayContainer(e){return e.closest(".mollie-apple-pay-direct")}findClosestBuyBox(e){let t=e.closest(".product-action");return t===null&&(t=e.closest(".product-detail-form-container")),t===null&&(t=e.closest(".offcanvas-cart-actions")),t===null&&(t=e.closest(".checkout-aside-container")),t===null&&(t=e.closest(".checkout-main")),t}findAllExpressButtons(e,t=null){let o=".mollie-express-button";
1return t!==null&&(o+=t),e.querySelectorAll(o)}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(".js-mollie-paypal-button")}findClosestPrivacyBox(e){let t=this.findClosestBuyBox(e);return t===null?null:t.querySelector(".mollie-privacy-note")}getPrivacyBoxCheckbox(e){return e.querySelector('input[name="acceptedDataProtection"]')}};var A="d-none",Y="is-invalid",J="js-mollie-observed",_=class{constructor(e){this._repoBuyBox=new h,this._document=e}initCheckbox(){let e=this._document.querySelectorAll(`.mollie-privacy-note:not(.${J})`);for(let t=0;t<e.length;t++){let o=e[t];o.classList.remove(A),o.classList.add(J);let n=this._repoBuyBox.findClosestBuyBox(o);if(n===null){o.classList.add(A);continue}let i=this._repoBuyBox.findAllExpressButtons(n,null);if(i.length===0){o.classList.add(A);continue}for(let s=0;s<i.length;s++){let l=i[s];new MutationObserver(p=>{let u=i.length;o.classList.remove(A),p.forEach(d=>{d.target.classList.contains(A)&&u--}),u<=0&&o.classList.add(A)}).observe(l,{attributes:!0,attributeFilter:["class"]})}}}getAcceptedDataProtection(e){let t=this._repoBuyBox.findClosestPrivacyBox(e);if(t===null)return 0;let o=this._repoBuyBox.getPrivacyBoxCheckbox(t);return o===null?0:o.checked?1:0}validateForExpressButton(e){let t=this._repoBuyBox.findClosestPrivacyBox(e);if(!(t instanceof HTMLDivElement))return!0;let o=this._repoBuyBox.getPrivacyBoxCheckbox(t),n=o.checked?1:0;return o.classList.remove(Y),n===0?(o.classList.add(Y),!1):!0}};var E=class{addEventListenerOnce(e,t,o="click"){let n="__handler_"+o;e[n]||(e.addEventListener(o,t),e[n]=!0)}};var C=class{register(e,t){let o=window.PluginManager.getPluginList().OffCanvasCart;if(!o)return;let n=o.get("instances");if(n)for(let i=0;i<n.length;i++){let s=n[i];s["_"+t+"_subscribed"]||(s.$emitter.subscribe("registerEvents",e),s["_"+t+"_subscribed"]=!0)}}};var V="loading",S=class{constructor(){this._repoBuyBox=new h}addItemToCart(e){let t=this._repoBuyBox.findClosestShopwareBuyButton(e);if(!(t instanceof HTMLButtonElement))return;let o=t.closest("form");if(!(o instanceof HTMLFormElement)||e.classList.contains(V))return;let n=o.elements,i=[];e.classList.add(V);for(let p=0;p<n.length;p++){let u=n[p];u.type==="radio"&&!u.checked||u.name&&u.name!=="redirectTo"&&i.push(encodeURIComponent(u.name)+"="+encodeURIComponent(u.value))}i.push("isExpressCheckout=1");let s=o.action,l=o.method,a=new XMLHttpRequest;a.open(l,s,!1),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onreadystatechange=()=>{if(a.readyState!==XMLHttpRequest.DONE)return;if(e.classList.remove(V),a.status>=400)throw new Error(`Request failed with status ${a.status}`)},a.send(i.join("&"))}};var x=class{APPLE_PAY_VERSION=3;constructor(){this.client=new f}create(e,t,o,n,i,s,l){let a=this;var p=["name","email","postalAddress"];n===1&&p.push("phone");var u={countryCode:t,currencyCode:o,requiredShippingContactFields:p,supportedNetworks:["amex","maestro","masterCard","visa","vPay"],merchantCapabilities:["supports3DS"],total:{label:"",amount:0}};let d=new ApplePaySession(this.APPLE_PAY_VERSION,u);return d.onvalidatemerchant=function(y){a.client.post(i+"/mollie/apple-pay/validate",JSON.stringify({validationUrl:y.validationURL}),m=>{if(m.success===!1)throw new Error("Validation failed for URL: "+y.validationURL);let P=JSON.parse(m.session);d.completeMerchantValidation(P)},()=>{d.abort()})},d.onshippingcontactselected=function(y){var m="";y.shippingContact.countryCode!==void 0&&(m=y.shippingContact.countryCode),a.client.post(i+"/mollie/apple-pay/shipping-methods",JSON.stringify({countryCode:m}),P=>{P.success?d.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS,P.shippingmethods,P.cart.total,P.cart.items):d.completeShippingContactSelection(ApplePaySession.STATUS_FAILURE,[],{label:"",amount:0,pending:!0},[])},()=>{d.abort()})},d.onshippingmethodselected=function(y){a.client.post(i+"/mollie/apple-pay/set-shipping",JSON.stringify({identifier:y.shippingMethod.identifier}),m=>{m.success?d.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS,m.cart.total,m.cart.items):d.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE,{label:"",amount:0,pending:!0},[])},()=>{d.abort()})},d.onpaymentauthorized=function(y){var m=y.payment.token;m=JSON.stringify(m),d.completePayment(ApplePaySession.STATUS_SUCCESS),a.finishPayment(i+"/mollie/apple-pay/start-payment",m,y.payment,s),l.classList.remove("processed")},d.oncancel=function(){e&&a.client.post(i+"/mollie/apple-pay/restore-cart"),l.classList.remove("processed")},d}finishPayment(e,t,o,n){let i=function(a,p){let u=document.createElement("input");return u.type="hidden",u.name=a,u.value=p,u},s=document.createElement("form");s.action=e,s.method="POST";let l=o.shippingContact.addressLines[0];o.shippingContact.addressLines.length>1&&(l+=" "+o.shippingContact.addressLines[1]),s.insertAdjacentElement("beforeend",i("email",o.shippingContact.emailAddress)),s.insertAdjacentElement("beforeend",i("lastname",o.shippingContact.familyName)),s.insertAdjacentElement("beforeend",i("firstname",o.shippingContact.givenName)),s.insertAdjacentElement("beforeend",i("street",l)),s.insertAdjacentElement("beforeend",i("postalCode",o.shippingContact.postalCode)),s.insertAdjacentElement("beforeend",i("city",o.shippingContact.locality)),s.insertAdjacentElement("beforeend",i("acceptedDataProtection",n)),o.shippingContact.phoneNumber!==void 0&&o.shippingContact.phoneNumber.length>0&&s.insertAdjacentElement("beforeend",i("phone",o.shippingContact.phoneNumber)),s.insertAdjacentElement("beforeend",i("countryCode",o.shippingContact.countryCode)),s.insertAdjacentElement("beforeend",i("paymentToken",t)),document.body.insertAdjacentElement("beforeend",s),s.submit()}};var ne="disabled",g=class{constructor(){this._repoBuyBox=new h}isCheckoutPossible(e){let t=this._repoBuyBox.findClosestShopwareBuyButton(e);return t instanceof HTMLButtonElement?!t.hasAttribute(ne):!0}};var I=class{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._isProductMode=this._mode==="productMode";let o=t.getAttribute("data-shop-url");o.slice(-1)==="/"&&(o=o.slice(0,-1)),this._shopSlug=o}isProductMode(){return this._isProductMode}getCountryCode(){return this._countryCode}getCurrency(){return this._currency}getMode(){return this._mode}getWithPhone(){return this._withPhone}getShopSlug(){return this._shopSlug}};
1var b="d-none",O=class extends c{init(){this._privacySection=new _(document),this._eventUtils=new E,this._cartService=new S,this._productBoxValidator=new g,this._repoBuyBox=new h(document),new C().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);let o=this._repoBuyBox.findClosestBuyBox(t);o!==null&&o.addEventListener("change",()=>{this.updateButtonVisibility(t)})}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(b)):(e.hidden=!0,e.classList.add(b))}showApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.remove(b);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.remove(b)}hideApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.add(b);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.add(b)}onApplePayButtonClicked(e){let t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t)||!this._privacySection.validateForExpressButton(t))return;let o=this._repoBuyBox.findClosestApplePayContainer(t),n=new I(o,t);n.isProductMode()&&this._cartService.addItemToCart(t),new x().create(n.isProductMode(),n.getCountryCode(),n.getCurrency(),n.getWithPhone(),n.getShopSlug(),this._privacySection.getAcceptedDataProtection(t),t).begin()}};var ie="#paymentMethod",se=".payment-method",w=class extends c{static options={shopUrl:null,hideAlways:!1,applePayId:null,hideApplePayOption:!1};init(){!this.options.hideAlways&&window.ApplePaySession&&window.ApplePaySession.canMakePayments()||(this.hideApplePay(ie+this.options.applePayId),this.options.hideApplePayOption&&this.hideApplePaySelect(this.options.applePayId))}hideApplePay(e){let t=document.querySelector(e),o=this.getClosest(t,se);o&&o.classList&&o.remove()}hideApplePaySelect(e){let t=document.querySelector('option[value="'+e+'"]');t!==null&&t.remove()}getShopUrl(){let e=this.options.shopUrl;if(e===void 0)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(o){let n=(this.document||this.ownerDocument).querySelectorAll(o),i=n.length;for(;--i>=0&&n.item(i)!==this;);return i>-1});e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null}};var q="d-none",T=class extends c{static 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 new Error(`The "shopUrl" option for the plugin "${this._pluginName}" is not defined.`);if(!this.options.customerId)throw new 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 f,this.registerEvents()))}registerEvents(){let e=document.querySelectorAll(this.options.mollieMandateRemoveButtonClass);if(!e||e.length===0)return;let t=document.querySelectorAll(this.options.mollieMandateRemoveModalButtonClass);!t||t.length===0||(e.forEach(o=>{o._mollieManageInit||(o._mollieManageInit=!0,o.addEventListener("click",n=>{n.preventDefault(),this.onRemoveButtonClick(o)}))}),t.forEach(o=>{o._mollieManageInit||(o._mollieManageInit=!0,o.addEventListener("click",n=>{n.preventDefault(),this.onConfirmRemoveButtonClick()}))}))}onRemoveButtonClick(e){this.currentContainerEl=e.closest(this.options.mollieMandateContainerClass),this.currentContainerEl&&(this.currentMandateId=this.currentContainerEl.getAttribute(this.options.mollieMandateDataId))}onConfirmRemoveButtonClick(){let e=this.currentContainerEl,t=this.currentMandateId;!e||!t||(this.currentMandateId=null,this.currentContainerEl=null,this.deleteMandate(t).then(({success:o})=>{o?(this.mollieMandateDeleteAlertErrorEl.classList.add(q),this.mollieMandateDeleteAlertEl.classList.remove(q),e.remove()):(this.mollieMandateDeleteAlertEl.classList.add(q),this.mollieMandateDeleteAlertErrorEl.classList.remove(q))}))}deleteMandate(e){return new Promise(t=>{this.client.post(this.options.shopUrl+"/mollie/components/revoke-mandate/"+this.options.customerId+"/"+e,"",o=>{t({success:o&&o.success})},()=>{t({success:!1})},"application/json; charset=utf-8")})}};var re="div.mollie-pos-terminals",le="#posTerminals",ae="#changePaymentForm",ce='input[type="radio"]',de="data-shop-url",ue="data-customer-id",pe="data-pos-payment-id",z="d-none",R=class extends c{_shopUrl="";_customerId="";_dropdownTerminals=null;_container=null;_paymentForm=null;_radioInputs=null;_posRadioInput=null;init(){this._container=document.querySelector(re),!(this._container===void 0||this._container===null)&&(this.initControls(),this._paymentForm!==null&&this._dropdownTerminals!==null&&(this.registerEvents(),this.updateDropdownVisibility(this._posRadioInput,this._container,this._dropdownTerminals),this.updateTerminal(this._shopUrl,this._customerId,this._posRadioInput,this._dropdownTerminals,function(){})))}
1initControls(){if(this._shopUrl=this._container.getAttribute(de),this._shopUrl.substr(-1)==="/"&&(this._shopUrl=this._shopUrl.substr(0,this._shopUrl.length-1)),this._customerId=this._container.getAttribute(ue),this._dropdownTerminals=document.querySelector(le),this._paymentForm=document.querySelector(ae),this._paymentForm===void 0||this._paymentForm===null)return;this._radioInputs=this._paymentForm.querySelectorAll(ce);let e=this._container.getAttribute(pe);this._posRadioInput=e?this._paymentForm.querySelector("#paymentMethod"+e):null}registerEvents(){if(this._paymentForm===null)return;let e=this._shopUrl,t=this._customerId,o=this._container,n=this._radioInputs,i=this._posRadioInput,s=this._dropdownTerminals;n.forEach(l=>{l.addEventListener("change",()=>{this.updateDropdownVisibility(i,o,s)})}),s.addEventListener("change",async()=>{this.updateTerminal(e,t,i,s,function(){})})}updateDropdownVisibility(e,t,o){let n=!1;e===void 0||e.checked===!1?t.classList.add(z):(t.classList.remove(z),n=!0),o!==void 0&&(o.required=n)}updateTerminal(e,t,o,n,i){if(o===void 0){i("POS Radio Input not defined");return}if(o===null){i("POS Radio Input not found");return}if(o.checked===!1){i("POS payment not active");return}if(n===void 0){i("POS terminals not defined");return}if(n===null){i("POS terminals not found");return}if(n.value===""){i("no POS terminal selected");return}new f().post(e+"/mollie/pos/store-terminal/"+t+"/"+n.value,"",function(){i("terminal updated successfully")},function(){i("error when updating terminal")},"application/json; charset=utf-8")}};var W="d-none",D=class extends c{init(){this._privacySection=new _(document),this._eventUtils=new E,this._cartService=new S,this._productBoxValidator=new g,this._repoBuyBox=new h(document),new C().register(this.bindEvents.bind(this),"mollie-paypal-express"),this.bindEvents()}bindEvents(){let e=this._repoBuyBox.findPayPalExpressButtons();if(e.length!==0){this._privacySection.initCheckbox();for(let t=0;t<e.length;t++){let o=e[t];this._eventUtils.addEventListenerOnce(o,this.onExpressCheckout.bind(this),"click"),this.updateButtonVisibility(o);let n=this._repoBuyBox.findClosestBuyBox(o);n!==null&&n.addEventListener("change",()=>{this.updateButtonVisibility(o)})}}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(W)):(e.hidden=!0,e.classList.add(W))}onExpressCheckout(e){let t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t)||!this._privacySection.validateForExpressButton(t))return;this._cartService.addItemToCart(t);let o=t.getAttribute("data-form-action"),n=document.createElement("form");n.setAttribute("action",o),n.setAttribute("method","POST");let i=document.createElement("input");i.type="hidden",i.name="acceptedDataProtection",i.value=this._privacySection.getAcceptedDataProtection(t),n.insertAdjacentElement("beforeend",i),document.body.insertAdjacentElement("beforeend",n),n.submit()}};var G="https://js.mollie.com/v2/mollie.js",F=class{load(){return window.mollieExpressScriptPromise||(window.mollieExpressScriptPromise=new Promise((e,t)=>{let o=document.createElement("script");o.src=G,o.onload=()=>e(),o.onerror=()=>t(new Error("Mollie: could not load "+G)),document.head.appendChild(o)})),window.mollieExpressScriptPromise}resolve(){return window.Mollie2&&typeof window.Mollie2.Checkout=="function"?window.Mollie2:window.Mollie&&typeof window.Mollie.Checkout=="function"?window.Mollie:null}createCheckout(e,t){let o=this.resolve();if(o===null)throw new Error("Mollie: mollie.js v2 is not available");return o.Checkout(e,{locale:t})}};var me="[data-mollie-express-component]",X="data-mollie-express-component-mounted",k=class extends c{init(){this._checkoutService=new F,new C().register(this.mountAll.bind(this),"mollie-express-components"),this.mountAll()}mountAll(){let e=document.querySelectorAll(me);e.length!==0&&this._checkoutService.load().then(()=>{e.forEach(t=>this.mount(t))}).catch(t=>{console.error(t)})}mount(e){if(e.hasAttribute(X))return;let t=e.getAttribute("data-client-access-token");if(t)try{this._checkoutService.createCheckout(t,e.getAttribute("data-locale")).create("express-component",this.getOptions(e)).mount(e),e.setAttribute(X,"true")}catch(o){console.error(o)}}getOptions(e){let t=e.getAttribute("data-options");
1if(!t)return{};try{return JSON.parse(t)}catch(o){return console.error(o),{}}}};var he="molliePayPhone",fe=".mollie-phone-field",ye='.mollie-phone-field [data-form-validation-invalid-phone="true"]',K="d-none",Ce="was-validated",Z="aria-invalid",N=class extends c{init(){let e=document.getElementById(he);if(e===null)return;let t=document.querySelector(fe),o=document.querySelector(ye);this._addListener(e,"focus",n=>{t.classList.add(Ce),n.target.removeAttribute(Z),o.classList.add(K)}),this._addListener(e,"blur",n=>{let i=n.target.form;return i.reportValidity()===!1&&(n.target.setAttribute(Z,"true"),o.classList.remove(K)),i.reportValidity()})}};var B=class r extends c{static options={productId:""};init(){this._form=this.el.closest("form"),this._form!==null&&(this._onSubmit=this._onSubmit.bind(this),this._addListener(this._form,"submit",this._onSubmit,!0))}_onSubmit(e){let t=this._form.querySelector(`input[name="${r.FIELD_NAME}"]`);if(e.submitter!==this.el){t!==null&&t.remove();return}t===null&&(t=document.createElement("input"),t.type="hidden",t.name=r.FIELD_NAME,this._form.appendChild(t)),t.value=this.options.productId}};B.FIELD_NAME="mollieSubscribe";var U=class{register(){let e=window.PluginManager,t=[["MollieApplePayDirect",O,"body"],["PayPalExpressPlugin",D,"body"],["MollieExpressComponents",k,"body"],["MollieApplePayPaymentMethod",w,"[data-mollie-template-applepay-account]"],["MollieApplePayPaymentMethod",w,"[data-mollie-template-applepay-checkout]"],["MollieCreditCardComponents",M,"[data-mollie-template-creditcard-components]"],["MollieCreditCardMandateManage",T,"[data-mollie-credit-card-mandate-manage]"],["MolliePosTerminal",R,"[data-mollie-template-pos-terminal]"],["MolliePhonePlugin",N,"[data-mollie-phone-validation]"],["MollieSubscribeButton",B,"[data-mollie-subscribe-button]"]];t.forEach(function(o){e.register(o[0],o[1],o[2])}),t.forEach(function(o){e.initializePlugin(o[0],o[2])})}};window.addEventListener("pageshow",function(r){r.persisted&&window.location.pathname.includes("/account/order/edit/")&&window.location.reload()});window.__mollieStorefrontRegistered||(window.__mollieStorefrontRegistered=!0,new U().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.