PageSourceSearch

https://www.apoolco.at/theme/d682ca12c3f67aee2bb81d4563a99b61/js/n…igurator.neon-configurator.plugin.2133f1.js

js apoolco.at collected 2026-10-06 19:45:09 UTC 123,463 bytes, 7 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[61651],{43:function(h,g,m){var y,_;!function(C,F){y=F,void 0!==(_="function"==typeof y?y.call(g,m,g,h):y)&&(h.exports=_)}(0,function(){"use strict";function h(h){for(var g=[],m=0,y=h.length;m<y;m++)-1===g.indexOf(h[m])&&g.push(h[m]);return g}Array.isArray||(Array.isArray=function(h){return"[object Array]"===Object.prototype.toString.call(h)});var g={},m={"==":function(h,g){return h==g},"===":function(h,g){return h===g},"!=":function(h,g){return h!=g},"!==":function(h,g){return h!==g},">":function(h,g){return h>g},">=":function(h,g){return h>=g},"<":function(h,g,m){return void 0===m?h<g:h<g&&g<m},"<=":function(h,g,m){return void 0===m?h<=g:h<=g&&g<=m},"!!":function(h){return g.truthy(h)},"!":function(h){return!g.truthy(h)},"%":function(h,g){return h%g},log:function(h){return console.log(h),h},in:function(h,g){return!!g&&void 0!==g.indexOf&&-1!==g.indexOf(h)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(h,g,m){if(m<0){var y=String(h).substr(g);return y.substr(0,y.length+m)}return String(h).substr(g,m)},"+":function(){return Array.prototype.reduce.call(arguments,function(h,g){return parseFloat(h,10)+parseFloat(g,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(h,g){return parseFloat(h,10)*parseFloat(g,10)})},"-":function(h,g){return void 0===g?-h:h-g},"/":function(h,g){return h/g},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(h,g){return h.concat(g)},[])},var:function(h,g){var m=void 0===g?null:g,y=this;if(void 0===h||""===h||null===h)return y;for(var _=String(h).split("."),C=0;C<_.length;C++)if(null==y||void 0===(y=y[_[C]]))return m;return y},missing:function(){for(var h=[],m=Array.isArray(arguments[0])?arguments[0]:arguments,y=0;y<m.length;y++){var _=m[y],C=g.apply({var:_},this);(null===C||""===C)&&h.push(_)}return h},missing_some:function(h,m){var y=g.apply({missing:m},this);return m.length-y.length>=h?[]:y}};return g.is_logic=function(h){return"object"==typeof h&&null!==h&&!Array.isArray(h)&&1===Object.keys(h).length},g.truthy=function(h){return(!Array.isArray(h)||0!==h.length)&&!!h},g.get_operator=function(h){return Object.keys(h)[0]},g.get_values=function(h){return h[g.get_operator(h)]},g.apply=function(h,y){if(Array.isArray(h))return h.map(function(h){return g.apply(h,y)});if(!g.is_logic(h))return h;var _,C,F,S,P,E=g.get_operator(h),w=h[E];if(Array.isArray(w)||(w=[w]),"if"===E||"?:"==E){for(_=0;_<w.length-1;_+=2)if(g.truthy(g.apply(w[_],y)))return g.apply(w[_+1],y);return w.length===_+1?g.apply(w[_],y):null}if("and"===E){for(_=0;_<w.length&&(C=g.apply(w[_],y),g.truthy(C));_+=1);return C}if("or"===E){for(_=0;_<w.length&&(C=g.apply(w[_],y),!g.truthy(C));_+=1);return C}if("filter"===E)return(S=g.apply(w[0],y),F=w[1],Array.isArray(S))?S.filter(function(h){return g.truthy(g.apply(F,h))}):[];if("map"===E)return(S=g.apply(w[0],y),F=w[1],Array.isArray(S))?S.map(function(h){return g.apply(F,h)}):[];if("reduce"===E)return(S=g.apply(w[0],y),F=w[1],P=void 0!==w[2]?w[2]:null,Array.isArray(S))?S.reduce(function(h,m){return g.apply(F,{current:m,accumulator:h})},P):P;if("all"===E){if(S=g.apply(w[0],y),F=w[1],!Array.isArray(S)||!S.length)return!1;for(_=0;_<S.length;_+=1)if(!g.truthy(g.apply(F,S[_])))return!1;return!0}else if("none"===E){if(S=g.apply(w[0],y),F=w[1],!Array.isArray(S)||!S.length)return!0;for(_=0;_<S.length;_+=1)if(g.truthy(g.apply(F,S[_])))return!1;return!0}else if("some"===E){if(S=g.apply(w[0],y),F=w[1],!Array.isArray(S)||!S.length)return!1;for(_=0;_<S.length;_+=1)if(g.truthy(g.apply(F,S[_])))return!0;return!1}if(w=w.map(function(h){return g.apply(h,y)}),m.hasOwnProperty(E)&&"function"==typeof m[E])return m[E].apply(y,w);if(E.indexOf(".")>0){var I=String(E).split("."),V=m;for(_=0;_<I.length;_++){if(!V.hasOwnProperty(I[_]))throw Error("Unrecognized operation "+E+" (failed at "+I.slice(0,_+1).join(".")+")");V=V[I[_]]}return V.apply(y,w)}throw Error("Unrecognized operation "+E)},g.uses_data=function(m){var y=[];if(g.is_logic(m)){var _=g.get_operator(m),C=m[_];Array.isArray(C)||(C=[C]),"var"===_?y.push(C[0]):C.forEach(function(h){y.push.apply(y,g.uses_data(h))})}return h(y)},g.add_operation=function(h,g){m[h]=g},g.rm_operation=function(h){delete m[h]},g.rule_like=function(h,m){if(m===h||"@"===m)return!0;
1if("number"===m)return"number"==typeof h;if("string"===m)return"string"==typeof h;if("array"===m)return Array.isArray(h)&&!g.is_logic(h);if(g.is_logic(m)){if(g.is_logic(h)){var y=g.get_operator(m),_=g.get_operator(h);if("@"===y||y===_)return g.rule_like(g.get_values(h,!1),g.get_values(m,!1))}return!1}if(Array.isArray(m)&&Array.isArray(h)){if(m.length!==h.length)return!1;for(var C=0;C<m.length;C+=1)if(!g.rule_like(h[C],m[C]))return!1;return!0}return!1},g})},242:function(h){!function(g,m){h.exports=m()}(0,function(){return function(h){function g(y){if(m[y])return m[y].exports;var _=m[y]={i:y,l:!1,exports:{}};return h[y].call(_.exports,_,_.exports,g),_.l=!0,_.exports}var m={};return g.m=h,g.c=m,g.i=function(h){return h},g.d=function(h,m,y){g.o(h,m)||Object.defineProperty(h,m,{configurable:!1,enumerable:!0,get:y})},g.n=function(h){var m=h&&h.__esModule?function(){return h.default}:function(){return h};return g.d(m,"a",m),m},g.o=function(h,g){return Object.prototype.hasOwnProperty.call(h,g)},g.p="",g(g.s=1)}([function(h,g,m){"use strict";function y(h,g){if(!(h instanceof g))throw TypeError("Cannot call a class as a function")}Object.defineProperty(g,"__esModule",{value:!0});var _=function(){function h(h,g){for(var m=0;m<g.length;m++){var y=g[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}return function(g,m,y){return m&&h(g.prototype,m),y&&h(g,y),g}}(),C=function(){function h(){y(this,h)}return _(h,null,[{key:"hash",value:function(g){return h.hex(h.md51(g))}},{key:"md5cycle",value:function(g,m){var y=g[0],_=g[1],C=g[2],F=g[3];y=h.ff(y,_,C,F,m[0],7,-680876936),F=h.ff(F,y,_,C,m[1],12,-389564586),C=h.ff(C,F,y,_,m[2],17,606105819),_=h.ff(_,C,F,y,m[3],22,-1044525330),y=h.ff(y,_,C,F,m[4],7,-176418897),F=h.ff(F,y,_,C,m[5],12,1200080426),C=h.ff(C,F,y,_,m[6],17,-1473231341),_=h.ff(_,C,F,y,m[7],22,-45705983),y=h.ff(y,_,C,F,m[8],7,1770035416),F=h.ff(F,y,_,C,m[9],12,-1958414417),C=h.ff(C,F,y,_,m[10],17,-42063),_=h.ff(_,C,F,y,m[11],22,-1990404162),y=h.ff(y,_,C,F,m[12],7,1804603682),F=h.ff(F,y,_,C,m[13],12,-40341101),C=h.ff(C,F,y,_,m[14],17,-1502002290),_=h.ff(_,C,F,y,m[15],22,1236535329),y=h.gg(y,_,C,F,m[1],5,-165796510),F=h.gg(F,y,_,C,m[6],9,-1069501632),C=h.gg(C,F,y,_,m[11],14,643717713),_=h.gg(_,C,F,y,m[0],20,-373897302),y=h.gg(y,_,C,F,m[5],5,-701558691),F=h.gg(F,y,_,C,m[10],9,38016083),C=h.gg(C,F,y,_,m[15],14,-660478335),_=h.gg(_,C,F,y,m[4],20,-405537848),y=h.gg(y,_,C,F,m[9],5,568446438),F=h.gg(F,y,_,C,m[14],9,-1019803690),C=h.gg(C,F,y,_,m[3],14,-187363961),_=h.gg(_,C,F,y,m[8],20,1163531501),y=h.gg(y,_,C,F,m[13],5,-1444681467),F=h.gg(F,y,_,C,m[2],9,-51403784),C=h.gg(C,F,y,_,m[7],14,1735328473),_=h.gg(_,C,F,y,m[12],20,-1926607734),y=h.hh(y,_,C,F,m[5],4,-378558),F=h.hh(F,y,_,C,m[8],11,-2022574463),C=h.hh(C,F,y,_,m[11],16,1839030562),_=h.hh(_,C,F,y,m[14],23,-35309556),y=h.hh(y,_,C,F,m[1],4,-1530992060),F=h.hh(F,y,_,C,m[4],11,1272893353),C=h.hh(C,F,y,_,m[7],16,-155497632),_=h.hh(_,C,F,y,m[10],23,-1094730640),y=h.hh(y,_,C,F,m[13],4,681279174),F=h.hh(F,y,_,C,m[0],11,-358537222),C=h.hh(C,F,y,_,m[3],16,-722521979),_=h.hh(_,C,F,y,m[6],23,76029189),y=h.hh(y,_,C,F,m[9],4,-640364487),F=h.hh(F,y,_,C,m[12],11,-421815835),C=h.hh(C,F,y,_,m[15],16,530742520),_=h.hh(_,C,F,y,m[2],23,-995338651),y=h.ii(y,_,C,F,m[0],6,-198630844),F=h.ii(F,y,_,C,m[7],10,1126891415),C=h.ii(C,F,y,_,m[14],15,-1416354905),_=h.ii(_,C,F,y,m[5],21,-57434055),y=h.ii(y,_,C,F,m[12],6,1700485571),F=h.ii(F,y,_,C,m[3],10,-1894986606),C=h.ii(C,F,y,_,m[10],15,-1051523),_=h.ii(_,C,F,y,m[1],21,-2054922799),y=h.ii(y,_,C,F,m[8],6,1873313359),F=h.ii(F,y,_,C,m[15],10,-30611744),C=h.ii(C,F,y,_,m[6],15,-1560198380),_=h.ii(_,C,F,y,m[13],21,1309151649),y=h.ii(y,_,C,F,m[4],6,-145523070),F=h.ii(F,y,_,C,m[11],10,-1120210379),C=h.ii(C,F,y,_,m[2],15,718787259),_=h.ii(_,C,F,y,m[9],21,-343485551),g[0]=y+g[0]&4294967295,g[1]=_+g[1]&4294967295,g[2]=C+g[2]&4294967295,g[3]=F+g[3]&4294967295}},{key:"cmn",value:function(h,g,m,y,_,C){return((g=(g+h&4294967295)+(y+C&4294967295)&4294967295)<<_|g>>>32-_)+m&4294967295}},{key:"ff",value:function(g,m,y,_,C,F,S){return h.cmn(m&y|~m&_,g,m,C,F,S)}},{key:"gg",value:function(g,m,y,_,C,F,S){return h.cmn(m&_|y&~_,g,m,C,F,S)}},{key:"hh",value:function(g,m,y,_,C,F,S){return h.cmn(m^y^_,g,m,C,F,S)}},{key:"ii",value:function(g,m,y,_,C,F,S){return h.cmn(y^(m|~_),g,m,C,F,S)}},{key:"md51",value:function(g){for(var m=g.length,y=[1732584193,-271733879,-1732584194,271733878],_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0,F=64;F<=m;F+=64)h.md5cycle(y,h.md5blk(g.substring(F-64,F)));for(g=g.substring(F-64),F=0,C=g.length;F<C;F++)_[F>>2]|=g.charCodeAt(F)<<(F%4<<3);if(_[F>>2]|=128<<(F%4<<3),F>55)for(h.md5cycle(y,_),F=0;F<16;F++)_[F]=0;return _[14]=8*m,h.md5cycle(y,_),y}},{key:"md5blk",value:function(h){for(var g=[],m=0;m<64;m+=4)g[m>>
12]=h.charCodeAt(m)+(h.charCodeAt(m+1)<<8)+(h.charCodeAt(m+2)<<16)+(h.charCodeAt(m+3)<<24);return g}},{key:"rhex",value:function(g){return""+(h.hexArray[g>>4&15]+h.hexArray[g>>0&15]+(h.hexArray[g>>12&15]+h.hexArray[g>>8&15])+(h.hexArray[g>>20&15]+h.hexArray[g>>16&15])+(h.hexArray[g>>28&15]+h.hexArray[g>>24&15]))}},{key:"hex",value:function(g){for(var m=g.length,y=0;y<m;y++)g[y]=h.rhex(g[y]);return g.join("")}}]),h}();C.hexArray=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],g.default=C},function(h,g,m){h.exports=m(0)}])})},840:(h,g,m)=>{"use strict";m.d(g,{Z:()=>y});/*!
2 * md5-es
3 * https://github.com/logotype/es-crypto.git
4 *
5 * Copyright 2017 Victor Norgren
6 * Released under the MIT license
7 */class y{static hexArray=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];static hash(h){return y.hex(y.md51(h))}static md5cycle(h,g){let m=h[0],_=h[1],C=h[2],F=h[3];m=y.ff(m,_,C,F,g[0],7,-680876936),F=y.ff(F,m,_,C,g[1],12,-389564586),C=y.ff(C,F,m,_,g[2],17,606105819),_=y.ff(_,C,F,m,g[3],22,-1044525330),m=y.ff(m,_,C,F,g[4],7,-176418897),F=y.ff(F,m,_,C,g[5],12,1200080426),C=y.ff(C,F,m,_,g[6],17,-1473231341),_=y.ff(_,C,F,m,g[7],22,-45705983),m=y.ff(m,_,C,F,g[8],7,1770035416),F=y.ff(F,m,_,C,g[9],12,-1958414417),C=y.ff(C,F,m,_,g[10],17,-42063),_=y.ff(_,C,F,m,g[11],22,-1990404162),m=y.ff(m,_,C,F,g[12],7,1804603682),F=y.ff(F,m,_,C,g[13],12,-40341101),C=y.ff(C,F,m,_,g[14],17,-1502002290),_=y.ff(_,C,F,m,g[15],22,1236535329),m=y.gg(m,_,C,F,g[1],5,-165796510),F=y.gg(F,m,_,C,g[6],9,-1069501632),C=y.gg(C,F,m,_,g[11],14,643717713),_=y.gg(_,C,F,m,g[0],20,-373897302),m=y.gg(m,_,C,F,g[5],5,-701558691),F=y.gg(F,m,_,C,g[10],9,38016083),C=y.gg(C,F,m,_,g[15],14,-660478335),_=y.gg(_,C,F,m,g[4],20,-405537848),m=y.gg(m,_,C,F,g[9],5,568446438),F=y.gg(F,m,_,C,g[14],9,-1019803690),C=y.gg(C,F,m,_,g[3],14,-187363961),_=y.gg(_,C,F,m,g[8],20,1163531501),m=y.gg(m,_,C,F,g[13],5,-1444681467),F=y.gg(F,m,_,C,g[2],9,-51403784),C=y.gg(C,F,m,_,g[7],14,1735328473),_=y.gg(_,C,F,m,g[12],20,-1926607734),m=y.hh(m,_,C,F,g[5],4,-378558),F=y.hh(F,m,_,C,g[8],11,-2022574463),C=y.hh(C,F,m,_,g[11],16,1839030562),_=y.hh(_,C,F,m,g[14],23,-35309556),m=y.hh(m,_,C,F,g[1],4,-1530992060),F=y.hh(F,m,_,C,g[4],11,1272893353),C=y.hh(C,F,m,_,g[7],16,-155497632),_=y.hh(_,C,F,m,g[10],23,-1094730640),m=y.hh(m,_,C,F,g[13],4,681279174),F=y.hh(F,m,_,C,g[0],11,-358537222),C=y.hh(C,F,m,_,g[3],16,-722521979),_=y.hh(_,C,F,m,g[6],23,76029189),m=y.hh(m,_,C,F,g[9],4,-640364487),F=y.hh(F,m,_,C,g[12],11,-421815835),C=y.hh(C,F,m,_,g[15],16,530742520),_=y.hh(_,C,F,m,g[2],23,-995338651),m=y.ii(m,_,C,F,g[0],6,-198630844),F=y.ii(F,m,_,C,g[7],10,1126891415),C=y.ii(C,F,m,_,g[14],15,-1416354905),_=y.ii(_,C,F,m,g[5],21,-57434055),m=y.ii(m,_,C,F,g[12],6,1700485571),F=y.ii(F,m,_,C,g[3],10,-1894986606),C=y.ii(C,F,m,_,g[10],15,-1051523),_=y.ii(_,C,F,m,g[1],21,-2054922799),m=y.ii(m,_,C,F,g[8],6,1873313359),F=y.ii(F,m,_,C,g[15],10,-30611744),C=y.ii(C,F,m,_,g[6],15,-1560198380),_=y.ii(_,C,F,m,g[13],21,1309151649),m=y.ii(m,_,C,F,g[4],6,-145523070),F=y.ii(F,m,_,C,g[11],10,-1120210379),C=y.ii(C,F,m,_,g[2],15,718787259),_=y.ii(_,C,F,m,g[9],21,-343485551),h[0]=m+h[0]&4294967295,h[1]=_+h[1]&4294967295,h[2]=C+h[2]&4294967295,h[3]=F+h[3]&4294967295}static cmn(h,g,m,y,_,C){return g=(g+h&4294967295)+(y+C&4294967295)&4294967295,(g<<_|g>>>32-_)+m&4294967295}static ff(h,g,m,_,C,F,S){return y.cmn(g&m|~g&_,h,g,C,F,S)}static gg(h,g,m,_,C,F,S){return y.cmn(g&_|m&~_,h,g,C,F,S)}static hh(h,g,m,_,C,F,S){return y.cmn(g^m^_,h,g,C,F,S)}static ii(h,g,m,_,C,F,S){return y.cmn(m^(g|~_),h,g,C,F,S)}static md51(h){let g=h.length,m=[1732584193,-271733879,-1732584194,271733878],_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0,F=64;for(;F<=g;
7F+=64)y.md5cycle(m,y.md5blk(h.substring(F-64,F)));for(h=h.substring(F-64),F=0,C=h.length;F<C;F++)_[F>>2]|=h.charCodeAt(F)<<(F%4<<3);if(_[F>>2]|=128<<(F%4<<3),F>55)for(y.md5cycle(m,_),F=0;F<16;F++)_[F]=0;return _[14]=8*g,y.md5cycle(m,_),m}static md5blk(h){let g=[],m=0;for(;m<64;m+=4)g[m>>2]=h.charCodeAt(m)+(h.charCodeAt(m+1)<<8)+(h.charCodeAt(m+2)<<16)+(h.charCodeAt(m+3)<<24);return g}static rhex(h){return""+(y.hexArray[h>>4&15]+y.hexArray[h>>0&15]+(y.hexArray[h>>12&15]+y.hexArray[h>>8&15])+(y.hexArray[h>>20&15]+y.hexArray[h>>16&15])+(y.hexArray[h>>28&15]+y.hexArray[h>>24&15]))}static hex(h){let g=h.length,m=0;for(;m<g;m++)h[m]=y.rhex(h[m]);return h.join("")}}},651:(h,g,m)=>{"use strict";m.r(g),m.d(g,{default:()=>et});var y=m(242),_=m.n(y),C=m(266),F=m(107),S=m(471);class P{update(h,g,m,y){let _=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,C=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";h<0&&(h=0);for(let P=0;P<g.length;P++){let E=this;var F=E._formatPrice(h,m,y,_);g[P].find("span").remove();var S=g[P].html();S=S.replace(/&nbsp;/g," "),S=0===_?S.replace(/\d{1,3}(?:[\u202F ,.’]\d{3})*/g,F):S.replace(/\d{1,3}(?:[\u202F ,.’]\d{3})*(?:[,.]\d{2})/g,F),g[P].html(S),""!==C&&g[P].prepend('<span class="product-detail-price-prefix">'+C+"</span> "),g[P].siblings("meta").attr("content",this._round(h,2))}}_round(h,g){return Number(Math.round(h+"e"+g)+"e-"+g).toFixed(g)}_formatPrice(h,g,m,y){let _=this;var C=h;return C=_._toFixed(C,y),_._number_format(C,y,g,m)}_number_format(h,g,m,y){var _=h.toString().split(".");return _[0]=_[0].replace(/\B(?=(\d{3})+(?!\d))/g,y),_.join(m)}_toFixed(h,g){return(+(Math.round(+(h+"e"+g))+"e"+-g)).toFixed(g)}countDigitsAfterDecimal(h,g,m){let y=RegExp("\\"+g+"\\d{3}","g"),_=h.replace(y,""),C="."===g?",":".",F=_.split(C)[1];return F?F.length:0}constructor(){return P.instance||(P.instance=this),P.instance}}let E=Object.freeze(new P);class w{static update(h,g,m,y,_,C){E.update(h,g,m,y,_,C)}static formatPrice(h,g,m,y){return E._formatPrice(h,g,m,y)}static countDigitAfterDecimalPart(h,g){return E.countDigitsAfterDecimal(h,g)}}class I{readConfig(h){let g=this;return g._getConfigFromUrl(h)}writeConfig(h,g,m){let y=this.extractKeyValuePair(m),_=g+"="+y;if(document.location.hash.indexOf(g)>0){let h=g+"=.*";document.location.hash=document.location.hash.replace(RegExp(h,"g"),_)}else document.location.hash+=_;let C={};try{C=JSON.parse(localStorage.getItem("neonCfg")),(null===C||"string"==typeof C)&&(C={})}catch(h){C={}}C[h]=y,localStorage.setItem("neonCfg",JSON.stringify(C))}clearConfig(){localStorage.removeItem("neonCfg")}extractKeyValuePair(h){let g="",m=this;return h.forEach(function(y,_){Array.isArray(y)?g+=m.extractKeyValuePair(y):(g+=y.key+"::"+(y.value+""),_<h.length-1&&(g+="--"))}),g}_getConfigFromUrl(h){let g=document.location.hash.replace("#"+h+"=",""),m=[];return""!==g&&(m=g.split("--").map(function(h){let[g,m]=h.split("::");return{key:g,value:m=decodeURIComponent(m)}})),m}constructor(){return I.instance||(I.instance=this),I.instance}}let V=Object.freeze(new I);class D{static readConfig(){return V.readConfig("neonCfg")}static writeConfig(h,g){V.writeConfig(h,"neonCfg",g)}static clearConfig(){V.clearConfig()}}var A=m(175),M=m(67);class T{open(){this.$el.removeClass("neonConfigurator__group--closed")}close(){this.$el.addClass("neonConfigurator__group--closed")}hide(){this._isVisible=!1,this.$el.hide()}show(){this._isVisible=!0,this.$el.show()}isVisible(){return this._isVisible}hasVisibilityCalculation(){return null!==this.groupConfiguration.visibilityCalculation&&(null!==this.groupConfiguration.visibilityCalculation.stringFormula||null!==this.groupConfiguration.visibilityCalculation.jsonFormula)}visibilityCalculation(){return this.groupConfiguration.visibilityCalculation}constructor(h,g,m,y){this._isVisible=!0,this.groupConfiguration=null;let _=this;this.$el=$(h),this.$emitter=y,this.groupConfiguration=g,this.$el.find(".neonConfigurator__group__header").on("click",function(h){null!==m.fieldgroupSettings&&"accordion"===m.fieldgroupSettings.openCloseBehavior&&_.$el.siblings(".neonConfigurator__group--boxed").addClass("neonConfigurator__group--closed"),_.$el.toggleClass("neonConfigurator__group--closed"),$(".neonConfigurator__infoLink").tooltip("hide")}),this.$el.find(".neonConfigurator__group__buttonContinue").on("click",function(h){h.preventDefault();let g=_.$el.nextAll(".neonConfigurator__group:visible").eq(0);null!==m.fieldgroupSettings&&"accordion"===m.fieldgroupSettings.openCloseBehavior&&(_.$el.siblings(".neonConfigurator__group--boxed").addClass("neonConfigurator__group--closed"),_.$el.addClass("neonConfigurator__group--closed")),g.removeClass("neonConfigurator__group--closed"),window.scrollTo({top:g.offset().top-20,behavior:"smooth"}),$(".neonConfigurator__infoLink").tooltip("hide")})}}class R{get id(){return this._id}set id(h){this._id=h}get el(){return this._el}set el(h){this._el=h}get key(){return this._key}set key(h){this._key=h}initEventHandlers(){let h=this;h._$field.find("*[data-neon-configurator-field-reset]").on("click",function(g){h.reset()})}value(){throw"implement value"+this.constructor.name}valueLabel(){return this.isVisible()?this.value():""}attributes(){return{}}reset(){this.publishFieldChangeEvent()}price(){}quantity(){}needsValueUpdateOnRefresh(){return!1}getValueForUniqueIdHash(){return JSON.stringify(this.value())}calculateNewValue(){return Promise.resolve()}callbackBeforeUpdate(h){}validations(){return this._fieldConfiguration.validations}hasVisibilityCalculation(){if(this._fieldConfiguration.visibilityCalculation){let{type:h,str
7ingFormula:g,jsonFormula:m}=this._fieldConfiguration.visibilityCalculation;if("simple"===h)return null!==g;if("pro"===h)return null!==m}}hasValues(){return!1}visibleValueCount(){return 1}visibilityCalculation(){return this._fieldConfiguration.visibilityCalculation}hide(h){this._isVisible=!1,this._fieldConfiguration.options.visibilityRules&&"hidden"!==this._fieldConfiguration.options.visibilityRules?"disabled"===this._fieldConfiguration.options.visibilityRules&&(this._$field.prop("disabled",!0),this._$field.addClass("neonConfigurator__field--disabled"),this._$field.find("input, select, textarea").prop("disabled",!0)):this._$field.hide(),h||this._$field.find("input, select, textarea").prop("disabled",!0)}show(){this._isVisible=!0,this._fieldConfiguration.options.visibilityRules&&"hidden"!==this._fieldConfiguration.options.visibilityRules?"disabled"===this._fieldConfiguration.options.visibilityRules&&(this._$field.prop("disabled",!1),this._$field.find("input").prop("disabled",!1),this._$field.removeClass("neonConfigurator__field--disabled")):(this._$field.show(),this._$field.find("input, select, textarea").prop("disabled",!1)),this._$field.find("input[type=file],input[type=button],input[type=text],input[type=number],input[type=hidden],input[type=radio],input[type=checkbox], select, textarea").prop("disabled",!1)}validate(h){let g=this,m=[];return g.validations().forEach(function(y){let _=JSON.parse(JSON.stringify(h));"object"==typeof y.options&&Object.assign(_,y.options),_.value=g.value(),m.push(A.Z.calculate(y.calculation,_,"Validation").then(h=>(h?y.alwaysShowValidationInfo&&$(g.el).find('*[data-neon-configurator-field-validation-id="'+y.id+'"]').show():g.markFieldAndValidationMessageAsErroneous(y),h)))}),Promise.all(m).then(h=>h.every(h=>h))}markFieldAndValidationMessageAsErroneous(h){let g=this,m=g.domField().find('*[data-neon-configurator-field-validation-id="'+h.id+'"]');m.addClass("neonConfigurator__field__validations__validation--hasError"),m.show(),g.domField().addClass("neonConfigurator__field--hasError"),g.domField().parents(".neonConfigurator__group").addClass("neonConfigurator__group--hasError");let y=g.domField().parents(".neonConfigurator__group").find(".neonConfigurator__group__buttonContinue");y.length>0&&y.prop("disabled",!0)}isValid(){let h=this;return!h._$field.hasClass("neonConfigurator__field--hasError")}changeValueVisibility(){}afterVisibilityChanged(){return Promise.resolve()}resetValueOptionsFromInitCache(){}domField(){return this._$field}setValue(h){return this.setQuantityIfNecessary(h),Promise.resolve()}isVisible(){return this._isVisible}getKey(){return this._key}openModalSelection(){}setFieldNameAttribute(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]}isRepeatField(h){return void 0!==h&&this.config.parentId}getUrlConfig(){return{key:this.config.key+(this.config.parentId?"["+this._$field.attr("data-neon-configurator-field-repeat-index")+"]":""),value:encodeURIComponent(this.value())}}registerEventHandler(){}publishFieldChangeEvent(){this.removeUntouchedClass(),this.$emitter.publish("fieldChange",{field:this})}removeUntouchedClass(){this.domField().removeClass("neonConfigurator__field--isUntouched")}getAllSubconfigurations(){}constructor(h,g,m,y,_){this.metaInformation={},this.forbiddenKeyCodes=[],this.config=null,this._isVisible=!0,this.group=null,this.uploadRunningCount=0;let C=this;this.$emitter=y,this._$field=$(h),this._el=h,this._key=this._$field.data("neon-configurator-field-key"),this._id=this._$field.data("neon-configurator-field-id"),this._fieldConfiguration=g,this.config=g,this.group=m,this.configuratorPlugin=_,this.initEventHandlers(),C.domField().on("keydown",function(h){C.forbiddenKeyCodes.includes(h.keyCode)&&h.preventDefault()}),this.registerEventHandler(),this.setFieldNameAttribute()}}class N extends R{value(){return this.isVisible()?this.getFormElement().val():""}setValue(h){return this.getFormElement().val(h),Promise.resolve()}registerEventHandler(){let h=null,g=this;g.getFormElement().on("keyup",function(m){clearTimeout(h),h=setTimeout(()=>{g.publishFieldChangeEvent()},200)})}getFormElement(){return this.config.options.isMultiline?this.domField().find("textarea"):this.domField().find('input[type="text"]')}constructor(h,g,m,y,_){super(h,g,m,y,_),this.forbiddenKeyCodes=[],this.config.options.isMultiline||(this.forbiddenKeyCodes=[13])}}class O extends N{registerEventHandler(){let h=this,g=h._$field.find('input[type="number"]'),m=h._$field.find(".js-btn-plus, .js-btn-minus");g.on("keyup",function(g){h.publishDebounceFieldChangeEvent()}),g.on("wheel",function(g){h.publishDebounceFieldChangeEvent()}),m.on("click",function(g){h.publishDebounceFieldChangeEvent()}
7),g.on("click",function(h){h.target.focus(),h.target.select()})}publishDebounceFieldChangeEvent(){let h=this;clearTimeout(this._debounceTimeout),this._debounceTimeout=setTimeout(()=>{h.publishFieldChangeEvent()},200)}value(){if(!this.isVisible())return 0;let h=parseFloat(this.domField().find('input[type="number"]').val().replace(",","."));return isNaN(h)?0:h}valueLabel(){if(!this.isVisible())return"";let h=this.value();return this._fieldConfiguration.options.afterLabel&&(h+=" "+this._fieldConfiguration.options.afterLabel),h}setValue(h){return this.domField().find('input[type="number"]').val(h),Promise.resolve()}}class U extends N{value(){let h={default:"",timestamp:""};if(this.isVisible()){let g=this.getDatePicker().selectedDates;g.length>0&&(h.default=this.getDateFormatted(),h.timestamp=g[0].getTime()/1e3)}return h}setValue(h){return this.getFormElement().val(h),this.getDatePicker().setDate(h,!1),Promise.resolve()}valueLabel(){return this.getDateFormatted()}getDateFormatted(){return this.isVisible()?this.getFormElement().val():""}getUrlConfig(){return{key:this.config.key+(this.config.parentId?"["+this._$field.attr("data-neon-configurator-field-repeat-index")+"]":""),value:this.getDateFormatted()}}registerEventHandler(){let h=this;h.getFormElement().on("change",function(g){h.publishFieldChangeEvent()})}needsValueUpdateOnRefresh(){return!0}calculateNewValue(h,g,m){let y=this.getDatePicker();if(void 0!==y){let _=this.getDateFormat(y);this._fieldConfiguration.validations.forEach(C=>{"minDate"===C.type||"maxDate"===C.type?y.set(C.type,this.getLimitDate(C)):"disabledDates"===C.type&&this.disableDates(C,h,g,y,_,m)})}return Promise.resolve()}getDatePicker(){let h=this.domField().find("input");return this.getDatePickerInstance(h).flatpickrElement}disableDates(h,g,m,y,_){arguments.length>5&&void 0!==arguments[5]&&arguments[5];let C=[];if(h.options.date.isDisabledByWeekdayEnabled){let g={monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6,sunday:0};C.push(function(m){let y=!1;return h.options.date.disabledWeekdays.forEach(function(h){m.getDay()===g[h]&&(y=!0)}),y})}if(h.options.date.isDisabledByListEnabled){let g=h.options.date.disabledDatelist.split(",").map(function(h){return h.trim()});C=C.concat(g)}if(h.options.date.isDisabledByFormulaEnabled){let m=A.Z.calculate(h.calculation,g,"disabled date validation");C=C.concat(m)}y.set("dateFormat","Y-m-d"),y.set("disable",C),y.set("dateFormat",_)}getDateFormat(h){return h.config.dateFormat}getLimitDate(h){let g=this,m=null;if("today"===h.options.date.mode)m="today";else if("fixDate"===h.options.date.mode)m=new Date(h.options.date.fixDate);else if("fieldPlusX"===h.options.date.mode){let y=g.configuratorPlugin.fields.find(g=>g.config.id===h.options.date.plusXFieldId);void 0!==y&&(m=y.getDatePicker().latestSelectedDateObj)}else"todayPlusX"===h.options.date.mode&&(m=new Date);if(null!=m&&("todayPlusX"===h.options.date.mode||"fieldPlusX"===h.options.date.mode)){let g=h.options.date.plusX;"weeks"===h.options.date.plusXType?g*=7:"months"===h.options.date.plusXType?g*=30:"years"===h.options.date.plusXType&&(g*=365),m=m.fp_incr(g)}return m}getDatePickerInstance(h){return PluginManager.getPluginInstanceFromElement(h.get(0),"DatePicker")}}class L extends R{price(){return 0}value(){let h=this.domField().find('input[type="hidden"]').val();return"number"===this.config.options.calculationResultFormat&&(h=parseFloat(h)),h}setValue(h){return this.domField().find(".neonConfigurator__field__value").html(h),this.removeUntouchedClass(),Promise.resolve()}needsValueUpdateOnRefresh(){return!0}calculateNewValue(h,g,m){let y=this;if(null!==this._fieldConfiguration.options.commoncalculation&&null!==this._fieldConfiguration.options.commoncalculation.calculation){let h=m[this._fieldConfiguration.options.commoncalculation.key];return y.setHiddenField(h),y.setValue(y.formatCalculationResult(h))}return Promise.resolve()}formatCalculationResult(h){return h=this.formatNumber(h),this._fieldConfiguration.options.afterLabel&&(h+=" "+this._fieldConfiguration.options.afterLabel),h}setHiddenField(h){this._$field.find("input[type=hidden]").val(this.formatForInternalUse(h))}formatNumber(h){if("number"===this.config.options.calculationResultFormat&&(this.numberFormater=new Intl.NumberFormat($("html").attr("lang")||"de-DE",{minimumFractionDigits:this.config.options.calculationResultDecimalPlaces,maximumFractionDigits:this.config.options.calculationResultDecimalPlaces}),h=this.numberFormater.format(h)),"price"===this.config.options.calculationResultFormat){this.numberFormater=new Intl.NumberFormat($("html").attr("lang")||"de-DE",{minimumFractionDigits:2,maximumFractionDigits:2});let g=1+this.configuratorPlugin.options.product.taxRate/100;"net"===this._fieldConfiguration.options.calculationResultTaxMode?"gross"===this.configuratorPlugin.options.configuration.priceEnterMode&&(h/=g):"net"
7===this.configuratorPlugin.options.configuration.priceEnterMode&&(h*=g),h=this.numberFormater.format(h)}return h}formatForInternalUse(h){return"number"===this.config.options.calculationResultFormat&&(this.numberFormater=new Intl.NumberFormat("en-US",{minimumFractionDigits:this.config.options.calculationResultDecimalPlaces,maximumFractionDigits:this.config.options.calculationResultDecimalPlaces}),h=this.numberFormater.format(h).replace(/,/g,"")),h}getUrlConfig(){return null}registerEventHandler(){}}var j=m(19);class B extends R{value(){let h=this,g=this.getCheckedDomFields();if(!this.isVisible()||0===g.length)return this.config.options.isMultiselect?[]:"";if(!this.config.options.isMultiselect)return g[0].val();{let m=[];return g.forEach(function(g){let y=g.parents(".neonConfigurator__field__value").data("neon-configurator-value-id"),_=h.getPriceOfValue(y);if(h._fieldConfiguration.options.isQuantitySelectionActive){let C=h.userQuantityOfValue(y);C>0&&m.push({value:g.val(),quantity:C,price:_,configuration:h.getSubconfiguration(y)})}else{let C=h.getQuantityDomField(y),F={value:g.val(),price:_},S=h.getSubconfiguration(y);void 0!==S&&(F.configuration=S),F.quantity=C.length>0?parseInt(C.val()):1,m.push(F)}}),m}}price(){let h=this,g=0;if(!h.isVisible())return g;let m=h.value();return!h.arePricesLoaded()&&h.loadedPrices?g=h.config.options.isMultiselect?h.loadedPrices.reduce((h,g)=>parseFloat(g.price)+h,0):h.loadedPrices.filter(h=>h.value===m)[0].price:h._fieldConfiguration.valueGroups.forEach(function(y){y.values.forEach(function(y){Array.isArray(m)?h.value().forEach(function(m){y.value!==m.value||h.isPriceEmpty(y)||(g+=parseFloat(y.price.replace(",","."))*h.userQuantityOfValue(y.id))}):y.value!==m||(y.usePriceFromLinkedProductConfiguration?g=void 0!==h.getSubconfiguration(y.id)?h.getSubconfiguration(y.id).price:0:h.isPriceEmpty(y)||(g=parseFloat(y.price.replace(",","."))))})}),parseFloat((g+"").replace(",","."))}arePricesLoaded(){let h=this;if(0===h._fieldConfiguration.valueGroups.length)return!0;let g=h._fieldConfiguration.valueGroups[0];return!(""!==h.value()&&h.value().length>0&&(0===g.values.length||1===g.values.length&&g.values[0].value!==h.value())&&h._fieldConfiguration.isModalSelection&&h._fieldConfiguration.isModalUseAjax)}registerEventHandler(){let h=this;this._$modalTrigger=this._$field.find("*[data-neon-configurator-modalselection]"),h._$field.on("change",function(g){let m=$(g.target).parents(".neonConfigurator__field__value").data("neon-configurator-value-id");h.enableOrDisableQuantityFields(m),h.publishFieldChangeEvent()}),this._$modalTrigger.length>0&&h._$modalTrigger.on("click",function(g){if(g.preventDefault(),!0===$(this).data("neon-configurator-modal-ajax")){let g=$(this).data("neonConfiguratorModalAjaxUrl"),m={htmlFieldId:$(this).data("neonHtmlFieldId"),uniqueConfigurationId:$(this).data("neonUniqueConfigurationId")};h._$field.find(".neonConfigurator__field__input").addClass("loading");let y=h.value();h.config.options.isMultiselect&&(y=y.map(h=>h.value).join(",")),h.getFieldContent(g,m).then(g=>{let m=h._fieldConfiguration.isModalSelection,_=h._fieldConfiguration.isModalUseAjax;h._fieldConfiguration=$(g).data("neon-configurator-field-config"),h._fieldConfiguration.isModalSelection=m,h._fieldConfiguration.isModalUseAjax=_;let C=$(g).find(".neonConfigurator__field__values");h._$field.find(".neonConfigurator__field__values").each(function(h,g){$(g).html(C.eq(h).html())}),h.setValue(y,!1).then(()=>{h.setFieldNameAttribute(),h._$field.find(".neonConfigurator__field__input").removeClass("loading"),h._$modalTrigger.data("neon-configurator-modal-ajax",!1),h.openModal(h._$field.clone()).then(()=>{let g=$(".js-pseudo-modal");h.initModalSearch(g)})})})}else h.openModal(h._$field.clone()).then(()=>{let g=$(".js-pseudo-modal");h.initModalSearch(g)})})}getFieldContent(h,g){return fetch(h,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(g)}).then(h=>h.text())}openModal(h){let g=this;g.config.options.isMultiselect&&h.append('<div class="neonConfigurator__modalSelection__footer"><div class="btn btn-primary">OK</div></div>');
7let m=$('<div class="configurator-fields-modal"></div>');return m.append(h),h=m.clone(),new Promise(m=>{let y=new j.Z(h.get(0).outerHTML,!0);y.open(function(){let h=$(y.getModal());h.find("img").each(function(h,g){void 0!==$(g).data("srcset")?$(g).prop("srcset",$(g).data("srcset")):$(g).prop("src",$(g).data("src"))}),h.find(".neonConfigurator__field__value").each(function(h,g){$(g).find("label").attr("for",$(g).find("label").attr("for")+"_modal"),$(g).find("[data-neon-configurator-field-value]").attr("id",$(g).find("label").attr("for"))});let _=function(h){let g=h.attr("id").replace("_modal",""),m=$("#"+g);m.parents(".neonConfigurator__field__value").find("img").each(function(h,g){void 0!==$(g).data("srcset")?$(g).prop("srcset",$(g).data("srcset")):$(g).prop("src",$(g).data("src"))}),m.prop("checked",h.prop("checked"))},C=function(h){let g=h.attr("id").replace("_modal",""),m=$("#"+g);h.prop("checked",m.prop("checked"))};h.find(g.getDomInputField()).each(function(h,g){C($(g))}),g.config.options.isMultiselect?h.find(".neonConfigurator__modalSelection__footer .btn-primary").on("click",function(m){h.find(g.getDomInputField()).each(function(h,g){_($(g))}),g.hideModalDialog(y),g.publishFieldChangeEvent()}):h.find(g.getDomInputField()).on("change",function(h){_($(h.target)),g.hideModalDialog(y),g.publishFieldChangeEvent()}),y._setModalTitle(h.find(".neonConfigurator__field__label__inlineContent").text().replace(":","")),window.PluginManager.initializePlugins().then(()=>{[].slice.call(document.querySelectorAll('[data-bs-toggle1="tooltip"]')).map(function(h){return new bootstrap.Tooltip(h)}),m()})})})}initModalSearch(h){let g;let m=h.find("[data-neon-configurator-modalsearch]"),y=m.find('input[type="search"]'),_=m.find('button[type="submit"]'),C=h.find(".neonConfigurator__field__value"),F=()=>{let h=RegExp(y.val().toLowerCase(),"i");C.each(function(g,m){let y=$(m).find("label").text();h.test(y)?$(m).show():$(m).hide()})};y.on("input",function(){clearTimeout(g),g=setTimeout(F,500)}),y.on("keydown",function(h){"Enter"===h.key&&(h.preventDefault(),F())}),_.on("click",function(h){h.preventDefault(),F()})}hideModalDialog(h){if(void 0!==h.close){h.close();try{h._modalInstance.hide()}catch(h){}}}getUrlConfig(){return{key:this.config.key+(this.config.parentId?"["+this._$field.attr("data-neon-configurator-field-repeat-index")+"]":""),value:this.config.options.isMultiselect?this.value().map(h=>h.value):this.value()}}valueLabel(){let h=this.getCheckedDomFields();if(!this.isVisible())return"";if(0===h.length)return this.config.options.isMultiselect?[]:"";if(!this.config.options.isMultiselect)return h[0].data("label");{let g=[];return h.forEach(function(h){g.push(h.data("label"))}),g}}attributes(){let h=this,g={};return this.config.fieldvalueAttributes.forEach(function(h){if("string"===h.dataType){var m;g[h.key]=(m=h.defaultValue)!==null&&void 0!==m?m:""}else"number"===h.dataType&&(g[h.key]=parseFloat(null==h.defaultValue?0:(h.defaultValue+"").replace(",",".")))}),h.isVisible()&&this.config.valueGroups.forEach(function(m){m.values.forEach(function(m){m.value===h.value()&&Object.values(m.attributes).forEach(function(h){g[h.key]=h.content})})}),g}reset(){this.domField().find(this.getDomInputField()).prop("checked",!1),super.reset()}setValue(h){let g,m=!(arguments.length>1)||void 0===arguments[1]||arguments[1],y=this;g=y.config.options.isMultiselect?h.split(","):[h];let _=!1;return new Promise(g=>{if(!_&&y._fieldConfiguration.isModalSelection&&y._fieldConfiguration.isModalUseAjax){let _;let C=new F.Z;_=m?y._$modalTrigger.data("neonConfiguratorModalAjaxRendervalueUrl").replace("_VALUESTORENDER_",h):y._$modalTrigger.data("neonConfiguratorModalAjaxRendervalueUrl").replace("_VALUESTORENDER_",""),C.get(_,h=>{y.domField().find("*[data-field-value-wrapper]").html(h),g()})}else g()}).then(()=>{let h=this.domField().find(this.getDomInputField());g.forEach(function(g){h.each(function(h,m){if($(m).val()===g){_=!0;let h=$(m).parents(".neonConfigurator__field__value").data("neon-configurator-value-id");y.enableOrDisableQuantityFields(h),$(m).parents(".neonConfigurator__field__value").find("img").each(function(h,g){void 0!==$(g).data("srcset")?$(g).prop("srcset",$(g).data("srcset")):$(g).prop("src",$(g).data("src"))}),$(m).prop("checked",!0)}})})})}changeValueOptionsVisibility(h,g,m,y){y?"hidden"===m.options.visibilityRules?g.show():"disabled"===m.options.visibilityRules&&(h.prop("disabled",!1),g.removeClass("neonConfigurator__field--disabled"),g.find("input, select, textarea").prop("disabled",!1)):"hidden"===m.options.visibilityRules?g.hide():"disabled"===m.options.visibilityRules&&(h.prop("disabled",!0),g.addClass("neonConfigurator__field--disabled"),g.find("input, select, textarea").prop("disabled",!0))}changeValueVisibility(h,g){let m=this,y=this.domField().find('input[value="'+h.value+'"]'),_=y.parents(".neonConfigurator__field__value"),C=[];return h.options.visibilityRules||(h.options.visibilityRules="hidden"),this.changeValueOptionsVisibility(y,_,h,g),!g&&y.is(":checked")&&(m.domField().find(".neonConfigurator__field__value").find("input").prop("checked",!1),m.config.valueGroups.forEach(function(h){h.values.forEac
7h(function(h){h.isDefault&&C.push(m.setValue(h.value))})})),Promise.all(C).then(()=>g)}afterVisibilityChanged(){let h=this,g=[];if(h.config.options.isFirstVisibleValueDefault&&h.hasValues()&&!1===h.isValueSelected()){let m=!1;h.config.valueGroups.forEach(function(y){y.values.forEach(function(y){let _=h.domField().find('.neonConfigurator__field__value[data-neon-configurator-value-id="'+y.id+'"]');m||"none"===_.css("display")||(g.push(h.setValue(y.value)),m=!0)})})}return Promise.all(g)}isValueSelected(){let h=this;return h.domField().find("input:checked").length>0}hasValues(){return!0}visibleValueCount(){let h=this.domField().find(".neonConfigurator__field__value"),g=0;return h.each(function(h,m){"none"!==$(m).css("display")&&g++}),g}userQuantityOfValue(h){let g=$('[data-neon-configurator-value-id="'+h+'"]').find(".js-quantity-selector");return 1===g.length?parseInt(g.val()):1}getPriceOfValue(h){let g=this,m=0;return g.loadedPrices?m=g.loadedPrices.filter(g=>g.value===h)[0].price:g._fieldConfiguration.valueGroups.forEach(function(y){y.values.forEach(function(y){if(y.id===h){let h=g.getSubconfiguration(y.id);m=void 0!==h?h.price:y.price}})}),parseFloat((m+"").replace(",","."))}quantity(){let h=this,g=0;if(!h.isVisible())return g;let m=h.value();if(Array.isArray(m))m.forEach(function(h,m){void 0!==h.quantity&&(g+=parseInt(h.quantity))});else{let m=h.getCheckedDomFields();if(1===m.length){let y=$(m[0]).parent(".neonConfigurator__field__value").data("neon-configurator-value-id");g=parseInt(h.getQuantityDomField(y).val())}}return g}getQuantityFields(){return this.domField().find(".js-quantity-selector")}getValueForUniqueIdHash(){let h=this,g="";return h.isVisible()&&h._fieldConfiguration.options.isQuantitySelectionActive&&h.getQuantityFields().each(function(h,m){g+=$(m).val()+";"}),JSON.stringify(this.value())+g}isPriceEmpty(h){return void 0===h.price||null==h.price||""===h.price||"0"===h.price}getDomInputField(){return"[data-neon-configurator-field-value]"}getCheckedDomFields(){var h=[];return this.domField().find(this.getDomInputField()).each(function(g,m){$(m).prop("checked")&&h.push($(m))}),h}async callbackBeforeUpdate(h){let g=this;if(!g.arePricesLoaded()){let h={method:"GET",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}};if(g.config.options.isMultiselect){let m=await fetch("/widgets/configurator/ajax/getPricesOfValues/"+g.value().map(h=>h.value).join(",")+"/field/"+g._fieldConfiguration.id+"/product/"+g.configuratorPlugin.options.product.id,h),y=await m.json();g.loadedPrices=y.prices}else{let m=await fetch("/widgets/configurator/ajax/getPriceOfValue/"+g.value()+"/field/"+g._fieldConfiguration.id+"/product/"+g.configuratorPlugin.options.product.id,h),y=await m.json();g.loadedPrices=y.prices}}return this.updateProductQuantityIfNecessary(h)}updateProductQuantityIfNecessary(h){let g=this,m=[];return g._fieldConfiguration.valueGroups.forEach(function(y){y.values.forEach(function(y){y.hasProduct&&m.push(g.updateValueProductQuantity(y,h))})}),Promise.all(m)}updateValueProductQuantity(h,g){let m=this.configuratorPlugin.getQuantity();return null!==h.productQuantityCalculation&&(null!==h.productQuantityCalculation.stringFormula||null!==h.productQuantityCalculation.jsonFormula)&&(m=A.Z.calculate(h.productQuantityCalculation,g,"Value Product Quantity")),m.then(g=>{let m=this.getQuantityDomField(h.id);null===g?m.hide():(m.show(),m.html(g),m.val(g))})}getQuantityDomField(h){return this.domField().find('[data-neon-configurator-value-id="'+h+'"]').find("[data-neon-configurator-field-value-product-quantity]")}getAllQuantityDomField(){return this.domField().find("input[data-neon-configurator-field-value-product-quantity]")}enableOrDisableQuantityFields(h){let g=this;g.disableAllQuantityFields(),g.getQuantityDomField(h).prop("disabled",!1)}disableAllQuantityFields(){let h=this;h.getAllQuantityDomField().each(function(h,g){$(g).prop("disabled",!0)})}setSubconfiguration(h,g){this.subconfigurations[h]=g,this.updateCurrentSubconfigurationInUi(h)}updateCurrentSubconfigurationInUi(h){let g=this;
7g.getCheckedDomFields().forEach(function(m){let y=Object.values(g.subconfigurations[h].fields).map(function(h){return"<strong>"+h.label+"</strong>: "+h.value});$(m).parents(".neonConfigurator__field__value").find("*[data-neon-configurator-subconfiguration-currentstate]").html(y.join('<span class="divider"> | </span>'))})}getSubconfiguration(h){return this.subconfigurations[h]}getAllSubconfigurations(){let h=this,g=null;if(!h.config.options.isMultiselect){let m=null;h.getCheckedDomFields().forEach(function(h){m=h.parents(".neonConfigurator__field__value").data("neon-configurator-value-id")}),g=null!==m&&void 0!==this.subconfigurations[m]?this.subconfigurations[m]:null}return g}constructor(h,g,m,y,_){super(h,g,m,y,_),this.forbiddenKeyCodes=[13],this.subconfigurations=[]}}class H extends B{}class G extends B{}class Z extends R{value(){return this.isVisible()?this.domField().find("select").val():null}valueLabel(){return this.isVisible()?this.domField().find("select option:selected").data("label"):""}setValue(h){return this.domField().find("select option").each(function(){$(this).prop("value")===h?$(this).prop("selected",!0):$(this).prop("selected",!1)}),Promise.resolve()}attributes(){let h=this,g={};return this.config.fieldvalueAttributes.forEach(function(h){if("string"===h.dataType){var m;g[h.key]=(m=h.defaultValue)!==null&&void 0!==m?m:""}else"number"===h.dataType&&(g[h.key]=parseFloat(null==h.defaultValue?0:(h.defaultValue+"").replace(",",".")))}),h.isVisible()&&this.config.valueGroups.forEach(function(m){m.values.forEach(function(m){m.value===h.value()&&Object.values(m.attributes).forEach(function(h){g[h.key]=h.content})})}),g}changeValueVisibility(h,g){let m=this,y=m.domField().find('option[value="'+h.value+'"]');return g?(y.show(),y.prop("hidden",!1)):y.remove(),Promise.resolve(g)}resetValueOptionsFromInitCache(){let h=this.domField().find("select").get(0),g=null;h.selectedIndex>=0&&h.options.length>0&&(g=h.options[h.selectedIndex].value),this.domField().find("select option").remove(),this.domField().find("select").append(this.$valueInitCache),null!==g&&this.domField().find('option[value="'+g+'"]').eq(0).prop("selected",!0)}afterVisibilityChanged(){let h=this,g=[],m="none"===h.domField().find("select option:selected").css("display");if(h.config.options.isFirstVisibleValueDefault&&h.hasValues()&&m){let g=!1;h.domField().find("select option").each(function(h,m){g||($(m).prop("selected",!0),g=!0)})}return Promise.all(g)}hasValues(){return this.config.valueGroups.length>0&&this.config.valueGroups.reduce((h,g)=>h+g.values.length,0)>0}price(){let h=this,g=0;return h.isVisible()?(h._fieldConfiguration.valueGroups.forEach(function(m){m.values.forEach(function(m){if(m.value===h.value()){if(void 0===m.price||null==m.price||""===m.price||"0"===m.price)return 0;g=m.price}})}),parseFloat((g+"").replace(",","."))):0}visibleValueCount(){let h=this.domField().find("select option"),g=0;return h.each(function(h,m){"none"!==$(m).css("display")&&g++}),g}registerEventHandler(){let h=this;h._$field.find("select").on("change",function(g){h.publishFieldChangeEvent()})}constructor(h,g,m,y,_){super(h,g,m,y,_),this.$valueInitCache=this.domField().find("select").html()}}class J extends Z{value(){return this.isVisible()?this._$rangeValueField.val():null}valueLabel(){return this.isVisible()?this._$rangeValueTextField.find(".range-value-text-label").text():""}setValue(h){return this._$rangeValueField.val(h),this.updateRangeInputField(),this.updateSliderLabel(),Promise.resolve()}resetValueOptionsFromInitCache(){}visibleValueCount(){let h=this._$rangeValuesField.find("span[data-range-value]"),g=0;return h.each(function(h,m){"none"!==$(m).css("display")&&g++}),g}changeValueVisibility(h,g){let m=this,y=m._$rangeValuesField.find('[data-range-value="'+h.value+'"]');return g?(y.show(),y.prop("hidden",!1),y.prop("disabled",!1),m._$rangeInputField.prop("disabled",!1)):(y.hide(),y.prop("hidden",!0),y.prop("disabled",!0)),m._$rangeValueField.val()===h.value&&!1===g&&(m._$rangeValueField.val(""),m._$rangeValueTextField.html("&nbsp;")),m.updateRangeInputField(),Promise.resolve()}updateRangeInputField(){let h=this,g=h._$rangeValuesField.find("span[data-range-value]:not([hidden])");g.length>0&&h._$rangeInputField.attr("max",g.length-1);let m=h._$rangeValueField.val();g.each(function(g,y){$(y).data("rangeValue")===m&&(h._$rangeValueTextField.text($(y).data("rangeValueLabel")),h._$rangeInputField.val(g))})}registerEventHandler(){let h=this;h._$field.find('input[type="range"]').on("input",function(g){h.updateSliderLabel()})}updateSliderLabel(){let h=this,g=h.getValueFromInputfield(),m=h._$rangeValuesField.find("span[data-range-value]:not([hidden])"),y=$(m[g]).data("rangeValue"),_=$(m[g]).find("*[data-range-value-label]").html();h._$rangeValueField.val(y),h._$rangeValueTextField.html(_),h.publishFieldChangeEvent()}getValueFromInputfield(){let h=this;return h.domField().val()}domField(){return this._$field.find('input[type="range"]')}constructor(h,g,m,y,_){super(h,g,m,y,_),this._$rangeInputField=this._$field.find('input[type="range"]'),this._$rangeValuesField=this._$field.find(".range-values"),this._$rangeValueField=this._$field.find(".range-values > input"),this._$rangeValueTextField=this._$field.find(".range-value-text"),this.updateRangeInputField(),this.updateSliderLabel()}}class Q extends R{value(){return 0===Object.keys(this.metaInformation).length?{hasFile:!1}:this.metaInformation}setValue(h){return Promise.resolve()}setExistingFile(h){this.updateHiddenField(h,"1"),this.metaInformation.isExistingFile=!0,this.setFieldNameAttribute()}getId(){return this.config.id}getUrlConfig(){return null}setFieldNameAttribute(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let h="";h="lineItems["+this.config.configurationId+"][neon_configurator]["+this.config.id+"]",this._$field.find(".hidden-control").each(function(g,m){let y=h;void 0!==$(m).data("name-suffix")&&(y+=$(m).data("name-suffix")),$(m).attr("name",y)})}initEventHandlers(){let h=this;h.domField().find("input[type=button]").on("click",function(g){h.domField().find("input:file").trigger("click")}),h.domField().find(".icon-neonConfigurator__field--upload--removeFile").on("click",function(g){h.removeFile(),h.domField().find("input:file").trigger("change")}),h.domField().find("input:file").on("change",function(g){let m=g.target.files||g.dataTransfer.files;m.length>0&&(h.metaInformation.isExistingFile=!1,h.updateHiddenField(m[0].name,m[0].size))})}reset(){this.removeFile()}removeFile(){let h=this;h.domField().find("input:file").val(""),h.metaInformation.isExistingFile=!1,h.updateHiddenField(),h.publishFieldChangeEvent()}updateHiddenField(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(this.domField().find("[data-neon-configurator-field-value-fileName]").html(h),""!==h&&""!==g){let m=h.split(".").pop().toLowerCase();this.metaInformation.fileName=h,this.metaInformation.fileType=m,this.metaInformation.fileSize=g,this.metaInformation.hasFile=!0,this.domField().find(".icon-neonConfigurator__field--upload--removeFile").css("display","inline-flex")}else this.metaInformation.fileName=null,this.metaInformation.fileType=null,this.metaInformation.fileSize=null,this.metaInformation.hasFile=!1,this.domField().find(".icon-neonConfigurator__field--upload--removeFile").hide();this.publishFieldChangeEvent()}}
7class z extends R{onAddRepetitionClicked(h){this.addRepetition(!1)}onRemoveRepetitionClicked(h){this.removeRepetition(h,!1)}addRepetition(h){let g=this,m=this.addNewRepetitionToDom();g.updateRepeatIndexAndNumbers(),g.addRepetitionToObjectStore(m,g.repetitionCount()-1),this.publishFieldStructureChange(h)}removeAllRepetitions(){let h=this;h.domField().find(".neonConfigurator__field__repetition").remove(),this.repetitions=[],this.publishFieldStructureChange(!1)}removeRepetition(h){let g=!(arguments.length>1)||void 0===arguments[1]||arguments[1],m=this.removeRepetitionFromDom(h);this.updateRepeatIndexAndNumbers(),this.removeRepetitionFromObjectStore(m.attr("data-repetition-index")),this.publishFieldStructureChange(g)}removeRepetitionByIndex(h){let g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],m=this;m.domField().find(".neonConfigurator__field__repetition").eq(h).remove(),this.updateRepeatIndexAndNumbers(),this.removeRepetitionFromObjectStore(h),m.publishFieldStructureChange(g)}addNewRepetitionToDom(){let h=this._$blueprintRepetition.clone();return h.removeAttr("data-is-blueprint"),h.find("*[data-remove-button]").on("click",this.onRemoveRepetitionClicked.bind(this)),this._$field.find("*[data-repetition-container]").append(h),h}addRepetitionToObjectStore(h,g){let m=this,y=[];m.config.children.forEach(function(h){let _=m.domField().find('*[data-neon-configurator-field-id="'+h.id+'"]').eq(g),C=ee.create(_,h,m.group,m.$emitter,m.configuratorPlugin);C.setFieldNameAttribute(g),y.push(C)}),m.repetitions.push(y)}removeRepetitionFromObjectStore(h){this.repetitions.splice(h,1)}removeRepetitionFromDom(h){let g=$(h.currentTarget).parents(".neonConfigurator__field__repetition");return g.remove(),g}updateRepeatIndexAndNumbers(){let h=this;h._$field.find(".neonConfigurator__field__repetition").each(function(g,m){let y=$(m);y.attr("data-repetition-index",g),h.updateNumber(y,g),y.find(".neonConfigurator__field").attr("data-neon-configurator-field-repeat-index",g)})}updateNumbers(){let h=this;h.domField().find(".neonConfigurator__field__repetition").each(function(g,m){h.updateNumber($(m),g)})}updateNumber(h,g){let m=h.find(".neonConfigurator__field__repetition__title__number");"lowercaseLetters"===this.config.options.repeaterRepeatNumberPattern?m.html(this.lowercaseAlphabet[g]):"uppercaseLetters"===this.config.options.repeaterRepeatNumberPattern?m.html(this.uppercaseAlphabet[g]):"romanUppercase"===this.config.options.repeaterRepeatNumberPattern?m.html(this.convertToRoman(g+1)):m.html(g+1)}value(){let h=[];return this.isVisible()?(this.repetitions.forEach(function(g,m){let y={};g.forEach(function(h){y[h.key]={value:h.value(),label:h.config.label,price:h.isVisible()?h.price():0,index:m,number:m+1}}),h.push(y)}),{fields:h,count:this.repetitions.length}):{fields:[],count:0}}setValue(h){if(h>this.repetitionCount())for(let g=this.repetitionCount();g<h;g++)this.addRepetition(!1);return Promise.resolve()}repetitionCount(){return this._$field.find(".neonConfigurator__field__repetition").length}callbackBeforeUpdate(h){return this.updateRepetitions(h)}updateRepetitions(h){let g=this;return"calculation"===g.config.options.repeaterRepeatCountMode?A.Z.calculate(this.config.repetitioncountCalculation.calculation,h,"Repetition count").then(h=>{if(h!==this.repetitionCount()){if(h>this.repetitionCount())for(let g=this.repetitionCount();g<h;g++)this.addRepetition(!0);else for(let g=this.repetitionCount();g>h;g--)this.removeRepetitionByIndex(g-1,!0);this.publishFieldStructureChange(!1)}}):Promise.resolve()}publishFieldStructureChange(){let h=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h||this.$emitter.publish("fieldStructureChange",{field:this})}convertToRoman(h){var g={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},m="";for(var y of Object.keys(g)){var _=Math.floor(h/g[y]);h-=_*g[y],m+=y.repeat(_)}return m}getUrlConfig(){let h=[];return this.repetitions.forEach(function(g){g.forEach(function(g){h.push(g.getUrlConfig())})}),h.push({key:this.config.key,value:this.repetitionCount()}),h}registerEventHandler(){}constructor(h,g,m,y,_){super(h,g,m,y,_),this.repetitions=[],this.uppercaseAlphabet=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],this.lowercaseAlphabet=[..."abcdefghijklmnopqrstuvwxyz"],this._$field.find("*[data-add-button]").on("click",this.onAddRepet
7itionClicked.bind(this)),this._$field.find("*[data-remove-button]").on("click",this.onRemoveRepetitionClicked.bind(this)),this._$blueprintRepetition=this._$field.find("*[data-is-blueprint]"),this._$blueprintRepetition.remove();let C=this;C._$field.find(".neonConfigurator__field__repetition").each(function(h,g){C.addRepetitionToObjectStore($(g),h)}),this.updateRepeatIndexAndNumbers()}}class W extends R{value(){return null}price(){return 0}setValue(h){return Promise.resolve()}needsValueUpdateOnRefresh(){return!1}getUrlConfig(){return null}registerEventHandler(){}}class X extends R{value(){let h=this.getCheckedDomFields();if(!this.isVisible())return null;let g=h.map(h=>h.data("value"));return{images:g,imageCount:g.length}}setValue(h){if(this.config.options.isMultiselect){let g=h.split(","),m=this.domField().find(this.getDomInputField());g.forEach(function(h){m.each(function(g,m){$(m).val()===h&&$(m).prop("checked",!0)})})}else this.domField().find(this.getDomInputField()).each(function(g,m){$(m).val()===h&&$(m).prop("checked",!0)});return Promise.resolve()}initEventHandlers(){this.refresh("")}refresh(h){let g=this;this.getAdobeStockGallery(h).then(function(h){g.$gallery.html(h)}).then(()=>{g.domField().find("[data-neonAdobeStockGallery-action-reload]").on("click",h=>{$(h.target).addClass("loading"),g.refresh()}),g.domField().find("[data-neonAdobeStockGallery-search]").on("keydown",function(h){[13].includes(h.keyCode)&&h.preventDefault()}),g.domField().find("[data-neonAdobeStockGallery-search]").on("input",h=>{clearTimeout(g.searchInputTimeout),g.searchInputTimeout=setTimeout(()=>{let m="&key="+h.target.value,y=g.domField().find("[data-neonAdobeStockGallery-category]").val();""!==y&&(m+="&category_id="+y),g.refreshImages(m)},500)}),g.domField().find("[data-neonAdobeStockGallery-category]").on("change",h=>{let m="&category_id="+h.target.value,y=g.domField().find("[data-neonAdobeStockGallery-search]").val();""!==y&&(m+="&key="+y),g.refreshImages(m)}),g.domField().find(".neonAdobeStock__gallery__image").on("click",h=>{g.publishFieldChangeEvent()}),g.domField().find("[data-neonAdobeStockGallery-action-prev],[data-neonAdobeStockGallery-action-next]").on("click",function(){let h="&page="+$(this).data("page"),m=g.domField().find("[data-neonAdobeStockGallery-category]").val();""!==m&&(h+="&category_id="+m);let y=g.domField().find("[data-neonAdobeStockGallery-search]").val();""!==y&&(h+="&key="+y),g.refreshImages(h)}),PluginManager.initializePlugin("NeonConfiguratorAlternativeModal","[data-neon-configurator-alternative-modal]"),this.setFieldNameAttribute()})}refreshImages(h){let g=this;this.getAdobeStockGalleryImages(h).then(function(h){g.$galleryImages.html(h)}).then(()=>{g.domField().find(".neonAdobeStock__gallery__images__container").removeClass("loading"),g.domField().find(".neonAdobeStock__gallery__image").on("click",h=>{g.publishFieldChangeEvent()}),g.domField().find("[data-neonAdobeStockGallery-action-prev],[data-neonAdobeStockGallery-action-next]").on("click",function(){let h="&page="+$(this).data("page"),m=g.domField().find("[data-neonAdobeStockGallery-category]").val();""!==m&&(h+="&category_id="+m);let y=g.domField().find("[data-neonAdobeStockGallery-search]").val();""!==y&&(h+="&key="+y),g.refreshImages(h)}),PluginManager.initializePlugin("NeonConfiguratorAlternativeModal","[data-neon-configurator-alternative-modal]"),this.setFieldNameAttribute()})}getAdobeStockGallery(h){this.$gallery=this.domField().find("*[data-neonconfigurator-adobestockgallerygetter]"),this.domField().find(".neonAdobeStock__gallery__images").addClass("loading");let g=new F.Z;if(0!==this.$gallery.length)return new Promise((m,y)=>{g.get(this.$gallery.data("action")+h,function(h){h?m(h):y("No response text available")})})}getAdobeStockGalleryImages(h){this.$galleryImages=this.domField().find(".neonAdobeStock__gallery__images__container"),this.$galleryImages.addClass("loading");let g=new F.Z;if(0!==this.$galleryImages.length)return new Promise((m,y)=>{g.get(this.$galleryImages.data("action")+h,function(h){h?m(h):y("No response text available")})})}getDomInputField(){return"[data-neon-configurator-field-value]"}getCheckedDomFields(){let h=[];return this.domField().find(this.getDomInputField()).each(function(g,m){$(m).prop("checked")&&h.push($(m))}),h}constructor(h,g,m,y,_){super(h,g,m,y,_),this.$gallery=null,this.stockID=null,this.$gallery=this.domField().find("*[data-neonconfigurator-adobestockgallerygetter]"),this.$galleryImages=this.domField().find(".neonAdobeStock__gallery__images__container"),this.searchInputTimeout=null}}class K{getValueInfo(){return{id:this.file.id,name:this.file.name,url:this.getFileUrl(),size:this.file.size,extension:this.file.name.split(".").pop().toLowerCase(),type:this.file.type,quantity:this.getAttributes().quantity}}getFileUrl(){let h=this;return h.file instanceof Blob?window.URL.createObjectURL(h.file):h.file.url}upload(){let h=this.prepareUpload();this.startUpload(h)}hasError(){let h=this;
7return null!==h.messages.serverError||h.messages.validationErrors.length>0}createCard(h){let g=this;g.$card=g.field.domField().find(g.selectors.template).eq(0).clone(),g.$fileList=g.field.domField().find(g.selectors.fileList),g.$card.appendTo(g.$fileList),g.$card.find(g.selectors.fileName).text(h.name),g.$card.find(g.selectors.fileSize).text(g.getFileSizeInMB(h)),g.setProgress(0),g.$card.find(g.selectors.removeFile).on("click",function(){g.remove()}),g.$messagesContainer=g.$card.find(g.selectors.messages),h.type.includes("image")&&(g.$card.find(g.selectors.image).attr("src",g.getFileUrl(h)),g.$card.find(g.selectors.image).show(),g.$card.find(g.selectors.icon).hide()),g.$card.show(),g.$quantity=g.$card.find(g.selectors.quantity),g.$quantity.on("change",function(){g.triggerEvent("quantityChanged")}),window.PluginManager.initializePlugins()}setProgress(h){let g=this;g.$card.find(g.selectors.fileProgress).css("width",h+"%"),g.$card.find(g.selectors.fileProgressLabel).text(h+"%")}getFileSizeInMB(h){let g=h.size/1024/1024;return((g=Math.round(100*g)/100)+"").replace(".",",")+" MB"}prepareUpload(){let h=this;var g=new XMLHttpRequest;return g.upload.addEventListener("progress",function(g){if(h.uploadStatus=K.STATES.uploading,g.loaded<=h.file.size){var m=Math.round(g.loaded/h.file.size*100);h.setProgress(m)}}),g.addEventListener("error",function(g){h.addServerErrorMessage("Fehler beim Dateiupload")}),g.addEventListener("load",function(m){if(200!==g.status)h.uploadStatus=K.STATES.uploadFailed,h.addServerErrorMessage("Fehler beim Dateiupload"),h.triggerEvent("uploaded");else{let g=JSON.parse(m.target.responseText);h.setUploadSuccessful(g.file)}}),g}setUploadSuccessful(h){let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,m=this;m.file=h,m.uploadStatus=K.STATES.uploadSuccessfull,m.setProgress(100),setTimeout(function(){m.$card.addClass(m.classes.success)},g),m.triggerEvent("uploaded")}startUpload(h){let g=this;g.uploadStatus=K.STATES.uploading,g.triggerEvent("uploading");let m=new FormData;m.append("action","upload"),m.append("file",g.file),h.open("post",g.endpoint),h.send(m),g.clearMessages()}addServerErrorMessage(h){let g=this;g.messages.serverError=h,g.updateMessagesOutput()}addValidationMessage(h){let g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],m=this;g?m.messages.validationNotes.push(h):m.messages.validationErrors.push(h),m.updateMessagesOutput()}clearMessages(){let h=this;h.messages.validationErrors=[],h.messages.validationNotes=[],h.updateMessagesOutput()}updateMessagesOutput(){let h=this;h.$messagesContainer.html(""),h.messages.serverError&&h.$messagesContainer.append('<div class="neonConfigurator__field--multiUpload__container__files__card__messages__message neonConfigurator__field--multiUpload__container__files__card__messages__message--error">'+h.messages.serverError+"</div>"),h.messages.validationErrors.forEach(function(g){h.$messagesContainer.append('<div class="neonConfigurator__field--multiUpload__container__files__card__messages__message neonConfigurator__field--multiUpload__container__files__card__messages__message--error">'+g+"</div>")}),h.messages.validationNotes.forEach(function(g){h.$messagesContainer.append('<div class="neonConfigurator__field--multiUpload__container__files__card__messages__message">'+g+"</div>")}),h.$messagesContainer.show(),h.hasError()&&h.$card.addClass(h.classes.error)}remove(){this.$card.remove(),this.triggerEvent("removed")}triggerEvent(h){this.$card.get(0).dispatchEvent(new CustomEvent(h,{bubbles:!0}))}addEventListener(h,g){this.$card.get(0).addEventListener(h,g)}getAttributes(){return{quantity:this.$card.find(this.selectors.quantity).val()}}setQuantity(h){let g=this;g.$card.find(g.selectors.quantity).val(h)}constructor(h,g,m){this.selectors={template:"*[data-neon-configurator-field-multi-upload-template]",fileList:"*[data-neon-configurator-field-multi-upload-filelist]",fileName:"*[data-neon-configurator-field-multi-upload-filecard-name]",fileSize:"*[data-neon-configurator-field-multi-upload-filecard-size]",fileProgress:"*[data-neon-configurator-field-multi-upload-filecard-progress]",fileProgressLabel:"*[data-neon-configurator-field-multi-upload-filecard-progressLabel]",removeFile:"*[data-neon-configurator-field-multi-upload-filecard-remove]",messages:"*[data-neon-configurator-field-multi-upload-filecard-messages]",image:"*[data-neon-configurator-field-multi-upload-filecard-image]",icon:"*[data-neon-configurator-field-multi-upload-filecard-icon]",quantity:"*[data-neon-configurator-field-multi-upload-filecard-quantity]",validationMessages:"*[data-neon-configurator-field-multi-upload-filecard-validationMessage]"}
7,this.classes={error:"neonConfigurator__field--multiUpload__container__files__card--error",success:"neonConfigurator__field--multiUpload__container__files__card--success"},this.messages={serverError:null,validationErrors:[],validationNotes:[]},this.$card=null,this.$messagesContainer=null,this.uploadStatus="initialized";let y=this;y.file=h,y.endpoint=g,y.field=m,y.createCard(h)}}K.STATES={initialized:"initialized",uploading:"uploading",uploadSuccessfull:"uploadSuccessfull",uploadFailed:"uploadFailed"};class Y extends R{initEventHandlers(){let h=this,g=h.domField().find('[data-neon-configurator-field-multi-upload-dropzone="true"]');h.urls=g.data("neon-configurator-field-multi-urls");let m=h.domField().find("input:file");m.on("change",function(g){g.preventDefault(),h.handleFiles(g.target.files||g.dataTransfer.files),$(this).val("")}),g.on("drop",function(g){g.preventDefault(),$(this).removeClass("is-dragover"),h.handleFiles(g.originalEvent.dataTransfer.files)}),g.on("dragover",function(h){h.preventDefault()}),g.on("dragenter",function(h){h.preventDefault(),$(this).addClass("is-dragover")}),g.on("dragleave",function(h){$(this).removeClass("is-dragover")}),g.on("click",function(h){m.trigger("click")})}value(){let h=this;if(!this.isVisible())return{files:[],totalFileSize:0,fileCount:0};let g=h.fileCards.filter(function(h){return h.uploadStatus!==K.STATES.uploadFailed}).map(function(h){return h.getValueInfo()});return{files:g,totalFileSize:g.reduce(function(h,g){return h+g.size},0),fileCount:g.length}}getUrlConfig(){let h=Object.values(this.value().files).map(function(h){let g="f:"+h.id;return h.quantity&&(g+="=q:"+h.quantity),g});return{key:super.getUrlConfig().key,value:h}}setValue(h){let g=this;return h.split(",").forEach(function(h){let m=h.split("="),y=m.filter(function(h){return h.startsWith("f:")})[0].substr(2),_=m.filter(function(h){return h.startsWith("q:")});1===_.length?g.loadFileInfo(y,_[0].substr(2)):g.loadFileInfo(y)}),Promise.resolve()}reset(){this.clearMessages(),this.removeFiles()}removeFiles(){let h=this;for(let g of h.fileCards)g.remove();h.fileCards=[],h.publishFieldChangeEvent()}handleFiles(h){let g=this;if(void 0!==h&&0!==h.length){for(let g of h)this.createFilecard(g);g.publishFieldChangeEvent()}}createFilecard(h,g){let m=this,y=new K(h,this.urls.upload,m);return y.addEventListener("uploading",function(){m.publishFieldChangeEvent()}),y.addEventListener("uploaded",function(){m.publishFieldChangeEvent()}),y.addEventListener("removed",function(){m.fileCards=m.fileCards.filter(function(h){return h!==y}),m.publishFieldChangeEvent()}),y.addEventListener("quantityChanged",function(){m.publishFieldChangeEvent()}),void 0!==g&&y.setQuantity(g),m.fileCards.push(y),y}isValid(){let h=this;return super.isValid()&&0===h.runningUploadCount()}runningUploadCount(){let h=this;return h.fileCards.reduce(function(h,g){return h+(g.uploadStatus===K.STATES.uploading?1:0)},0)}validate(h){let g=this;g.fileCards.forEach(h=>{h.clearMessages()});let m=g.validations().filter(function(h){return!h.options.isFileValidation}),y=g.validations().filter(function(h){return h.options.isFileValidation});return this.executeFieldValidations(m,h).then(function(){g.executeFileValidations(y,h).then(function(h){return h.failedValidations.forEach(function(h){g.markFieldAndValidationMessageAsErroneous(h)}),h.alwaysVisibleValidationMessages.forEach(function(h){$(g.el).find('*[data-neon-configurator-field-validation-id="'+h.id+'"]').show()}),g.fileCards.forEach(h=>{h.hasError()||h.uploadStatus!==K.STATES.initialized||h.upload()}),h})})}executeFieldValidations(h,g){let m=this,y=[];return h.forEach(function(h){let _=JSON.parse(JSON.stringify(g));"object"==typeof h.options&&Object.assign(_,h.options),_.value=m.value(),y.push(A.Z.calculate(h.calculation,_,"Validation").then(g=>{g?h.alwaysShowValidationInfo&&$(m.el).find('*[data-neon-configurator-field-validation-id="'+h.id+'"]').show():m.markFieldAndValidationMessageAsErroneous(h)}))}),Promise.all(y)}executeFileValidations(h,g){let m=this;return new Promise(function(y,_){let C=!1,F=[],S=[],P=[];m.fileCards.forEach(m=>{h.forEach(function(h){let y=JSON.parse(JSON.stringify(g));"object"==typeof h.options&&Object.assign(y,h.options),y.file=m.getValueInfo(),y.value=void 0,P.push(A.Z.calculate(h.calculation,y,"Validation").then(g=>{g?h.alwaysShowValidationInfo&&(S.push(h),m.addValidationMessage(h.validationInfo,!0)):(
7F.push(h),C=!0,m.addValidationMessage(h.validationInfo))}))})}),Promise.all(P).then(()=>{h.forEach(function(h){h.alwaysShowValidationInfo&&S.push(h)}),C&&(m.domField().addClass("neonConfigurator__field--hasError"),m.domField().parents(".neonConfigurator__group").addClass("neonConfigurator__group--hasError")),y({failedValidations:F,alwaysVisibleValidationMessages:S})})})}loadFileInfo(h){let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,m=this,y=new XMLHttpRequest;return y.addEventListener("load",function(h){if(200===y.status){let h=JSON.parse(y.responseText);m.createFilecard(h,g).setUploadSuccessful(h,0)}}),y.timeout=0,y.open("GET",this.urls.fileInfo.replace("FILEID",h),!0),y.send(),y}constructor(...h){super(...h),this.fileCards=[]}}class ee{static create(h,g,m,y,_){let C=null;if("number"===g.type&&(C=new O(h,g,m,y,_)),"date"===g.type&&(C=new U(h,g,m,y,_)),"text"===g.type&&(C=new N(h,g,m,y,_)),"calculationResult"===g.type&&(C=new L(h,g,m,y,_)),"select"===g.type&&("list"===g.options.selectType&&(C=new B(h,g,m,y,_)),"button"===g.options.selectType&&(C=new H(h,g,m,y,_)),"color"===g.options.selectType&&(C=new H(h,g,m,y,_)),"image"===g.options.selectType&&(C=new G(h,g,m,y,_)),"dropdown"===g.options.selectType&&(C=new Z(h,g,m,y,_)),"slider"===g.options.selectType&&(C=new J(h,g,m,y,_))),"upload"===g.type&&(C=new Q(h,g,m,y,_)),"multiUpload"===g.type&&(C=new Y(h,g,m,y)),"repeat"===g.type&&(C=new z(h,g,m,y,_)),"spacer"===g.type&&(C=new W(h,g,m,y,_)),"adobeStock"===g.type&&(C=new X(h,g,m,y,_)),null==C)throw"No JS storefront module found for field type "+g.type+" "+g.options.selectType;return C}}class et extends window.PluginBaseClass{init(){let h=this;if(h.$el=$(h.el),D.clearConfig(),h.options.configuration=JSON.parse(h.options.configuration),"true"===window.localStorage.getItem("neonlinesConfiguratorIsDebugActive")&&(h.options.configuration.isDebugActive=!0),h.options.configuration.isDebugActive&&et.EVENTS.forEach(function(g){h.$emitter.subscribe(g,function(h){console.debug("Event "+h.type+" fired. "+(void 0!==h.detail.message?h.detail.message:""),h.detail)})}),h.$emitter.publish("beforeInit"),window.neonlinesConfigurator={},h.commoncalculationCache={},h.decimalSign=h.options.decimalSignPrice.replace(/.*1[\s.,’]000([,.])[0-9]{2}.*/g,"$1"),h.thousandSeparator=h.options.decimalSignPrice.replace(/.*1(['\s.,’])000[,.][0-9]{2}.*/g,"$1"),h.decimalDigitCount=h.options.decimalSignPrice.replace(/.*[0-9.,]*[,.]([0-9]{2}).*/g,"$1").length,h.decimalSign===h.options.decimalSignPrice&&(h.decimalSign="",h.decimalDigitCount=0,h.thousandSeparator=h.options.decimalSignPrice.replace(/.*1(['\s.,’])000.*/g,"$1")),h.previousImageSet={additionalMediaIds:[],hiddenConfigurationMediaIds:[],visibileMediaIds:[]},h.$debug=h.$el.find(".neonConfigurator__debug"),h.$offerButton=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find('*[data-neon-configurator-action-type="askForOffer"]'),h.$price=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".product-detail-price-container .product-detail-price"),h.$blockPrices=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".product-block-prices .product-detail-block-price"),h.$basePrice=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".product-detail-price-unit .price-unit-content"),h.$listPrice=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".list-price-price"),h.$deliveryTime=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".delivery-information.delivery-available, .delivery-information.delivery-restock, .twt-product-detail-deliveryTime"),h.$productNumber=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".product-detail-ordernumber"),h.$form=h.$el.parents("form"),h.$quantitySelection=h.$form.find(".product-detail-quantity-select, .product-detail-quantity-input, .product-detail-quantity-group .quantity-selector-group-input"),h.$form.attr("novalidate","novalidate"),h.$form.attr("enctype","multipart/form-data"),h.$productImageGalleryContainer=$("[data-neonconfigurator-imagegallerygetter] + div"),h.options.configuration.isStockCalculationActive&&h.$quantitySelection.attr("max",2147483647),h.setCheapestPriceIfAvailable(),h.$listPrice.length>0&&h.options.product.hasGlobalPriceDiscount&&(h.options.product.price=h.options.product.price/(1-h.options.product.listPrice.percentage/100)),"manual"===h.options.configuration.priceEnterMode){let g="net"===h.options.context.taxState?h.options.product.taxRate/100+1:1;h.options.product.price*=g,h.options.product.calculatedPrices.forEac
7h(function(h){h.unitPrice*=g,void 0!==h.listPrice&&null!=h.listPrice&&(h.listPrice.price*=g)})}else{let g=1+h.options.product.taxRate/100;"net"===h.options.configuration.priceEnterMode&&"gross"===h.options.context.taxState?(h.options.product.price=h.options.product.price/g,h.options.product.calculatedPrices.forEach(function(h){h.unitPrice=h.unitPrice/g,void 0!==h.listPrice&&null!=h.listPrice&&(h.listPrice.price=h.listPrice.price/g)})):"gross"===h.options.configuration.priceEnterMode&&("net"===h.options.context.taxState||"tax-free"===h.options.context.taxState)&&(h.options.product.price=h.options.product.price*g,h.options.product.calculatedPrices.forEach(function(h){h.unitPrice=h.unitPrice*g,void 0!==h.listPrice&&null!=h.listPrice&&(h.listPrice.price=h.listPrice.price*g)}))}h.hasValidPrice=!1,h.fields=[],h.groups=[],h.initDebugMessage(),h.addFromPriceLabelIfNecessary(),h.options.configuration.fieldgroups.forEach(function(g,m){let y=new T(h.$el.find('*[data-neon-configurator-fieldgroup-id="'+g.id+'"]'),g,h.options.configuration,h.$emitter);h.groups.push(y),g.fields.forEach(function(g){let m=h.$el.find('*[data-neon-configurator-field-id="'+g.id+'"]'),_=ee.create(m,g,y,h.$emitter,h);h.fields.push(_)}),"fields-only"===y.groupConfiguration.displayMode?y.open():null!==h.options.configuration.fieldgroupSettings&&"accordion"===h.options.configuration.fieldgroupSettings.openCloseBehavior&&(0===m?y.open():y.close())});let g=[],y=[];h.isOnlyOneConfiguratorInstanceOnPage()&&(g=D.readConfig()).forEach(function(g){if(void 0!==g.value){let m;let _=g.key.match(/^([^\[]+)\[([^\[]+)\[(\d+)\]\]$/);if(_){let g=_[1],y=_[2],C=_[3];m=h.fields.filter(h=>h.key===g)[0].repetitions[C].filter(h=>h.key===y)[0]}else m=h.fields.filter(h=>h.key===g.key)[0];void 0!==m&&""!==g.value&&(m instanceof Q?m.setExistingFile(g.value):y.push(m.setValue(g.value)))}});let _=g.length>0;Promise.all(y).then(function(){h.refresh(_).then(function(){h.removeLoader(),h._registerEventHandlers(),h.createCurrentState().then(g=>{h.$emitter.publish("afterInit",{currentState:g})}),PluginManager.register("NeonConfiguratorInfolink",()=>m.e(40427).then(m.bind(m,427)),"[data-neon-configurator-infolink]"),PluginManager.initializePlugins()})})}setCheapestPriceIfAvailable(){let h=this;null!==h.options.configuration.cheapestPrice&&h.$price.length>0&&w.update(h.options.configuration.cheapestPrice,[h.$price],h.decimalSign,h.thousandSeparator,h.decimalDigitCount,"")}async createCurrentState(){let h=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1)||void 0===arguments[1]||arguments[1],m=this,y=m.currentFieldData;h&&(y=m.convertFieldDataForRule(h));let _={fields:y};return void 0!==m.options.parent&&void 0!==m.options.parent.configurationState&&(_.parent=m.options.parent.configurationState),await m.buildCalculationContext(_,!0,g),{price:m.lastCalculatedPrice,configuration:y,ruleData:_,subcalculations:{}}}isOnlyOneConfiguratorInstanceOnPage(){return 1===document.querySelectorAll("div[data-neon-configurator]").length}_registerEventHandlers(){let h=this,g=window.PluginManager.getPluginInstances("AddToCart");C.Z.iterate(g,h=>{h.$emitter.subscribe("beforeFormSubmit",this.beforeFormSubmit.bind(this))}),h.$quantitySelection.length>0&&h.$quantitySelection.on("change",function(){h.refresh(!0)}),h.$emitter.subscribe("fieldChange",this.onFieldChanged.bind(this)),h.$emitter.subscribe("fieldStructureChange",this.onFieldStructureChanged.bind(this))}beforeFormSubmit(){let h=this;h.updateLineItemId()}onFieldStructureChanged(h){let g=this;window.PluginManager.initializePlugins(),g.onFieldChanged(h)}onFieldChanged(h){let g=this,m=0;g.options.configuration.refreshDelay&&(m=g.options.configuration.refreshDelay)<0&&(m=0),clearTimeout(g.refreshTimeout),g.refreshTimeout=setTimeout(function(){g.refresh(!0).then(async function(){let m={fields:g.currentFieldData,quantity:g.getQuantity()};await g.buildCalculationContext(m),g.createCurrentState().then(m=>{m.changedField=h.detail.field,g.$emitter.publish("afterFieldChange",{field:h.detail.field}),m.isValid=!g.isInvalid(),g.$emitter.publish("configurationChange",m)})})},m)}async calculateSubcalculations(){let h=this,g=await h.createCurrentState(!1,!1);return h.$emitter.publish("beforeSubcalculationsCalculated"),new Promise(async function(m){let y=g.ruleData;
7for(let g of(h.commoncalculationCache=h.commoncalculationCache||{},h.options.configuration.commoncalculations)){h.$emitter.publish("beforeSubcalculationCalculated",{key:g.key,subcalculation:g,ruleData:JSON.parse(JSON.stringify(y))});let m=await A.Z.calculate(g.calculation,y,"Subcalculations");h.$emitter.publish("afterSubcalculationCalculated",{key:g.key,result:m,subcalculation:g,ruleData:JSON.parse(JSON.stringify(y))}),y.calculations=y.calculations||{},y.calculations[g.key]=m,h.commoncalculationCache[g.key]=m}h.$emitter.publish("afterSubcalculationsCalculated",{result:h.commoncalculationCache}),m(h.commoncalculationCache)})}addRefreshingLoader(){let h=this;h.$el.hasClass("neonConfigurator--isLoading")||h.$el.addClass("neonConfigurator--isRefreshing")}removeRefreshingLoader(){let h=this;h.$el.removeClass("neonConfigurator--isRefreshing")}refresh(h){let g=this;return g.$emitter.publish("beforeRefresh",{isDirty:h}),g.cleanDebugMessages(),g.addDebugMessage("Context tax state: "+g.options.context.taxState),g.addDebugMessage("Price enter mode: "+g.options.configuration.priceEnterMode),g.addRefreshingLoader(),g.currentFieldData=g.convertFieldDataForRule(),new Promise(function(m,y){g.calculateSubcalculations().then(function(){let _=[];g.fields.forEach(function(h){_.push(g.executeFieldCallbackBeforeUpdate(h))}),Promise.all(_).then(()=>{g.setVisibilities().then(function(){g.calculateSubcalculations().then(function(){h&&g.$el.removeClass("neonConfigurator--isUntouched"),g.$fields=g.$el.find("*[data-neon-configurator-field]"),g.$validationMessages=g.$el.find("*[data-neon-configurator-field-validation]"),g.updateCalculationFields().then(function(){g.currentFieldData=g.convertFieldDataForRule(),g.setVisibilities().then(function(){g.setVisibilities().then(function(){g.currentFieldData=g.convertFieldDataForRule(),g.calculateSubcalculations().then(function(_){g.currentFieldData=g.convertFieldDataForRule(),g.updateCalculationFields().then(function(){g.currentFieldData=g.convertFieldDataForRule(),g.validate().then(function(){let C=[];C.push(new Promise(function(m,y){g.isInvalid()&&"always"!==g.options.configuration.priceUpdateMode?m():(h&&g.updateUrlParams(),g.updatePrices(h).then(function(){m()}).catch(function(h){y(h)}))})),Promise.all(C).then(function(){g.currentFieldData=g.convertFieldDataForRule(),g.updateCartButton(),g.updateDeliveryTime().then(function(){g.updateLineItemId(),g.updateProductImage().catch(function(h){g.logError(h)}).then(function(h){g.updateFormUserData(h)}),g.updateProductNumber(),g.updateDebugMessage(_),g.removeRefreshingLoader(),g.createCurrentState().then(m=>{g.$emitter.publish("afterRefresh",{isDirty:h,isValid:!g.isInvalid(),commonCalculationResults:_,currentState:m})}),m()})}).catch(function(h){y(h)})})})})})})})}).catch(function(h){y(h)})})})})}).catch(function(h){void 0!==h&&g.logError(h)})}updateFormUserData(h){let g=this;g.createCurrentState().then(m=>{if(m=JSON.parse(JSON.stringify(m.configuration)),g.removeUnnecessaryKeys(m),h&&g.options.configuration.isDynamicImageSavingActive){let h=".product-detail-media img";"imagestack"===g.options.configuration.mediaDisplayMode&&(h=".product-detail-media .neonconfiguratorProductImageLayered__imageWrapper"),g.savePreviewImage($(h).get(0),()=>{}).then(h=>{null!==h&&(m.images=m.images||{},m.images.dynamicImage=h),g.$el.find("[data-neon-configurator-user-data]").val(JSON.stringify(m))})}else g.$el.find("[data-neon-configurator-user-data]").val(JSON.stringify(m))})}savePreviewImage(h,g){return new Promise((m,y)=>{void 0===h&&m(null),html2canvas(h,{allowTaint:!0,logging:!0,useCORS:!0,onclone:function(h){g(h)},ignoreElements:function(h){}}).then(h=>{m(h.toDataURL("image/jpeg"))},h=>{y(h)})})}removeUnnecessaryKeys(h){let g=this;for(let m in h)h.hasOwnProperty(m)&&("label"===m||"valueLabel"===m?delete h[m]:"object"==typeof h[m]&&null!==h[m]&&g.removeUnnecessaryKeys(h[m]))}updateUrlParams(){let h=this;if(!h.options.configuration.isUrlUpdateDisabled&&h.isOnlyOneConfiguratorInstanceOnPage()){var g=[];h.getVisibleFields().forEach(function(h){let m=h.getUrlConfig();null!==m&&g.push(m)}),g.length>0?D.writeConfig(h.options.configuration.id,g):D.clearConfig()}else D.clearConfig()}updateCartButton(){let h=this;!h.hasValidPrice||h.isInvalid()?h.disableCartButton():h.enableCartButton()}validate(){let h=this;h.$emitter.publish("beforeValidated"),h.$validationMessages.removeClass("neonConfigurator__field__validations__validation--hasError"),h.$validationMessages.hide(),h.$fields.removeClass("neonConfigurator__field--hasError"),h.$el.find(".neonConfigurator__group").removeClass("neonConfigurator__group--hasError"),h.$el.find(".neonConfigurator__group").find(".neonConfigurator__group__buttonContinue").prop("disabled",!1),h.$el.removeClass("neonConfigurator--hasError");let g=h.currentFieldData,m=[];return h.fields.forEach(function(y){m.push(h.validateField(y,g).then(function(){void 0!==y.repetitions&&y.repetitions.forEach(function(y){y.forEac
7h(function(y){m.push(h.validateField(y,g))})})}))}),Promise.all(m).then(function(){h.isInvalid()&&h.$el.addClass("neonConfigurator--hasError"),h.$emitter.publish("afterValidated",{isValid:!h.isInvalid()})})}async validateField(h,g){let m=this,y={};y.fields=g,await m.buildCalculationContext(y);let _=h.validate(y);return m.$emitter.publish("afterFieldValidated",{isValid:_,field:h,ruleData:y}),_}async setVisibilities(){let h=this;h.$emitter.publish("beforeVisibilityUpdated"),h.currentFieldData=h.convertFieldDataForRule();let g={};for(let m of(g.fields=h.currentFieldData,await h.buildCalculationContext(g),h.groups)){let y=!0;m.hasVisibilityCalculation()&&(y=await A.Z.calculate(m.visibilityCalculation(),g,"Group visibility")),y?m.show():m.hide(),h.$emitter.publish("afterGroupVisibilityUpdated",{isVisible:y,group:m,ruleData:g,message:'Group "'+m.groupConfiguration.label+'" is '+(y?"visible":"not visible")})}for(let m of h.fields){g.value=m.value();let y=!0;m.hasVisibilityCalculation()&&(y=await A.Z.calculate(m.visibilityCalculation(),g,"Field visibility"));let _=y&&m._fieldConfiguration.isVisibleInConfiguration;m.resetValueOptionsFromInitCache(),m.group.isVisible()?_?m.show():m.hide(y):m.hide(!1),h.$emitter.publish("afterFieldVisibilityUpdated",{isVisible:_,field:m,ruleData:g,message:'Field "'+m.key+'", is '+(_?"visible":"not visible")+', current value: "'+m.value()+'"'})}for(let m of h.fields){for(let y of m._fieldConfiguration.valueGroups)for(let _ of y.values)if(null!==_.visibilityCalculation&&(null!==_.visibilityCalculation.stringFormula||null!==_.visibilityCalculation.jsonFormula)){let y=await A.Z.calculate(_.visibilityCalculation,g,"Fieldvalue visibility",{field:m.key,value:_.label});h.$emitter.publish("afterFieldValueVisibilityUpdated",{isValueVisible:y,field:m,value:_.label,ruleData:g,calculation:_.visibilityCalculation,message:'Field "'+m.key+'", value "'+m.value()+'" is '+(y?"visible":"not visible")}),m.changeValueVisibility(_,y).then(function(){})}await m.afterVisibilityChanged(),m.hasValues()&&0===m.visibleValueCount()&&!m._fieldConfiguration.isModalSelection&&(m.hide(!1),h.$emitter.publish("afterFieldVisibilityUpdated",{isVisible:!1,field:m,reason:"noValues"}))}h.$emitter.publish("afterVisibilityUpdated")}updatePrices(h){let g=this;return new Promise(function(m,y){"cartOnly"===g.options.configuration.priceUpdateMode?(g.hasValidPrice=!0,m()):g.hasBlockPrices()?(g.$emitter.publish("beforeBlockPricesUpdated"),"quantity"===g.options.configuration.blockpriceSelectionMode?0===g.$blockPrices.length?(g.hasValidPrice=!0,g.$emitter.publish("afterBlockPricesUpdated"),m()):g.updateBlockPrices().then(function(){g.$emitter.publish("afterBlockPricesUpdated"),m()}).catch(function(){y()}):(g.hasValidPrice=!0,m())):g.updateBasePrice().then(function(_){g.$emitter.publish("afterBasePriceUpdated",{calculatedBasePrice:_}),g.updateMainPrice(h).then(function(h){g.$emitter.publish("afterPriceUpdated",{calculatedPrice:h,hasValidPrice:g.hasValidPrice}),m()}).catch(function(h){g.options.configuration.isDebugActive&&console.error(h),y(h)})}).catch(function(h){g.options.configuration.isDebugActive&&console.error(h),y(h)})})}async getQuantityForBlockprices(h){let g=this;if("calculation"===g.options.configuration.blockpriceSelectionMode)return await A.Z.calculate(g.options.configuration.blockpriceQuantityCalculation,h,"Blockprice quantity calculation");if("field"!==g.options.configuration.blockpriceSelectionMode||null===g.options.configuration.blockpriceQuantityField)return await g.getQuantity();for(let h of g.fields)if(h.config.id===g.options.configuration.blockpriceQuantityField.id)return h.value()}async getQuantity(){let h=this,g=1;if("calculation"===h.options.configuration.quantityMode&&h.options.configuration.quantityCalculationId){let m={};m.fields=h.currentFieldData,await h.buildCalculationContext(m,!1,!1),g=await A.Z.calculate(h.options.configuration.quantityCalculation,m,"Quantity")}else"field"===h.options.configuration.quantityMode&&h.options.configuration.quantityFieldId?h.getVisibleFields().forEach(function(m){m.config.id===h.options.configuration.quantityFieldId&&(g=m.value())}):g=1===h.$quantitySelection.length?h.$quantitySelection.val():1;return parseInt(g)}async getCurrentBlockPrice(h){let g;let m=this,y=m.options.product.calculatedPrices,_=JSON.parse(JSON.stringify(y));for(let y of _){let C=await m.getQuantityForBlockprices(h);void 0===g&&(y.quantity>=C||Object.is(_[_.length-1],y))&&(g=void 0!==y.calculatedUnitPrice?y.calculatedUnitPrice:y.unitPrice)}void 0!==g?h.product.price=g:y.length>0&&(h.product.price=void 0!==y[0].calculatedUnitPrice?y[0].calculatedUnitPrice:y[0].unitPrice)}updateBlockPrices(){let h=this;h.calculatedBlockPrices=[];let g=0,m=[];for(;g<h.$blockPrices.length;)m.push(h.updateBlockPrice(g)),g++;return Promise.all(m)}updateBlockPrice(h){let g=this;return g.calculatePrice(g.options.product.calculatedPrices[h].unitPrice,g.options.configuration.priceCalculation,"Graduate prices").then(function(m){g.$emitter.publish("afterBlockPriceUpdated",{calculatedPrice:m,priceIndex:h,originalUnitPrice:g.options.product.calculatedPrices[h].unitPrice});let y=g.$blockPrices.eq(h),_=y.parents(".product-block-prices-cell").find(".list-price-price");return w.update(m,[y],g.decimalSign,g.thousandSeparator,g.decimalDigitCount),g.options.product.calculatedPrices[h].calculatedUnitPrice=m,_.length>0&&null!==g.options.product.calculatedPrices[h].listPrice&&g.calculatePrice(g.options.product.calculatedPrices[h].listPrice.price,g.options.configuration.priceCalculation,"Graduate prices list price").then(function(h){w.update(h,[_],g.decimalSign,g.thousandSeparator,g.decimalDigitCount)}
7).catch(function(h){g.logError(h)}),m})}async updateMainPrice(h){let g;let m=this;if(!h&&m.options.configuration.cheapestPrice?(m.hasValidPrice=!0,g=m.options.configuration.cheapestPrice):g=await m.calculatePrice(m.options.product.price,m.options.configuration.priceCalculation,"Main price"),m.$listPrice.length>0&&m.options.product.hasGlobalPriceDiscount&&(g*=1-m.options.product.listPrice.percentage/100),m.lastCalculatedPrice=g,m.$price.length>0){if(w.update(g,[m.$price],m.decimalSign,m.thousandSeparator,m.decimalDigitCount,!h&&m.options.configuration.showFromPriceprefixForUntouchedConfiguration?m.options.translations.fromLabel:""),m.options.product.listPrice&&m.options.product.listPrice.percentage>0){if(m.$listPrice.length>0){let h=g/(1-Math.abs(m.options.product.listPrice.discount)/m.options.product.listPrice.price*100/100);w.update(h,[m.$listPrice],m.decimalSign,m.thousandSeparator,m.decimalDigitCount)}else throw"List price is available but list price element was not found."}}else m.hasValidPrice=!0;return g}updateBasePrice(){let h=this;return new Promise(function(g){h.options.configuration.isBasePriceCalculationActive&&null!==h.options.configuration.basePriceCalculation&&(null!==h.options.configuration.basePriceCalculation.jsonFormula||null!==h.options.configuration.basePriceCalculation.stringFormula)?h.calculatePrice(h.options.product.price,h.options.configuration.basePriceCalculation,"Base price").then(function(m){h.$basePrice.length>0&&w.update(m,[h.$basePrice],h.decimalSign,h.thousandSeparator,h.decimalDigitCount),g(m)}).catch(function(m){h.logError(m),g(null)}):g(null)})}async calculatePrice(h,g){let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Main price",y=this,_={};_.fields=y.currentFieldData,await y.buildCalculationContext(_),_.product=JSON.parse(JSON.stringify(y.options.product)),_.product.price=h;let C=await A.Z.calculateWithoutCommoncalculationCache(g,_,m);if(null!==C&&isNaN(C)&&""!==C)throw y.hasValidPrice=!1,new M.Z(m+" calculation returned NaN or empty string. Please check your calculation configuration.","price",g,"pro"===g.type?g.jsonFormula:g.stringFormula,_,null);return y.hasValidPrice=!0,C}convertFieldDataForRule(){let h=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=this,m={};return g.fields.forEach(function(g){if("spacer"!==g.config.type&&(g.isVisible()||!h)&&void 0!==g.key){m[g.key]={value:g.value(),valueLabel:g.valueLabel(),label:g.config.label,key:g.key,price:g.isVisible()?g.price():0};let h=g.getAllSubconfigurations();null!==h?m[g.key].configuration=h:"select"===g.config.type&&(m[g.key].configuration={price:0,fields:[],calculations:[]}),m[g.key]=Object.assign(m[g.key],g.attributes());let y=g.quantity();g.isVisible()?y||0===y?m[g.key].quantity=y:m[g.key].quantity=1:m[g.key].quantity=0}}),m}isInvalid(){let h=this;return h.getInvalidFields().length>0}getVisibleFields(){let h=this;return h.fields.filter(function(h){return h.isVisible()})}getInvalidFields(){let h=this;return h.getVisibleFields().filter(function(h){return!h.isValid()})}updateLineItemId(){let h=this,g=h.$form.find("[name^=lineItems\\[]"),m=h.options.product.productNumber;h.fields.forEach(function(h){m+=h.getValueForUniqueIdHash()});let y=_().hash(h.options.configuration.splitLineItemsWithSameConfiguration?m+new Date().getTime():m);g.each(function(h,g){var m=$(g);let _=m.attr("name");m.attr("name",_.replace(/lineItems\[[a-zA-Z0-9]*](.*)/,"lineItems["+y+"]$1")),m.attr("name").indexOf("[id]")>0&&m.val(y)}),h.$emitter.publish("listItemIdUpdated")}async updateCalculationFields(){let h=this;for(let g of(h.currentFieldData=h.convertFieldDataForRule(),h.fields)){let m=h.currentFieldData;if(g.needsValueUpdateOnRefresh()){let y={};y.value=g.value(),y.fields=m,await h.buildCalculationContext(y),await g.calculateNewValue(y,h.options.configuration.commoncalculations,h.commoncalculationCache),y.value=g.value()}if(void 0!==g.repetitions){for(let y of g.repetitions)for(let g of y)if(g.needsValueUpdateOnRefresh()){let y={};y.value=g.value(),y.fields=m,await h.buildCalculationContext(y),await g.calculateNewValue(y,h.options.configuration.commoncalculations,h.commoncalculationCache),y.value=g.value()}}}}hasBlockPrices(){let h=this;return null!==h.options.product.calculatedPrices&&h.options.product.calculatedPrices.length>1}async buildCalculationContext(h){let g=!(arguments.length>1)||void 0===arguments[1]||arguments[1],m=!(arguments.length>2)||void 0===arguments[2]||arguments[2];h.params=this.options.params,h.context=this.options.context,h.salesChannel=this.options.salesChannel,h.product=this.options.product,h.calculations=this.commoncalculationCache,g&&(h.selectedQuantity=await this.getQuantity()),h.customerGroup=this.options.customerGroup,m&&this.hasBlockPrices()&&await this.getCurrentBlockPrice(h),void 0!==this.options.parent&&void 0!==this.options.parent.configurationState&&(h.parent=this.options.parent.configurationState)}async updateDeliveryTime(){let h=this,g={};if(g.fields=h.currentFieldData,await h.buildCalculationContext(g),null!==h.options.configuration.deliverytimeCalculation&&(null!==h.options.configuration.deliverytimeCalculation.stringFormula||null!==h.options.configuration.deliverytimeCalculation.jsonFormula)){let m;let y=await A.Z.calculate(h.options.configuration.deliverytimeCalculation,g,"Delivery time"),_=h.options.configuration.deliverytimeName;"1"===h.options.configuration.deliverytimeMaxUseCalculation&&(null!==h.options.configuration.deliverytimeMaxCalculation.stringFormula||null!==h.options.configuration.deliverytimeMaxCalculation.jsonFormula)?(m=await A.Z.calculate(h.options.configuration.deliverytimeMaxCalculation,g,"Max delivery time"),_=h.options.configuration.deliverytimeMaxUseAdding?_.replace("{min}",y).replace("{max}",y+parseInt(m)):_.replace("{min}",y).replace("{max}",m)):(m=parseInt(h.options.configuration.deliverytimeMax),_=_.replace("{min}",y).replace("{max}",y+m)),h.$deliveryTime.contents().filter(function(){return this.nodeType===Node.TEXT_NODE&&""!==this.nodeValue.trim()}).each(function(){this.textContent=_}),h.$emitter.publish("afterDeliveryTimeUpdated",{name:_,minTime:y,maxTime:m})}}async updateProductNumber(){let h=this;if(!h.options.configuration.isProductNumberConfiguratorActive)return Promise.resolve();{let g={configurationId:h.options.configuration.id,productId:h.options.product.id,userData:JSON.stringify(h.currentFieldData)};return new Promise(function(m){let y=new XMLHttpRequest;y.open("POST",h.options.productNumberCalculationUrl,!0),y.send(JSON.stringify(g)),y.onload=()=>{let g=JSON.parse(y.responseText).productNumber;h.$productNumber.text(g),h.$emitter.publish("afterProductNumberUpdated",{productNumber:g}
7),m()}})}}async updateProductImage(){let h=this;return new Promise(function(g){if(0===h.$productImageGalleryContainer.length)return g(!1);clearTimeout(h.imageUpdateTimer),h.imageUpdateTimer=setTimeout(async function(){let m={};m.fields=h.currentFieldData,await h.buildCalculationContext(m);let y=[];for(let g of h.options.configuration.medias)null!=g.media&&g.visibilityCalculationId&&(g.visibilityCalculation.stringFormula||g.visibilityCalculation.jsonFormula)&&!await A.Z.calculate(g.visibilityCalculation,m,"Image Visibility")&&y.push(g.media.id);let _=[];h.fields.filter(h=>"select"===h.config.type&&"image"===h.config.options.selectType).forEach(function(h){!0===h.config.options.isSelectImageActiveImageVisibleInImageView&&h.config.valueGroups.forEach(function(g){g.values.forEach(function(g){let m=h.value()===g.value&&null!==g.options;!0===h.config.options.isMultiselect&&(m=h.value().map(h=>h.value).includes(g.value)&&null!==g.options),m&&("media"===g.options.imageSourceType&&g.mediaId?_.push(g.mediaId):"productCustomField"===g.options.imageSourceType&&g.options.mediaProductCustomFieldId&&_.push(g.options.mediaProductCustomFieldId))})})});let C=_.length===h.previousImageSet.additionalMediaIds.length&&_.every(function(g,m){return g===h.previousImageSet.additionalMediaIds[m]}),F=y.length===h.previousImageSet.hiddenConfigurationMediaIds.length&&y.every(function(g,m){return g===h.previousImageSet.hiddenConfigurationMediaIds[m]}),S=Object.values(h.options.configuration.visibleMedias).filter(h=>!y.includes(h.id)).map(h=>h.id),P=S.length===h.previousImageSet.visibileMediaIds.length&&y.every(function(g,m){return g===h.previousImageSet.visibileMediaIds[m]});h.options.configuration.isDebugActive&&(h.addDebugMessage("Visible media count: "+S.length),h.addDebugMessage("Additional media count: "+_.length)),P&&C&&F?(h.addDebugMessage("No image update necessary"),g(!1)):(h.addDebugMessage("Image update necessary"),await h.replaceImageGallery(_,y),h.previousImageSet.additionalMediaIds=_,h.previousImageSet.hiddenConfigurationMediaIds=y,h.previousImageSet.visibileMediaIds=S,h.$emitter.publish("afterImageUpdated",{visibleMediaIds:S,additionalMediaIds:_}),g(!0))},h.options.imageUpdateTimeout)})}removeLoader(){let h=this;h.$el.removeClass("neonConfigurator--isLoading")}async executeFieldCallbackBeforeUpdate(h){let g=this;if(void 0!==h.callbackBeforeUpdate){let m={};m.fields=g.currentFieldData,await g.buildCalculationContext(m),await h.callbackBeforeUpdate(m,g.options.configuration.commoncalculations)}}getFieldByKey(h){return this.fields.find(g=>g.key===h)}getFieldById(h){return this.fields.find(g=>g.config.id===h)}replaceImageGallery(h,g){let m=this;return new Promise(function(y){let _=new F.Z,C=$("[data-neonconfigurator-imagegallerygetter]");if(0!==C.length){let F=S.Z.serialize(C.get(0));F.set("hiddenConfigurationMediaIds",g),F.set("additionalMediaIds",h),F.set("mediaDisplayMode",m.options.configuration.mediaDisplayMode),F.set("configurationId",m.options.configuration.id),F.set("configuratorMediaCount",m.options.configuration.medias.length),_.post(C.prop("action"),F,function(h){m.$productImageGalleryContainer.html(h),window.PluginManager.initializePlugins().then(()=>{y()})})}else y()})}initDebugMessage(){let h=this;if(window.neonlinesConfigurator.startDebug=function(){window.localStorage.setItem("neonlinesConfiguratorIsDebugActive",!0),h.options.configuration.isDebugActive=!0,h.initDebugMessage()},window.neonlinesConfigurator.stopDebug=function(){h.options.configuration.isDebugActive=!1,$(".neonConfigurator__debug").remove(),window.localStorage.removeItem("neonlinesConfiguratorIsDebugActive")},h.options.configuration.isDebugActive){h.$debug=$('<div class="neonConfigurator__debug"><div class="neonConfigurator__debug__headline"  onclick="$(\'.neonConfigurator__debug\').toggleClass(\'neonConfigurator__debug__closed\')">neonlines Konfigurator - Debug Modus <div class="neonConfigurator__debug__headline__close">></div></div><div class="neonConfigurator__debug__content"><small>Konfigurator-ID: '+h.options.configuration.id+'</small><ul class="neonConfigurator__debug__log"></ul><div class="neonConfigurator__debug__messageContainer"></div></div></div>'),$("body").append(h.$debug);let g=document.createElement("script");g.setAttribute("src",h.options.libUrls.jsonView),document.body.appendChild(g),g.onload=function(){h.jsonViewLibIsLoaded=!0}}}updateDebugMessage(h){let g=this;g.options.configuration.isDebugActive&&g.jsonViewLibIsLoaded&&g.createCurrentState().then(function(m){m.subcalculations.calculations=h,g.$debug.find(".neonConfigurator__debug__messageContainer").html(""),g.$debug.find(".neonConfigurator__debug__messageContainer").append('<div class="neonConfigurator__debug__subheadline">Feldwerte</div>'),jsonview.renderJSON(m.ruleData.fields,document.querySelector(".neonConfigurator__debug__messageContainer")),$(".json-container:first .json-key:first").html("fields"),g.$debug.find(".neonConfigurator__debug__messageContainer").append('<div class="neonConfigurator__debug__subheadline">Alle verfügbare Variablen</div>'),jsonview.renderJSON(m.ruleData,document.querySelector(".neonConfigurator__debug__messageContainer"));let y=$(".json-container");y.eq(1).find(".json-key:first").html("[]"),g.$debug.find(".neonConfigurator__debug__messageContainer").append('<div class="neonConfigurator__debug__subheadline">Zwischenberechnungen</div>'),jsonview.renderJSON(m.subcalculations.calculations,document.querySelector(".neonConfigurator__debug__messageContainer")),y.eq(2).find(".json-key:first").html("calculations"),g.$debug.find(".neonConfigurator__debug__messageContainer").append('<div class="neonConfigurator__debug__subheadline">Sonstiges</div>');let _=$('<div class="json-container"><ul></ul></div>');for(let h of Object.values(g.debugMessages))_.find("ul").append("<li>"+h+"</li>");g.$debug.find(".neonConfigurator__debug__messageContainer").append(_)})}logError(h){let g=this,m={message:h.message,level:"error",exceptionType:h.constructor.name,innerException:{message:h.innerException?h.innerException.message:"",exceptionType:h.innerException?h.innerException.constructor.name:""}};
7h instanceof M.Z&&(m={...m,formula:h.formula,configurationId:g.options.configuration.id,calculationType:h.calculationType,calculation:h.calculation}),new F.Z().post(g.options.loggerUrl,JSON.stringify(m)),this.options.configuration.isDebugActive&&$(".neonConfigurator__debug__log").html('<li class="neonConfigurator__debug__log__entry neonConfigurator__debug__log__entry--error">Error: '+m.message+"</li>"),g.removeRefreshingLoader()}addFromPriceLabelIfNecessary(){let h=this;h.options.configuration.showFromPriceprefixForUntouchedConfiguration&&h.$price.prepend('<span class="product-detail-price-prefix">'+h.options.translations.fromLabel+"</span>")}setParent(h){let g=this;g.parentConfiguratorPlugin=h}disableCartButton(){let h=this,g=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".btn-buy, .btn-save-subconfiguration"),m=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find("#swag-amazon-pay-product-detail-wrapper");g.prop("disabled",!0),h.$offerButton.prop("disabled",!0),g.addClass("is--disabled"),m.addClass("is--disabled"),h.$offerButton.addClass("is--disabled")}getCartButton(){let h=this;return h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".btn-buy")}enableCartButton(){let h=this,g=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find(".btn-buy, .btn-save-subconfiguration"),m=h.$el.parents(".product-detail-buy, .cms-element-buy-box").find("#swag-amazon-pay-product-detail-wrapper");g.prop("disabled",!1),h.$offerButton.prop("disabled",!1),g.removeClass("is--disabled"),m.removeClass("is--disabled"),h.$offerButton.removeClass("is--disabled")}addDebugMessage(h){let g=this;g.debugMessages=g.debugMessages||[],g.debugMessages.push(h)}cleanDebugMessages(){let h=this;h.debugMessages=[],h.$debug.find(".neonConfigurator__debug__log").html("")}constructor(...h){super(...h),this.CalculatorServiceUtil=A.Z,this.dynamicTextElements=[]}}et.options={decimalSignPrice:"",configuration:null,productPriceFormatted:null,params:null,product:null,loggerUrl:null,productNumberCalculationUrl:null,customerGroup:null,imageUpdateTimeout:100},et.EVENTS=["beforeInit","afterInit","beforeRefresh","afterRefresh","beforeSubcalculationsCalculated","beforeSubcalculationCalculated","afterSubcalculationCalculated","afterSubcalculationsCalculated","fieldChange","configurationChange","afterFieldChange","beforeValidated","afterFieldValidated","afterValidated","beforeVisibilityUpdated","beforeInfoVisibilityUpdated","afterInfoVisibilityUpdated","afterGroupVisibilityUpdated","afterFieldVisibilityUpdated","afterFieldValueVisibilityUpdated","afterVisibilityUpdated","listItemIdUpdated","afterPriceUpdated","afterBasePriceUpdated","beforeBlockPricesUpdated","afterBlockPriceUpdated","afterBlockPricesUpdated","afterDeliveryTimeUpdated","afterImageUpdated","afterProductNumberUpdated","beforeDynamicTextUpdated","afterDynamicTextUpdated"],et.$input=null},175:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>CalculatorServiceUtil});var _json_logic_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(43),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_json_logic_js__WEBPACK_IMPORTED_MODULE_0__),_include_strtotime_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(906),_exceptions_calculation_exception__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(67),md5_es_src_md5__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(840);class CalculatorServiceSingleton{clearCache(){Object.keys(this.calculationCache).forEach(h=>delete this.calculationCache[h])}async calculate(h,g){let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,y=this,_=null;try{if("api"===h.type&&"POST"===h.options.api.method){let m={};h.options.api.variables.split(",").forEach(h=>{if(h.includes(".")){let y=h.split("."),_=g;for(let h=0;h<y.length;h++)_=_[y[h]];m[y[y.length-y.length+1]]=_}else m[h]=g.fields[h].value}),g=m}let m=this.getCacheKey(g,h),C=null;if(y.calculationCache[m])C=y.calculationCache[m];else{let F="";F="pro"===h.type?h.jsonFormula:h.stringFormula,_=y.replaceHtmlEntities(F),"pro"===h.type&&null!==h.jsonFormula?C=await y.evaluateProRule(JSON.parse(_.replace(/[<][\s]+/g,"<")),g):"simple"===h.type&&null!==h.stringFormula?C=await y.evaluateSimpleRule(_,g):"api"===h.type&&null!==h.options.api&&void 0!==h.options.api.url&&(C=await y.evaluateApiRule(h,g)),y.calculationCache[m]=C}return Promise.resolve(C)}catch(y){throw new _exceptions_calculation_exception__WEBPACK_IMPORTED_MODULE_1__.Z("Error in "+m+" calculation. "+y.message+", Formel: "+_,m,h,_,g,y)}}getCacheKey(h,g){let{quantity:m,value:y,..._}=h;return"api"===g.type&&"GET"===g.options.api.method?md5_es_src_md5__WEBPACK_IMPORTED_MODULE_2__.Z.hash(JSON.stringify(g.id)):md5_es_src_md5__WEBPACK_IMPORTED_MODULE_2__.Z.hash(JSON.stringify(g.id)+":"+JSON.stringify(_))}evaluateApiRule(h,g){return fetch(h.options.api.url,{method:h.options.api.method,body:"POST"===h.options.api.method?JSON.stringify(g):null}).then(h=>h.json())}evaluateProRule(h,g){return this.addCustomRules(g),Promise.resolve(_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().apply(h,g))}replaceHtmlEntities(h){return h.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}convertToDate(h,g){return("today"===h||"heute"===h)&&(h="now"),(0,_include_strtotime_js__WEBPACK_IMPORTED_MODULE_3__.G)(h)}convertToNet(h,g){return"net"===g.context.taxState||"tax-free"===g.context.taxState?h:h*(g.product.taxRate/100+1)}convertToGross(h,g){return"gross"===g.context.taxState?h:h/(g.product.taxRate/100+1)}addCustomRules(h){_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("net",g=>this.convertToNet(g,h)),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("netto",g=>this.convertToNet(g,h)),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("brutto",g=>this.convertToGross(g,h)),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("gross",g=>this.convertToGross(g,h));let g=function(h){return 1==arguments.length?null===h?0:h.length:arguments.length};_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("length",g);let m=function(h,g){let m=parseFloat((g+="").replace(",","."));if(h=parseFloat((h+"").replace(",",".")),isNaN(g.replace(",",".")))return!1;if(parseInt(h,10)===h)return m%h==0;var y=m/h;return 1e-8>Math.abs(parseInt(Math.round(y),10)-y)};function y(h){let g=h.length,m={},y=h.slice();for(y.sort();g--;){let h=y[g];if(/nul|nan|infini/i.test(String(h))&&(h=String(h)),m[JSON.stringify(h)])return!0;m[JSON.stringify(h)]=!0}return!1}_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("stepsize",m),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("date",g=>this.convertToDate(g,h)),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("datum",g=>this.convertToDate(g,h)),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("floor",function(h){let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.floor(h/g)*g}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("ceil",function(h){let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.ceil(h/g)*g}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("roun
7d",function(h,g){return Number(Math.round(h+"e+"+g)+"e-"+g)}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("sqrt",function(h){return Math.sqrt(h)}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("pow",function(h,g){return Math.pow(h,g)}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("unique",function(h){return!y(h)}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("matrix",function(){let h=arguments.length;if(h<2)return console.error("matrix: not enough arguments"),!1;let g=arguments[h-1],m=null,y=h-1;Array.isArray(g)||(m=g,y=h-2);let _=arguments,C=arguments[y],F=!1,S=[],P=[];for(let h=0;h<y;h++){let g=S.length?S:C;S=[],g.forEach(function(g,y){null==m&&_[h]>=g[h]&&(S.push(g),(!P[h]||P[h]<g[h])&&(P[h]=g[h])),"=="===m&&_[h]===g[h]?(S.push(g),(!P[h]||P[h]<g[h])&&(P[h]=g[h])):"ceil"===m&&_[h]<=g[h]?(S.push(g),(!P[h]||P[h]>g[h])&&(P[h]=g[h])):"startsWith"===m&&(_[h]+"").startsWith(g[h])&&(S.push(g),P[h]||(P[h]=g[h]))})}return 1===S.length?F=S[0][y]:S.length>1&&S.forEach(function(h){JSON.stringify(h.slice(0,y))===JSON.stringify(P)&&(F=h[y])}),F}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("regexFind",function(){let h=arguments.length;if(h<2)return console.error("regexFind: not enough arguments"),!1;let g=arguments[0].toString(),m=arguments[1],y=arguments[2]?parseInt(arguments[2],10)-1:0,_=arguments[3]?arguments[3]:"",C=void 0!==arguments[4]?arguments[4]:0,F=g.match(new RegExp(m,_.toString()));return F?F[y]:C}),_json_logic_js__WEBPACK_IMPORTED_MODULE_0___default().add_operation("replace",function(){let h=arguments.length;if(3!==h)return console.error("replace operator: not enough arguments"),arguments[0];let g=arguments[0].toString(),m=arguments[1],y=arguments[2];return g.replaceAll(m,y)})}evaluateSimpleRule(formula,ruleData){let that=this;formula=that.replaceDottedVariables(formula,ruleData),Object.keys(ruleData).forEach(function(h){"fields"!==h&&"product"!==h&&(formula=formula.replace(RegExp(h,"g"),ruleData[h]))});try{if(-1!==formula.indexOf("fields"))throw Error("Fields are not replaced correctly, check the formula: "+formula);if(-1!==formula.indexOf("[object Object]"))throw Error("Formula is not replaced correctly, check the formula: "+formula);try{function net(h){return that.convertToNet(h,ruleData)}function netto(h){return that.convertToNet(h,ruleData)}function gross(h){return that.convertToGross(h,ruleData)}function brutto(h){return that.convertToGross(h,ruleData)}let calcResult=eval(formula);return Promise.resolve(calcResult)}catch(e){throw Error("Error in formula: "+formula+", "+e.message)}}catch(e){return Promise.reject(e)}}replaceDottedVariables(h,g){return h.replace(/\b([\w.]+)\b(?![\w."])/g,function(h,m){let y=m.split("."),_=g;for(let h of y)if(void 0===(_=_[h]))break;return"string"==typeof _&&(_="'"+_+"'"),"object"==typeof _&&(_=JSON.stringify(_)),void 0!==_?_:h})}escapeAsStringIfIsString(h){return("string"==typeof h||h instanceof String)&&(h="'"+h+"'"),h}constructor(){return this.calculationCache={},CalculatorServiceSingleton.instance||(CalculatorServiceSingleton.instance=this),CalculatorServiceSingleton.instance}}let CalculatorServiceInstance=Object.freeze(new CalculatorServiceSingleton);class CalculatorServiceUtil{static calculateWithoutCommoncalculationCache(h,g,m){return CalculatorServiceInstance.calculate(h,g,m)}static calculate(h,g,m){return CalculatorServiceInstance.calculate(h,g,m)}static clearCache(){CalculatorServiceInstance.clearCache()}}},67:(h,g,m)=>{"use strict";m.d(g,{Z:()=>y});class y extends Error{constructor(h,g,m,y,_,C){super(h),this.calculationDebugContext=null,this.message=h,this.calculationType=g,this.calculation=m,this.formula=y,this.ruleData=_,this.innerException=C}}},906:(h,g,m)=>{"use strict";function y(h,g){var m,y,_,C,F,S,P,E,w;if(!h)return null;if("now"===(h=h.trim().replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()))return null===g||isNaN(g)?new Date().getTime()/1e3|0:0|g;if(!isNaN(m=Date.parse(h)))return m/1e3|0;if("now"===h)return new Date().getTime()/1e3;if(!isNaN(m=Date.parse(h)))return m/1e3;if(y=h.match(/^(\d{2,4})-(\d{2})-(\d{2})(?:\s(\d{1,2}):(\d{2})(?::\d{2})?)?(?:\.(\d+)?)?$/))return new Date(y[1]>=0&&y[1]<=69?+y[1]+2e3:y[1],parseInt(y[2],10)-1,y[3],y[4]||0,y[5]||0,y[6]||0,y[7]||0)/1e3;function I(h,g,m){var y,F=C[g];void 0!==F&&(0==(y=F-_.getDay())?y=7*m:y>0&&"last"===h?y-=7:y<0&&"next"===h&&(y+=7),_.setDate(_.getDate()+y))}function V(h){var g=h.split(" "),m=g[0],y=g[1].substring(0,3),C=/\d+/.test(m),S=("last"===m?-1:1)*("ago"===g[2]?-1:1);if(C&&(S*=parseInt(m,10)),F.hasOwnProperty(y)&&!g[1].match(/^mon(day|\.)?$/i))return _["set"+F[y]](_["get"+F[y]]()+S);if("wee"===y)return _.setDate(_.getDate()+7*S);if("next"===m||"last"===m)I(m,y,S);else if(!C)return!1;return!0}if(_=g?new Date(1e3*g):new Date,C={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},F={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},E="([+-]?\\d+\\s"+(P="(years?|months?|weeks?|days?|hours?|minutes?|min|
7seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+P+")(\\sago)?",!(y=h.match(RegExp(E,"gi"))))return!1;for(w=0,S=y.length;w<S;w++)if(!V(y[w]))return!1;return _.getTime()/1e3}m.d(g,{G:()=>y})},49:(h,g,m)=>{"use strict";m.d(g,{Z:()=>_});var y=m(140);class _{static isNode(h){return"object"==typeof h&&null!==h&&(h===document||h===window||h instanceof Node)}static hasAttribute(h,g){if(!_.isNode(h))throw Error("The element must be a valid HTML Node!");return"function"==typeof h.hasAttribute&&h.hasAttribute(g)}static getAttribute(h,g){let m=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(m&&!1===_.hasAttribute(h,g))throw Error('The required property "'.concat(g,'" does not exist!'));if("function"!=typeof h.getAttribute){if(m)throw Error("This node doesn't support the getAttribute function!");return}return h.getAttribute(g)}static getDataAttribute(h,g){let m=!(arguments.length>2)||void 0===arguments[2]||arguments[2],C=g.replace(/^data(|-)/,""),F=y.Z.toLowerCamelCase(C,"-");if(!_.isNode(h)){if(m)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===h.dataset){if(m)throw Error("This node doesn't support the dataset attribute!");return}let S=h.dataset[F];if(void 0===S){if(m)throw Error('The required data attribute "'.concat(g,'" does not exist on ').concat(h,"!"));return S}return y.Z.parsePrimitive(S)}static querySelector(h,g){let m=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(m&&!_.isNode(h))throw Error("The parent node is not a valid HTML Node!");let y=h.querySelector(g)||!1;if(m&&!1===y)throw Error('The required element "'.concat(g,'" does not exist in parent node!'));return y}static querySelectorAll(h,g){let m=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(m&&!_.isNode(h))throw Error("The parent node is not a valid HTML Node!");let y=h.querySelectorAll(g);if(0===y.length&&(y=!1),m&&!1===y)throw Error('At least one item of "'.concat(g,'" must exist in parent node!'));return y}static getFocusableElements(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,g='\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not([tabindex^="-"]):not([disabled])\n        ';return h.querySelectorAll(g)}static getFirstFocusableElement(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(h)[0]}static getLastFocusableElement(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,g=this.getFocusableElements(h);return g[g.length-1]}}},266:(h,g,m)=>{"use strict";m.d(g,{Z:()=>y});class y{static iterate(h,g){if(h instanceof Map||Array.isArray(h))return h.forEach(g);if(h instanceof FormData){for(var m of h.entries())g(m[1],m[0]);return}if(h instanceof NodeList)return h.forEach(g);if(h instanceof HTMLCollection)return Array.from(h).forEach(g);if(h instanceof Object)return Object.keys(h).forEach(m=>{g(h[m],m)});throw Error("The element type ".concat(typeof h," is not iterable!"))}}},140:(h,g,m)=>{"use strict";m.d(g,{Z:()=>y});class y{static ucFirst(h){return h.charAt(0).toUpperCase()+h.slice(1)}static lcFirst(h){return h.charAt(0).toLowerCase()+h.slice(1)}static toDashCase(h){return h.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(h,g){let m=y.toUpperCamelCase(h,g);return y.lcFirst(m)}static toUpperCamelCase(h,g){return g?h.split(g).map(h=>y.ucFirst(h.toLowerCase())).join(""):y.ucFirst(h.toLowerCase())}static parsePrimitive(h){try{return/^\d+(.|,)\d+$/.test(h)&&(h=h.replace(",",".")),JSON.parse(h)}catch(g){return h.toString()}}}},107:(h,g,m)=>{"use strict";m.d(g,{Z:()=>y});class y{get(h,g){let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",y=this._createPreparedRequest("GET",h,m);return this._sendRequest(y,null,g)}post(h,g,m){let y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";y=this._getContentType(g,y);let _=this._createPreparedRequest("POST",h,y);return this._sendRequest(_,g,m)}delete(h,g,m){let y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";y=this._getContentType(g,y);let _=this._createPreparedRequest("DELETE",h,y);return this._sendRequest(_,g,m)}patch(h,g,m){let y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";y=this._getContentType(g,y);let _=this._createPreparedRequest("PATCH",h,y);return this._sendRequest(_,g,m)}
7abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(h){this._errorHandlingInternal=h}_registerOnLoaded(h,g){g&&(!0===this._errorHandlingInternal?(h.addEventListener("load",()=>{g(h.responseText,h)}),h.addEventListener("abort",()=>{console.warn("the request to ".concat(h.responseURL," was aborted"))}),h.addEventListener("error",()=>{console.warn("the request to ".concat(h.responseURL," failed with status ").concat(h.status))}),h.addEventListener("timeout",()=>{console.warn("the request to ".concat(h.responseURL," timed out"))})):h.addEventListener("loadend",()=>{g(h.responseText,h)}))}_sendRequest(h,g,m){return this._registerOnLoaded(h,m),h.send(g),h}_getContentType(h,g){return h instanceof FormData&&(g=!1),g}_createPreparedRequest(h,g,m){return this._request=new XMLHttpRequest,this._request.open(h,g),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),m&&this._request.setRequestHeader("Content-type",m),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},306:(h,g,m)=>{"use strict";m.d(g,{ar:()=>P,ZP:()=>V});class y{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return y.isIPhoneDevice()||y.isIPadDevice()}static isNativeWindowsBrowser(){return y.isIEBrowser()||y.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":y.isTouchDevice(),"is-ios":y.isIOSDevice(),"is-native-windows":y.isNativeWindowsBrowser(),"is-iphone":y.isIPhoneDevice(),"is-ipad":y.isIPadDevice(),"is-ie":y.isIEBrowser(),"is-edge":y.isEdgeBrowser()}}}var _=m(266);let C="modal-backdrop",F="modal-backdrop-open",S="no-scroll",P=350,E={ON_CLICK:"backdrop/onclick"};class w{create(h){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let g=document.body.lastChild;document.documentElement.classList.add(S),setTimeout(function(){g.classList.add(F),"function"==typeof h&&h()},75),this._dispatchEvents()}remove(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,g=this._getBackdrops();_.Z.iterate(g,h=>h.classList.remove(F)),setTimeout(this._removeExistingBackdrops.bind(this),h),document.documentElement.classList.remove(S)}_dispatchEvents(){let h=y.isTouchDevice()?"touchstart":"click";document.addEventListener(h,function(h){h.target.classList.contains(C)&&document.dispatchEvent(new CustomEvent(E.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(C))}_removeExistingBackdrops(){if(!1===this._exists())return;let h=this._getBackdrops();_.Z.iterate(h,h=>h.remove())}_exists(){return document.querySelectorAll(".".concat(C)).length>0}_getTemplate(){return'<div class="'.concat(C,'"></div>')}constructor(){return w.instance||(w.instance=this),w.instance}}let I=Object.freeze(new w);class V{static create(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;I.create(h)}static remove(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;I.remove(h)}static SELECTOR_CLASS(){return C}}},471:(h,g,m)=>{"use strict";m.d(g,{Z:()=>_});var y=m(266);class _{static serialize(h){let g=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if("FORM"!==h.nodeName){if(g)throw Error("The passed element is not a form!");return{}}return new FormData(h)}static serializeJson(h){let g=!(arguments.length>1)||void 0===arguments[1]||arguments[1],m=_.serialize(h,g);if(0===Object.keys(m).length)return{};let C={};return y.Z.iterate(m,(h,g)=>C[g]=h),C}}},19:(h,g,m)=>{"use strict";m.d(g,{Z:()=>w});var y=m(49),_=m(306);let C="js-pseudo-modal",F="js-pseudo-modal-template",S="js-pseudo-modal-template-content-element",P="js-pseudo-modal-template-title-element",E="js-pseudo-modal-template-root-element";class w{open(h){let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.ar;this._hideExistingModal(),this._create(),setTimeout(this._open.bind(this,h),g)}close(){let h=this.getModal();this._modalInstance=bootstrap.Modal.getInstance(h),this._modalInstance.hide()}getModal(){return this._modal||this._create(),this._modal}updatePosition(){this._modalInstance.handleUpdate()}updateContent(h,g){this._content=h,this._setModalContent(h),this.updatePosition(),"function"==typeof g&&g.bind(this)()}_hideExistingModal(){try{let h=y.Z.querySelector(document,".".concat(C," .modal"),!1);if(!h)return;let g=bootstrap.Modal.getInstance(h);if(!g)return;g.hide()}catch(h){console.warn("[PseudoModalUtil] Unable to hide existing pseudo modal before opening pseudo modal: ".concat(h.message))}}_open(h){this.getModal(),this._modal.addEventListener("hidden.bs.modal",this._modalWrapper.remove),this._modal.addEventListener("shown.bs.modal",h),this._modal.addEventListener("hide.bs.modal",()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}),this._modalInstance.show()}_create(){this._modalMarkupEl=y.Z.querySelector(document,this._templateSelector),this._createModalWrapper(),this._modalWrapper.innerHTML=this._content,this._modal=this._createModalMar
7kup(),this._modalInstance=new bootstrap.Modal(this._modal,{backdrop:this._useBackdrop}),document.body.insertAdjacentElement("beforeend",this._modalWrapper)}_createModalWrapper(){this._modalWrapper=y.Z.querySelector(document,".".concat(C),!1),this._modalWrapper||(this._modalWrapper=document.createElement("div"),this._modalWrapper.classList.add(C))}_createModalMarkup(){let h=y.Z.querySelector(this._modalWrapper,".modal",!1);if(h)return h;let g=this._modalWrapper.innerHTML;return this._modalWrapper.innerHTML=this._modalMarkupEl.innerHTML,this._setModalContent(g),y.Z.querySelector(this._modalWrapper,".modal")}_setModalTitle(){let h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{y.Z.querySelector(this._modalWrapper,this._templateTitleSelector).innerHTML=h}catch(h){}}_setModalContent(h){let g=y.Z.querySelector(this._modalWrapper,this._templateContentSelector);g.innerHTML=h;let m=y.Z.querySelector(g,".".concat(E),!1);if(m){y.Z.querySelector(this._modalWrapper,".".concat(E)).replaceChildren(m);return}try{let h=y.Z.querySelector(g,this._templateTitleSelector);h&&(this._setModalTitle(h.innerHTML),h.parentNode.removeChild(h))}catch(h){}}constructor(h,g=!0,m=".".concat(F),y=".".concat(S),_=".".concat(P)){this._content=h,this._useBackdrop=g,this._templateSelector=m,this._templateContentSelector=y,this._templateTitleSelector=_}}}}]);

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.