1"use strict";(self.webpackChunk_lux2_ssr_catalogue_sfcc=self.webpackChunk_lux2_ssr_catalogue_sfcc||[]).push([["4140"],{67895:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var r=n(41594),a=n.n(r),o=n(10474),u=function(e){if(e.expired)return null;var t=[{value:e.days,singular:"day"},{value:e.hours,singular:"hour"},{value:e.minutes,singular:"minute"},{value:e.seconds,singular:"second"}].map(function(e){var t=e.value,n=e.singular;return{readValue:t,displayValue:t.toString().padStart(2,"0"),label:1===t?n:"".concat(n,"s")}});return{ariaLabel:t.map(function(e){return"".concat(e.readValue," ").concat(e.label)}).join(" "),time:t.map(function(e){return e.displayValue}),unitLabels:t.map(function(e){return e.label})}},i=function(e){return e.last?a().createElement(a().Fragment,null):a().createElement("div",{className:"countdown-timer--separator countdown-timer--unit-separator"},":")};function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=a().memo(function(e){var t=e.value,n=e.text;return a().createElement("div",{className:"countdown-timer--unit-container"},a().createElement("div",{className:"countdown-timer--unit-value-container"},((function(e){if(Array.isArray(e))return l(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return l(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e,t){return a().createElement("div",{className:"countdown-timer--unit-value",key:t},e)})),a().createElement("div",{className:"countdown-timer--unit-label"},n))});function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],u=!0,i=!1;try{for(a=a.call(e);!(u=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(e){i=!0,r=e}finally{try{u||null==a.return||a.return()}finally{if(i)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var t=new Date(e),n=new Date,r=t.getTime()-n.getTime();return r<=0?{expired:!0,days:0,hours:0,minutes:0,seconds:0}:{expired:!1,days:Math.floor(r/864e5),hours:Math.floor(r%864e5/36e5),minutes:Math.floor(r%36e5/6e4),seconds:Math.floor(r%6e4/1e3)}}function d(e){return!e||new Date>=new Date(e)}var p=a().memo(function(e){var t=e.promotionEndTime,n=e.promotionStartTime,l=e.countdownTimerMessage,s=e.alignment,p=void 0===s?{mobile:"center",desktop:"center"}:s,v=e.countdownTimerExpiryMessage,y=e.backgroundColor,b=e.fontColor,g=m((0,r.useState)(function(){return f(t)}),2),w=g[0],h=g[1],E=m((0,r.useState)(function(){return!(0,o.A)()&&d(n)}),2),A=E[0],S=E[1],x=(0,r.useRef)(null);(0,r.useEffect)(function(){return w.expired?function(){return null}:(x.current=setInterval(function(){var e=d(n);S(e),e&&h(f(t))},1e3),function(){x.current&&clearInterval(x.current)})},[t,n,w.expired]);var k=(0,r.useMemo)(function(){return u(w)},[w]);return A?a().createElement("div",{className:"countdown-timer-container countdown-timer--font-size-sm",style:{backgroundColor:y,color:b},role:"timer"},a().createElement("div",{className:"countdown-timer--section countdown-timer--".concat(p.desktop," countdown-timer--").concat(p.mobile,"--mobile")},w.expired?a().createElement("span",null,v):k&&a().createElement(a().Fragment,null,a().createElement("span",{className:"countdown-timer--message"},void 0===l?"":l),a().createElement("span",{className:"countdown-timer--time-screenreader-only"},null==k?void 0:k.ariaLabel),a().createElement("div",{"aria-hidden":"true",className:"countdown-timer--time-container countdown-timer--".concat(p.desktop," countdown-timer--").concat(p.mobile,"--mobile"),style:{color:b}},k.time.map(function(e,t){return a().createElement(r.Fragment,{key:t},a().createElement(c,{value:e,text:k.unitLabels[t]}),a().createElement(i,{last:t===k.time.length-1}))}))))):a().createElement(a().Fragment,null)})},10474:function(e,t){t.A=function(){return"u"<typeof window}}}]);
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.