1(function(){"use strict";(function(){var str_moduleName='addToCartButton';var obj_classdef={start:function(){lsjs.__moduleHelpers[str_moduleName]=this.__module},enhanceButtons:function(str_selector,el_domReference){var els_buttonsToEnhance;if(str_selector===undefined||!str_selector){console.error('str_selector is empty');return} 2if(el_domReference!==undefined&&typeOf(el_domReference)==='element'){els_buttonsToEnhance=el_domReference.getElements(str_selector)}else{els_buttonsToEnhance=$$(str_selector)} 3Array.each(els_buttonsToEnhance,function(el_buttonToEnhance){if(!el_buttonToEnhance.retrieve('alreadyHandledBy_'+str_moduleName)){el_buttonToEnhance.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 4el_buttonToEnhance.addEvent('click',function(){var num_quantity,str_productVariantId;lsjs.loadingIndicator.__controller.show();this.blur();num_quantity=this.getParent().getElement('[name="quantity"]').getProperty('value');str_productVariantId=this.getParent().getParent().getElement('input[name="productVariantID"]').getProperty('value');new Request.JSON({url:lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl,noCache:!0,data:'REQUEST_TOKEN='+lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN+'&isAjax=1'+'&action=putInCart'+'&requestedClass=ModuleAjaxGeneral'+'&productVariantID='+str_productVariantId+'&quantity='+num_quantity,onComplete:function(objResponse){var el_parentQuantityInput,el_parentOfPutInCartMsg,el_alreadyExistingPutInCartMsg;if(typeof(lsjs.__appHelpers.merconisApp.obj_references.lsMerconisMiniCart)==='undefined'||lsjs.__appHelpers.merconisApp.obj_references.lsMerconisMiniCart===null){console.log('lsjs.__appHelpers.merconisApp.obj_references.lsMerconisMiniCart is not available')}else{lsjs.__appHelpers.merconisApp.obj_references.lsMerconisMiniCart.__controller.reloadCartMini()} 5var msgClass='';switch(objResponse.value.msgType){case 1:msgClass='.hasBeenPutInCart';break;case 2:msgClass='.hasBeenPutInCart.error';break;case 3:msgClass='.notPutInCart';break} 6el_parentQuantityInput=this.getParent('.quantityInput');if(el_parentQuantityInput!==null){el_parentOfPutInCartMsg=el_parentQuantityInput.getParent();if(el_parentOfPutInCartMsg!==null){el_alreadyExistingPutInCartMsg=el_parentOfPutInCartMsg.getElement('.putInCartMsg');if(el_alreadyExistingPutInCartMsg!==null){el_alreadyExistingPutInCartMsg.dispose()}} 7new Element('div.putInCartMsg'+msgClass).setProperty('html',objResponse.value.msg).inject(el_parentQuantityInput,'before')} 8lsjs.loadingIndicator.__controller.hide()}.bind(this)}).send();return!1})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.createModule({__name:str_moduleName})})();(function(){var str_moduleName='addToWatchlistButton';var obj_classdef={start:function(){lsjs.__moduleHelpers[str_moduleName]=this.__module},enhanceButtons:function(str_selector,el_domReference){var els_buttonsToEnhance;if(str_selector===undefined||!str_selector){console.error('str_selector is empty');return} 9if(el_domReference!==undefined&&typeOf(el_domReference)==='element'){els_buttonsToEnhance=el_domReference.getElements(str_selector)}else{els_buttonsToEnhance=$$(str_selector)} 10Array.each(els_buttonsToEnhance,function(el_buttonToEnhance){if(!el_buttonToEnhance.retrieve('alreadyHandledBy_'+str_moduleName)){el_buttonToEnhance.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 11el_buttonToEnhance.addEvent('click',function(){var FORM_SUBMIT,favoriteProductID;lsjs.loadingIndicator.__controller.show();this.blur();FORM_SUBMIT=this.getParent().getElement('input[name="FORM_SUBMIT"]').getProperty('value');favoriteProductID=this.getParent().getElement('input[name="favoriteProductID"]').getProperty('value');new Request.JSON({url:lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl,noCache:!0,data:'REQUEST_TOKEN='+merconis_FE.options.REQUEST_TOKEN+'&isAjax=1'+'&action=addToFavorites'+'&requestedClass=ModuleAjaxGeneral'+'&favoriteProductID='+favoriteProductID+'&FORM_SUBMIT='+FORM_SUBMIT,onComplete:function(objResponse){var parentSwitchBox,msgSuccess,msgError,parentWatchlistContainer,crossSellerFavoritesParent,el_shopProduct;parentSwitchBox=this.getParent('.favoriteSwitchBox');if(typeOf(parentSwitchBox)==='element'){msgSuccess=parentSwitchBox.getElement('.success');msgError=parentSwitchBox.getElement('.error')}
12parentWatchlistContainer=this.getParent('.watchlistContainer');crossSellerFavoritesParent=this.getParent('.crossSeller.favorites');el_shopProduct=this.getParent('.shopProduct');switch(objResponse.value.msgType){case 1:if(typeOf(msgSuccess)==='element'){msgSuccess.dispose()} 13if(typeOf(msgError)==='element'){msgError.dispose()} 14if(typeOf(parentSwitchBox)==='element'){new Element('span.success').setProperty('html',objResponse.value.msg).inject(parentSwitchBox,'top')} 15if(typeOf(parentWatchlistContainer)==='element'){parentWatchlistContainer.addClass('inMyWatchlist')} 16this.value=objResponse.value.btnText;break;case 2:if(typeOf(crossSellerFavoritesParent)==='element'){el_shopProduct.set('tween',{onComplete:function(){el_shopProduct.dispose();var remainingSwitchBoxes=$$('.favoriteSwitchBox')[0] 17if(remainingSwitchBoxes==undefined||remainingSwitchBoxes==null){location.reload(!0)}}});el_shopProduct.fade(0)}else{if(typeOf(msgSuccess)==='element'){msgSuccess.dispose()} 18if(typeOf(msgError)==='element'){msgError.dispose()} 19if(typeOf(parentSwitchBox)==='element'){new Element('span.success').setProperty('html',objResponse.value.msg).inject(parentSwitchBox,'top')} 20if(typeOf(parentWatchlistContainer)==='element'){parentWatchlistContainer.removeClass('inMyWatchlist')} 21this.value=objResponse.value.btnText} 22break;case 3:if(typeOf(msgSuccess)==='element'){msgSuccess.dispose()} 23if(typeOf(msgError)==='element'){msgError.dispose()} 24if(typeOf(parentSwitchBox)==='element'){new Element('span.error').setProperty('html',objResponse.value.msg).inject(parentSwitchBox,'top')} 25break} 26lsjs.loadingIndicator.__controller.hide()}.bind(this)}).send();return!1})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.createModule({__name:str_moduleName})})();(function(){var str_moduleName='configuratorInstance';var obj_classdef={el_linkChangeConfiguration:null,el_configuratorForm:null,int_productId:null,int_productVariantId:null,start:function(){this.int_productId=this.__el_container.getProperty('data-merconis-productId');this.int_productVariantId=this.__el_container.getProperty('data-merconis-productVariantId');if(!this.int_productVariantId){console.error('Product variant id for configurator could not be determined. Check for [data-merconis-productVariantId] in configurator element: ',this.__el_container);return} 27this.initializeEvents()},initializeEvents:function(){this.initializeChangeConfigurationLink();this.initializeConfiguratorForm()},initializeConfiguratorForm:function(){var self=this;this.el_configuratorForm=this.__el_container.getElement('form');if(typeOf(this.el_configuratorForm)!=='element'){return} 28this.el_configuratorForm.addEvent('submit',function(event){if(event!==undefined&&event!==null){event.stop()} 29lsjs.loadingIndicator.__controller.show();new Request.cajax({url:this.getProperty('action'),method:'post',noCache:!0,cajaxMode:'updateCompletely',el_formToUseForFormData:this,obj_additionalFormData:{'cajaxRequestData[requestedElementClass]':'ajax-reload-by-configurator_'+self.int_productVariantId,'cajaxRequestData[custom][onlyRequestedProductId]':self.int_productId},onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()})},initializeChangeConfigurationLink:function(){var self=this;this.el_linkChangeConfiguration=this.__el_container.getElement('.changeConfiguration a');if(typeOf(this.el_linkChangeConfiguration)!=='element'){return} 30this.el_linkChangeConfiguration.addEvent('click',function(event){event.stop();lsjs.loadingIndicator.__controller.show();new Request.cajax({url:this.getProperty('href'),method:'post',noCache:!0,cajaxMode:'updateCompletely',data:'cajaxRequestData[requestedElementClass]=ajax-reload-by-configurator_'+self.int_productVariantId+'&cajaxRequestData[custom][onlyRequestedProductId]='+self.int_productId+'&REQUEST_TOKEN='+lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN,onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='configuratorInstance';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='configuratorManager';var obj_classdef={start:function(){Array.each($$('[data-merconis-component~="configurator"]'),function(el_configuratorContainer){if(!el_configuratorContainer.retrieve('alreadyHandledBy_'+str_moduleName)){el_configuratorContainer.store('alreadyHandledBy_'+str_moduleName,!0)}else{return}
31lsjs.createModule({__name:'configuratorInstance',__useLoadingIndicator:!0,__el_container:el_configuratorContainer})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var obj_classdef_model={name:'options',data:{},start:function(){this.__module.onModelLoaded()},set:function(obj_options){Object.merge(this.data,obj_options)}};lsjs.addModelClass('customerDataFormInstance',obj_classdef_model)})();(function(){var str_moduleName='customerDataFormInstance';var obj_classdef={els_allDeviantAddressFormFields:null,el_checkbox_useDeviantShippingAddress:null,start:function(){this.registerElements(this.__el_container,'main');if(this.__autoElements.main.deviantShippingAddress){this.initializeDeviantShippingAddressFunctionality()}},getAllDeviantAddressFormFields:function(){this.els_allDeviantAddressFormFields=new Elements();Array.prototype.push.apply(this.els_allDeviantAddressFormFields,this.__autoElements.main.deviantShippingAddress.getElements('input'));Array.prototype.push.apply(this.els_allDeviantAddressFormFields,this.__autoElements.main.deviantShippingAddress.getElements('select'));Array.prototype.push.apply(this.els_allDeviantAddressFormFields,this.__autoElements.main.deviantShippingAddress.getElements('textarea'))},initializeDeviantShippingAddressFunctionality:function(){var self=this;this.el_checkbox_useDeviantShippingAddress=this.__el_container.getElement('[type="checkbox"][name="useDeviantShippingAddress"]');if(this.el_checkbox_useDeviantShippingAddress===null){return} 32this.getAllDeviantAddressFormFields();if(this.els_allDeviantAddressFormFields.length<=0){return} 33Array.each(this.els_allDeviantAddressFormFields,function(el_formField){if(el_formField.getProperty('data-misc-required')!==null){return} 34el_formField.setProperty('data-misc-required',el_formField.getProperty('required')!==null?'1':'0')});this.el_checkbox_useDeviantShippingAddress.addEvent('change',function(){if(this.getProperty('checked')===!0){self.showDeviantShippingAddressForm()}else{self.hideDeviantShippingAddressForm()}});this.el_checkbox_useDeviantShippingAddress.fireEvent('change')},showDeviantShippingAddressForm:function(){this.__autoElements.main.deviantShippingAddress.removeClass('hideDeviantShippingAddress');Array.each(this.els_allDeviantAddressFormFields,function(el_formField){if(el_formField.getProperty('data-misc-required')=='1'){el_formField.setProperty('required','')}})},hideDeviantShippingAddressForm:function(){this.__autoElements.main.deviantShippingAddress.addClass('hideDeviantShippingAddress');Array.each(this.els_allDeviantAddressFormFields,function(el_formField){el_formField.removeProperty('required')})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='customerDataFormInstance';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var obj_classdef_model={name:'options',data:{},start:function(){this.data={el_domReference:null,str_selector:'[data-lsjs-component~="customerDataForm"]',str_classToSetWhenModuleApplied:'customerDataFormApplied'}},set:function(obj_options){Object.merge(this.data,obj_options);this.__module.onModelLoaded()}};lsjs.addModelClass('customerDataFormManager',obj_classdef_model)})();(function(){var str_moduleName='customerDataFormManager';var obj_classdef={start:function(){var els_toEnhance;if(this.__models.options.data.el_domReference!==undefined&&typeOf(this.__models.options.data.el_domReference)==='element'){els_toEnhance=this.__models.options.data.el_domReference.getElements(this.__models.options.data.str_selector)}else{els_toEnhance=$$(this.__models.options.data.str_selectors)} 35Array.each(els_toEnhance,function(el_container){if(!el_container.retrieve('alreadyHandledBy_'+str_moduleName)){el_container.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 36el_container.addClass(this.__models.options.data.str_classToSetWhenModuleApplied);lsjs.createModule({__name:'customerDataFormInstance',__parentModule:this.__module,__useLoadingIndicator:!1,__el_container:el_container})}.bind(this))}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(obj_options){this.self=lsjs.createModule({__name:str_moduleName});this.self.__models.options.set(obj_options)}}})();(function(){var obj_classdef_model={name:'options',data:{},start:function(){this.data={str_containerSelector:'.template_filterForm_default',bln_storeToggleStatusInCookie:!0,str_initialToggleStatus:'open'}},set:function(obj_options){Object.merge(this.data,obj_options);this.__module.onModelLoaded()}};lsjs.addModelClass('filterFormManager',obj_classdef_model)})();(function(){var str_moduleName='filterFormManager';var obj_classdef={start:function(){this.__el_container=$$(this.__models.options.data.str_containerSelector)[0];if(typeOf(this.__el_container)!=='element'){return} 37if(!this.__el_container.retrieve('alreadyHandledBy_'+str_moduleName)){this.__el_container.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 38this.registerElements(this.__el_container,'main',!0);this.prepareHeadlineToggler();this.prepareFilterOptionBoxes()},prepareHeadlineToggler:function(){if(this.__autoElements.main.filterFormHeadline===undefined||this.__autoElements.main.filterForm
38Content===undefined){return} 39lsjs.__moduleHelpers.unfold.start({str_initialToggleStatus:'open',bln_toggleOnInitialization:!1,bln_skipAnimationWhenTogglingOnInitialization:!1,var_togglerSelector:this.__autoElements.main.filterFormHeadline,var_contentBoxSelector:this.__autoElements.main.filterFormContent,var_wrapperSelector:this.__el_container,str_cookieIdentifierName:this.__models.options.data.bln_storeToggleStatusInCookie?'lsUnfold_filterBox':'',str_initialCookieStatus:this.__models.options.data.str_initialToggleStatus,obj_morphOptions:{'duration':600}})},prepareFilterOptionBoxes:function(){if(this.__autoElements.main.filterOptionsBox!==undefined){Array.each(this.__autoElements.main.filterOptionsBox,function(el_filterOptionsBox){lsjs.createModule({__name:'filterFormOptionsBox',__parentModule:this.__module,__el_container:el_filterOptionsBox})}.bind(this))} 40if(this.__autoElements.main.filterPriceBox!==undefined){Array.each(this.__autoElements.main.filterPriceBox,function(el_filterPriceBox){lsjs.createModule({__name:'filterFormOptionsBox',__parentModule:this.__module,__el_container:el_filterPriceBox})}.bind(this))}}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='filterFormManager';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(obj_options){this.self=lsjs.createModule({__name:str_moduleName});this.self.__models.options.set(obj_options)}}})();(function(){var str_moduleName='filterFormOptionsBox';var obj_classdef={el_showAndHideOptionsIcon:null,str_displayStyleFilterOptions:'block',start:function(){this.registerElements(this.__el_container,'main');if(this.__autoElements.main.optionsBox_filterOption===undefined){this.__autoElements.main.optionsBox_filterOption=new Elements()} 41this.prepare();this.hideAllPossibleOptions()},prepare:function(){var self=this;this.__el_container.addClass('usingJS');this.el_showAndHideOptionsIcon=new Element('div.showAndHideOptionsIcon');this.el_showAndHideOptionsIcon.addEvent('click',function(){if(this.hasClass('currentlyHiding')){self.showAllOptions()}else{self.hideAllPossibleOptions()}});if(this.__autoElements.main.optionsBox_filterOptionsWrapper!==undefined){this.__autoElements.main.optionsBox_filterOptionsWrapper.adopt(this.el_showAndHideOptionsIcon)}else{this.__autoElements.main.optionsBox_content.adopt(this.el_showAndHideOptionsIcon)} 42this.hideShowAndHideOptionsIconIfUnneeded();Array.each(this.__el_container.getElements('[data-lsjs-element="optionsBox_filterOption"] input'),function(el_filterOptionInput){self.markInputFieldSelectStatus(el_filterOptionInput);el_filterOptionInput.addEvent('change',function(){self.hideShowAndHideOptionsIconIfUnneeded();self.markInputFieldSelectStatus(this)})});var el_firstFilterOption=this.__autoElements.main.optionsBox_filterOption[0];if(typeOf(el_firstFilterOption)==='element'){this.str_displayStyleFilterOptions=el_firstFilterOption.getStyle('display')} 43this.initializeCheckAllField();lsjs.__moduleHelpers.unfold.start({str_initialToggleStatus:'open',bln_toggleOnInitialization:this.__el_container.hasClass('startClosedIfNothingSelected')&&this.check_noOptionIsChecked()?!0:!1,bln_skipAnimationWhenTogglingOnInitialization:this.__el_container.hasClass('startClosedIfNothingSelected')&&this.check_noOptionIsChecked()?!0:!1,var_togglerSelector:this.__autoElements.main.optionsBox_label,var_contentBoxSelector:this.__autoElements.main.optionsBox_content,var_wrapperSelector:this.__el_container,obj_morphOptions:{'duration':600}})},initializeCheckAllField:function(){var self=this;if(this.__autoElements.main.optionsBox_checkAll===undefined){return} 44this.__autoElements.main.optionsBox_checkAll.setStyle('display',this.str_displayStyleFilterOptions);this.__autoElements.main.optionsBox_checkAll.getElement('input').addEvent('change',function(){Array.each(self.__autoElements.main.optionsBox_filterOption.filter(':not(.checkAll)'),function(el_filterOption){var el_filterOptionInput;if(el_filterOption.hasClass('hidden')){return} 45el_filterOptionInput=el_filterOption.getElement('input');el_filterOptionInput.setProperty('checked',this.getProperty('checked'));el_filterOptionInput.fireEvent('change')}.bind(this))})},markInputFieldSelectStatus:function(el_input){if(el_input.getProperty('checked')){el_input.getParent('[data-lsjs-element="optionsBox_filterOption"]').addClass('checked');el_input.getParent('[data-lsjs-element="optionsBox_filterOption"]').removeClass('unchecked')}else{el_input.getParent('[data-lsjs-element="optionsBox_filterOption"]').removeClass('checked');el_input.getParent('[data-lsjs-element="optionsBox_filterOption"]').addClass('unchecked')} 46if(el_input.getProperty('type')=='radio'){Array.each(el_input.getParent('[data-lsjs-element="filterOptionsBox"]').getElements('[data-lsjs-element="optionsBox_filterOption"] input'),function(el_inputRadio){if
46(!el_inputRadio.getProperty('checked')){el_inputRadio.getParent('[data-lsjs-element="optionsBox_filterOption"]').removeClass('checked');el_inputRadio.getParent('[data-lsjs-element="optionsBox_filterOption"]').addClass('unchecked')}})}},hideShowAndHideOptionsIconIfUnneeded:function(){var obj_numOptions=this.getNumOptions();if(obj_numOptions.hideableOptions<=0){this.el_showAndHideOptionsIcon.addClass('hidden')}else{this.el_showAndHideOptionsIcon.removeClass('hidden')} 47if(obj_numOptions.hiddenOptions<=0){this.el_showAndHideOptionsIcon.removeClass('currentlyHiding');this.el_showAndHideOptionsIcon.addClass('currentlyShowing')}else{this.el_showAndHideOptionsIcon.addClass('currentlyHiding');this.el_showAndHideOptionsIcon.removeClass('currentlyShowing')}},getNumOptions:function(){var obj_return={'allOptions':0,'hiddenOptions':0,'displayedOptions':0,'importantOptions':0,'unimportantOptions':0,'checkedOptions':0,'uncheckedOptions':0,'hideableOptions':0,'unhideableOptions':0} 48Array.each(this.__autoElements.main.optionsBox_filterOption,function(el_filterOption){obj_return.allOptions++;var bln_isImportant=!1;var bln_isChecked=!1;if(el_filterOption.hasClass('important')){obj_return.importantOptions++;bln_isImportant=!0}else{obj_return.unimportantOptions++} 49if(el_filterOption.getElement('input').getProperty('checked')){obj_return.checkedOptions++;bln_isChecked=!0}else{obj_return.uncheckedOptions++} 50if(bln_isImportant||bln_isChecked){obj_return.unhideableOptions++}else{obj_return.hideableOptions++} 51if(el_filterOption.hasClass('hidden')){obj_return.hiddenOptions++}else{obj_return.displayedOptions++}});if(obj_return.importantOptions<=0){obj_return.hideableOptions=0;obj_return.unhideableOptions=obj_return.unimportantOptions} 52return obj_return},check_noOptionIsChecked:function(){var int_numChecked=0;Array.each(this.__autoElements.main.optionsBox_filterOption,function(el_filterOption){if(el_filterOption.getElement('input').getProperty('checked')){int_numChecked++}});if(int_numChecked<=0){return!0}else{return!1}},hideAllPossibleOptions:function(){var arr_importantOptions=this.__autoElements.main.optionsBox_filterOption.filter('.important');if(arr_importantOptions.length<=0){return} 53Array.each(this.__autoElements.main.optionsBox_filterOption,function(el_filterOption){if(el_filterOption.hasClass('important')||el_filterOption.getElement('input').getProperty('checked')){return} 54el_filterOption.addClass('hidden')});this.el_showAndHideOptionsIcon.addClass('currentlyHiding');this.el_showAndHideOptionsIcon.removeClass('currentlyShowing')},showAllOptions:function(){Array.each(this.__autoElements.main.optionsBox_filterOption,function(el_filterOption){el_filterOption.removeClass('hidden')});this.el_showAndHideOptionsIcon.removeClass('currentlyHiding');this.el_showAndHideOptionsIcon.addClass('currentlyShowing')}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='filterFormOptionsBox';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var obj_templates={'hitselector':function(arg){var str_return='<div\ 55 data-lsjs-element="hitSelectorOutside"\ 56 class="merconisHitSelectorOutside'+(this.__models.configuration.data.liveHitsNoAutoPosition?' noAutoPosition':'')+'"\ 57 ';if(!this.__models.configuration.data.liveHitsNoAutoPosition){str_return+='\ 58 style="position: fixed; z-index: 100000; width: '+this.__view.el_input.getSize().x+'px;"\ 59 '} 60str_return+='\ 61>\ 62 <div data-lsjs-element="hitSelector" class="merconisHitSelector large-12 pd-noGap bgc-bright'+(this.__models.configuration.data.liveHitsNoAutoPosition?' noAutoPosition':'')+'">\ 63 ';Array.each(this.__models.hits.data,function(obj_hitValue,obj_hitKey){str_return+='\ 64 <div data-lsjs-element="hit" data-hit-key="'+obj_hitKey+'" class="hit newline bgc-bright'+(obj_hitValue._class!==undefined&&obj_hitValue._class?' '+obj_hitValue._class.join(' '):'')+'">\ 65 ';if(obj_hitValue._mainImage!==undefined&&obj_hitValue._mainImage){str_return+='\ 66 <div class="_mainImage large-1 medium-2 small-3 floatLeft pd-noGap mgr-20">\ 67 <img src="'+obj_hitValue._mainImage+'" alt="">\ 68 </div>\ 69 ';Object.each(obj_hitValue,function(var_value,str_fieldName){if(str_fieldName==='_class'||str_fieldName==='_mainImage'||str_fieldName==='_linkToProduct'){return} 70str_return+='\ 71 <div class="'+str_fieldName+'">\ 72 '+var_value+'\ 73 </div>\ 74 '})} 75str_return+='\ 76 <div class="clearFloat"></div>\ 77 </div>\ 78 '}.bind(this));str_return+='\ 79 </div>\ 80</div>';var str_return='<!-- BEGIN LSJS TEMPLATE: hitselector.html (path removed for security reasons) -->'+str_return+'<!-- END LSJS TEMPLATE: hitselector.html (path removed for security reasons) -->';return str_return}};lsjs.tpl.register(obj_templates,'liveHits')})();(function(){var obj_classdef_model={name:'configuration',data:{},start:function(){this.loadData()}
80,loadData:function(){new Request.JSON({url:lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl,noCache:!0,method:'post',data:{'REQUEST_TOKEN':lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN,'isAjax':1,'requestedClass':'ModuleProductSearch','action':'getLiveHitsConfiguration'},onComplete:function(obj_response){if(obj_response==undefined||!obj_response.success){return} 81this.data=obj_response.value;this.__module.onModelLoaded()}.bind(this)}).send()}};lsjs.addModelClass('liveHits',obj_classdef_model)})();(function(){var obj_classdef_model={name:'hits',data:{},obj_searchRequest:null,start:function(){this.__module.onModelLoaded()},getPossibleHits:function(){if(this.__models.configuration.data.ls_shop_liveHitsMinLengthSearchTerm>0&&this.__view.el_input.getProperty('value').length<this.__models.configuration.data.ls_shop_liveHitsMinLengthSearchTerm){return} 82if(this.obj_searchRequest!==null&&this.obj_searchRequest.isRunning()){this.obj_searchRequest.cancel();this.obj_searchRequest=null} 83this.obj_searchRequest=new Request.JSON({url:lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl,noCache:!0,method:'post',data:{'REQUEST_TOKEN':lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN,'isAjax':1,'requestedClass':'ModuleProductSearch','action':'getPossibleHits','searchWord':this.__view.el_input.getProperty('value')},onComplete:function(objResponse){if(objResponse===undefined||!objResponse.success){return} 84this.data=objResponse.value;if(Object.getLength(this.data)>0){this.__view.showHitSelector()}}.bind(this)}).send()}};lsjs.addModelClass('liveHits',obj_classdef_model)})();(function(){var obj_classdef_model={name:'options',data:{var_inputField:'.liveHits input[name="merconis_searchWord"]'},start:function(){},set:function(obj_options){Object.merge(this.data,obj_options);this.__module.onModelLoaded()}};lsjs.addModelClass('liveHits',obj_classdef_model)})();(function(){var str_moduleName='liveHits';var obj_classdef={el_input:null,start:function(){this.el_input=typeOf(this.__models.options.data.var_inputField)==='element'?this.__models.options.data.var_inputField:$$(this.__models.options.data.var_inputField)[0];if(typeOf(this.el_input)!=='element'){return} 85this.__autoElements={hitselector:{}};this.el_input.setProperty('autocomplete','off');this.el_input.addEvent('keyup',this.handleKeyup.bind(this));this.el_input.addEvent('keydown',this.handleKeydown.bind(this));this.el_input.addEvent('click',this.__models.hits.getPossibleHits.bind(this.__models.hits));if(this.__models.configuration.data.liveHitsNoAutoPosition===!1){window.addEvent('resize',this.reactOnWindowResize.bind(this));window.addEvent('scroll',this.reactOnWindowResize.bind(this))}},reactOnWindowResize:function(){this.setHitSelectorPosition()},handleKeydown:function(event){switch(event.key){case 'up':this.focusPreviousOrNextHitElement('previous');break;case 'down':this.focusPreviousOrNextHitElement('next');break;case 'enter':if(this.fireCurrentlyFocusedHitElement()){event.stop()} 86break}},handleKeyup:function(event){switch(event.key){case 'up':case 'down':if(this.__autoElements.hitselector.hitSelector!=undefined&&this.__autoElements.hitselector.hitSelector!=null){return}else{this.__models.hits.getPossibleHits()} 87break;case 'esc':this.closeHitSelector();break;default:this.__models.hits.getPossibleHits();break}},focusPreviousOrNextHitElement:function(str_what){if(this.__autoElements.hitselector.hitSelector===undefined||this.__autoElements.hitselector.hitSelector===null){return} 88var el_previousOrNextHitElement=null 89var el_currentlyFocusedHit=this.__autoElements.hitselector.hitSelector.getChildren('.hit.active')[0];if(el_currentlyFocusedHit===undefined||el_currentlyFocusedHit===null){el_currentlyFocusedHit=this.__autoElements.hitselector.hitSelector.getChildren('.hit')[0]}else{switch(str_what){case 'previous':el_previousOrNextHitElement=el_currentlyFocusedHit.getPrevious();break;case 'next':default:el_previousOrNextHitElement=el_currentlyFocusedHit.getNext();break}} 90if(el_currentlyFocusedHit==undefined||el_currentlyFocusedHit==null){return} 91if(el_previousOrNextHitElement==undefined||el_previousOrNextHitElement==null){el_previousOrNextHitElement=el_currentlyFocusedHit} 92el_currentlyFocusedHit.removeClass('active');el_previousOrNextHitElement.addClass('active')},fireCurrentlyFocusedHitElement:function(){var el_currentlyFocusedHit=this.__autoElements.hitselector.hitSelector.getChildren('.hit.active')[0];if(el_currentlyFocusedHit!==undefined&&el_currentlyFocusedHit!==null){el_currentlyFocusedHit.fireEvent('click');return!0}else{return!1}},showHitSelector:function(){var self=this,el_parentForHitSelector;this.closeHitSelector();$$('body')[0].addEvent('click',this.closeHitSelector.bind(this));if(this.__models.configuration.data.liveHitsNoAutoPosition){el_parentForHitSelector=$$(this.__models.configuration.data.DOMSelector)[0]}else{el_parentForHitSelector=this.el_input.getParent()} 93this.tplAdd({parent:el_parentForHitSelector,name:'hitselector'});this.__autoElements.hitselector.hit.addEvent('click',function(){var str_fieldValueToSubmit,obj_hitValue;obj_hitValue=self.__models.hits.data[this.getProperty('data-hit-key')];if(obj_hitValue._linkToProduct!=undefined&&obj_hitValue._linkToProduct!=null){window.location=obj_hitValue._linkToProduct}else{str_fieldValueToSubmit=obj_hitValue._title;if(str_fieldValueToSubmit===undefined||str_fieldValueToSubmit===null){Object.each(obj_hitValue,function(value,str_fieldName){if(str_fieldValueToSubmit!==undefined||str_fieldValueToSubmit!==null){return} 94str_fieldValueToSubmit=value})} 95self.el_input.setProperty('value',str_fieldValueToSubmit);self.el_input.getParent('form').submit()}});this.setHitSelectorPosition()},setHitSelectorPosition:function(){if(this.__autoElements.hitselector.hitSelector===undefined||this.__autoElements.hitselector.hitSelector===null||this.__autoElements.hitselector.hitSelectorOutside===undefined||this.__autoElements.hitselector.hitSelectorOutside===null){return} 96if(this.__models.configuration.data.liveHitsNoAutoPosition==!0){return} 97this.__autoElements.hitselector.hitSelectorOutside.setPosition({x:this.el_input.getPosition().x-window.getScroll().x,y:(this.el_input.getPosition().y+this.el_input.getSize().y)-window.getScroll().y})},closeHitSelector:function(){$(document.body).removeEvent('click',this.closeHitSelector.bind(this));if(this.__autoElements.hitselector.hitSelector===undefined||this.__autoElements.hitselector.hitSelector===null){return} 98this.__autoElements.hitselector.hitSelectorOutside.getParent('.hitselector.liveHits').destroy();this.__autoElements.hitselector={}}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='liveHits';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(obj_options){this.self=lsjs.createModule({__name:str_moduleName});this.self.__models.options.set(obj_options)}}})();(function(){var obj_classdef_model={name:'options',data:{},start:function(){this.data={bln_useUnfold:!1,obj_unfoldOptions:{}}},set:function(obj_options){Object.merge(this.data,obj_options);this.__module.onModelLoaded()}};lsjs.addModelClass('miniCart',obj_classdef_model)})();(function(){var str_moduleName='miniCart';var obj_classdef={start:function(){if(this.__models.options.data.bln_useUnfold){this.init_miniCartUnfold()}},reloadCartMini:function(){if(lsjs.__appHelpers.merconisApp.obj_config.int_minicartID===undefined||lsjs.__appHelpers.merconisApp.obj_config.int_minicartID===null||lsjs.__appHelpers.merconisApp.obj_config.int_minicartID==0){return} 99new Request.HTML({url:lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl,noCache:!0,data:'REQUEST_TOKEN='+lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN+'&isAjax=1&feModID='+lsjs.__appHelpers.merconisApp.obj_config.int_minicartID,update:$$('.template_cart_mini')[0],onComplete:function(){if(this.__models.options.data.bln_useUnfold){this.init_miniCartUnfold(!0)}}.bind(this)}).send()},init_miniCartUnfold:function(bln_toggleOnInitialization){var obj_unfoldOptions={bln_automaticallyCreateResizeBox:!1,var_initialHeight:'auto',int_heightOffset:50,str_initialDisplayType:'block',str_animationMode:'margin-top',bln_considerWindowScrollInMarginAnimationMode:!0,bln_moveWithWindowScrollInMarginAnimationMode:!0,obj_moveWithWindowScrollInMarginAnimationModeOffsets:{top:0,bottom:50},bln_closeOnOutsideClick:!0,str_togglerEventType:['click','closeButton'],str_initialToggleStatus:'closed',bln_toggleOnInitialization:bln_toggleOnInitialization,var_togglerSelector:'.template_cart_mini',var_contentBoxSelector:'.template_cart_mini .cartPreview',var_wrapperSelector:'.template_cart_mini',var_closeButtonSelector:'.template_cart_mini .cartPreview .closeButton',obj_morphOptions:{'duration':600}};Object.each(obj_unfoldOptions,function(value,key){obj_unfoldOptions[key]=this.__models.options.data.obj_unfoldOptions[key]!==undefined&&this.__models.options.data.obj_unfoldOptions[key]!==null?this.__models.options.data.obj_unfoldOptions[key]:value}.bind(this));
99bln_toggleOnInitialization=bln_toggleOnInitialization!==undefined&&bln_toggleOnInitialization!==null?bln_toggleOnInitialization:!1;this.obj_miniCartUnfold=lsjs.__moduleHelpers.unfold.start(obj_unfoldOptions)}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='miniCart';var obj_classdef={start:function(){},reloadCartMini:function(){this.__view.reloadCartMini()}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(obj_options){this.self=lsjs.createModule({__name:str_moduleName});this.self.__models.options.set(obj_options);return this.self}}})();(function(){var str_moduleName='putInCartFormInstance';var obj_classdef={el_putInCartForm:null,int_productId:null,int_productVariantId:null,start:function(){this.int_productId=this.__el_container.getProperty('data-merconis-productId');this.int_productVariantId=this.__el_container.getProperty('data-merconis-productVariantId');if(!this.int_productVariantId){console.error('Product variant id for put-in-cart-form could not be determined. Check for [data-merconis-productVariantId] in put-in-cart-form element: ',this.__el_container);return} 100this.initializeEvents()},initializeEvents:function(){this.initializePutInCartForm()},initializePutInCartForm:function(){var self=this;this.el_putInCartForm=typeOf(this.__el_container.getElement('form'))==='element'?this.__el_container.getElement('form'):this.__el_container;if(typeOf(this.el_putInCartForm)!=='element'){return} 101this.el_putInCartForm.addEvent('submit',function(event){event.stop();lsjs.loadingIndicator.__controller.show();new Request.cajax({url:this.getProperty('action'),method:'post',noCache:!0,cajaxMode:'updateCompletely',el_formToUseForFormData:this,obj_additionalFormData:{'cajaxRequestData[requestedElementClass]':'ajax-reload-by-putInCart,ajax-reload-by-putInCart_'+self.int_productVariantId,'cajaxRequestData[custom][onlyRequestedProductId]':self.int_productId},onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='putInCartFormInstance';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='putInCartFormManager';var obj_classdef={start:function(){Array.each($$('[data-merconis-component="put-in-cart-form"]'),function(el_putInCartFormContainer){if(!el_putInCartFormContainer.retrieve('alreadyHandledBy_'+str_moduleName)){el_putInCartFormContainer.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 102lsjs.createModule({__name:'putInCartFormInstance',__useLoadingIndicator:!0,__el_container:el_putInCartFormContainer})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var str_moduleName='variantLinkerInstance';var obj_classdef={el_linkToVariant:null,int_productId:null,start:function(){var self=this;this.int_productId=this.__el_container.getProperty('data-merconis-productId');this.el_linkToVariant=this.__el_container.getElement('a');if(typeOf(this.el_linkToVariant)!=='element'){console.error('Could not find a hyperlink element (a) in variantLinker element: ',this.__el_container);return} 103this.el_linkToVariant.addEvent('click',function(event){this.blur();event.stop();lsjs.loadingIndicator.__controller.show();new Request.cajax({url:this.getProperty('href'),method:'post',noCache:!0,cajaxMode:'updateCompletely',data:'cajaxRequestData[requestedElementClass]=ajax-reload-by-variantLinker_'+self.int_productId+'&cajaxRequestData[custom][onlyRequestedProductId]='+self.int_productId+'&REQUEST_TOKEN='+lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN,onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='variantLinkerInstance';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='variantLinkerManager';var obj_classdef={start:function(){Array.each($$('[data-merconis-component="variantLinker"]'),function(el_variantLinkerContainer){if(!el_variantLinkerContainer.retrieve('alreadyHandledBy_'+str_moduleName)){el_variantLinkerContainer.store('alreadyHandledBy_'+str_moduleName,!0)}else{return}
104lsjs.createModule({__name:'variantLinkerInstance',__useLoadingIndicator:!0,__el_container:el_variantLinkerContainer})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var obj_templates={'main':function(arg){var str_return='';Object.each(arg.__models.attributesAndValues.readData('obj_allAttributeValues'),function(obj_attribute){str_return+='\ 105 <div class="attributeBox small-12 pd-5 mgr-5 mgb-5">\ 106 <h3 class="txs-l mgb-0 pd-m">'+obj_attribute.attributeTitle+'</h3>\ 107 <div class="values">\ 108 ';Object.each(obj_attribute.values,function(obj_value){str_return+='\ 109 <div\ 110 data-lsjs-element="btn_valueSelect"\ 111 class="value txs-s-all pd-m"\ 112 data-lsjs-value-attributeId="'+obj_attribute.attributeID+'"\ 113 data-lsjs-value-valueId="'+obj_value.valueID+'"\ 114 data-lsjs-bindToModel="attributesAndValues"\ 115 data-lsjs-bindToPath=""\ 116 data-lsjs-bindToProperty="data-lsjs-class"\ 117 data-lsjs-bindToTranslation="bindingTranslation_selectedValueIdToSelectionClass"\ 118 >\ 119 <span class="mg-0">'+obj_value.valueTitle+'</span>\ 120 <span class="closeButton txs-l"><i class="fi fi-close mg-0"></i></span>\ 121 </div>\ 122 '});str_return+='\ 123 </div>\ 124 </div>\ 125 '});str_return+='';var str_return='<!-- BEGIN LSJS TEMPLATE: main.html (path removed for security reasons) -->'+str_return+'<!-- END LSJS TEMPLATE: main.html (path removed for security reasons) -->';return str_return}};lsjs.tpl.register(obj_templates,'variantSelectorInstance')})();(function(){var obj_classdef_model={name:'attributesAndValues',data:{int_productVariantId:0,int_numMatchingVariants:0,obj_allAttributeValues:{},obj_selectedAttributeValues:{},obj_possibleAttributeValues:{}},start:function(){this.__module.onModelLoaded()},setProductVariantId:function(int_productVariantId){if(int_productVariantId===undefined){console.error('int_productVariantId not given')} 126this.writeData('int_productVariantId',int_productVariantId)},setProductId:function(int_productId){if(int_productId===undefined){console.error('int_productId not given')} 127this.writeData('int_productId',int_productId)},loadAttributesAndValues:function(func_onSuccess){lsjs.loadingIndicator.__controller.show();lsjs.apiInterface.request({str_resource:'variantSelector_getInitialData',obj_params:{productVariantId:this.readData('int_productVariantId')},func_onSuccess:function(obj_data){this.data.obj_allAttributeValues=typeOf(obj_data._allVariantAttributes)==='object'?obj_data._allVariantAttributes:{};this.data.obj_selectedAttributeValues=typeOf(obj_data._selectedAttributeValues)==='object'?obj_data._selectedAttributeValues:{};this.data.obj_possibleAttributeValues=typeOf(obj_data._possibleAttributeValues)==='object'?obj_data._possibleAttributeValues:{};if(typeOf(func_onSuccess)==='function'){func_onSuccess()} 128lsjs.loadingIndicator.__controller.hide()}.bind(this)})},selectAttributeValue:function(int_attributeId,int_valueId){if(!int_attributeId||!int_valueId){console.error('missing parameters - ','int_attributeId: ',int_attributeId,'int_valueId: ',int_valueId);return} 129if(this.data.obj_possibleAttributeValues[int_attributeId].values[int_valueId]===undefined){this.data.obj_selectedAttributeValues={}} 130if(this.data.obj_selectedAttributeValues[int_attributeId]===int_valueId){delete this.data.obj_selectedAttributeValues[int_attributeId]}else{this.data.obj_selectedAttributeValues[int_attributeId]=int_valueId} 131this.triggerDataBinding('obj_selectedAttributeValues');lsjs.apiInterface.request({str_resource:'callProductMethod',obj_params:{productId:this.readData('int_productVariantId'),method:'_getPossibleAttributeValuesForCurrentSelection',parameters:JSON.encode([this.readData('obj_selectedAttributeValues'),!1])},func_onSuccess:function(obj_data){this.writeData('obj_possibleAttributeValues',obj_data);this.triggerDataBinding('')}.bind(this)})},getNumMatchingVariants:function(func_onSuccess){lsjs.apiInterface.request({str_resource:'callProductMethod',obj_params:{productId:this.readData('int_productVariantId'),method:'_getNumMatchingVariantsByAttributeValues',parameters:JSON.encode([this.readData('obj_selectedAttributeValues')])},func_onSuccess:function(int_numMatchingVariants){this.data.int_numMatchingVariants=int_numMatchingVariants;if(typeOf(func_onSuccess)==='function'){func_onSuccess()}}.bind(this)})},bindingTranslation_selectedValueIdToSelectionClass:function(var_valueToSet,el_bound){var int_valueId,int_attributeId,bln_isSelected,bln_isPossible,str_class='';int_valueId=el_bound.getProperty('data-lsjs-value-valueId');int_attributeId=el_bound.getProperty('data-lsjs-value-attributeId');bln_isSelected=this.data.obj_selectedAttributeValues[int_attributeId]!==undefined&&this.data.obj_selectedAttributeValues[int_attributeId]===int_valueId;bln_isPossible=this.data.obj_possibleAttributeValues[int_attributeId].values[int_valueId]!==undefined;if(bln_isSelected){str_class+='selected'} 132if(bln_isPossible){str_class+=(str_class!==''?' ':'')+'possible'} 133return str_class}};lsjs.addModelClass('variantSelectorInstance',obj_classdef_model)})();(function(){var obj_classdef_model={name:'lang',data:{text01:'__VARIANT_SELECTOR__'},start:function(){this.__module.onModelLoaded()}};lsjs.addModelClass('variantSelectorInstance',obj_classdef_model)})();(function(){var str_moduleName='variantSelectorInstance';var obj_classdef={start:function(){},showVariantSelector:function(){this.tplAdd({name:'main'});this.__autoElements.main.btn_valueSelect.addEvent('click',function(event){var int_attributeId,int_valueId;int_attributeId=event.event.currentTarget.getProperty('data-lsjs-value-attributeId');int_valueId=event.event.currentTarget.getProperty('data-lsjs-value-valueId');this.__controller.selectAttributeValue(int_attributeId,int_valueId)}.bind(this))}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='variantSelectorInstance';var obj_classdef={start:function(){var int_productVariantId,int_productId;int_productVariantId=this.__module.obj_args.el_variantSelectorContainer.getProperty('data-merconis-productVariantId');if(!int_productVariantId){console.error('Product variant id could not be determined. Check for [data-merconis-productVariantId] in original variant selector element: ',this.__module.obj_args.el_variantSelectorContainer);return} 134this.__models.attributesAndValues.setProductVariantId(int_productVariantId);int_productId=this.__module.obj_args.el_variantSelectorContainer.getProperty('data-merconis-productId');if(!int_productId){console.error('Product id could not be determined. Check for [data-merconis-productId] in original variant selector element: ',this.__module.obj_args.el_variantSelectorContainer);return} 135this.__models.attributesAndValues.setProductId(int_productId);this.__module.obj_args.el_variantSelectorContainer.empty();this.__module.obj_args.el_variantSelectorContainer.adopt(this.__module.__el_container);this.__models.attributesAndValues.loadAttributesAndValues(this.showVariantSelector.bind(this))},showVariantSelector:function(){if(Object.getLength(this.__models.attributesAndValues.data.obj_allAttributeValues)<=0){return} 136this.__view.showVariantSelector()},selectAttributeValue:function(int_attributeId,int_valueId){this.__models.attributesAndValues.selectAttributeValue(int_attributeId,int_valueId);if(this.__models.attributesAndValues.data.obj_selectedAttributeValues[int_attributeId]!==undefined&&this.__models.attributesAndValues.data.obj_selectedAttributeValues[int_attributeId]!==null){this.__models.attributesAndValues.getNumMatchingVariants(this.loadVariant.bind(this))}},loadVariant:function(){var bln_loadVariant=!1;if(this.__models.attributesAndValues.data.int_numMatchingVariants===1){lsjs.loadingIndicator.__controller.show();bln_loadVariant=!0}else if(this.__models.attributesAndValues.data.int_numMatchingVariants>1){}else{} 137if(bln_loadVariant){new Request.cajax({url:document.location.href,method:'post',noCache:!0,data:'json_attributeValueSelection='+JSON.encode(this.__models.attributesAndValues.data.obj_selectedAttributeValues)+'&FORM_SUBMIT='+'variantSelectionForm_'+this.__models.attributesAndValues.data.int_productVariantId+'&REQUEST_TOKEN='+lsjs.__appHelpers.merconisApp.obj_config.REQUEST_TOKEN+'&cajaxRequestData[requestedElementClass]=ajax
137ReloadByVariantSelector_'+this.__models.attributesAndValues.data.int_productId,onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()}}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='variantSelectorManager';var obj_classdef={start:function(){Array.each($$('[data-merconis-component="variantSelector"]'),function(el_variantSelectorContainer){lsjs.createModule({__name:'variantSelectorInstance',__useLoadingIndicator:!0,el_variantSelectorContainer:el_variantSelectorContainer})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var str_moduleName='ajaxTest';var obj_classdef={start:function(){var self=this,el_ajaxTestContainer=$$('[data-lsjs-component="ajaxTest"]')[0];if(typeOf(el_ajaxTestContainer)!=='element'){return} 138this.registerElements(el_ajaxTestContainer);this.__autoElements.defaultElementGroup.ajaxTestElement.addEvent('click',function(){self.__controller.ajaxReloadElement(this)})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='ajaxTest';var obj_classdef={start:function(){},ajaxReloadElement:function(el_toReload){lsjs.loadingIndicator.__controller.show();new Request.cajax({url:document.location.href,method:'get',noCache:!0,data:'cajaxRequestData[requestedElementID]='+el_toReload.getProperty('id'),onComplete:function(){lsjs.loadingIndicator.__controller.hide()}}).send()}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var str_moduleName='productManagementApiTestInstance';var obj_classdef={el_form:null,el_btn_addRow:null,el_btn_sendData:null,el_requestOutput:null,el_responseOutput:null,el_apiUrl:null,str_apiUrl:'',int_numRows:1,int_highestTabindex:0,str_httpRequestMethod:'post',str_absoluteRequestUrl:'',str_responseType:'',bln_expectsMultipleDataRows:!1,start:function(){this.initializeForm();this.initializeAddRowButton()},addRow:function(){this.int_numRows++;Array.each(this.__el_container.getElements('.widget input:last-child'),function(el){var el_clone=el.clone();this.int_highestTabindex++;el_clone.setProperty('tabindex',this.int_highestTabindex);el_clone.inject(el,'after')}.bind(this))},initializeAddRowButton:function(){this.el_btn_addRow=this.__el_container.getElement('button.addRow');if(typeOf(this.el_btn_addRow)!=='element'){console.log('add row button not found');return} 139if(!this.bln_expectsMultipleDataRows){this.el_btn_addRow.setStyle('display','none');return} 140Array.each(this.__el_container.getElements('.widget input:last-child'),function(el){this.int_highestTabindex=el.getProperty('tabindex')}.bind(this));this.el_btn_addRow.addEvent('click',this.addRow.bind(this))},initializeForm:function(){var self=this;this.el_form=typeOf(this.__el_container.getElement('form'))==='element'?this.__el_container.getElement('form'):this.__el_container;this.el_btn_sendData=this.__el_container.getElement('button.sendData');this.el_apiUrl=this.__el_container.getElement('input[name="APIURL"]');this.el_requestOutput=this.__el_container.getElement('.requestOutput .output');this.el_responseOutput=this.__el_container.getElement('.responseOutput .output');this.str_httpRequestMethod=this.__el_container.getProperty('data-merconis-http-request-method');this.str_absoluteRequestUrl=this.__el_container.getProperty('data-merconis-absolute-request-url');this.str_responseType=this.__el_container.getProperty('data-merconis-response-type');this.bln_expectsMultipleDataRows=this.__el_container.getProperty('data-merconis-expects-multiple-data-rows')==1?!0:!1;if(typeOf(this.el_form)!=='element'){console.log('no form element found');return} 141if(typeOf(this.el_apiUrl)!=='element'){console.log('no APIURL element found');return} 142if(typeOf(this.el_requestOutput)!=='element'){console.log('no request output element found');return} 143if(typeOf(this.el_responseOutput)!=='element'){console.log('no response output element found');return} 144if(typeOf(this.el_btn_sendData)!=='element'){console.log('no send data button element found');return} 145this.str_apiUrl=this.el_apiUrl.getProperty('value');
145if(!this.str_apiUrl){console.log('api url could not be determined');return} 146this.el_btn_sendData.addEvent('click',function(event){self.performRequest()});this.el_form.addEvent('submit',function(event){event.stop()})},performRequest:function(){var self=this,arr_dataCollection,json_data,obj_requestParameter={};lsjs.loadingIndicator.__controller.show();arr_dataCollection=this.createDataCollection();json_data=JSON.stringify(this.bln_expectsMultipleDataRows?arr_dataCollection:arr_dataCollection[0],null,"\t");this.el_requestOutput.setProperty('html',this.str_httpRequestMethod==='post'?('data='+json_data):(this.str_absoluteRequestUrl+'?data='+JSON.stringify(this.bln_expectsMultipleDataRows?arr_dataCollection:arr_dataCollection[0],null,"")));obj_requestParameter={url:this.str_apiUrl,noCache:!0,method:this.str_httpRequestMethod,data:{'data':json_data},onComplete:function(obj_response){lsjs.loadingIndicator.__controller.hide();this.el_responseOutput.setProperty('html',JSON.stringify(obj_response,null,"\t"));console.log(obj_response)}.bind(this)};if(this.str_responseType==='json'){new Request.JSON(obj_requestParameter).send()}else{new Request(obj_requestParameter).send()}},createDataCollection:function(){var int_rowNumber,els_inputs,obj_dataRow={},arr_dataCollection=[];for(var int_rowNumber=1;int_rowNumber<=this.int_numRows;int_rowNumber++){els_inputs=this.__el_container.getElements('.widget input:nth-child('+(int_rowNumber+1)+')');Array.each(els_inputs,function(el_input){obj_dataRow[el_input.getProperty('name')]=el_input.getProperty('value')}) 147arr_dataCollection.push(Object.clone(obj_dataRow))} 148return arr_dataCollection}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='productManagementApiTestInstance';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='productManagementApiTestManager';var obj_classdef={start:function(){Array.each($$('[data-merconis-component="product-management-api-test"]'),function(el_formContainer){if(!el_formContainer.retrieve('alreadyHandledBy_'+str_moduleName)){el_formContainer.store('alreadyHandledBy_'+str_moduleName,!0)}else{return} 149lsjs.createModule({__name:'productManagementApiTestInstance',__useLoadingIndicator:!0,__el_container:el_formContainer})})}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(){this.self=lsjs.createModule({__name:str_moduleName})}}})();(function(){var obj_templates={'main':function(arg){var str_return='';var str_headline='A headline';var str_text1='And a paragraph below.';var str_text2='And another paragraph below.';str_return+='\ 150<h1>'+str_headline+'</h1>\ 151<p>'+str_text1+'</p>\ 152';if(str_text2){str_return+='\ 153 <p>'+str_text2+'</p>\ 154 '}else{str_return+='\ 155 <p>nix da!</p>\ 156 '} 157str_return+='\ 158';var str_return='<!-- BEGIN LSJS TEMPLATE: main.html (path removed for security reasons) -->'+str_return+'<!-- END LSJS TEMPLATE: main.html (path removed for security reasons) -->';return str_return}};lsjs.tpl.register(obj_templates,'templateTest')})();(function(){var str_moduleName='templateTest';var obj_classdef={start:function(){this.tplReplace({name:'main'})}};lsjs.addViewClass(str_moduleName,obj_classdef)})();(function(){var str_moduleName='templateTest';var obj_classdef={start:function(){}};lsjs.addControllerClass(str_moduleName,obj_classdef);lsjs.__moduleHelpers[str_moduleName]={self:null,start:function(obj_args){console.log(obj_args);if(this.self!==null){console.error('module '+str_moduleName+' has already been started');return} 159var obj_argsDefault={__name:str_moduleName};this.self=lsjs.createModule(Object.merge(obj_argsDefault,obj_args))}}})();(function(){var classdef_app={obj_config:{},obj_references:{},initialize:function(){},start:function(){lsjs.__moduleHelpers.stickyHeader.start({str_headerSelector:'body',int_offset:1});lsjs.__moduleHelpers.foldedNavi.start({var_naviSelector:'#mainNavigation',bln_automaticallyToggleOnInitialization:!1,bln_closeOnOutsideClick:!0,bln_onlyFirstLevel:!1});lsjs.__moduleHelpers.slidesManager.start({contentSelector:'.crossSellerCTE .crossSeller_3 .productList',slideboxSize:{x:'100%',y:280},autoSize:{countingElementSelector:'.shopProduct',sizePerElement:{x:180},sizeOffset:{x:0}},blnUseVariableSlideDistance:!0,blnUpdateMovingPossibilityClassesOnWindowResize:!0,slideDistanceOffset:{x:0}});lsjs.__moduleHelpers.slidesManager.start({contentSelector:'.crossSellerCTE .crossSeller_4 .productList',slideboxSize:{x:'100%',y:280},autoSize:{countingElementSelector:'.shopProduct',sizePerElement:{x:180},sizeOffset:{x:0}},blnUseVariableSlideDistance:!0,blnUpdateMovingPossibilityClassesOnWindowResize:!0,slideDistanceOffset:{x:0}});lsjs.__moduleHelpers.slidesManager.start({contentSelector:'.crossSellerCTE .crossSeller_6 .productList',slideboxSize:{x:'100%',y:280},autoSize:{countingElementSelector:'.shopProduct',sizePerElement:{x:180},sizeOffset:{x:0}},blnUseVariableSlideDistance:!0,blnUpdateMovingPossibilityClassesOnWindowResize:!0,slideDistanceOffset:{x:0}});lsjs.__moduleHelpers.slidesManager.start({contentSelector:'.crossSellerCTE .crossSeller_8 .productList',slideboxSize:{x:'100%',y:280},autoSize:{countingElementSelector:'.shopProduct',sizePerElement:{x:180},sizeOffset:{x:0}},blnUseVariableSlideDistance:!0,blnUpdateMovingPossibilityClassesOnWindowResize:!0,slideDistanceOffset:{x:0}});lsjs.__moduleHelpers.slidesManager.start({contentSelector:'.crossSellerCTE .productList',slideboxSize:{x:'100%',y:280},autoSize:{countingElementSelector:'.shopProduct',sizePerElement:{x:180},sizeOffset:{x:0}},blnUseVariableSlideDistance:!0,blnUpdateMovingPossibilityClassesOnWindowResize:!0,slideDistanceOffset:{x:0}});lsjs.apiInterface.str_apiUrl=lsjs.__appHelpers.merconisApp.obj_config.str_ajaxUrl;window.addEvent('cajax_domUpdate',function(el_domReference){el_domReference.getElements('a[data-lightbox]').mediabox({},function(el){return[el.href,el.title,el.getAttribute('data-lightbox')]},function(el){var data=this.getAttribute('data-lightbox').split(' ');
159return(this==el)||(data[0]&&el.getAttribute('data-lightbox').match(data[0]))});lsjs.__moduleHelpers.addToWatchlistButton.__controller.enhanceButtons('.favoriteSwitchBox input.submit',el_domReference);lsjs.__moduleHelpers.navtabManager.start({el_domReference:el_domReference,navtabContainerSelector:'[data-lsjs-component="navtab"]',defaultAutoplayStatus:!1,autoplayDelay:4000,stopAutoplayOnMouseenter:!0,startAutoplayOnMouseleave:!0});lsjs.__moduleHelpers.customerDataFormManager.start({el_domReference:el_domReference});lsjs.__moduleHelpers.formReviewerManager.start({el_domReference:el_domReference});lsjs.__moduleHelpers.statusTogglerManager.start({el_domReference:el_domReference});lsjs.__moduleHelpers.cajaxCallerManager.start({el_domReference:el_domReference});lsjs.__moduleHelpers.elementFolderManager.start({el_domReference:el_domReference});lsjs.__moduleHelpers.configuratorManager.start();lsjs.__moduleHelpers.putInCartFormManager.start();lsjs.__moduleHelpers.variantLinkerManager.start();this.prefillContactProductForm(el_domReference)}.bind(this));window.fireEvent('cajax_domUpdate',$$('body')[0]);lsjs.__moduleHelpers.filterFormManager.start({str_containerSelector:'.template_filterForm_default'});lsjs.__moduleHelpers.liveHits.start({var_inputField:'#header .liveHits input[name="merconis_searchWord"]'});lsjs.__moduleHelpers.variantSelectorManager.start();lsjs.__moduleHelpers.productManagementApiTestManager.start()},prefillContactProductForm:function(){var els_formFieldsToPrefill=$$('.contactProduct form input[name="code"]');Array.each(els_formFieldsToPrefill,function(el_formFieldToPrefill){var el_product=el_formFieldToPrefill.getParent('.shopProduct');if(typeOf(el_product)!=='element'){return} 160var el_productCode=el_product.getElement('.code');var el_productTitle=el_product.getElement('.productTitle');var el_variantTitle=el_product.getElement('.variantTitle');var str_productCode=typeOf(el_productCode)==='element'?el_productCode.getProperty('html'):'';var str_productTitle=typeOf(el_productTitle)==='element'?el_productTitle.getProperty('html'):'';var str_variantTitle=typeOf(el_variantTitle)==='element'?el_variantTitle.getProperty('html'):'';var str_valueToPrefill=str_productCode+' ('+str_productTitle+(str_variantTitle?', '+str_variantTitle:'')+')';el_formFieldToPrefill.setProperty('value',str_valueToPrefill)})}};var class_app=new Class(classdef_app);window.addEvent('domready',function(){lsjs.__appHelpers.merconisApp=new class_app()})})()})()
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.