PageSourceSearch

https://www.faber-castell.fr/dist/FC.Ecom/modules/ProductConfigurator-components-ImageFilterList.ccc8ab4a.js

js faber-castell.fr collected 2026-10-02 12:14:01 UTC 9,922 bytes, 1 lines download raw bytes

vendor: 4,156 bytes, line 1
1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[7055,6881,5491],{41535:(e,t)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),l=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,h={};function _(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||m}function v(){}function g(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=_.prototype;var b=g.prototype=new v;b.constructor=g,y(b,_.prototype),b.isPureReactComponent=!0;var E=Array.isArray,S=Object.prototype.hasOwnProperty,w={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var o,u={},a=null,c=null;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,o)&&!k.hasOwnProperty(o)&&(u[o]=t[o]);var l=arguments.length-2;if(1===l)u.children=n;else if(1<l){for(var i=Array(l),s=0;s<l;s++)i[s]=arguments[s+2];u.children=i}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===u[o]&&(u[o]=l[o]);return{$$typeof:r,type:e,key:a,ref:c,props:u,_owner:w.current}}function $(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var R=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function j(e,t,o,u,a){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var l=!1;if(null===e)l=!0;else switch(c){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case n:l=!0}}if(l)return a=a(l=e),e=""===u?"."+N(l,0):u,E(a)?(o="",null!=e&&(o=e.replace(R,"$&/")+"/"),j(a,t,o,"",(function(e){return e}))):null!=a&&($(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(R,"$&/")+"/")+e)),t.push(a)),1;if(l=0,u=""===u?".":u+":",E(e))for(var i=0;i<e.length;i++){var s=u+N(c=e[i],i);l+=j(c,t,o,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),i=0;!(c=e.next()).done;)l+=j(c=c.value,t,o,s=u+N(c,i++),a);else if("object"===c)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function I(e,t,r){if(null==e)return e;var n=[],o=0;return j(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var q={current:null},x={transition:null},O={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:x,ReactCurrentOwner:w};t.Children={map:I,forEach:function(e,t,r){I(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!$(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=_,t.Fragment=o,t.Profiler=a,t.PureComponent=g,t.StrictMode=u,t.Suspense=s,t.__SECRET_INT
1ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=y({},e.props),u=e.key,a=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,c=w.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(i in t)S.call(t,i)&&!k.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==l?l[i]:t[i])}var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){l=Array(i);for(var s=0;s<i;s++)l[s]=arguments[s+2];o.children=l}return{$$typeof:r,type:e.type,key:u,ref:a,props:o,_owner:c}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:i,render:e}},t.isValidElement=$,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=x.transition;x.transition={};try{e()}finally{x.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return q.current.useCallback(e,t)},t.useContext=function(e){return q.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return q.current.useDeferredValue(e)},t.useEffect=function(e,t){return q.current.useEffect(e,t)},t.useId=function(){return q.current.useId()},t.useImperativeHandle=function(e,t,r){return q.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return q.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return q.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return q.current.useMemo(e,t)},t.useReducer=function(e,t,r){return q.current.useReducer(e,t,r)},t.useRef=function(e){return q.current.useRef(e)},t.useState=function(e){return q.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return q.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return q.current.useTransition()},t.version="18.2.0"},27378:(e,t,r)=>{e.exports=r(41535)},41638:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(27378),o=r(15211),u=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,u=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=u.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}return a};const a=function(e){var t,r="".concat(e,"-status"),a=u((0,n.useState)(""),2),c=a[0],l=a[1],i=u((0,n.useState)(null),2),s=i[0],f=i[1],p=u((0,n.useState)(""),2),d=p[0],m=p[1],y=document.querySelector(".pdp-container__left .product-slider__list picture"),h=document.querySelectorAll(".pdp-container__left .product-slider__list img"),_=e.options.find((function(e){return"true"===e.selected}));(0,n.useEffect)((function(){y&&!s&&f(y.cloneNode(!0))}),[]),(0,n.useEffect)((function(){l((null==_?void 0:_.title)||"")}),[]);var v=function(e){if(y){y.querySelectorAll("source").forEach((function(t){t.srcset=t.srcset.replace(/\/-\/media\/[^ ]+/g,e.productImage||e.image)}));var t=y.querySelector("img");t&&(t.src=e.productImage||e.image),(e.productImage||e.image&&h.length>1)&&h.forEach((function(e,t){0!==t&&e.classList.add("fade-out")}))}m(e.title)},g=function(){if(y){if(s){for(var e=s.querySelectorAll("source"),t=y.querySelectorAll("source"),r=0;r<e.length;r++)t[r].srcset=e[r].srcset;var n=y.querySelector("img");n&&(n.src=s.querySelector("img").src)}h.forEach((function(e){e.classList.remove("fade-out")}))}m("")};return n.createElement("fieldset",{className:"product-image-filter"},n.createElement("legend",{className:"product-image-filter__header"},n.createElement("div",{className:"product-image-filter__header-wrapper"},n.createElement(o.default,{showWhen:((null===(t=e.title)||void 0===t?void 0:t.length)||0)>0},n.createElement("span",{className:"product-image-filter__label"},e.title,":")),n.createElement("span",{className:"product-image-filter__selected-item",id:r,role:"status"},d||c))),n.createElement("div",{className:"product-filter-tag__body"},n.createElement(o.default,{showWhen:e.options.length>0},n.createElement("ul",{className:"product-image-filter__list"},e.options.map((function(t,u){var a;return n.createElement("li",{className:"product-image-filter__list-item",key:u},n.createElement("a",{className:""===t.targetProductLink?"disabled":"",href:t.targetProductLink,onClick:function(e){return function(e,t){t.preventDefault();var r=window.location.pathname+window.location.search+window.location.hash;e&&e!==r&&(window.location.href=e)}(t.targetProductLink,e)},"data-focusable":"Enter,Space",onFocus:function(){return v(t)},onBlur:g},n.createElement(o.default,{showWhen:((null===(a=e.options)||void 0===a?void 0:a.length)||0)>0},n.createElement("label",{className:"true"===t.selected?"checked":"",onMouseEnter:function(){return v(t)},onMouseLeave:g},n.createElement("input",{"aria-controls":r,checked:t.title===c,name:t.title,onChange:function(){return l(t.title)},type:"radio"}),t.colorImage?n.createElement("img",{className:"product-image-filter__item-img",alt:t.title,src:t.colorImage}):n.createElement("span",{className:"product-image-filter__item-background",style:t.color?{backgroundColor:t.color}:{}})))))}))))))}},15211:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(27378);const o=function(e){var t=e.showWhen,r=e.children;return t?n.createElement(n.Fragment,null,r):n.createElement(n.Fragment,null)}}}]);

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.