Build 594031stable
Module 647474
2,388 characters · in 76a47094615a2e71.jsDependencies
Source Raw
function(t,e,r){r.d(e,{A:()=>N,e:()=>k});var n=r(477900),l=r(582128),s=r(503698),c=r.n(s),o=r(317097),i=r(43990),a=r(406810),u=r(834730),d=r(52133),m=r(417098),x=r(396583),h=r(421108),v=r(818348),j=r(375708),f=r(280309);function N(t){let{className:e,color:r="default",sticky:l=!1,children:s}=t,a=l?f.qf:void 0;function u(){let{className:t,noticeColor:e,customStyle:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.jsx)(m.$T,{className:t,color:e,style:r,children:s})}if("nitro-pink"===r)return u({className:c()(f.cI,f.p3,a,e),customStyle:{"--custom-notice-background":"var(--background-surface-highest)","--custom-notice-text":"var(--text-strong)","--custom-notice-button-hover":"var(--background-surface-highest)"}});if((0,o.qt)(r)){let t=(0,o.OK)((0,o.LX)(r))>.5?v.NJ.DARK:v.NJ.LIGHT;return(0,n.jsx)(i.N,{theme:t,children:t=>u({className:c()(t,f.cI,a,e),customStyle:{"--custom-notice-background":r,"--custom-notice-text":"var(--text-strong)","--custom-notice-button-hover":r}})})}return(0,n.jsx)(i.N,{theme:v.NJ.DARK,children:t=>u({className:c()(t,f.cI,a,e),noticeColor:m.Hv.BRAND})})}function k(t){let{Icon:e,children:r,endDatetime:s,...c}=t,[o,i]=l.useState(()=>(0,h.ZH)(s));function a(){return(0,n.jsxs)("div",{className:f.lt,children:[null!=e&&(0,n.jsx)(e,{size:"xs",color:"currentColor",className:f.Kk}),r]})}return((0,x.A)(()=>{let t=(0,h.ZH)(s);i(e=>null==t?null:null!=e&&(0,d.A)(e,t)?e:t)},1e3),null!=o)?o.days>0?(0,n.jsxs)(N,{...c,children:[a(),(0,n.jsx)(p,{days:o.days})]}):(0,n.jsxs)(N,{...c,children:[a(),(0,n.jsx)(g,{timeLeft:o})]}):null!=s?null:(0,n.jsx)(N,{...c,children:a()})}function p(t){let{days:e}=t;return(0,n.jsxs)("div",{className:f.S5,children:[(0,n.jsx)(a.O,{size:"sm",color:"currentColor"}),(0,n.jsx)(u.E,{variant:"text-sm/medium",color:"currentColor",children:j.intl.formatToPlainString(j.t.BXpdIg,{days:e})})]})}function g(t){let{timeLeft:{days:e,hours:r,minutes:l,seconds:s}}=t;function o(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=String(t).padStart(2,"0").split("");return(0,n.jsx)(n.Fragment,{children:r.map((t,r)=>(0,n.jsx)(u.E,{className:c()(f.g2,{[f.$2]:e}),variant:"text-sm/bold",color:"currentColor",children:t},r))})}function i(){return(0,n.jsx)(u.E,{className:f.At,variant:"text-lg/bold",children:":"})}return(0,n.jsxs)("div",{className:f.kz,children:[e>0&&o(e),e>0&&i(),o(r),i(),o(l),i(),o(s,!0)]})}}