PageSourceSearch

https://jungfrauregion.swiss/layout/data-object-reader-cart.4a0eae58.js

js jungfrauregion.swiss collected 2026-10-02 10:25:14 UTC 5,941 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1958],{89408:(t,e,n)=>{n.d(e,{Hm:()=>s,N6:()=>c,U0:()=>a,eF:()=>u});var r=[],o=[],i=!1;function a(t){r.push(t)}function u(t){o.push(t)}function s(){if(!i){i=!0;var t=document.body.dataset.objectCartUrl;t&&fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then((function(t){return t.json()})).then((function(t){return c(t.items)}))}}function c(t){var e;e=Object.values(t).reduce((function(t,e){return t+e.quantity}),0),r.forEach((function(t){return t.classList.toggle("cart-conditional--active",e>0)})),o.forEach((function(t){return t.textContent=e}))}},87171:(t,e,n)=>{n.r(e),n.d(e,{default:()=>g});var r=n(89408);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function c(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}function f(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function m(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var h=new WeakSet,d=c((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,h),this.form=e,this.quantityInput=this.form.querySelector('input[name="quantity"]'),this.variantAttributes=i(this.form.querySelectorAll('select[name^="variant_attribute"]')),this.submitButton=this.form.querySelector("[data-object-reader-cart-button]"),this.confirmationMessage=this.form.querySelector("[data-object-reader-cart-confirmation]"),this.config=JSON.parse(this.form.dataset.objectReaderCart)||{},this.isFormDisabled=!1,m(h,this,b).call(this),m(h,this,y).call(this)}));function b(){var t=this;this.form.addEventListener("submit",(function(e){if(e.preventDefault(),!t.isFormDisabled){var n=new FormData(t.form);m(h,t,v).call(t),fetch(t.config.url,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:n}).then((function(e){return m(h,t,w).call(t,e,!0)}))}}))}function y(){var t=this;this.variantAttributes.forEach((function(e){e.addEventListener("change",(function(){m(h,t,v).call(t,e),window.location="".concat(window.location.origin).concat(window.location.pathname,"?").concat(t.variantAttributes.map((function(t){return"".concat(t.name,"=").concat(encodeURIComponent(t.value))})).join("&"))}))}))}function p(){this.isFormDisabled=!1,i(this.form.querySelectorAll("input, select, textarea")).forEach((function(t){return t.disabled=!1})),this.submitButton&&(this.submitButton.classList.remove("loading"),this.submitButton.disabled=!1)}function v(){this.isFormDisabled=!0,i(this.form.querySelectorAll("input, select, textarea")).forEac
1h((function(t){return t.disabled=!0})),this.submitButton&&(this.submitButton.classList.add("loading"),this.submitButton.disabled=!0),this.confirmationMessage&&this.confirmationMessage.classList.add("d-none")}function w(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];200===t.status?t.json().then((function(t){i(e.form.querySelectorAll('input[name^="attribute"]')).forEach((function(e){var n,r=/\d+/.exec(e.name)[0];if(null===(n=e.parentElement.querySelector(".alert"))||void 0===n||n.remove(),e.classList.remove("error"),t.hasOwnProperty("errors")&&t.errors.hasOwnProperty(r)){e.classList.add("error");var o=document.createElement("p");o.className="alert alert-danger",o.innerHTML=t.errors[r],e.parentElement.insertBefore(o,e)}})),t.hasOwnProperty("errors")||(e.quantityInput.value="1",n&&(e.confirmationMessage.classList.remove("d-none"),e.confirmationMessage.innerHTML=e.config.label),(0,r.N6)(t.items)),m(h,e,p).call(e)})):alert("An error occurred! Please contact the website administrator.")}const g=function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;new d(r)}}catch(t){n.e(t)}finally{n.f()}}}}]);

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.