(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3368],{41067:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/stats",function(){return a(30360)}])},30360:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return et},default:function(){return ea}});var n=a(85893),i=a(67294),r=a(85434),l=a(23100),s=a(57524),o=a(68217),c=a(5197),d=a(93344),u=a(14418),h=a(31708),m=a(93777),x=a(38459),p=a(26364),v=a(21342),f=a(21967),g=a(62723),j=a(31507),b=a(88911),w=a(33838),y=a(86989),Z=function(){let{isOpen:e,onClose:t}=(0,g.q)({defaultIsOpen:!0});return e?(0,n.jsxs)(j.b,{status:"warning",mb:4,children:[(0,n.jsxs)(b.x,{mr:2,children:["Some of the charts did not load because the server didn".concat(x.Iy,"t respond. To reload charts "),(0,n.jsx)(w.r,{href:window.document.location.href,children:"click once again."})]}),(0,n.jsx)(y.P,{alignSelf:{base:"flex-start",lg:"center"},ml:"auto",onClick:t})]}):null},S=a(51748),_=e=>{let{filterQuery:t,isError:a,isPlaceholderData:r,charts:s,interval:o,initialFilterQuery:g}=e,[j,b]=(0,i.useState)(!1),w=null==s?void 0:s.some(e=>e.charts.length>0),y=i.useRef(null),_=!!g;i.useEffect(()=>{if(_){var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}},[_]);let k=(0,m.Z)("stats",{queryOptions:{refetchOnMount:!1}}),C=(0,i.useCallback)(()=>b(!0),[b]);return a?(0,n.jsx)(Z,{}):t&&!w?(0,n.jsx)(p.Z,{text:"Couldn".concat(x.Iy,"t find a chart that matches your filter query.")}):(0,n.jsxs)(l.xu,{children:[j&&(0,n.jsx)(Z,{}),(0,n.jsx)(c.aV,{ref:y,children:null==s?void 0:s.map(e=>(0,n.jsxs)(c.HC,{mb:8,_last:{marginBottom:0},children:[(0,n.jsxs)(d.O,{isLoaded:!r,mb:4,display:"inline-flex",alignItems:"center",columnGap:2,id:e.id,children:[(0,n.jsx)(u.X,{size:"md",id:e.id,children:e.title}),"gas"===e.id&&k.data&&k.data.gas_prices&&(0,n.jsx)(v.Z,{data:k.data,dataUpdatedAt:k.dataUpdatedAt,children:(0,n.jsx)(f.Z,{name:"info",boxSize:5,display:"block",cursor:"pointer",color:"icon_info",_hover:{color:"link_hovered"}})})]}),(0,n.jsx)(h.r,{templateColumns:{lg:"repeat(2, minmax(0, 1fr))"},gap:4,children:e.charts.map(e=>(0,n.jsx)(S.Z,{id:e.id,title:e.title,description:e.description,interval:o,units:e.units||void 0,isPlaceholderData:r,onLoadingError:C},e.id))})]},e.id))})]})},k=a(25448),C=a(64477),E=a(37250);let O=["s"];var A=()=>{var e;let{data:t,isPlaceholderData:a,isError:i}=(0,m.Z)("stats_counters",{queryOptions:{placeholderData:{counters:Array(10).fill(k._G)}}});return i?(0,n.jsx)(E.Z,{}):(0,n.jsx)(h.r,{gridTemplateColumns:{base:"repeat(2, 1fr)",lg:"repeat(4, 1fr)"},gridGap:4,children:null==t?void 0:null===(e=t.counters)||void 0===e?void 0:e.map((e,t)=>{let{id:i,title:r,value:l,units:s,description:o}=e,c="";return s&&O.includes(s)?c=s:s&&(c=" "+s),(0,n.jsx)(C.Z,{label:r,value:"".concat(Number(l).toLocaleString(void 0,{maximumFractionDigits:3,notation:"compact"})).concat(c),isLoading:a,hint:o},i+(a?t:""))})})},N=a(776),M=a(69046),H=a(31260),V=a(66303),R=a(96272),I=a(54232),L=a(46887),z=a(36953),P=a(35059),D=a(25432),G=(0,P.G)((e,t)=>{let{title:a,children:i,className:r,...l}=e,s=(0,D.cx)("chakra-menu__group__title",r),o=(0,z.x)();return(0,n.jsxs)("div",{ref:t,className:"chakra-menu__group",role:"group",children:[a&&(0,n.jsx)(I.m.p,{className:s,...l,__css:o.groupTitle,children:a}),i]})});G.displayName="MenuGroup";var B=a(15900),q=e=>{let{className:t,title:a,...i}=e,r=(0,B.Vg)(i);return(0,n.jsx)(G,{title:a,className:(0,D.cx)("chakra-menu__option-group",t),...r})};q.displayName="MenuOptionGroup";var T=a(13589),W=a(80610),F=e=>(0,n.jsx)("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e,children:(0,n.jsx)("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),X=(0,P.G)((e,t)=>{let{icon:a,iconSpacing:i="0.75rem",...r}=e,l=(0,B.gO)(r,t);return(0,n.jsxs)(T.C,{...l,className:(0,D.cx)("chakra-menu__menuitem-option",r.className),children:[null!==a&&(0,n.jsx)(W.O,{fontSize:"0.8em",marginEnd:i,opacity:e.isChecked?1:0,children:a||(0,n.jsx)(F,{})}),(0,n.jsx)("span",{style:{flex:1},children:l.children})]})});X.id="MenuItemOption",X.displayName="MenuItemOption";var $=a(40402),U=function(e){let{items:t,selectedId:a,onSelect:r}=e,s=t.find(e=>e.id===a),o=(0,i.useCallback)(e=>{r(Array.isArray(e)?e[0]:e)},[r]);return(0,n.jsxs)($.Z,{children:[(0,n.jsx)(V.j,{as:R.z,size:"md",variant:"outline",colorScheme:"gray",w:"100%",children:(0,n.jsxs)(l.xu,{as:"span",display:"flex",alignItems:"center",children:[(0,n.jsx)(I.m.span,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:null==s?void 0:s.title}),(0,n.jsx)(f.Z,{transform:"rotate(-90deg)",ml:"auto",name:"arrows/east-mini",w:5,h:5})]})}),(0,n.jsx)(L.q,{zIndex:3,children:(0,n.jsx)(q,{value:a,type:"radio",onChange:o,children:t.map(e=>(0,n.jsx)(X,{value:e.id,children:e.title},e.id))})})]})};let Q=Object.keys(H.g).map(e=>({id:e,title:H.g[e].title}));var Y=e=>{let{sections:t,currentSection:a,onSectionChange:i,interval:r,onIntervalChange:l,onFilterInputChange:s,isLoading:o,initialFilterValue:c}=e,u=[{id:"all",title:"All"},...t||[]];return(0,n.jsxs)(h.r,{gap:2,templateAreas:{base:'"section interval"\n                "input input"',lg:'"section interval input"'},gridTemplateColumns:{base:"repeat(2, minmax(0, 1fr))",lg:"auto auto 1fr"},children:[(0,n.jsx)(N.P,{w:{base:"100%",lg:"auto"},area:"section",children:o?(0,n.jsx)(d.O,{w:{base:"100%",lg:"76px"},h:"40px",borderRadius:"base"}):(0,n.jsx)(U,{items:u,selectedId:a,onSelect:i})}),(0,n.jsx)(N.P,{w:{base:"100%",lg:"auto"},area:"interval",children:o?(0,n.jsx)(d.O,{w:{base:"100%",lg:"118px"},h:"40px",borderRadius:"base"}):(0,n.jsx)(U,{items:Q,selectedId:r,onSelect:l})}),(0,n.jsx)(N.P,{w:"100%",area:"input",children:(0,n.jsx)(M.Z,{isLoading:o,onChange:s,placeholder:"Find chart, metric...",initialValue:c},c)})]})},J=a(11163),K=a(31251),ee=()=>{let{isPlaceholderData:e,isError:t,sections:a,currentSection:r,handleSectionChange:c,interval:d,handleIntervalChange:u,handleFilterChange:h,displayedCharts:x,filterQuery:p,initialFilterQuery:v}=function(){let e=(0,J.useRouter)(),{data:t,isPlaceholderData:a,isError:n}=(0,m.Z)("stats_lines",{queryOptions:{placeholderData:k.SX}}),[r,l]=(0,i.useState)("all"),[s,o]=(0,i.useState)(""),[c,d]=i.useState(""),[u,h]=(0,i.useState)("oneMonth"),x=(0,i.useMemo)(()=>{var e;return null==t?void 0:null===(e=t.sections)||void 0===e?void 0:e.map(e=>{let{id:t}=e;return t})},[t]);i.useEffect(()=>{if(!a&&!n){var i;let a=(0,K.Z)(e.query.chartId),n=null==t?void 0:null===(i=t.sections.map(e=>e.charts.find(e=>e.id===a)).filter(Boolean)[0])||void 0===i?void 0:i.title;n&&(d(n),o(n),e.replace({pathname:"/stats"},void 0,{scroll:!1}))}},[a]);let p=i.useMemo(()=>{var e;return null==t?void 0:null===(e=t.sections)||void 0===e?void 0:e.map(e=>{let t=e.charts.filter(t=>("all"===r||e.id===r)&&t.title.toLowerCase().includes(s.toLowerCase()));return{...e,charts:t}}).filter(e=>e.charts.length>0)},[r,null==t?void 0:t.sections,s]),v=(0,i.useCallback)(e=>{l(e)},[]),f=(0,i.useCallback)(e=>{h(e)},[]),g=(0,i.useCallback)(e=>{o(e)},[]);return i.useMemo(()=>({sections:null==t?void 0:t.sections,sectionIds:x,isPlaceholderData:a,isError:n,initialFilterQuery:c,filterQuery:s,currentSection:r,handleSectionChange:v,interval:u,handleIntervalChange:f,handleFilterChange:g,displayedCharts:p}),[t,x,a,n,c,s,r,v,u,f,g,p])}();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{title:s.Z.meta.seo.enhancedDataEnabled?"".concat(s.Z.chain.name," statistic & data"):"".concat(s.Z.chain.name," stats")}),(0,n.jsx)(l.xu,{mb:{base:6,sm:8},children:(0,n.jsx)(A,{})}),(0,n.jsx)(l.xu,{mb:{base:6,sm:8},children:(0,n.jsx)(Y,{isLoading:e,initialFilterValue:v,sections:a,currentSection:r,onSectionChange:c,interval:d,onIntervalChange:u,onFilterInputChange:h})}),(0,n.jsx)(_,{filterQuery:p,initialFilterQuery:v,isError:t,isPlaceholderData:e,charts:x,interval:d})]})},et=!0,ea=()=>(0,n.jsx)(r.Z,{pathname:"/stats",children:(0,n.jsx)(ee,{})})},37250:function(e,t,a){"use strict";var n=a(85893),i=a(31507),r=a(56837),l=a(54232);a(67294),t.Z=(0,l.m)(e=>{let{className:t}=e;return(0,n.jsx)(i.b,{status:"warning",width:"fit-content",className:t,children:(0,n.jsx)(r.X,{children:"Something went wrong. Try refreshing the page or come back later."})})})},26364:function(e,t,a){"use strict";a.d(t,{Z:function(){return h}});var n,i,r=a(85893),l=a(23100),s=a(56877),o=a(14418),c=a(67294);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}var u=function(e){return c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 240 185",fill:"none"},e),n||(n=c.createElement("g",{clipPath:"url(#a)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.307-2.023H6.923A7.2 7.2 0 0 0-.37 5.269v19.385a7.25 7.25 0 0 0 7.293 7.292h19.384a7.25 7.25 0 0 0 7.293-7.292V5.269a7.25 7.25 0 0 0-7.293-7.292Zm-19.384-2.4A9.692 9.692 0 0 0-2.77 5.269v19.385a9.692 9.692 0 0 0 9.693 9.692h19.384A9.692 9.692 0 0 0 36 24.654V5.269a9.693 9.693 0 0 0-9.693-9.692H6.923Zm19.384 54.092H6.923A7.2 7.2 0 0 0-.37 56.962v19.384a7.25 7.25 0 0 0 7.293 7.292h19.384a7.25 7.25 0 0 0 7.293-7.292V56.961a7.25 7.25 0 0 0-7.293-7.292Zm-19.384-2.4a9.693 9.693 0 0 0-9.693 9.693v19.384a9.692 9.692 0 0 0 9.693 9.692h19.384A9.692 9.692 0 0 0 36 76.346V56.961a9.693 9.693 0 0 0-9.693-9.692H6.923Zm0 54.093h19.384a7.249 7.249 0 0 1 7.293 7.292v19.384a7.25 7.25 0 0 1-7.293 7.293H6.923a7.209 7.209 0 0 1-5.184-2.108 7.208 7.208 0 0 1-2.109-5.185v-19.384a7.249 7.249 0 0 1 7.293-7.292Zm-9.693 7.292a9.693 9.693 0 0 1 9.693-9.692h19.384A9.694 9.694 0 0 1 36 108.654v19.384a9.694 9.694 0 0 1-9.693 9.693H6.923a9.691 9.691 0 0 1-9.693-9.693v-19.384Zm29.077 44.4H6.923a7.19 7.19 0 0 0-5.184 2.108 7.208 7.208 0 0 0-2.109 5.184v19.385a7.25 7.25 0 0 0 7.293 7.292h19.384a7.25 7.25 0 0 0 7.293-7.292v-19.385a7.25 7.25 0 0 0-7.293-7.292Zm-19.384-2.4a9.691 9.691 0 0 0-9.693 9.692v19.385a9.691 9.691 0 0 0 9.693 9.692h19.384A9.691 9.691 0 0 0 36 179.731v-19.385a9.691 9.691 0 0 0-9.693-9.692H6.923Zm51.692-126.83H78a7.25 7.25 0 0 1 7.292 7.291V50.5A7.25 7.25 0 0 1 78 57.792H58.615a7.2 7.2 0 0 1-7.292-7.292V31.115a7.249 7.249 0 0 1 7.292-7.292Zm-9.692 7.291a9.692 9.692 0 0 1 9.692-9.692H78a9.692 9.692 0 0 1 9.692 9.692V50.5A9.692 9.692 0 0 1 78 60.192H58.615a9.692 9.692 0 0 1-9.692-9.692V31.115ZM78 75.515H58.615a7.2 7.2 0 0 0-7.292 7.293v19.384a7.25 7.25 0 0 0 7.292 7.293H78a7.25 7.25 0 0 0 7.292-7.293v-2.123c.39 1.933.977 3.819 1.754 5.631A9.689 9.689 0 0 1 78 111.885H58.615a9.695 9.695 0 0 1-9.692-9.693V82.808a9.692 9.692 0 0 1 9.692-9.693H78c4.061 0 7.569 2.493 9.046 6.185-.83 1.754-1.385 3.692-1.846 5.538v-2.03c0-4.062-3.139-7.293-7.2-7.293Zm61.384-12.83V56.96a9.694 9.694 0 0 0-9.692-9.692h-19.385a9.693 9.693 0 0 0-9.692 9.693v5.723l2.4-1.477v-4.246a7.25 7.25 0 0 1 7.292-7.293h19.385a7.249 7.249 0 0 1 7.292 7.293v4.246l2.4 1.477Zm13.57 43.015a9.691 9.691 0 0 0 9.046 6.185h19.384a9.696 9.696 0 0 0 9.693-9.693V82.808a9.695 9.695 0 0 0-9.693-9.693H162a9.69 9.69 0 0 0-9.046 6.185c.83 1.754 1.384 3.692 1.846 5.538v-2.03c0-4.062 3.138-7.293 7.2-7.293h19.384a7.25 7.25 0 0 1 7.293 7.293v19.384a7.25 7.25 0 0 1-7.293 7.293H162a7.188 7.188 0 0 1-5.184-2.109 7.188 7.188 0 0 1-2.109-5.184v-2.123a28.602 28.602 0 0 1-1.753 5.631Zm-52.339 16.615v5.816a9.69 9.69 0 0 0 9.692 9.692h19.385a9.692 9.692 0 0 0 9.692-9.692v-5.723l-2.4 1.384v4.339a7.249 7.249 0 0 1-7.292 7.292h-19.385a7.192 7.192 0 0 1-5.217-2.14 7.199 7.199 0 0 1-2.075-5.245v-4.153l-2.4-1.385v-.185Zm-42 4.893H78a7.249 7.249 0 0 1 7.292 7.292v19.385A7.25 7.25 0 0 1 78 161.177H58.615a7.21 7.21 0 0 1-5.184-2.108 7.209 7.209 0 0 1-2.108-5.184V134.5a7.248 7.248 0 0 1 7.292-7.292Zm-9.692 7.292a9.693 9.693 0 0 1 9.692-9.692H78a9.694 9.694 0 0 1 9.692 9.692v19.385A9.693 9.693 0 0 1 78 163.577H58.615a9.69 9.69 0 0 1-9.692-9.692V134.5ZM129.692-2.023h-19.385a7.198 7.198 0 0 0-7.292 7.292v19.385a7.25 7.25 0 0 0 7.292 7.292h19.385a7.249 7.249 0 0 0 7.292-7.292V5.269a7.249 7.249 0 0 0-7.292-7.292Zm-19.385-2.4a9.693 9.693 0 0 0-9.692 9.692v19.385a9.69 9.69 0 0 0 9.692 9.692h19.385a9.693 9.693 0 0 0 9.692-9.692V5.269a9.694 9.694 0 0 0-9.692-9.692h-19.385Zm-7.292 164.769a7.25 7.25 0 0 1 7.292-7.292h19.385a7.249 7.249 0 0 1 7.292 7.292v19.385a7.249 7.249 0 0 1-7.292 7.292h-19.385a7.207 7.207 0 0 1-5.184-2.108 7.216 7.216 0 0 1-2.108-5.184v-19.385Zm-2.4 0a9.69 9.69 0 0 1 9.692-9.692h19.385a9.692 9.692 0 0 1 9.692 9.692v19.385a9.693 9.693 0 0 1-9.692 9.692h-19.385a9.691 9.691 0 0 1-9.692-9.692v-19.385Zm80.769-136.523H162a7.206 7.206 0 0 0-5.184 2.108 7.195 7.195 0 0 0-2.109 5.184V50.5A7.25 7.25 0 0 0 162 57.792h19.384a7.25 7.25 0 0 0 7.293-7.292V31.115a7.25 7.25 0 0 0-7.293-7.292ZM162 21.423a9.691 9.691 0 0 0-9.693 9.692V50.5A9.695 9.695 0 0 0 162 60.192h19.384a9.693 9.693 0 0 0 9.693-9.692V31.115a9.695 9.695 0 0 0-9.693-9.692H162Zm19.384 105.785H162a7.186 7.186 0 0 0-5.184 2.108 7.193 7.193 0 0 0-2.109 5.184v19.385a7.25 7.25 0 0 0 7.293 7.292h19.384a7.25 7.25 0 0 0 7.293-7.292V134.5a7.249 7.249 0 0 0-7.293-7.292Zm-19.384-2.4a9.695 9.695 0 0 0-9.693 9.692v19.385a9.696 9.696 0 0 0 9.693 9.692h19.384a9.692 9.692 0 0 0 9.693-9.692V134.5a9.695 9.695 0 0 0-9.693-9.692H162ZM213.692-2.023h19.385a7.25 7.25 0 0 1 7.292 7.292v19.385a7.25 7.25 0 0 1-7.292 7.292h-19.385a7.198 7.198 0 0 1-7.292-7.292V5.269a7.249 7.249 0 0 1 7.292-7.292ZM204 5.269a9.691 9.691 0 0 1 9.692-9.692h19.385a9.693 9.693 0 0 1 9.692 9.692v19.385a9.69 9.69 0 0 1-9.692 9.692h-19.385A9.69 9.69 0 0 1 204 24.654V5.269Zm29.077 44.4h-19.385a7.198 7.198 0 0 0-7.292 7.293v19.384a7.249 7.249 0 0 0 7.292 7.292h19.385a7.25 7.25 0 0 0 7.292-7.292V56.961a7.25 7.25 0 0 0-7.292-7.292Zm-19.385-2.4A9.69 9.69 0 0 0 204 56.962v19.384a9.69 9.69 0 0 0 9.692 9.692h19.385a9.693 9.693 0 0 0 9.692-9.692V56.961a9.691 9.691 0 0 0-9.692-9.692h-19.385Zm0 54.093h19.385a7.249 7.249 0 0 1 7.292 7.292v19.384a7.25 7.25 0 0 1-7.292 7.293h-19.385a7.207 7.207 0 0 1-5.184-2.108 7.2 7.2 0 0 1-2.108-5.185v-19.384a7.248 7.248 0 0 1 7.292-7.292ZM204 108.654a9.692 9.692 0 0 1 9.692-9.692h19.385a9.694 9.694 0 0 1 9.692 9.692v19.384a9.692 9.692 0 0 1-9.692 9.693h-19.385a9.692 9.692 0 0 1-9.692-9.693v-19.384Zm29.077 44.4h-19.385a7.189 7.189 0 0 0-5.184 2.108 7.2 7.2 0 0 0-2.108 5.184v19.385a7.249 7.249 0 0 0 7.292 7.292h19.385a7.25 7.25 0 0 0 7.292-7.292v-19.385a7.25 7.25 0 0 0-7.292-7.292Zm-19.385-2.4a9.69 9.69 0 0 0-9.692 9.692v19.385a9.69 9.69 0 0 0 9.692 9.692h19.385a9.691 9.691 0 0 0 9.692-9.692v-19.385a9.69 9.69 0 0 0-9.692-9.692h-19.385Z",fill:"url(#b)"}),c.createElement("path",{d:"M87.231 68.5c1.385-1.846 4.154-.923 4.154 1.477v.37a6.461 6.461 0 0 0 6.462 6.46h44.307a6.461 6.461 0 0 0 6.462-6.46v-.37c0-2.308 2.769-3.416 4.154-1.477.276.37.461.923.461 1.477v.37a11.078 11.078 0 0 1-11.077 11.076H97.847a11.077 11.077 0 0 1-11.078-11.077v-.37c0-.553.185-1.107.462-1.476Zm65.539 48c.276-.369.461-.923.461-1.477v-.369a11.08 11.08 0 0 0-11.077-11.077H97.847a11.078 11.078 0 0 0-11.078 11.077v.369c0 .554.185 1.108.462 1.477 1.385 1.846 4.154.923 4.154-1.477v-.369a6.461 6.461 0 0 1 6.462-6.462h44.307a6.46 6.46 0 0 1 6.462 6.462v.369c0 2.308 2.769 3.415 4.154 1.477Z",fill:"#A0AEC0",fillOpacity:.5}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M153.231 92.5a33.233 33.233 0 0 1-45.948 30.701 33.237 33.237 0 0 1-17.984-17.984A33.233 33.233 0 0 1 120 59.269 33.232 33.232 0 0 1 153.231 92.5Zm-5.262 33.877a3.963 3.963 0 0 0-4.984-.369 40.618 40.618 0 0 1-54.212-7.54 40.613 40.613 0 0 1 2.52-54.675 40.614 40.614 0 0 1 62.215 51.692c-1.108 1.569-.923 3.692.369 4.984l18.185 18.185a3.693 3.693 0 0 1 0 5.169l-.739.739a3.693 3.693 0 0 1-5.169 0l-18.185-18.185Z",fill:"#A0AEC0"}))),i||(i=c.createElement("defs",null,c.createElement("radialGradient",{id:"b",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(0 96.9231 -119.218 0 116.449 92.5)"},c.createElement("stop",{stopColor:"#CBD5E0",stopOpacity:.8}),c.createElement("stop",{offset:1,stopColor:"#CBD5E0",stopOpacity:0})),c.createElement("clipPath",{id:"a"},c.createElement("path",{fill:"#fff",transform:"translate(0 .192)",d:"M0 0h240v184.615H0z"})))))},h=e=>{let{text:t}=e;return(0,r.jsxs)(l.xu,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",mt:"50px",children:[(0,r.jsx)(s.J,{as:u,w:{base:"160px",sm:"240px"},h:"auto",mb:{base:4,sm:6}}),(0,r.jsx)(o.X,{as:"h4",size:"sm",mb:2,children:"No results"}),(0,r.jsx)(l.xu,{fontSize:{base:"sm",sm:"md"},textAlign:"center",children:t})]})}},73887:function(e,t,a){"use strict";var n=a(85893),i=a(62723),r=a(93344),l=a(47523),s=a(89154),o=a(54232),c=a(67294),d=a(21967);t.Z=c.memo((0,o.m)(e=>{let{label:t,className:a,tooltipProps:o,isLoading:u}=e,{isOpen:h,onOpen:m,onToggle:x,onClose:p}=(0,i.q)(),v=c.useCallback(e=>{e.stopPropagation(),x()},[x]);return u?(0,n.jsx)(r.O,{className:a,boxSize:5,borderRadius:"sm"}):(0,n.jsx)(l.u,{label:t,placement:"top",maxW:{base:"calc(100vw - 8px)",lg:"320px"},isOpen:h,...o,children:(0,n.jsx)(s.h,{colorScheme:"none","aria-label":"hint",icon:(0,n.jsx)(d.Z,{name:"info",w:"100%",h:"100%",color:"icon_info",_hover:{color:"link_hovered"}}),boxSize:5,variant:"simple",display:"inline-block",flexShrink:0,className:a,onMouseEnter:m,onMouseLeave:p,onClick:v})})}))},68217:function(e,t,a){"use strict";var n=a(85893),i=a(93344),r=a(47523),l=a(33838),s=a(62723),o=a(204),c=a(14418),d=a(54232),u=a(23279),h=a.n(u),m=a(67294),x=a(20809),p=a(15297),v=a(21967),f=a(85e3);let g=e=>{if(!e)return null;if(e.isLoading)return(0,n.jsx)(i.O,{boxSize:6,display:"inline-block",flexShrink:0,borderRadius:"base",mr:3,my:2,verticalAlign:"text-bottom",isLoaded:!e.isLoading});let t=(0,n.jsx)(v.Z,{name:"arrows/east",boxSize:6,transform:"rotate(180deg)",margin:"auto",color:"gray.400",flexShrink:0});return"url"in e?(0,n.jsx)(r.u,{label:e.label,children:(0,n.jsx)(f.Z,{display:"inline-flex",href:e.url,h:"40px",mr:3,children:t})}):(0,n.jsx)(r.u,{label:e.label,children:(0,n.jsx)(l.r,{display:"inline-flex",onClick:e.onClick,h:"40px",mr:3,children:t})})};t.Z=(0,d.m)(e=>{let{title:t,contentAfter:a,withTextAd:l,backLink:d,className:u,isLoading:v,afterTitle:f,beforeTitle:j,secondRow:b}=e,w=(0,s.q)(),y=(0,x.Z)(),[Z,S]=m.useState(!1),_=m.useRef(null),k=m.useRef(null),C=m.useCallback(()=>{if(!_.current||!k.current)return;let e=_.current.getBoundingClientRect(),t=k.current.getBoundingClientRect();2*e.height<=t.height?S(!0):S(!1)},[]);return m.useEffect(()=>{v||C()},[v,C]),m.useEffect(()=>{let e=h()(C,1e3);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[C]),(0,n.jsxs)(o.k,{className:u,flexDir:"column",rowGap:3,mb:6,children:[(0,n.jsxs)(o.k,{flexDir:"row",flexWrap:"wrap",rowGap:3,columnGap:3,alignItems:"center",children:[(0,n.jsxs)(o.k,{h:{base:"auto",lg:v?10:"auto"},maxW:"100%",alignItems:"center",children:[d&&(0,n.jsx)(g,{...d,isLoading:v}),j,(0,n.jsx)(i.O,{isLoaded:!v,overflow:"hidden",children:(0,n.jsx)(r.u,{label:t,isOpen:w.isOpen,onClose:w.onClose,maxW:{base:"calc(100vw - 32px)",lg:"500px"},closeOnScroll:!!y,isDisabled:!Z,children:(0,n.jsx)(c.X,{ref:_,as:"h1",size:"lg",whiteSpace:"normal",wordBreak:"break-all",style:{WebkitLineClamp:1,WebkitBoxOrient:"vertical",display:"-webkit-box"},overflow:"hidden",textOverflow:"ellipsis",onMouseEnter:w.onOpen,onMouseLeave:w.onClose,onClick:y?w.onToggle:void 0,children:(0,n.jsx)("span",{ref:k,children:t})})})}),f]}),a,l&&(0,n.jsx)(p.Z,{order:{base:-1,lg:100},mb:{base:6,lg:0},ml:"auto",w:{base:"100%",lg:"auto"}})]}),b&&(0,n.jsx)(o.k,{alignItems:"center",minH:10,overflow:"hidden",_empty:{display:"none"},children:b})]})})},95250:function(e,t,a){"use strict";var n=a(85893),i=a(93344),r=a(54232),l=a(67294),s=a(72620);t.Z=l.memo((0,r.m)(e=>{let{className:t,isLoading:a,value:r,tooltipPlacement:l}=e;return(0,n.jsx)(s.Z,{label:r,placement:l,children:(0,n.jsx)(i.O,{className:t,isLoaded:!a,display:"inline-block",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",height:"fit-content",children:r})})}))},40402:function(e,t,a){"use strict";var n=a(85893),i=a(36953),r=a(67294);t.Z=r.memo(e=>(0,n.jsx)(i.v,{gutter:4,...e}))},69046:function(e,t,a){"use strict";var n=a(85893),i=a(12498),r=a(93344),l=a(93863),s=a(43775),o=a(28129),c=a(54232),d=a(67294),u=a(89377),h=a(21967);t.Z=(0,c.m)(e=>{let{onChange:t,className:a,size:c="sm",placeholder:m,initialValue:x,isLoading:p,type:v,name:f}=e,[g,j]=(0,d.useState)(x||""),b=d.useRef(null),w=(0,i.ff)("blackAlpha.600","whiteAlpha.600"),y=(0,d.useCallback)(e=>{let{value:a}=e.target;j(a),null==t||t(a)},[t]),Z=(0,d.useCallback)(()=>{var e;j(""),null==t||t(""),null==b||null===(e=b.current)||void 0===e||e.focus()},[t]);return(0,n.jsx)(r.O,{isLoaded:!p,className:a,minW:"250px",borderRadius:"base",children:(0,n.jsxs)(l.B,{size:c,children:[(0,n.jsx)(s.Z,{pointerEvents:"none",children:(0,n.jsx)(h.Z,{name:"search",color:w,boxSize:4})}),(0,n.jsx)(o.I,{ref:b,size:c,value:g,onChange:y,placeholder:m,borderWidth:"2px",textOverflow:"ellipsis",whiteSpace:"nowrap",type:v,name:f}),g?(0,n.jsx)(s.x,{children:(0,n.jsx)(u.Z,{onClick:Z})}):null]})})})},64477:function(e,t,a){"use strict";var n=a(85893),i=a(12498),r=a(204),l=a(23100),s=a(93344),o=a(54232),c=a(88911),d=a(41664),u=a.n(d);a(67294);var h=a(73887),m=a(21967),x=a(95250);let p=e=>{let{href:t,children:a}=e;return t?(0,n.jsx)(u(),{href:t,passHref:!0,legacyBehavior:!0,children:a}):a};t.Z=(0,o.m)(e=>{let{className:t,icon:a,label:d,value:u,valuePrefix:v,valuePostfix:f,isLoading:g,hint:j,diff:b,diffPeriod:w="24h",diffFormatted:y,period:Z,href:S}=e,_=(0,i.ff)("gray.50","whiteAlpha.100"),k=(0,i.ff)("blackAlpha.50","whiteAlpha.50"),C=(0,i.ff)("gray.600","gray.400");return(0,n.jsx)(p,{href:g?void 0:S,children:(0,n.jsxs)(r.k,{className:t,alignItems:"center",bgColor:g?k:_,p:3,borderRadius:"base",justifyContent:"space-between",columnGap:2,...S&&!g?{as:"a",href:S}:{},children:[a&&(0,n.jsx)(m.Z,{name:a,p:2,boxSize:"40px",isLoading:g,borderRadius:"base",display:{base:"none",lg:"block"},flexShrink:0}),(0,n.jsxs)(l.xu,{w:{base:"100%",lg:a?"calc(100% - 48px)":"100%"},children:[(0,n.jsx)(s.O,{isLoaded:!g,color:"text_secondary",fontSize:"xs",lineHeight:"16px",w:"fit-content",children:(0,n.jsx)("h2",{children:d})}),(0,n.jsxs)(s.O,{isLoaded:!g,display:"flex",alignItems:"baseline",fontWeight:500,fontSize:"lg",lineHeight:6,children:[v&&(0,n.jsx)(o.m.span,{whiteSpace:"pre",children:v}),"string"==typeof u?(0,n.jsx)(x.Z,{isLoading:g,value:u}):u,f&&(0,n.jsx)(o.m.span,{whiteSpace:"pre",children:f}),b&&Number(b)>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.x,{ml:2,mr:1,color:"green.500",children:["+",y||Number(b).toLocaleString()]}),(0,n.jsxs)(c.x,{variant:"secondary",fontSize:"sm",children:["(",w,")"]})]}),Z&&(0,n.jsxs)(c.x,{variant:"secondary",fontSize:"xs",fontWeight:400,ml:1,children:["(",Z,")"]})]})]}),"string"==typeof j?(0,n.jsx)(s.O,{isLoaded:!g,alignSelf:"center",borderRadius:"base",children:(0,n.jsx)(h.Z,{label:j,boxSize:6,color:C})}):j]})})})},51748:function(e,t,a){"use strict";var n=a(85893),i=a(54232),r=a(67294),l=a(93777),s=a(86619),o=a(31260);function c(e){return e.toISOString().substring(0,10)}t.Z=(0,i.m)(e=>{let{id:t,title:a,description:i,interval:d,onLoadingError:u,units:h,isPlaceholderData:m,className:x}=e,p=o.g[d],v=p.start?c(new Date):void 0,f=p.start?c(p.start):void 0,{data:g,isPending:j,isError:b}=(0,l.Z)("stats_line",{pathParams:{id:t},queryParams:{from:f,to:v},queryOptions:{enabled:!m,refetchOnMount:!1}}),w=(0,r.useMemo)(()=>{var e;return null==g?void 0:null===(e=g.chart)||void 0===e?void 0:e.map(e=>({date:new Date(e.date),value:Number(e.value),isApproximate:e.is_approximate}))},[g]);return(0,r.useEffect)(()=>{b&&u()},[b,u]),(0,n.jsx)(s.Z,{isError:b,items:w,title:a,units:h,description:i,isLoading:j,minH:"230px",className:x})})},31260:function(e,t,a){"use strict";a.d(t,{g:function(){return n}});let n={all:{title:"All time"},oneMonth:{title:"1 month",start:i(1)},threeMonths:{title:"3 months",start:i(3)},sixMonths:{title:"6 months",start:i(6)},oneYear:{title:"1 year",start:i(12)}};function i(e){let t=new Date;return t.setMonth(t.getMonth()-e),t}},776:function(e,t,a){"use strict";a.d(t,{P:function(){return c}});var n=a(35059),i=a(54232),r=a(87052),l=a(33951),s=a(85893);function o(e){return(0,l.XQ)(e,e=>"auto"===e?"auto":`span ${e}/span ${e}`)}var c=(0,n.G)(function(e,t){let{area:a,colSpan:n,colStart:l,colEnd:c,rowEnd:d,rowSpan:u,rowStart:h,...m}=e,x=(0,r.o)({gridArea:a,gridColumn:o(n),gridRow:o(u),gridColumnStart:l,gridColumnEnd:c,gridRowStart:h,gridRowEnd:d});return(0,s.jsx)(i.m.div,{ref:t,__css:x,...m})});c.displayName="GridItem"},77374:function(e,t,a){"use strict";a.d(t,{h:function(){return g}});var n=a(54232),i=a(99155),r=a(25432),l=a(21190),s=a(24262),o=a(67294),c=a(85893),d={initial:"initial",animate:"enter",exit:"exit",variants:{initial:({offsetX:e,offsetY:t,transition:a,transitionEnd:n,delay:r})=>{var l;return{opacity:0,x:e,y:t,transition:null!=(l=null==a?void 0:a.exit)?l:i.p$.exit(i.Sh.exit,r),transitionEnd:null==n?void 0:n.exit}},enter:({transition:e,transitionEnd:t,delay:a})=>{var n;return{opacity:1,x:0,y:0,transition:null!=(n=null==e?void 0:e.enter)?n:i.p$.enter(i.Sh.enter,a),transitionEnd:null==t?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:a,transitionEnd:n,reverse:r,delay:l})=>{var s;let o={x:t,y:e};return{opacity:0,transition:null!=(s=null==a?void 0:a.exit)?s:i.p$.exit(i.Sh.exit,l),...r?{...o,transitionEnd:null==n?void 0:n.exit}:{transitionEnd:{...o,...null==n?void 0:n.exit}}}}}};(0,o.forwardRef)(function(e,t){let{unmountOnExit:a,in:n,reverse:i=!0,className:o,offsetX:u=0,offsetY:h=8,transition:m,transitionEnd:x,delay:p,...v}=e,f=!a||n&&a,g=n||a?"enter":"exit",j={offsetX:u,offsetY:h,reverse:i,transition:m,transitionEnd:x,delay:p};return(0,c.jsx)(l.M,{custom:j,children:f&&(0,c.jsx)(s.E.div,{ref:t,className:(0,r.cx)("chakra-offset-slide",o),custom:j,...d,animate:g,...v})})}).displayName="SlideFade";var u={initial:"exit",animate:"enter",exit:"exit",variants:{exit:({reverse:e,initialScale:t,transition:a,transitionEnd:n,delay:r})=>{var l;return{opacity:0,...e?{scale:t,transitionEnd:null==n?void 0:n.exit}:{transitionEnd:{scale:t,...null==n?void 0:n.exit}},transition:null!=(l=null==a?void 0:a.exit)?l:i.p$.exit(i.Sh.exit,r)}},enter:({transitionEnd:e,transition:t,delay:a})=>{var n;return{opacity:1,scale:1,transition:null!=(n=null==t?void 0:t.enter)?n:i.p$.enter(i.Sh.enter,a),transitionEnd:null==e?void 0:e.enter}}}};(0,o.forwardRef)(function(e,t){let{unmountOnExit:a,in:n,reverse:i=!0,initialScale:o=.95,className:d,transition:h,transitionEnd:m,delay:x,...p}=e,v=!a||n&&a,f=n||a?"enter":"exit",g={initialScale:o,reverse:i,transition:h,transitionEnd:m,delay:x};return(0,c.jsx)(l.M,{custom:g,children:v&&(0,c.jsx)(s.E.div,{ref:t,className:(0,r.cx)("chakra-offset-slide",d),...u,animate:f,custom:g,...p})})}).displayName="ScaleFade";var h={slideInBottom:{...d,custom:{offsetY:16,reverse:!0}},slideInRight:{...d,custom:{offsetX:16,reverse:!0}},scale:{...u,custom:{initialScale:.95,reverse:!0}},none:{}},m=(0,n.m)(s.E.section),x=e=>h[e||"none"],p=(0,o.forwardRef)((e,t)=>{let{preset:a,motionProps:n=x(a),...i}=e;return(0,c.jsx)(m,{ref:t,...n,...i})});p.displayName="ModalTransition";var v=a(65085),f=a(34151),g=(0,a(35059).G)((e,t)=>{let{className:a,children:i,containerProps:l,motionProps:s,...o}=e,{getDialogProps:d,getDialogContainerProps:u}=(0,f.vR)(),h=d(o,t),m=u(l),x=(0,r.cx)("chakra-modal__content",a),g=(0,f.I_)(),j={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:w}=(0,f.vR)();return(0,c.jsx)(v.M,{children:(0,c.jsx)(n.m.div,{...m,className:"chakra-modal__content-container",tabIndex:-1,__css:b,children:(0,c.jsx)(p,{preset:w,motionProps:s,className:x,...h,__css:j,children:i})})})});g.displayName="ModalContent"},23438:function(e,t,a){"use strict";a.d(t,{o:function(){return o}});var n=a(34151),i=a(86989),r=a(25432),l=a(35059),s=a(85893),o=(0,l.G)((e,t)=>{let{onClick:a,className:l,...o}=e,{onClose:c}=(0,n.vR)(),d=(0,r.cx)("chakra-modal__close-btn",l),u=(0,n.I_)();return(0,s.jsx)(i.P,{ref:t,__css:u.closeButton,className:d,onClick:(0,r.v0)(a,e=>{e.stopPropagation(),c()}),...o})});o.displayName="ModalCloseButton"}},function(e){e.O(0,[5481,7040,569,2108,5434,3284,6619,2888,9774,179],function(){return e(e.s=41067)}),_N_E=e.O()}]);
//# sourceMappingURL=stats-1a8f29ca59d9a855.js.map