PageSourceSearch

https://www.probrake.de/plugins/s360_amazonpay_shop5/frontend/template/js/lpa.min.js?v=1.2.23

js probrake.de collected 2026-10-05 23:26:01 UTC 11,390 bytes, 1 lines download raw bytes

vendor: 3,046 bytes, line 1
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";function t(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}function e(t){return new this(function(e,n){function o(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var r=n.then;if("function"==typeof r)return void r.call(n,function(e){o(t,e)},function(n){a[t]={status:"rejected",reason:n},0==--i&&e(a)})}a[t]={status:"fulfilled",value:n},0==--i&&e(a)}if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var a=Array.prototype.slice.call(t);if(0===a.length)return e([]);for(var i=a.length,r=0;a.length>r;r++)o(r,a[r])})}function n(t){return!(!t||void 0===t.length)}function o(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var o;try{o=n(t._value)}catch(t){return void u(e.promise,t)}r(e.promise,o)}else(1===t._state?r:u)(e.promise,t._value)})):t._deferreds.push(e)}function r(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void l(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,d(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,d(t)}function d(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;n>e;e++)i(t,t._deferreds[e]);t._deferreds=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,r(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}var c=setTimeout;a.prototype.catch=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(o);return i(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,e,n)),n},a.prototype.finally=t,a.all=function(t){return new a(function(e,o){function a(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(e){a(t,e)},o)}i[t]=n,0==--r&&e(i)}catch(t){o(t)}}if(!n(t))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);for(var r=i.length,u=0;i.length>u;u++)a(u,i[u])})},a.allSettled=e,a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a(function(e){e(t)})}
1,a.reject=function(t){return new a(function(e,n){n(t)})},a.race=function(t){return new a(function(e,o){if(!n(t))return o(new TypeError("Promise.race accepts an array"));for(var i=0,r=t.length;r>i;i++)a.resolve(t[i]).then(e,o)})},a._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){c(t,0)},a._unhandledRejectionFn=function(t){};var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"function"!=typeof s.Promise?s.Promise=a:s.Promise.prototype.finally?s.Promise.allSettled||(s.Promise.allSettled=e):s.Promise.prototype.finally=t}),window.lpa=function(){var t=function(t){var e=document.getElementById(t);void 0!==window.amazon&&null!==window.amazon?null!==e&&void 0!==e?e.classList.contains("lpa-initialized")||(window.amazon.Pay.renderButton("#"+t,{merchantId:e.getAttribute("data-merchant-id"),ledgerCurrency:e.getAttribute("data-ledger-currency"),checkoutLanguage:e.getAttribute("data-language"),productType:e.getAttribute("data-product-type"),buttonColor:e.getAttribute("data-color"),placement:e.getAttribute("data-placement"),sandbox:"true"===e.getAttribute("data-sandbox"),signInConfig:{payloadJSON:e.getAttribute("data-payload"),signature:e.getAttribute("data-signature"),publicKeyId:e.getAttribute("data-publickeyid")}}),e.classList.add("lpa-initialized")):console.log('Amazon Pay: Warning: Login button element with ID "'+t+'" not found.'):console.log("Amazon Pay: Not completely initialized. Skipping button rendering.")},e=function(t){var e=document.getElementById(t);if(void 0!==window.amazon&&null!==window.amazon)if(null!==e&&void 0!==e){if(!e.classList.contains("lpa-initialized")){var o=e.getAttribute("data-context"),a=e.getAttribute("data-subscription-interval"),i=null,r="[]";null!==a&&""!==a&&void 0!==a&&(r='["'+e.getAttribute("data-subscription-interval")+'"]');var u={merchantId:e.getAttribute("data-merchant-id"),createCheckoutSession:function(){return new Promise(function(a,i){var u=function(){$.ajax({url:e.getAttribute("data-shop-url")+e.getAttribute("data-io-path"),data:'io={"name":"lpaCreateCheckoutSession","params":'+r+"}",dataType:"json",method:"POST"}).done(function(t){void 0!==t&&"success"===t.result&&t.checkoutSessionId?a(t.checkoutSessionId):(console.log("AmazonPay: Checkout session could not be created: ",t),i(t))})};"payDetail"===o||"payCategory"===o?n(t,u,i):u()})},ledgerCurrency:e.getAttribute("data-ledger-currency"),checkoutLanguage:e.getAttribute("data-language"),productType:e.getAttribute("data-product-type"),placement:e.getAttribute("data-placement"),buttonColor:e.getAttribute("data-color"),sandbox:"true"===e.getAttribute("data-sandbox")};if(null===a||""===a||void 0===a){var d=e.getAttribute("data-estimated-order-amount-amount"),l=e.getAttribute("data-estimated-order-amount-currency");d&&l&&(u.estimatedOrderAmount={amount:d,currencyCode:l}),i=window.amazon.Pay.renderButton("#"+t,u),window.lpaPayButtons.push(i)}else{i=window.amazon.Pay.renderButton("#"+t,u),e.style.display="none";var c=t.replaceAll(/-subscription-\d+\w+/g,""),s=document.getElementById(c+"-subscription-select");s&&!s.classList.contains("lpa-initialized")&&(s.addEventListener("change",function(t){var e=t.target.value,n=document.getElementsByClassName("lpa-button-group-"+c);if(n.length)for(var o=0;o<n.length;o++)n[o].style.display="none";var a;(a="none"===e?document.getElementById(c):document.getElementById(c+"-subscription-"+e))&&(a.style.display="")},{passive:!0}),s.classList.add("lpa-initialized")),window.lpaPaySubscriptionButtons.push(i)}e.classList.add("lpa-initialized")}}else console.log('Amazon Pay: Warning: Pay button element with ID "'+t+'" not found.');else console.log("Amazon Pay: Not completely initialized. Skipping button rendering.")},n=function(t,e,n){var o=document.getElementById(t);if(null!==o){var a=$(o),i=a.data("context");try{var r="#buy_form"+("payCategory"===i?"_"+a.data("product-id"):""),u=$
1(r);if(u.find(":invalid").length)return a.closest(".lpa-button-wrapper").find(".lpa-pay-button-express-feedback").html(a.data("msg-required-field-missing")),void n("AmazonPay: Required form fields missing.");var d=u.serializeObject(),l=0;l=void 0!==d.VariKindArtikel?parseInt(d.VariKindArtikel):parseInt(d.a);var c=parseFloat(d.anzahl);if(isNaN(c))return void n("AmazonPay: Quantity could not be determined.");var s=$.evo.basket();$.evo.io().call("pushToBasket",[l,c,d],s,function(t,i){if(a.css("cursor","initial"),t)n(t);else{var r=i.response;if(r)switch(r.nType){case 0:if(void 0!==r.cHints){for(var u="",d=0;d<r.cHints.length;d++)u=u+r.cHints[d]+"\n";a.closest(".lpa-button-wrapper").find(".lpa-pay-button-express-feedback").html(u)}return void n("AmazonPay: Adding to basket failed.");case 1:case 2:return void $.ajax({url:o.getAttribute("data-shop-url")+o.getAttribute("data-io-path"),data:'io={"name":"lpaGetEstimatedOrderAmount","params":[]}',dataType:"json",method:"POST"}).done(function(t){if(void 0!==t&&"success"===t.result&&t.estimatedOrderAmount){if(t.estimatedOrderAmount.amount&&t.estimatedOrderAmount.currencyCode)for(var o=0;o<window.lpaPayButtons.length;o++)window.lpaPayButtons[o]&&"function"==typeof window.lpaPayButtons[o].updateButtonInfo&&window.lpaPayButtons[o].updateButtonInfo(t.estimatedOrderAmount);e()}else console.log("AmazonPay: Failed to get estimated order amount: ",t),n(t)})}n(r)}})}catch(t){return void n(t)}}else n('AmazonPay: Failed to load button element with ID "'+t+'"')},o=function(t){var e=document.getElementById(t);if(void 0!==window.amazon&&null!==window.amazon)if(null!==e&&void 0!==e){if(!e.classList.contains("lpa-initialized")){var n={merchantId:e.getAttribute("data-merchant-id"),ledgerCurrency:e.getAttribute("data-ledger-currency"),checkoutLanguage:e.getAttribute("data-language"),productType:e.getAttribute("data-product-type"),buttonColor:e.getAttribute("data-color"),placement:e.getAttribute("data-placement"),sandbox:"true"===e.getAttribute("data-sandbox")},o=e.getAttribute("data-estimated-order-amount-amount"),a=e.getAttribute("data-estimated-order-amount-currency");o&&a&&(n.estimatedOrderAmount={amount:o,currencyCode:a});var i=window.amazon.Pay.renderButton("#"+t,n);window.initAmazonPayCheckoutRedirect=function(){i.initCheckout({createCheckoutSessionConfig:{payloadJSON:e.getAttribute("data-payload"),signature:e.getAttribute("data-signature"),publicKeyId:e.getAttribute("data-publickeyid")}})},window.initAmazonPayCheckoutRedirect(),e.classList.add("lpa-initialized")}}else console.log('Amazon Pay: Warning: Amazon Pay additional pay button element with ID "'+t+'" not found.');else console.log("Amazon Pay: Not completely initialized. Skipping button rendering.")},a=function(){window.lpaPayButtons=window.lpaPayButtons||[],window.lpaPaySubscriptionButtons=window.lpaPaySubscriptionButtons||[];for(var n=document.getElementsByClassName("lpa-button-pay-container"),a=0;a<n.length;a++)n[a].classList.contains("lpa-initialized")||e(n[a].id);for(var i=document.getElementsByClassName("lpa-button-login-container"),r=0;r<i.length;r++)i[r].classList.contains("lpa-initialized")||t(i[r].id);for(var u=document.getElementsByClassName("lpa-button-apb-redirect-container"),d=0;d<u.length;d++)u[d].classList.contains("lpa-initialized")||o(u[d].id)},i=function(){"undefined"!=typeof $?$(document).ajaxSuccess(function(t,e,n){n.url&&(n.url.includes("?isAjax")||n.url.includes("&isAjax"))&&window.setTimeout(a,100)}):setTimeout(i,50)},r=function(t,e){window.lpaJqAsync=window.lpaJqAsync||[],lpaJqAsync.push([e,t])},u=function(){"undefined"!=typeof $?$(".dropdown").each(function(t,e){var n=$(e);n.find(".lpa-button").length&&n.on("shown.bs.dropdown",function(){window.dispatchEvent(new Event("resize"))})}):setTimeout(u,50)};return{initLoginButton:function(){return window.lpaOnAmazonLoginReadyFired?t:function(e){r(function(){t(e)},"loginReady")}}(),initPayButton:function(){return window.lpaOnAmazonPayReadyFired?e:function(t){r(function(){e(t)},"payReady")}}(),initButtons:function(){return window.lpaOnAmazonPayReadyFired?a:function(){r(function(){a()},"payReady")}}(),registerInitAjaxLoadedButtons:i,registerDropdownResizeFallback:u}},window.lpa().initButtons(),window.lpa().registerInitAjaxLoadedButtons(),window.lpa().registerDropdownResizeFallback();

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.