PageSourceSearch

https://www.faber-castell.de/dist/FC.Ecom/modules/Shop-components-ProductPrice.84fb318b.js

js faber-castell.de collected 2026-10-02 06:15:34 UTC 11,259 bytes, 1 lines download raw bytes

vendor: 4,156 bytes, line 1
1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[9533,6881,6049],{41535:(e,t)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=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 y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function b(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}function h(){}function _(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}b.prototype.isReactComponent={},b.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")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},h.prototype=b.prototype;var E=_.prototype=new h;E.constructor=_,m(E,b.prototype),E.isPureReactComponent=!0;var S=Array.isArray,g=Object.prototype.hasOwnProperty,w={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var o,a={},u=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(u=""+t.key),t)g.call(t,o)&&!P.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var i=Array(c),s=0;s<c;s++)i[s]=arguments[s+2];a.children=i}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:r,type:e,key:u,ref:l,props:a,_owner:w.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var $=/\/+/g;function R(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 x(e,t,o,a,u){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return u=u(c=e),e=""===a?"."+R(c,0):a,S(u)?(o="",null!=e&&(o=e.replace($,"$&/")+"/"),x(u,t,o,"",(function(e){return e}))):null!=u&&(C(u)&&(u=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(u,o+(!u.key||c&&c.key===u.key?"":(""+u.key).replace($,"$&/")+"/")+e)),t.push(u)),1;if(c=0,a=""===a?".":a+":",S(e))for(var i=0;i<e.length;i++){var s=a+R(l=e[i],i);c+=x(l,t,o,s,u)}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;!(l=e.next()).done;)c+=x(l=l.value,t,o,s=a+R(l,i++),u);else if("object"===l)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 c}function F(e,t,r){if(null==e)return e;var n=[],o=0;return x(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function j(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 I={current:null},N={transition:null},O={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:N,ReactCurrentOwner:w};t.Children={map:F,forEach:function(e,t,r){F(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return F(e,(function(){t++})),t},toArray:function(e){return F(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=b,t.Fragment=o,t.Profiler=u,t.PureComponent=_,t.StrictMode=a,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=m({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(i in t)g.call(t,i)&&!P.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==c?c[i]:t[i])}var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){c=Array(i);for(var s=0;s<i;s++)c[s]=arguments[s+2];o.children=c}return{$$typeof:r,type:e.type,key:a,ref:u,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.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=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return I.current.useCallback(e,t)},t.useContext=function(e){return I.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return I.current.useDeferredValue(e)},t.useEffect=function(e,t){return I.current.useEffect(e,t)},t.useId=function(){return I.current.useId()},t.useImperativeHandle=function(e,t,r){return I.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return I.current.useMemo(e,t)},t.useReducer=function(e,t,r){return I.current.useReducer(e,t,r)},t.useRef=function(e){return I.current.useRef(e)},t.useState=function(e){return I.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return I.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return I.current.useTransition()},t.version="18.2.0"},27378:(e,t,r)=>{e.exports=r(41535)},96449:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(27378);const o=function(e){var t=e.label;return n.createElement("span",{"aria-label":t,className:"bouncing-loader",role:"img"},n.createElement("span",null),n.createElement("span",null),n.createElement("span",null))}},60681:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var n=r(27378),o=r(47012),a=r(98530),u=r(96449),l=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function u(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(u,l)}c((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return u};const s=function(e){var t=this,r=e.isPlp,s=e.productId,f=e.commonTexts,p=i((0,n.use
1State)(null),2),d=p[0],y=p[1],m=i((0,n.useState)(null),2),v=m[0],b=m[1];(0,n.useEffect)((function(){l(t,void 0,void 0,(function(){var e,t;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a.default.client.get(a.default.getProductPricesEndpoint(s))];case 1:return e=r.sent().data,y(e.productPrice),b(e.specialPrice),[3,3];case 2:return t=r.sent(),console.error("Error fetching price information for a product:",t),[3,3];case 3:return[2]}}))}))}),[s]);var h=function(e,t){var r=(0,o.getPriceFormatted)(e);return(null==t?void 0:t.replace("{0}",r))||r},_=n.createElement(n.Fragment,null,null!==v?n.createElement(n.Fragment,null,n.createElement("span",{"aria-label":h(v,null==f?void 0:f.priceLabel),className:"product-info__price-reducted","data-info-price-reducted":v.value,"data-info-price-currency":d.currencyIsoCode,role:"listitem","aria-live":"polite","aria-atomic":"true"},(0,o.getPriceFormatted)(v)),n.createElement("span",{"aria-label":h(d,null==f?void 0:f.oldPriceLabel),className:"product-info__price-replaced data-info-price","data-info-price-values":d.value,role:"listitem","aria-live":"polite","aria-atomic":"true"},(0,o.getPriceFormatted)(d))):null!==d?n.createElement(n.Fragment,null,n.createElement("span",{"aria-label":h(d,null==f?void 0:f.priceLabel),className:"product-info__price data-info-price","data-info-price-values":d.value,"data-info-price-currency":d.currencyIsoCode,role:"listitem","aria-live":"polite","aria-atomic":"true"},(0,o.getPriceFormatted)(d)),(null==f?void 0:f.bestPrice)&&n.createElement("span",{className:"product-info__best-price","data-best-price":""},"(",null==f?void 0:f.bestPrice.replace("{currency}",d.currencyIsoCode),")")):n.createElement(u.default,{label:null==f?void 0:f.loadingText})),E=n.createElement(n.Fragment,null,null!==v?n.createElement("div",{className:"product-teaser-list-item__discount",role:"list"},n.createElement("span",{"aria-label":h(v,null==f?void 0:f.priceLabel),className:"product-teaser-list-item__price--new","data-info-price-reducted":v.value,"data-info-price-currency":d.currencyIsoCode,role:"listitem"},(0,o.getPriceFormatted)(v)),n.createElement("span",{"aria-label":h(d,null==f?void 0:f.oldPriceLabel),className:"product-teaser-list-item__price--old",role:"listitem"},(0,o.getPriceFormatted)(d))):null!==d?n.createElement("span",{"aria-label":h(d,null==f?void 0:f.priceLabel),className:"product-teaser-list-item__price","data-info-price-values":d.value,"data-info-price-currency":d.currencyIsoCode,role:"presentation"},(0,o.getPriceFormatted)(d)):n.createElement(u.default,{label:null==f?void 0:f.loadingText}));return r?E:_}}}]);

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.