1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[9297],{97706:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var n=r(42120),i=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function c(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}l((n=n.apply(t,e||[])).next())}))},o=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},a=function(){function t(t){var e=this;this.element=t,this.header=document.querySelector("header"),this.site=document.querySelector(".site"),this.body=document.body,this.pdpIntroWrapper=this.element.querySelector(".product-info"),this.pdpStageWrapper=this.element.querySelector(".pdp-container__left"),this.pdpContainer=this.element.querySelector(".pdp-container"),this.productDetailsWrapper=this.element.querySelector(".product-detail");var r=document.createElement("style");r.textContent="\n .no-horizontal-scroll {\n overflow-x: hidden !important;\n }\n .allow-vertical-scroll {\n overflow: visible !important;\n }\n ",document.head.appendChild(r),this.cleanDuplicateContent(),this.setupScrollEvent();var i=window.innerWidth>=1024;this.pdpIntroWrapper&&i&&(this.site.classList.add("allow-vertical-scroll"),this.body.classList.add("no-horizontal-scroll"),this.initSticky()),document.addEventListener("FaberCastell:resizeEnd",(function(){window.innerWidth>=1024?(e.site.classList.add("allow-vertical-scroll"),e.body.classList.add("no-horizontal-scroll"),e.initSticky()):(e.site.classList.remove("allow-vertical-scroll"),e.body.classList.remove("no-horizontal-scroll"))})),window.addEventListener("load",(function(){var t,r;t="consent",r=function(t){e.initPdpViewItemTracking()},"function"==typeof window.__cmp?window.__cmp("addEventListener",[t,r,!1],null):console.error("CMP is not available"),(0,n.rK)()&&window.__cmp("consentStatus")?window.__cmp("consentStatus",null,(function(t){t&&t.consentExists&&t.userChoiceExists?e.initPdpViewItemTracking():console.error("Consent status is not available or consent not given")})):e.initPdpViewItemTracking()})),this.element.addEventListener("click",(function(t){t.target.closest(".main-add-button")&&e.initAddToCartTracking()}))}return t.setup=function(e){void 0===e&&(e='[data-module="StickyPdpIntro"]'),Array.from(document.querySelectorAll(e)).filter((function(t){return!t.dataset.moduleInitialized})).forEach((function(e){new t(e),e.dataset.moduleInitialized="true"}))},t.prototype.initSticky=function(){var t=this;this.pdpIntroWrapper&&FaberCastell.isDesktop&&(this.site.classList.add("allow-vertical-scroll"),this.body.classList.add("no-horizontal-scroll")),this.stickyPdpIntroWrapper(),document.addEventListener("scroll",(function(){t.stickyPdpIntroWrapper()}))},t.prototype.stickyPdpIntroWrapper=function(){this.boundingClientRect=this.pdpIntroWrapper.getBoundingClientRect();var t=window.innerHeight;this.boundingClientRect.height>t?this.setSticky(this.pdpStageWrapper,this.pdpIntroWrapper):this.setSticky(this.pdpIntroWrapper,this.pdpStageWrapper),this.adjustMarkup()},t.prototype.setSticky=function(t,e){t.style.position="sticky",t.style.top="10px",e.style.position="static"},t.prototype.setupScrollEvent=function(){var t=this;window.addEventListener("scroll",(function(){0===window.scrollY&&t.stickyPdpIntroWrapper()}))},t.prototype.adjustMarkup=function(){var t=document.querySelector(".product-detail"),e=document.querySelector(".pdf-download"),r=window.innerHeight;FaberCastell.isDesktop&&this.boundingClientRect.height>r&&(t&&this.element.appendChild(t),e&&this.element.appendChild(e))},t.prototype.cleanDuplicateContent=function(){var t=this.element.querySelectorAll(".product-info-mobile .product-info__add-to-cart-wrapper, .product-info-mobile .product-info__price-wrapper , .product-info-mobile .product-info__vat-wrapper");(0,n.mE)(t)},t.prototype.getProductItemArray=function(t){return[{item_id:t.id,item_pid:t.pid,item_name:t.name,item_variant:t.variant,item_brand:t.brand,item_category:t.category,price:t.price,quantity:t.quantity}]},t.prototype.getProductItemArrayData=function(t,e){var r={},n=t.querySelector(".product-info__article-number"),i=t.querySelector(".product-info__title"),o=t.querySelector(".product-info__sub-title"),a=t.querySelector(".cart-product__quantity-field");return r.id=n?n.getAttribute("data-product-item-id"):null,r.pid=n?n.getAttribute("data-product-id"):null,r.name=i?i.getAttribute("data-product-name"):null,r.variant=o?o.getAttribute("data-product-variant"):null,r.brand=n?n.getAttribute("data-brand"):null,r.category=o?o.getAttribute("data-product-category"):null,r.price=e?e.toFixed(2):NaN,r.quantity=a?a.value:1,this.getProductItemArray(r)},t.prototype.initPdpViewItemTracking=function(){var t,e;return i(this,void 0,void 0,(function(){var r,n,i,a,c;return o(this,(function(o){switch(o.label){case 0:if(!window.FaberCastell.isShopEnable)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.waitForElement(".product-info__price.data-info-price[data-info-price-values], .product-info__price-reducted[data-info-price-reducted]")];case 2:return r=o.sent(),i=r.price,a=r.currency,c=this.getProductItemArrayData(this.pdpIntroWrapper,i),window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"eec.view_item",event_name:"view_item",event_source:"source_code",ecommerce:{currency:a||null,value:i.toFixed(2)?i.toFixed(2):null,items:c},_clear:!0}),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return[3,6];case 5:i=Number(null===(t=this.element.querySelector(".product-info__price-wrapper .data-info-price"))||void 0===t?void 0:t.getAttribute("data-info-price-values")),a=null===(e=this.element.querySelector(".product-info__price-wrapper .data-info-price"))||void 0===e?void 0:e.getAttribute("data-info-price-currency"),c=this.getProductItemArrayData(this.pdpIntroWrapper,i),window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"eec.view_item",event_name:"view_item",event_source:"source_code",ecommerce:{currency:i&&a?a:null,value:i?i.toFixed(2):null,items:c},_clear:!0}),o.label=6;case 6:return[2]}}
1))}))},t.prototype.initAddToCartTracking=function(){return i(this,void 0,void 0,(function(){var t,e,r,n,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.waitForElement(".product-info__price.data-info-price[data-info-price-values], .product-info__price-reducted[data-info-price-reducted]")];case 1:return t=o.sent(),e=t.price,r=t.currency,n=this.getProductItemArrayData(this.pdpIntroWrapper,e),i=Number(this.element.querySelector(".cart-product__quantity-field").value),window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"eec.add_to_cart",event_name:"add_to_cart",event_source:"source_code",ecommerce:{currency:r,value:(e*i).toFixed(2),items:n},_clear:!0}),[3,3];case 2:return a=o.sent(),console.error(a),[3,3];case 3:return[2]}}))}))},t.prototype.waitForElement=function(t){var e=this;return new Promise((function(r,n){var i=0,o=setInterval((function(){var a=e.element.querySelector(t);if(a){var c=Number(a.getAttribute("data-info-price-values")||a.getAttribute("data-info-price-reducted")),l=a.getAttribute("data-info-price-currency");c&&l&&(clearInterval(o),r({price:c,currency:l}))}i>50&&(clearInterval(o),n("Element with price or currency not found")),i++}),100)}))},t}();const c=a;new a.setup}}]);
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.