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 r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function l(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,i,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var c,u,d=Array.isArray(i);return d!==Array.isArray(e)?r(i,o):d?o.arrayMerge(e,i,o):(u={},(c=o).isMergeableObject(e)&&l(e).forEach(function(t){u[t]=r(e[t],c)}),l(i).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(i[t])?u[t]=(function(e,t){if(!t.customMerge)return s;var i=t.customMerge(e);return"function"==typeof i?i:s})(t,c)(e[t],i[t],c):u[t]=r(i[t],c))}),u)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return s(e,i,t)},{})},e.exports=s}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,i),l.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 r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=i(156),n=i.n(r);class l{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let i=l.toUpperCamelCase(e,t);return l.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>l.ucFirst(e.toLowerCase())).join(""):l.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(r),r}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,n=e.split("."),l=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=l;l=function(i){r.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],l),this.listeners.push({splitEventName:n,opts:i,cb:l}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class s{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),n().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=l.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=l.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}class o extends s{static #e=this.options={checkboxSelector:".bundle-product-item-selection",qtySelectBoxSelector:".zeobv-bundle-item-qty-select",variantSelectBoxSelector:".zeobv-bundle-item-variant-select",bundleItemPriceSelectorTemplate:"[data-price-%connectionId%]",calculateBundlePriceUrl:null};init(){let e=document.querySelectorAll(this.options.checkboxSelector);for(let t of(this.itemSelection={},e)){let e=t.dataset.productId,i=t.dataset.connectionId,r=this._getQuantity(i);this.itemSelection[i]={},this.itemSelection[i].productId=e,this.itemSelection[i].qty=r,"checkbox"===t.type&&this.registerCheckboxEvent(t)}for(let e of document.querySelectorAll(this.options.qtySelectBoxSelector))this.registerQtySelectBoxEvent(e);for(let e of document.querySelectorAll(this.options.variantSelectBoxSelector))this.registerVariantSelectBoxEvent(e)}registerCheckboxEvent(e){e.addEventListener("change",this.handleCheckboxChange.bind(this))}registerQtySelectBoxEvent(e){e.addEventListener("change",this.handleQtySelectBoxChange.bind(this))}registerVariantSelectBoxEvent(e){e.addEventListener("change",this.handleVariantSelectBoxChange.bind(this))}handleCheckboxChange(e){let t=e.target,i=t.checked,r=t.dataset.connectionId,n=this._getQuantity(r);if(i){if(null!==this.itemSelection[r].qty)return;this.itemSelection[r].qty=n}else this.itemSelection[r].qty=null,0===Object.values(this.itemSelection).filter(e=>null!==e).length&&(t.checked=!0,this.itemSelection[r].qty=n);this.determineCalculatedBundlePrice()}handleQtySelectBoxChange(e){let t=e.target,i=t.dataset.connectionId,r=parseInt(t.value);this._getQuantityInput(i).value=r,null!==this.itemSelection[i].qty&&(this.itemSelection[i].qty=r,this.determineCalculatedBundlePrice())}handleVariantSelectBoxChange(e){let t=e.target,i=t.dataset.connectionId,r=t.value;this.itemSelection[i].productId=r,this.determineCalculatedBundlePrice()}determineCalculatedBundlePrice(){fetch(this.options.calculateBundlePriceUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemSelection:this.itemSelection})}).then(e=>e.json()).then(e=>{e.hasOwnProperty("calculatedBundlePrice")&&(this.rerenderPricing(e),this.rerenderBundleItemControlInputs(e.products))})}rerenderBundleItemControlInputs(e){for(let t in e){let i=e[t],r=document.querySelectorAll(`.zeobv-bundle-item-qty-select-${t}`),n=document.querySelectorAll(`.bundle-product-item-selection-${t}`),l=document.querySelector(`#zeobv-bundle-item-availability-${t}`);if(i.available){for(let e of(l.classList.remove("zeobv-bundle-item-availability--unavailable"),l.classList.add("zeobv-bundle-item-availability--available"),n))"false"!==e.dataset.optional&&(e.checked=!0,e.removeAttribute("disabled"));for(let e of r)e.removeAttribute("disabled"),this.rerenderQtySelectBoxOptions(e,i)}else{for(let e of(l.classList.remove("zeobv-bundle-item-availability--available"),l.classList.add("zeobv-bundle-item-availability--unavailable"),n))"false"!==e.dataset.optional&&(e.checked=!1,e.setAttribute("disabled","disabled"));for(let e of r)e.setAttribute("disabled","disabled")}}}rerenderQtySelectBoxOptions(e,t){let i=t.maxPurchase?t.maxPurchase:100,r=t.minPurchase?t.minPurchase:1,n=t.purchaseSteps?t.purchaseSteps:1,l=parseInt(e.value);e.innerHTML="";for(let t=r;t<=i;t+=n){let i=document.createElement("option");i.value=t,i.text=t,e.appendChild(i)}let a=!1;e.value=l,l>i?(a=!0,e.value=i):l<r&&(a=!0,e.value=r),a&&this.handleQtySelectBoxChange({target:e})}rerenderPricing(e){this._renderBundlePrice(e),this._renderBundleItemPrices(e)}_renderBundlePrice(e){let t=document.querySelector(".product-detail-price");if(!t||(t.innerHTML=this._replacePrice(t.innerHTML,e.calculatedBundlePrice.unitPrice),!t.classList.contains("with-list-price")))return;let i=document.querySelector(".product-detail-list-price-wrapper .list-price-price");i&&(i.innerHTML=this._replacePrice(i.innerHTML,e.calculatedBundlePrice.listPrice.price))}_renderBundleItemPrices(e){let t=0;for(let i in e.calculatedProductPrices){let r=e.calculatedProductPrices[i],n=e.products[i];if(!r)continue;let l=document.querySelectorAll(this.options.bundleItemPriceSelectorTemplate.replace("%connectionId%",i));if(0===l.length)continue;let a=this._getQuantity(i),s=r.unitPrice*a;for(let e of(null!==a&&a>0&&n?.available&&(t+=s),l)){let t=e.closest(".product-bundle-products-product-cell-price"),i=t?.querySelector(".list-price");if(r.listPrice&&i){let e=r.listPrice.price*a;i.innerHTML=this._replacePrice(i.innerHTML,e)}e.innerHTML=this._replacePrice(e.innerHTML,s)}}let i=document.querySelectorAll("[data-price-total]");if(0!==i.length)for(let e of i)e.innerHTML=this._replacePrice(e.innerHTML,t)}_replacePrice(e,t){return e.replace(/\d.+[^\*]/,this._formatPrice(t))}_getQuantity(e){return parseInt(this._getQuantityInput(e).value)}_getQuantityInput(e){return document.getElementById(`zeobv-bundle-item-quantity-${e}`)}_formatPrice(e){return new Intl.NumberFormat(document.documentElement.lang||"de-DE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(+(Math.round(e+"e+2")+"e-2"))}}window.PluginManager&&window.PluginManager.register("DiztechBundleConfigurator",o,"[data-diztech-bundle-configurator]")})();
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.