1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1117],{81117:function(t,e,a){a.r(e),a.d(e,{Countdown:function(){return d},default:function(){return p}});var n=a(14288),i=a(60188),r=a(70917),l=a(69558);let o=(t,e)=>{let a={};return a["@media (max-width: ".concat(l.Qn,"px)")]={".panel":{width:"auto",height:"auto",minHeight:"unset",".panel-header":{padding:"".concat(l.iR,"px ").concat(l.fh,"px"),".category":{fontSize:l.dX},".title":{fontSize:12}},".panel-ticker":{padding:"".concat(l.iR,"px ").concat(l.fh,"px"),".time-item":{".time":{fontSize:12},".unit":{fontSize:l.dX}}},".waiting":{padding:"".concat(l.iR,"px ").concat(l.fh,"px"),marginTop:0,lineHeight:"12px",fontSize:10}}},(0,r.iv)({position:e?"relative":"absolute",top:e?"unset":0,left:e?"unset":0,width:e?"unset":"100%",height:e?"unset":"100%",display:e?"unset":"flex",alignItems:e?"unset":"center",justifyContent:e?"unset":"center",zIndex:e?"unset":300,".panel":{position:"relative",width:e?"auto":296,minHeight:e?"auto":146,borderRadius:8,backgroundColor:t===i.Q2.DARK?l.af:l.LM,color:t===i.Q2.DARK?l.Cb:l.af,".panel-header":{borderBottom:"thin solid ".concat(t===i.Q2.DARK?l.ay:l.KN),padding:"".concat(l.PG,"px ").concat(l.bH,"px"),".category":{fontSize:11,color:t===i.Q2.DARK?l.a:l.Ro,marginBottom:l.$Q},".title":{fontSize:18,fontWeight:l.wM}},".panel-ticker":{padding:"".concat(l.PG,"px ").concat(l.bH,"px"),textAlign:"center",display:"flex",justifyContent:"center",".time-item":{marginLeft:l.iR,marginRight:l.iR,":last-child":{".time:after":{display:"none"}},".time":{fontSize:28,fontWeight:l.wM,position:"relative","&:after":{content:'":"',position:"absolute",top:-2,right:-12}},".unit":{fontSize:l.yN,color:t===i.Q2.DARK?l.a:l.Ro}}},".waiting":{fontSize:l.yB,fontWeight:l.wM,textAlign:"center",marginTop:l.PG,lineHeight:"18.9px",paddingBottom:16}},...a})};var c=a(67294),u=a(53093),s=a(95030);let d=t=>{let{endTime:e,className:a="",category:r,title:l,onEnded:d=u.Z,panelOnly:p=!1,showCountdownOnEnd:h=!1,...m}=t,{theme:g}=(0,i.Fg)(),[f,S]=(0,c.useState)("00"),[b,v]=(0,c.useState)("00"),[x,R]=(0,c.useState)("00"),[y,w]=(0,c.useState)("00"),[N,z]=(0,c.useState)(!1),k=(0,c.useRef)(null),M=(0,c.useRef)(0),B=(0,c.useCallback)(()=>{let t=M.current,e={day:86400,hour:3600,minute:60},a=Math.floor(t/e.day);t-=a*e.day;let n=Math.floor(t/e.hour);t-=n*e.hour;let i=Math.floor(t/e.minute);t-=i*e.minute;let r=t;S(String(a).padStart(2,"0")),v(String(n).padStart(2,"0")),R(String(i).padStart(2,"0")),w(String(r).padStart(2,"0"))},[]);return(0,c.useEffect)(()=>{let t=new Date,a=Math.round(t.getTime()/1e3);return M.current=e-a,M.current>0?k.current=setInterval(()=>{M.current>0?(M.current-=1,B()):(h||z(!0),clearInterval(k.current),d())},1e3):(h||z(!0),d()),()=>{clearInterval(k.current)}},[]),(0,n.tZ)("div",{className:a,css:o(g,p),...m,children:(0,n.BX)("div",{className:"panel",children:[(r||l)&&(0,n.BX)("div",{className:"panel-header",children:[(0,n.tZ)("p",{className:"category",children:r}),(0,n.tZ)("p",{className:"title",children:(0,s.OW)(l,28)})]}),N?(0,n.BX)("p",{className:"waiting",children:["Tunggu sebentar, ya.",(0,n.tZ)("br",{}),"Streamer masih siap-siap, nih."]}):(0,n.tZ)("div",{className:"panel-ticker",children:[{label:"Hari",value:f},{label:"Jam",value:b},{label:"Menit",value:x},{label:"Detik",value:y}].map(t=>(0,n.BX)("span",{className:"time-item",children:[(0,n.tZ)("p",{className:"time",children:t.value}),(0,n.tZ)("p",{className:"unit",children:t.label})]},t.label))})]})})};var p=d}}]);
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.