1/** 2* @name oxCart6App 3* @version 1.5.0 4* @date 2020-01-21 5* @author Oxatis Consulting 6*/ 7 8window.oxCartApp=!0,function(){var ImageMoover=function(t){this.cartElement=t,this.referer=oxCart.querySelectorAll(oxCart.PLACES.list.target)[0].getBoundingClientRect(),this.placeToImport=oxCart.querySelectorAll("body")[0],this.referer&&this.placeToImport&&this.cartElement&&this.cartElement.refNode&&this.sheet&&this.run()};ImageMoover.create=function(t){return new ImageMoover(t)},ImageMoover.prototype.run=function(){this.createElem(),setTimeout(function(){oxCart.addClass(t.voyager,"start-"+t.cartElement.itemID)},100);var t=this;setTimeout(function(){oxCart.addClass(t.voyager,"end")},200),setTimeout(function(){oxCart.addClass(t.voyager,"fade")},2e3),setTimeout(function(){t.kill()},3e3)},ImageMoover.prototype.createElem=function(){this.voyager=document.createElement("div"),this.voyager.className=oxCart.VOYAGERCLASSNAME,this.cartElement.itemImgFile&&(this.voyager.style.backgroundImage="url("+this.cartElement.itemImgFile+")"),this.placeToImport.appendChild(this.voyager);var t=this.cartElement.refNode.getBoundingClientRect(),e=this.referer,n=void 0!==window.pageXOffset,i="CSS1Compat"===(document.compatMode||""),r=n?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft,a=n?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop;oxCart.addCSSRule(this.sheet,"."+this.voyager.className+".start-"+this.cartElement.itemID,"top:"+(t.top+a)+"px; left :"+(t.left+r)+"px; width:"+t.width+"px; height:"+t.height+"px;"),oxCart.addCSSRule(this.sheet,"."+this.voyager.className+".start-"+this.cartElement.itemID+".end","top:"+(e.top+a)+"px; left :"+(e.left+r)+"px; width:"+e.width+"px; height:"+e.height+"px;")},ImageMoover.prototype.kill=function(){this.placeToImport.removeChild(this.voyager),oxCart.killCSSRule(this.sheet,"."+this.voyager.className+".start-"+this.cartElement.itemID),oxCart.killCSSRule(this.sheet,"."+this.voyager.className+".start-"+this.cartElement.itemID+".end")};var oxCart={WSCARTURL:"PBShoppingCart.asp?ajaxmode=1",WSCROSSURL:"/ws/wsGetRelatedProducts.asp?RelType=1&ShopCart=1&pdtid=",ACTIVECLASSNAME:"highlighted",VOYAGERCLASSNAME:"cartVoyager",PRODUCTURL:"PBSCProduct.asp?ItmID=",TEMPLATE:"",CROSSPROCESS:"limitTo4ByPrice",IDS:"",lang:"fr",isApp:!1,ANIMATION:!1,PLACES:{list:{target:"#headerInfoCart",method:"append"},popup:{target:"body",method:"prepend"}},toDoPost:{sendEvent:function(){var t=this,e={qty:t.cartContent.cartqtytotal,total:t.cartContent.cartFeatures.subTotalNet,mainProductIdAdded:t.mainProductIdAdded};window.oxInfos&&window.oxInfos.oxCart&&(window.oxInfos.oxCart.qty=e.qty,window.oxInfos.oxCart.total=e.total),this.event.launch("oxEvent",{name:"csDynamicCart-complete",data:e}),this.event.launch("oxEvent",{name:"csDynamicCart-change",data:t.cartContent})}},crossManaging:{limitTo4:function(t){return t.length=Math.min(4,t.length),t},limitTo4ByPrice:function(t){return t.sort(function(t,e){return e.price-t.price}),t.length=Math.min(4,t.length),t}},popupReinsuranceModel:{popupReinsurance:function(){return oxCart.popupReinsuranceWbId?'<div cs cs-webblock wb-id="'+oxCart.popupReinsuranceWbId+'" session-cache="true"></div>':""}},productLineModel:{name:function(t){return'<span class="PBMainTxt"'+(t.canLink?' data-click="link"':"")+">"+t.itemName+"</span>"},app_name_only:function(t){return t.itemName},sku:function(t){return'<span class="itemcode">'+t.itemCode+"</span>"},attributes:function(t){var e="";t.option1Value&&t.option1Name&&(e+='<div class="attribute">'+(t.option1Name?t.option1Name.replace(/\s*:\s*$/,""):"")+": "+t.option1Value+"</div>");t.option2Value&&t.option2Name&&(e+='<div class="attribute">'+t.option2Name.replace(/\s*:\s*$/,"")+": "+t.option2Value+"</div>");return e},options:function(t){for(var e,n="",i=0,r=t.options?t.options.length:0;i<r;i++)for(var a in e=t.options[i],t.options[i])n+='<div class="option">'+a+": "+e[a]+"</div>";return n},image:function(t){var e;return(e=t.itemImgFile)?"<img"+(t.canLink?' data-click="link"':"")+' class="pdtImg" src="'+e+'">':""},plusminus:function(t){return t.canEdit&&t.canUpdateQty?'<a class="button" data-click="plus">(+)</a><a class="button" data-click="minus">(-)</a>':""},app_minus:function(t){return t.canEdit&&t.canUpdateQty?'<span class="button" data-click="minus">-</span>':""},app_plus:function(t){return t.canEdit&&t.canUpdateQty?'<span class="button" data-click="plus">+</span>':""},discard:function(t){return t.canEdit&&t.canDelete?'<a class"trashcan" data-click="discard"><span data-click="discard">x</span></a>':""},app_discard:function(t){return t.canEdit&&t.canDelete?'<span class="trashcan fa fa-tras
8h" data-click="discard"></span>':""},price:function(t){return'<span class="PBSalesPrice PBCurrency">'+this.convertToPrice(t.itemPriceNet)+"</span>"},id:function(t){return t.itemID},is_bundle:function(t){return!!t.bundlecontent||200===t.pdtType},secondaryPrice:function(t){var e;return(e=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat?'<span class="PBSalesPrice PBCurrency PB2ndCur">'+this.convertToPrice(t.itemPriceNet*e,"scndryFormat")+"</span>":""},striked_price:function(t){return t.itemPrice&&t.itemPriceNet!==t.itemPrice?'<span class="PBStrike PBCurrency">'+this.convertToPrice(t.itemPrice)+"</span>":""},striked_secondaryPrice:function(t){var e;return(e=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat&&t.itemPriceNet!==t.itemPrice?'<span class="PBStrike PBCurrency">'+this.convertToPrice(t.itemPrice*e,"scndryFormat")+"</span>":""},total:function(t){return'<span class="PBSalesPrice PBCurrency">'+this.convertToPrice(t.lineAmountNet)+"</span>"},secondaryTotal:function(t){var e;return(e=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat?'<span class="PBSalesPrice PBCurrency PB2ndCur">'+this.convertToPrice(t.lineAmountNet*e,"scndryFormat")+"</span>":""},qty:function(t){return t.itemQuantity||0},textAttribute:function(t){if(""===t.custFieldName)return"";switch(t.custFieldType){case"oneSimpleField":case"oneRequiredField":return'<div class="PBMsg">'+t.custFieldName+'</div><input class="PB" type="text" data-change="customFld" maxlength="100" value="'+t.custFieldValue+'">';case"threeSimpleField":case"threeRequiredField":return'<div class="PBMsg">'+t.custFieldName+'</div><textarea class="PB" data-change="customFld" rows="3">'+t.custFieldValue+"</textarea>";case"forcedCustomField":return'<div class="PBMsg">'+t.custFieldName+'</div><div calss="PBShortTxt">'+t.custFieldValue+"</div>";default:return""}},discount:function(t){return t.itemDiscount?this.convertToPercent(t.itemDiscount,"-"):""},offered:function(t){return!!t.offered},tax:function(t){return t.itemTax?this.convertToPercent(t.itemTax):""}},productTotalModel:{qtyAdded:function(){return this.delta&&this.delta.length},app_qtyAdded_zero:function(){return!this.delta||0===this.delta.length},app_qtyAdded_one:function(){return this.delta&&1===this.delta.length},app_qtyAdded_other:function(){return this.delta&&1<this.delta.length},qtyTotal:function(){return this.cartContent.cartqtytotal||0},app_qtyTotal_zero:function(){return!this.cartContent.cartqtytotal},app_qtyTotal_one:function(){return this.cartContent.cartqtytotal&&1===this.cartContent.cartqtytotal},app_qtyTotal_other:function(){return this.cartContent.cartqtytotal&&1<this.cartContent.cartqtytotal},cartTotal:function(){return'<span class="PBCurrency">'+this.convertToPrice(this.cartContent.cartFeatures.cartTotal)+"</span>"},totalBeforeReduction:function(){var t=this.cartContent.cartFeatures;return t.reductionAmount?'<span class="PBStrike PBCurrency">'+this.convertToPrice(t.totalBeforeReduction)+"</span>":""},subTotalNet:function(){return'<span class="PBCurrency">'+this.convertToPrice(this.cartContent.cartFeatures.subTotalNet)+"</span>"},subTotalNetSecondary:function(){var t;return(t=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat?'<span class="PBCurrency PBCurrency PB2ndCur">'+this.convertToPrice(this.cartContent.cartFeatures.subTotalNet*t,"scndryFormat")+"</span>":""},taxesAmount:function(){return'<span class="PBCurrency">'+this.convertToPrice(this.cartContent.cartFeatures.renderTaxesAmount)+"</span>"},reductionAmount:function(){var t=this.cartContent.cartFeatures,e=this.cartContent.currencies;if(!t.reductionAmount)return"";switch(t.reductionType){case"amount":return'<span class="PBShortTxt">'+e.mainFormat.replace("#",t.reductionAmount)+"</span>";case"percent":return'<span class="PBShortTxt">'+t.reductionAmount+"%</span>";default:return""}},linesCount:function(){return this.cartContent.cartitemcount||0},intemsCount:function(){return this.cartContent.cartqtytotal||0},shippingOffered:function(){return this.cartContent.cartFeatures.shippingOffered||!1},displayMsg:function(){return this.cartContent.displayMsg||""}},crossLineModel:{name:function(t){return'<a class="PBLink" href="'+t.url+'"><span class="PBMainTxt">'+t.name+"</span></a>"},app_name:function(t){return'<a class="PBLink PBMainTxt" href="'+t.url+'">'+t.name+"</a>"},image:function(t){var e;return(e=t.smallimg||t.bigimg)?'<a class="PBLink" href="'+t.url+'"><img class="pdtImg" src="'+e+'"></a>':""},price:function(t){return'<span class="PBSalesPrice PBCurrency">'+this.convertToPrice(t.price)+"</span>"},secondaryPrice:function(t){var e;return(e=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat?'<span class="PBSalesPrice PBCurrency PB2ndCur">'+this.convertToPrice(t.price*e,"scndryFormat")+"</span>":""},tax:function(t){return t.vatrate?this.convertToPercent(t.vatrate):""}},staticValues:{price:{node:".cartPrice",update:function(t){var e,n=this.convertToPrice(this.cartContent.cartFeatures.subTotalNet);return(e=this.cartContent.currencies.scndryRate)&&this.cartContent.currencies.scndryFormat&&(n+=this.convertToPrice(this.cartContent.cartFeatures.subTotalNet*e,"scndryFormat")),n}},btnQuantity:{node:"#btnviewcart small",update:function(t){return t.replace(/[\d\.]+/i,this.cartContent.cartqtytotal||0)}},headerCartItems:{node:"#cartItems",update:function(t){return t.replace(/[\d\.]+/i,this.cartContent.cartqtytotal||0)}}},specialCaseList:{productLink:function(t,e){return void 0===e.canLink&&(e.canLink=!0),!0},productOffered:function(t,e){return void 0===e.canEdit&&(e.canEdit=!0),e.offered&&(e.canEdit=!1),!0},schopcartPage:function(t,e){var n=this.querySelectorAll("#maincontainer.scshopcart, #maincontainer.scshipform, #maincontainer.sc
8paymentform, #maincontainer.scconfirmform")[0];return void 0===e.canEdit&&(e.canEdit=!0),n&&(e.canEdit=!1),!0},forcedCustomField:function(t,e){return e.custFieldType=/^<!--#RO#-->/i.test(e.custFieldValue)?"forcedCustomField":e.custFieldType,!0}},addToCartFx:{move:function(){return!(!this.ANIMATION||!this.delta.length||this.cartContent.displayMsg)&&(window.console&&console.log("animation mode"),this.animationMode(),!0)},popup:function(){return!(this.ANIMATION&&this.delta.length&&!this.cartContent.displayMsg)&&(window.console&&console.log("popup mode"),this.popupMode(),!0)}},productImageFinder:{productList:function(){for(var t=0,e=this.delta.length;t<e;t++){var n=this.querySelectorAll('#maincontainer.itemlist .oxcell a[href*="'+this.delta[t].itemID+'"]')[0];if(n){var i=this.closest(n,".oxcell"),r=this.querySelectorAll('[itemprop="image"]',i)[0];this.delta[t].refNode=r||i}}},searchPage:function(){for(var t=0,e=this.delta.length;t<e;t++){var n=this.querySelectorAll('#maincontainer.sccatalog.searchpage .oxcell[data-pdt-id="'+this.delta[t].itemID+'"]')[0];if(n){var i=this.querySelectorAll(".PBItemImg img",n)[0];this.delta[t].refNode=i}}},productDetail:function(){for(var t=0,e=this.delta.length;t<e;t++){var n=this.querySelectorAll('#maincontainer.itemdetail [name="HVProductID"]')[0];if(n&&n.value==this.delta[t].itemID){var i=this.querySelectorAll("img.imgmain")[0];this.delta[t].refNode=i||document.getElementById("btnaddtocart")}}},crossSales:function(){for(var t=0,e=this.delta.length;t<e;t++){var n=this.querySelectorAll('#maincontainer.itemdetail .PBRelPdtTable a[href*="'+this.delta[t].itemID+'"]')[0];if(n){var i=this.closest(n,".PBLayoutTable"),r=this.querySelectorAll("img",i)[0];this.delta[t].refNode=r||i}}}},injectionMethods:{append:function(t,e){return e.appendChild(t),!0},prepend:function(t,e){return e.insertBefore(t,e.firstChild),!0},before:function(t,e){return e.parentNode.insertBefore(t,e),!0},after:function(t,e){return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),!0}},querySelectorAll:function(t,e){e=e||document;if(document.querySelectorAll)return e.querySelectorAll(t);if(!document.createStyleSheet)return!1;for(var n=document.createStyleSheet(),i=e.all,r=[],a=(t=t.replace(/\[for\b/gi,"[htmlFor").split(",")).length;a--;){n.addRule(t[a],"k:v");for(var o=i.length;o--;)i[o].currentStyle.k&&r.push(i[o]);n.removeRule(0)}return r},event:{add:function(t,e,n){return window.addEventListener?(t&&t.addEventListener(e,n,!1),!0):!!window.attachEvent&&(t&&t.attachEvent("on"+e,n),!0)},remove:function(t,e,n){return window.removeEventListener?(t&&t.removeEventListener(e,n,!1),!0):!!window.detachEvent&&(t&&t.detachEvent("on"+e,n),!0)},launch:function(t,e){if(e=e||"",document.createEvent){var n=document.createEvent("HTMLEvents");n.customData=e,n.initEvent(t,!0,!0),document.dispatchEvent(n)}else document.createEventObject&&(document.documentElement[t]=e);return this}},addClass:function(t,e){t.className.match(e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){t.className=t.className.replace(new RegExp("s?"+e,"g"),"")},killCSSRule:function(t,e,n){if(document.styleSheets){var i=0,r=!1;do{if((r=t.cssRules?t.cssRules[i]:t.rules[i])&&r.selectorText==e)return t.cssRules?t.deleteRule(i):t.removeRule(i),!0;i++}while(r)}return!1},addCSSRule:function(t,e,n,i){"insertRule"in t?t.insertRule(e+"{"+n+"}",i):"addRule"in t&&t.addRule(e,n,i)},matchesSelector:(Ab=Element.prototype,Ab.matchesSelector||Ab.mozMatchesSelector||Ab.msMatchesSelector||Ab.oMatchesSelector||Ab.webkitMatchesSelector||function(t){for(var e=oxCart.querySelectorAll(t,this.parentNode||this.document),n=-1;e[++n]&&e[n]!=this;);return!!e[n]}),matches:function(t,e){return this.matchesSelector.call(t,e)},closest:function(t,e){for(;(t=t.parentNode)&&t!==document;)if(this.matches(t,e))return t;return null},parse:function(t){return window.JSON?JSON.parse(t):eval("("+t+")")},ajaxLoad:function(t,e,n){var i=window.XMLHttpRequest?new XMLHttpRequest:!!window.ActiveXObject&&new ActiveXObject("MSXML2.XMLHTTP.3.0");if(!i)return!1;var r=n?"POST":"GET";i.onreadystatechange=function(){if(4===i.readyState)switch(i.status){case 200:e&&e(i.responseText);break;default:throw new Error("Ajax Error",i.status)}};new Date;return t+=/\?/g.test(t)?"&":"?",t+="_="+(new Date).getTime(),i.open(r,t,!0),n&&i.setRequestHeader("Content-type","application/x-www-form-urlencoded;"),i.send(n||null),!0},schedule:function(i){var r=0,a=1;return function(){if(!(0<--a)){var t=i[r++];"object"!=typeof t&&(t=[t]),a=t.length;for(var e=0,n=t.length;e<n&&this[t[e]];e++)!this[t[e]]()&&window.console&&console.log("failed running",t[e])}}},convertToPrice:function(t,e){e=e||"mainFormat";var n=this.cartContent.currencies,i=n.thousandsSep,r=n.decSep,a=t<0?"-":"",o=parseInt(t=Math.abs(+t||0).toFixed(2),10)+"",s=3<(s=o.length)?s%3:0,c=a+(s?o.substr(0,s)+i:"")+o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+i)+(r+Math.abs(t-o).toFixed(2).slice(2));return n[e].replace("#",c)},convertToPercent:function(t,e){return(e=e||"")+(100*t).toFixed(2)+"%"},getClass:function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},whatis:function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;return"object"===e&&(e=this.getClass(t).toLowerCase()),"number"===e?0<t.toString().indexOf(".")?"float":"integer":e}
8,equalityModels:{array:function(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(!this.equal(t[n],e[n]))return!1;return!0},object:function(t,e){if(t===e)return!0;for(var n in t){if(!e.hasOwnProperty(n))return!1;if(!this.equal(t[n],e[n]))return!1}for(var n in e)if(!t.hasOwnProperty(n))return!1;return!0},date:function(t,e){return t.getTime()===e.getTime()},regexp:function(t,e){return t.toString()===e.toString()}},equal:function(t,e){if(t===e)return!0;var n=this.whatis(t);return n===this.whatis(e)&&(this.equalityModels.hasOwnProperty(n)?this.equalityModels[n].call(this,t,e):t==e)},getModel:function(t,e,n){this[e]=document.createElement("div");var i=this;return this.ajaxLoad(t,function(t){i.addToStorage(e,t),i[e].innerHTML=t,n&&n.call(i)})},getFragment:function(t,e){if(this[t])return!0;var n=this.querySelectorAll('[data-fragment="'+t+'"]',e)[0];if(!n)return window.console&&console.log("fragment ",t," not found in template"),!1;var i=n.parentNode.nodeName,r=document.createElement(i);return r.appendChild(n),this[t]=r.innerHTML,!0},updateTemplate:function(t,e,n,i){var r,a=t,o=e;for(var s in o)(r=o[s].call(this,i))||n.push(s),a=a.replace(new RegExp("\\|"+s+"\\|","i"),function(){return r});return a},matchIdsTags:function(t){var e=this.ids,n=this[t];if(!n)return!1;for(var i in e)n=n.replace(new RegExp("#"+i+"#","mgi"),e[i]);return this[t]=n,!0},storeCartContent:function(t,e){return this.addToStorage("oxCartContent",t),this.cartAsText=t,this.cartContent=this.parse(t),this.backupCart=this.parse(t),this.realBackupCart=this.parse(t),e&&e.call(this),!0}
8,compareAndStoreCartContent:function(t,e){this.cartAsText=t,this.addToStorage("oxCartContent",t);var n=this.parse(t).products||[],i=this.backupCart.products,r=this.realBackupCart.products;if(n&&i)t:for(var a=0,o=n.length;a<o;a++)for(var s=0,c=i.length;s<c;s++)if(r&&r[s]&&this.equal(n[a],r[s])&&delete r[s],this.equal(n[a],i[s])){delete n[a],delete i[s];continue t}for(var u,d,p=[],l=[],h=0,m=n.length;h<m;h++)(u=n[h])&&(u.refId=h,u.quantityAdded=u.itemQuantity,r&&r.length&&(d=r[h])&&(u.quantityAdded=u.itemQuantity-d.itemQuantity),void 0!==u.linkedTo?p.unshift(u):p.push(u),l.push(u));if(r&&r.length)for(h=0,m=r.length;h<m;h++)(u=r[h])&&((d=n[u.refId=h])||(u.quantityAdded=-u.itemQuantity,(d=u).itemQuantity=0,d.lineAmountNet=0,l.push(d)));return this.delta=p,this.deltaAnalytics=l,this.cartContent=this.parse(t),this.backupCart=this.parse(t),this.realBackupCart=this.parse(t),this.isApp&&this.setCartRelatedProduct(this.parse(t)),e&&e.call(this),!0},setCartRelatedProduct:function(t){window.appConfig&&(window.appConfig.csAppCrossSales=window.appConfig.csAppCrossSales||{},window.appConfig.csAppCrossSales.cartRelatedProducts=t.cartRelatedProducts||{})},resetCart:function(){return this.backupCart=this.parse(this.cartAsText),this.realBackupCart=this.parse(this.cartAsText),!0},checkIfCartHasChanged:function(){var t,e,n,i,r=this.cartContent;return window.oxInfos&&window.oxInfos.oxCart?(n=window.oxInfos.oxCart.subTotalNet,i=window.oxInfos.oxCart.qty,r.cartsubtotalnet===n&&r.cartqtytotal===i):(e=(t=/(?:;)?PCart=([^;]*);?/gi.exec(document.cookie))&&t[1],n=(t=/SubTotalNet=(\d+)/gi.exec(e))&&t[1]||"",i=(i=(t=/ItemCount=(\d+)/gi.exec(e))&&t[1])&&parseInt(i),r.cartsubtotalnet===n&&r.cartitemcount===i)},addInPage:function(t,e,n,i){if(!this[t]){var r=document.createElement("div");r.innerHTML=e,this[t]=r.firstChild,this[n]=i.target&&this.querySelectorAll(i.target)[0];var a=i.method&&this.injectionMethods[i.method];if(!this[n]||!a)return!1;a(this[t],this[n])}return!0},eraseContent:function(t,e){var n,i=this.querySelectorAll('[data-target="'+t+'"]',e)[0];if(!i)return window.console&&console.log("target ",t," not found in template"),!1;for(;i.hasChildNodes&&(n=i.firstChild);)i.removeChild(n);return!0},happendContent:function(t,e,n){var i,r=this.querySelectorAll('[data-target="'+t+'"]',n)[0];if(!r)return window.console&&console.log("target ",t," not found in template"),!1;var a,o=document.createElement("div");for(o.innerHTML=e,a=o.firstChild;a.hasChildNodes&&(i=a.firstChild);)r.appendChild(i);return!0},removeEmptySources:function(t,e){for(var n in t)for(var i,r=0,a=(i=this.querySelectorAll('[data-dependency="'+t[n]+'"]',e)).length;r<a;r++)i[r].parentNode.removeChild(i[r]);return!0},removeEmptyBlocks:function(t){for(var e,n={},i=this.querySelectorAll("[data-target]",t),r=0,a=i.length;r<a;r++)i[r].firstChild||(n[e=i[r].getAttribute("data-target")]=e);this.removeEmptySources(n,t)},addProducts:function(t,e,n,i,r){var a=this.querySelectorAll('[data-target="'+t+'"]',e)[0];if(!a)return!1;for(var o,s,c=n||[],u=c.length;u--;)s=document.createElement("div"),o=i[u]={hideDependencyList:[]},s.innerHTML=this.updateTemplate(this[t],r,i[u].hideDependencyList,c[u]),o.node=s.firstChild,a.appendChild(o.node);return!0},addListeners:function(t,n){var e,i,r=this;for(var a in t){var o=function(e){return function(t){r.lineEventListener(t,e,n)}}(a);for(var s in n)for(var c=0,u=(e=(i=this.eventBubbling[s])?this.querySelectorAll(i,t[a].node):[t[a].node]).length;c<u;c++)this.event.add(e[c],s,o)}return!0},grabPopupCross:function(t,e,n,i){var r,a,o=this.parse(t).crosssell||[],s=this.cartContent.products;t:for(var c=0,u=o.length;c<u;c++){a=o[c];for(var d=0,p=s.length;d<p;d++)if(a.id===s[d].itemID)continue t;for(d=0,p=i.length;d<p;d++)if(a.id===i[d].id)continue t;i.push(a)}return!(0<--this[n])&&(i=this.CROSSPROCESS&&(r=this.crossManaging[this.CROSSPROCESS])?r.call(this,i):i,e&&e.call(this),!0)},onComplete:function(t){var e,n=this.toDoPost;for(var i in n)(e=n[i])&&"function"==typeof e&&e.call(this,t);return!0},scenarioList:{showCart:[["getMainModel","getIds","getCartContent"],"getAllTemplates","matchIdsTagsFromList","manageSpecialCases","updateExistingTags","addListInPage","clearListSubFragments","prepareListTotal","addListTotal","addListProducts","removeEmptySourcesFromList","addListListeners","addHoverToMainContainer","listComplete"],addLine:["sendCartQuantity","matchIdsTagsFromList","manageSpecialCases","updateExistingTags","clearListSubFragments","prepareListTotal","addListTotal","addListProducts","removeEmptySourcesFromList","addListListeners","chainedProcess","listComplete"],addToCart:["addStrURLParamsToCartBtn","matchIdsTagsFromList","manageSpecialCases","updateExistingTags","clearListSubFragments","prepareListTotal","addListTotal","addListProducts","removeEmptySourcesFromList","addListListeners","chainedProcess","listComplete"],popup:["getPopupTemplate","matchIdsTagsFromPopup","getPopupCrossPdt","popupSpecialCases","addPopupInPage","clearPopupSubFragments","preparePopupTotal","addPopupTotal","addPopupProducts","removeProductsFromBackup","addPopupCrosssells","removeEmptySourcesFromPopup","addPopupListeners","closeListener","popupComplete"],addPopupLine:["matchI
8dsTagsFromPopup","popupSpecialCases","clearPopupSubFragments","preparePopupTotal","addPopupTotal","addPopupProducts","removeProductsFromBackup","removeEmptySourcesFromPopup","addPopupListeners","popupComplete"],animation:["findTargetImage","moveImages"]},getMainModel:function(){return this.getModel(this.TEMPLATE,"mainModel",this.listNext)},getIds:function(){var t=this.IDS,e=window.sessionStorage&&sessionStorage.getItem("oxCartIds_"+this.lang);if(e&&"undefined"!==e)return this.ids=this.parse(e),this.listNext(),!0;var n=this;return this.ajaxLoad(t,function(t){n.addToStorage("oxCartIds_"+n.lang,t),n.ids=n.parse(t),n.listNext()})},getCartContent:function(){var t=window.sessionStorage&&sessionStorage.getItem("oxCartContent");if(t&&"undefined"!==t&&(this.cartContent=this.parse(t),this.backupCart=this.parse(t),this.realBackupCart=this.parse(t),this.checkIfCartHasChanged()))return this.listNext(),!0;var e=this;return this.ajaxLoad(this.WSCARTURL,function(t){e.storeCartContent(t,e.listNext)})},getAllTemplates:function(){var t=this.getFragment("listTemplate",this.mainModel)&&this.getFragment("productLine",this.mainModel)&&this.getFragment("headLine",this.mainModel)&&this.getFragment("total",this.mainModel);return this.listNext(),t},matchIdsTagsFromList:function(){var t=this.matchIdsTags("listTemplate")&&this.matchIdsTags("productLine")&&this.matchIdsTags("headLine")&&this.matchIdsTags("total");return this.listNext(),t},manageSpecialCases:function(){for(var t=this.cartContent.products||[],e=t.length;e--;)for(var n in this.specialCaseList)this.specialCaseList[n].call(this,e,t[e]);return this.listNext(),!0},updateExistingTags:function(){var t,e,n=this.staticValues;for(var i in n)for(var r=0,a=(t=this.querySelectorAll(n[i].node)).length;r<a;r++)(e=t[r])&&(e.innerHTML=n[i].update.call(this,e.innerHTML));return this.listNext(),!0},addListInPage:function(){return this.addInPage("cartContainer",this.listTemplate,"target",this.PLACES.list),this.PLACES.list&&this.PLACES.list.target&&(this.listTemplateNode=this.querySelectorAll(this.PLACES.list.target+' [data-fragment="listTemplate"]')[0],this.event.add(this.listTemplateNode,"click",this.preventAClick)),this.listNext(),!0},preventAClick:function(t){var e=t.path[0]&&t.path[0].nodeName||"",n=t.path[1]&&t.path[1].nodeName||"";"a"!==e.toLowerCase()&&"a"!==n.toLowerCase()&&t.preventDefault()},clearListSubFragments:function(){return!!(this.eraseContent("productLine",this.cartContainer)&&this.eraseContent("headLine",this.cartContainer)&&this.eraseContent("total",this.cartContainer))&&(this.listNext(),!0)},prepareListTotal:function(){return this.totalHtml=this.updateTemplate(this.total,this.productTotalModel,this.hideDependencyList=[]),this.headHtml=this.updateTemplate(this.headLine,this.productTotalModel,this.hideDependencyHead=[]),this.listNext(),!0},addListTotal:function(){return!(!this.happendContent("total",this.totalHtml,this.cartContainer)||!this.happendContent("headLine",this.headHtml,this.cartContainer))&&(this.listNext(),!0)},addListProducts:function(){return this.listPdtNodes={},!!this.addProducts("productLine",this.cartContainer,this.cartContent.products,this.listPdtNodes,this.productLineModel)&&(this.listNext(),!0)},removeEmptySourcesFromList:function(){this.removeEmptySources(this.hideDependencyList,this.cartContainer),this.removeEmptySources(this.hideDependencyHead,this.cartContainer);var t=this.listPdtNodes;for(var e in t)this.removeEmptySources(t[e].hideDependencyList,t[e].node);return this.listNext(),this.removeEmptyBlocks(this.cartContainer),!0},addListListeners:function(){return!!this.addListeners(this.listPdtNodes,this.eventList)&&(this.listNext(),!0)},addHoverToMainContainer:function(){var e=this;return this.event.add(this.target,"mouseover",function(t){t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,e.addClass(e.cartContainer,e.ACTIVECLASSNAME)}),this.event.add(this.target,"mouseout",function(t){t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,e.removeClass(e.cartContainer,e.ACTIVECLASSNAME)}),this.listNext(),!0},chainedProcess:function(){return this.chained&&this.chained(),this.chained=null,this.listNext(),!0},listComplete:function(){return this.onComplete("list"),this.listNext(),!0},sendCartQuantity:function(){for(var t,e,n="ActionID=1",i=this.cartContent.products||[],r=!0,a=0,o=i.length;a<o;a++)t=i[a].itemQuantity,window.Decimal&&Decimal.isDecimal(t)&&(i[a].itemQuantity=t.toNumber()),n+="&QTY"+a+"="+i[a].itemQuantity,!r||i[a].itemQuantity&&"0"!==i[a].itemQuantity||(n+="&DELITEM="+a,r=!1),n+=(e=i[a].custFieldValue)?"&CUSTFLD"+a+"="+escape(e):"";var s=this;return this.ajaxLoad(this.WSCARTURL,function(t){s.compareAndStore
8CartContent(t,s.listNext)},n)},addStrURLParamsToCartBtn:function(){this.chained=this.addToCartEffect;var t=this.WSCARTURL+this.strURLParams,e=this;return this.ajaxLoad(t,function(t){e.compareAndStoreCartContent(t,e.listNext)})},addToCartEffect:function(){for(var t in this.addToCartFx)this.addToCartFx[t].call(this);return this.listNext(),!0},getPopupTemplate:function(){var t=this.getFragment("popupTemplate",this.mainModel)&&this.getFragment("popupLine",this.mainModel)&&this.getFragment("popupTotal",this.mainModel)&&this.getFragment("popupHeadLine",this.mainModel)&&this.getFragment("popupCross",this.mainModel);return this.popupNext(),t},matchIdsTagsFromPopup:function(){var t=this.matchIdsTags("popupTemplate")&&this.matchIdsTags("popupLine")&&this.matchIdsTags("popupTotal")&&this.matchIdsTags("popupHeadLine")&&this.matchIdsTags("popupCross");return this.popupNext(),t},addReinsurancePopup:function(){this.getFragment("popupReinsurance",this.mainModel);var t=this.updateTemplate(this.popupReinsurance,this.popupReinsuranceModel,this.hideDependencyPopupReinsurance=[]);return this.happendContent("popupReinsurance",t,this.popupContainer),this.popupNext(),!0},getPopupCrossPdt:function(){var t=this.delta||[],e=this;function n(t){e.grabPopupCross(t,e.popupNext,"countCross",e.crossList)}this.countCross=t.length,this.crossList=[];for(var i=t.length;i--;)this.ajaxLoad(this.WSCROSSURL+t[i].itemID,n);return t.length||e.popupNext&&e.popupNext(),!0},popupSpecialCases:function(){for(var t=this.delta||[],e=t.length;e--;)for(var n in this.specialCaseList)this.specialCaseList[n].call(this,e,t[e]);return this.popupNext(),!0},addPopupInPage:function(){this.addInPage("popupContainer",this.popupTemplate,"popupTarget",this.PLACES.popup);var t=this.querySelectorAll("[data-center]",this.popupContainer)[0];t&&(t.style.top=Math.max(window.scrollY||0,window.pageYOffset||0,document.body.parentNode.scrollTop||0)+"px");var e=document.body.clientHeight||document.body.offsetHeight||0,n=document.body.parentNode&&document.body.parentNode.clientHeight||0;return this.popupContainer.style.height=Math.max(e,n)+"px",this.popupNext(),!0},closeListener:function(){var e=this;return this.event.add(this.popupContainer,"click",function(t){e.lineEventListener(t,0,e.eventClose)}),this.popupNext(),!0},clearPopupSubFragments:function(){var t=this.eraseContent("popupLine",this.popupContainer)&&this.eraseContent("popupHeadLine",this.popupContainer)&&this.eraseContent("popupTotal",this.popupContainer);return this.popupNext(),t},preparePopupTotal:function(){return this.popupTotalHtml=this.updateTemplate(this.popupTotal,this.productTotalModel,this.hideDependencyPopup=[]),this.popupHeadlHtml=this.updateTemplate(this.popupHeadLine,this.productTotalModel,this.hideDependencyPopupHead=[]),this.popupNext(),!0},addPopupTotal:function(){var t=this.happendContent("popupTotal",this.popupTotalHtml,this.popupContainer)&&this.happendContent("popupHeadLine",this.popupHeadlHtml,this.popupContainer);return this.popupNext(),t},addPopupProducts:function(){this.popupPdtNodes={};for(var t=this.addProducts("popupLine",this.popupContainer,this.delta,this.popupPdtNodes,this.productLineModel),e=0,n=this.delta.length;e<n;e++)delete this.backupCart.products[this.delta[e].refId];return this.popupNext(),t},removeProductsFromBackup:function(){for(var t=0,e=this.delta.length;t<e;t++)delete this.backupCart.products[this.delta[t].refId];return this.popupNext(),!0},addPopupCrosssells:function(){this.popupCrossNodes={};var t=this.addProducts("popupCross",this.popupContainer,this.crossList,this.popupCrossNodes,this.crossLineModel);return this.popupNext(),t},removeEmptySourcesFromPopup:function(){this.removeEmptySources(this.hideDependencyPopup,this.popupContainer),this.removeEmptySources(this.hideDependencyPopupHead,this.popupContainer);var t=this.popupPdtNodes;for(var e in t)this.removeEmptySources(t[e].hideDependencyList,t[e].node);var n=this.popupCrossNodes;for(var e in n)this.removeEmptySources(n[e].hideDependencyList,n[e].node);return this.popupNext(),this.removeEmptyBlocks(this.popupContainer),!0},addPopupListeners:function(){var t=this.addListeners(this.popupPdtNodes,this.eventPopup);return this.popupNext(),t},popupComplete:function(){return this.onComplete("popup"),this.listNext(),!0},findTargetImage:function(){for(var t in this.productImageFinder)this.productImageFinder[t].apply(this);return this.animationNext(),!0},moveImages:function(){ImageMoover.prototype.sheet=function(){try{var t=document.createElement("style");return t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet}catch(t){return null}}()||document.styleSheets&&document.styleSheets[0];for(var t=0,e=this.delta.length;t<e;t++)ImageMoover.create(this.delta[t]);return this.animationNext(),!0},popupMode:function(){this.popupNext=this.schedule(this.scenarioList.popup),this.popupNext()},animationMode:function(){this.animationNext=this.schedule(this.scenarioList.animation),this.animationNext()},changeLineCartQuantity:function(t,e){var n,i;return!(!this.cartContent.products||!(n=this.cartContent.products[t]))&&(e?window.Decimal?(e=new Decimal(e),i=new Decimal(2===n.packagingVersion?1:n.packagingQTY),n.itemQuantity+=i.mul(e).toNumber()):(i=2===n.packagingVersion?1:n.packagingQTY,n.itemQuantity+=e*i,n.itemQuantity=Math.round(100*n.itemQuantity)/100):n.itemQuantity=0,this.scheduleListUpdate(),!0)},updateLineCustomField:function(t,e){var n;if(!this.cartContent.products||!(n=this.cartContent.products[t]))return!1;var i=e.value||"";return n.custFieldValue=i,this.scheduleListUpdate(),!0},scheduleListUpdate:function(){this.listNext=this.schedule(this.scenarioList.addLine),this.listNext()},schedulePopupUpdate:function(){this.popupNext=this.schedule(this.scenarioList.addPopupLine),this.popupNext()},scheduleSendFromAddToCart:function(t){return this.strURLParams="&"+t,this.listNext=this.schedule(this.scenarioList.addToCart),this.listNext(),!0},oxAddToCart:function(t,e){this.mainProductIdAdded=t,this.scheduleSendFromAddToCart(e)},closePopup:function(){this.popupContainer&&this.popupContainer.parentNode.removeChild(this.popupContainer),this.resetCart(),this.popupContainer=null},lineEventListener:function(t,e,n){var i,r=t.srcElement||t.originalTarget,a=t.type,o=n[a]||[],s=r.getAttribute("data-"+a);return!!(s&&(i=o[s])&&i.call(this,e,r,t))},eventList:{click:{plus:function(t){return this.changeLineCartQuantity(t,1),!0},minus:function(t){return this.changeLineCartQuantity(t,-1),!0},discard:function(t){return this.changeLineCartQuantity(t,0),!0},link:function(t){return window.location.assign(this.PRODUCTURL+this.cartContent.products[t].itemID),!0}},change:{customFld:function(t,e){this.updateLineCustomField(t,e)}}},eventPopup:{click:{plus:function(t){return this.chained=this.schedulePopupUpdate,this.changeLineCartQuantity(this.delta[t].refId,1),!0},minus:function(t){return this.chained=this.schedulePopupUpdate,this.changeLineCartQuantity(this.delta[t].refId,-1),!0},discard:function(t){return this.chained=this.schedulePopupUpdate,this.changeLineCartQuantity(this.delta[t].refId,0),!0},link:function(t){return window.location.assign(this.PRODUCTURL+this.delta[t].itemID),!0}},change:{customFld:function(t,e){this.updateLineCustomField(this.delta[t].refId,e)}}},eventClose:{click:{close:function(t,e,n){return this.closePopup(),!0}}},eventBubbling:{change:"input, textarea"},addToStorage:function(t,e){try{window.sessionStorage&&sessionStorage.setItem(t,e)}catch(t){window.console&&console.log("Private mode")}},loaded:!1,run:function(){var t=this;this.starter(function(){t.main()})},starter:function(t){window.oxLoaded?window.setTimeout(t,0):window.addEventListener?window.addEventListener("DOMContentLoaded",t,!1):window.attachEvent&&window.attachEvent("onload",t)},main:function(){return this.listNext=this.schedule(this.scenarioList.showCart),this.listNext(),!0}},Ab;oxCart.starter(function(){window.oxLoaded=!0}),window.oxCart=oxCart,window.ImageMoover=ImageMoover,window.oxCartApp||(window.OxAddToCart=function(t,e){return oxCart.oxAddToCart(t,e),!0})}(),function(a,t,n,i){a.oxTrackingsConfig=a.oxTrackingsConfig||{},a.oxTrackingsConfig.disableCartTracking=!1;var e="/frontend/scripts/oxCart6App/";n("head").prepend('<link rel="stylesheet" href="'+e+'cartV6App.css" type="text/css" />'),i.TEMPLATE=e+"cartV6App.html",i.lang=t.module("oxFramework").getCurrentLang(),i.IDS=e+"IDs/oxCartAppIDs-"+i.lang+".js",i.isApp=!0,i.WSCARTURL="PBShoppingCart.asp?ajaxmode=1&cartRelatedProducts=1",i.scenarioList.popup=["getPopupTemplate","matchIdsTagsFromPopup","popupSpecialCases","addPopupInPage","addReinsurancePopup","clearPopupSubFragments","preparePopupTotal","addPopupTotal","addPopupProducts","removeProductsFromBackup","removeEmptySourcesFromPopup","addPopupListeners","closeListener","popupComplete"],i.toDoPost.appCompile=function(t){"popup"===t&&this.event.launch("oxEvent",{name:"csAppDynamicCart-popupComplete",data:this.cartContent})},i.toDoPost.trackAddToCart=function(t){if((a.oxTag||a.oxAnalytics)&&"list"===t&&this.deltaAnalytics&&this.deltaAnalytics.length){var e=[],n=[],i=null,r=a.oxTrackingsConfig&&a.oxTrackingsConfig.lastAddToCartCliked||null;this.deltaAnalytics.forEach(function(t){if(t.refNode)try{t=JSON.parse(JSON.stringify(t))}catch(t){}r&&t.itemID==this.mainProductIdAdded&&r.id==t.itemID&&(i=r.products),0<t.quantityAdded?e.push(t):n.push(t)}.bind(this)),e.length&&(i?a.oxTrackings&&a.oxTrackings("addToCart",{products:e,list:i.list}):a.oxTrackings&&a.oxTrackings("addToCart",{products:e,list:"app-dynamic-cart"}),a.oxTrackings&&(this.cartContent&&this.cartContent.products&&a.oxTrackings("cartContent",{products:this.cartContent.products}),a.oxTrackingsConfig=a.oxTrackingsConfig||{},a.oxTrackingsConfig.lastAddToCartCliked=null)),n.length&&a.oxTrackings&&(a.oxTrackings("removeFromCart",{products:n,list:"app-dynamic-cart"}),this.cartContent&&this.cartContent.products&&a.oxTrackings("cartContent",{products:this.cartContent.products}))}},n(function(){var t=a.oxInfos&&a.oxInfos.oxADContext,e=a.oxAppsPreviewOnly||[];1===t||-1===_.indexOf(e,"oxCart6App")?(1===t&&-1!==_.indexOf(e,"oxCart6App")&&console.info("[oxApps:oxCart6App] Preview mode"),a.dynamicCart?console.warn("[oxApps:oxCart6App] Cannot be installed: dynamicCart v4 allready instanciated"):a.setDynamicCart?console.warn("[oxApps:oxCart6App] Cannot be installed: dynamicCart v1 allready instanciated"):n(i.PLACES.list.target).length?(a.productList&&a.addBox?a.OxAddToCart=function(t,e){return(e=a.productList.addQuantity(t,e))&&i.oxAddToCart(t,e),!0}:a.OxAddToCart=function(t,e){return i.oxAddToCart(t,e),!0},i.run()):console.warn("[oxApps:oxCart6App] Cannot be installed: Missing ",i.PLACES.list.target)):console.warn("[oxApps:oxCart6App] Only installed in preview")})}(window,window.angular,window.angular.element,window.oxCart);
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.