PageSourceSearch

https://www.faber-castell.fr/dist/FC.Ecom/modules/LayerAdvance.ebb3d372.js

js faber-castell.fr collected 2026-10-02 12:13:28 UTC 10,294 bytes, 1 lines download raw bytes

1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[3991,6006],{49780:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h});var r,o=n(52942),i=n(40939),a=n(49964),l=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(){return c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},c.apply(this,arguments)},s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function l(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((r=r.apply(t,e||[])).next())}))},u=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},p=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},f=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},y=["spinner","spinner--medium"];const h=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,n)||this;return r.options=(0,i.FW)(r.element,r.options),r.init(),r}return l(e,t),e.prototype.getDefaultOptions=function(){var e=this,n=t.prototype.getDefaultOptions.call(this);return c(c({},n),{beforeOpen:function(){return s(e,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,window.FaberCastell.initModules()];case 1:return t.sent(),[2]}}))}))},afterOpen:function(){return s(e,void 0,void 0,(function(){return u(this,(function(t){return[2]}))}))},beforeClose:function(){return s(e,void 0,void 0,(function(){return u(this,(function(t){return[2]}))}))},afterClose:function(){return s(e,void 0,void 0,(function(){return u(this,(function(t){return[2]}))}))}})},Object.defineProperty(e.prototype,"isOpen",{get:function(){return document.body.contains(this.layer)},enumerable:!1,configurable:!0}),e.prototype.showSpinner=function(){return a.PT.apply(void 0,f([this.layer.querySelector(".layer__wrapper")],p(y),!1)),this.isOpen||i.yy.prevent(!0),this},e.prototype.open=function(e,n){return void 0===n&&(n=function(){}),s(this,void 0,void 0,(function(){var r,o,l,c,s=this;return u(this,(function(u){switch(u.label){case 0:return r=this.options,o=r.layerMainClass,l=r.beforeOpen,c=r.afterOpen,[4,l()];case 1:return u.sent(),this.isOpen||i.yy.prevent(!0),this.element&&((0,a.cn)(document.body,"layer--open"),(0,a.cn)(document.documentElement,"layer--open")),a.GK.apply(void 0,f([this.layer.querySelector(".layer__wrapper")],p(y),!1)),t.prototype.open.call(this,e),(0,i.xb)((function(){return s.layer.classList.add("".concat(o,"--open"))})),[4,c()];case 2:return u.sent(),n(),[2]}}))}))},e.prototype.close=function(e){return void 0===e&&(e=function(){}),s(this,void 0,void 0,(function(){var n,r,o,l,c=this;return u(this,(function(s){switch(s.label){case 0:return n=this.options,r=n.layerMainClass,o=n.beforeClose,l=n.afterClose,[4,o()];case 1:return s.sent(),(0,a.cn)(this.layer,"".concat(r,"--closing")),(0,i.c$)((function(){(0,a.GK)(c.layer,"".concat(r,"--open"),"".concat(r,"--closing")),t.prototype.close.call(c)}),400),this.element&&((0,a.IV)(document.body,"layer--open"),(0,a.IV)(document.documentElement,"layer--open")),document.body.classList.contains("cp-u-prevent-scroll")&&i.yy.allow(),[4,l()];case 2:return s.sent(),e(),[2]}}))}))},e}(o.default)},52942:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var r=n(49964),o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)}
1,i=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function l(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((r=r.apply(t,e||[])).next())}))},a=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},l=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const s=function(){function t(t,e){void 0===e&&(e={}),this.element=t,this.options=o(o({},this.getDefaultOptions()),e)}return t.prototype.init=function(t){var e=this;void 0===t&&(t="");var n=this.options.layerMainClass;return this.layer=this.createLayer(t),this.wrapper=this.layer.querySelector(".".concat(n,"__wrapper")),this.layerContent=this.layer.querySelector(".".concat(n,"__content")),this.closeBtn=this.layer.querySelector(".".concat(n,"__close-btn")),this.closeBtn.addEventListener("click",(function(){return e.close()})),this.layer.querySelector(".".concat(this.options.layerBackdrop)).addEventListener("click",(function(){return e.close()})),this},t.prototype.createLayer=function(t){void 0===t&&(t="");var e=this.options,n=e.layerMainClass,o=e.layerModifierClasses,i=e.layerCloseIconClass,a=e.layerCloseBtnModifierClass,l=e.layerCloseAriaLabel;return(0,r.AQ)('\n            <div class="'.concat(n," ").concat(o,'">\n            <div class="layer__backdrop"></div>\n                <div class="').concat(n,'__wrapper layer__overlay fc-modal">\n                    <div class="').concat(n,"__close-btn layer__close-container ").concat(a,'">\n                        <button aria-label="').concat(l,'" class="').concat(i,'" type="button">\n                            <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x" data-id="element-10"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>\n                        </button>\n                    </div>\n                    <div class="').concat(n,'__content">').concat(t,"</div>\n                </div>\n            </div>\n        "))},t.prototype.getDefaultOptions=function(){return{layerMainClass:"layer",layerCloseIconClass:"modal-close",closeBtnWithBackground:"layer__close-container",layerModifierClasses:"",layerCloseBtnModifierClass:"",animationDuration:400,parent:this.element,layerBackdrop:"layer__backdrop",layerCloseAriaLabel:"Close Dialog"}},t.prototype.open=function(t,e){return void 0===e&&(e=function(){}),i(this,void 0,void 0,(function(){var n,o,i;return a(this,(function(a){return this.options=Object.assign(this.options,t),n=this.options,o=n.parent,(i=n.layerModifierClasses)&&r.PT.apply(void 0,c([this.layer],l(i.split(" ")),!1)),o.appendChild(this.layer),e(),[2]}))}
1))},t.prototype.close=function(t){return void 0===t&&(t=function(){}),i(this,void 0,void 0,(function(){return a(this,(function(e){return document.dispatchEvent(new CustomEvent("FaberCastellCloseLayer",{detail:{layerNode:this.layer}})),this.removeLayerModifierClass(),this.layer.remove(),t(),[2]}))}))},t.prototype.insertContent=function(t,e){void 0===e&&(e=function(){});var n=this.layerContent.firstElementChild;return n&&n!==t&&(this.layerContent.innerHTML=""),this.layerContent.appendChild(t),e(),this},t.prototype.removeLayerModifierClass=function(){var t=this.options.layerModifierClasses;t&&r.GK.apply(void 0,c([this.layer],l(t.split(" ")),!1))},t.prototype.getElement=function(){return this.element},t}()}}]);

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.