1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/component.client-BWvFnpxt.js","assets/components-DZP3uNYy.js","assets/index-DlhJzqRw.js","assets/index-ZhkFHCHQ.js","assets/client-B3dlM9RU.js","assets/index-Cr9PnSxe.js","assets/index-BtSRx8Zj.js","assets/i18next-DyZISFPe.js","assets/component-DNVN2dqC.css"])))=>i.map(i=>d[i]); 2import{r as c,j as h,U as ke,X as Ud,E as hl,T as Bd,u as qd,w as Wd,Y as Jd}from"./components-DZP3uNYy.js";import{p as Oe,f as Gt,g as Gd,d as G,m as Xs,r as yn,B as So,h as Xd,j as qt,k as Tt,N as $e,E as Ys,l as qe,n as Yd,o as Kd,q as Qd,s as sa,v as ia,x as Ks,y as e0,z as t0,A as ml,C as n0,D as pl,F as aa,G as r0,H as o0,J as s0,K as i0,L as ca,M as a0,O as c0,Q as l0,R as Qs,u as le,U as u0,V as d0,W as Ss,P as f0,e as h0,I as m0}from"./index-DlhJzqRw.js";import{r as p0,D as ht}from"./index-ZhkFHCHQ.js";import{L as g0,a as v0,E as ei,g as y0,C as b0}from"./index-Cr9PnSxe.js";import{T as Ro,F as w0}from"./index-BtSRx8Zj.js";const x0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,144l-72,72L56,144Z",opacity:"0.2"}),c.createElement("path",{d:"M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"}))]]),_0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),k0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),c.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"}))]]),E0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),A0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V2
216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),c.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),S0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),c.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),R0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,116H152a12,12,0,0,1,0-24h24a12,12,0,0,1,0,24ZM104,92h-4V88a12,12,0,0,0-24,0v4H72a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM244.76,202.94a40,40,0,0,1-61,5.35,7,7,0,0,1-.53-.56L144.67,164H111.33L72.81,207.73c-.17.19-.35.38-.53.56A40,40,0,0,1,4.62,173.05a1.18,1.18,0,0,1,0-.2L21,88.79A63.88,63.88,0,0,1,83.88,36H172a64.08,64.08,0,0,1,62.93,52.48,1.8,1.8,0,0,1,0,.19l16.36,84.17a1.77,1.77,0,0,1,0,.2A39.74,39.74,0,0,1,244.76,202.94ZM172,140a40,40,0,0,0,0-80H83.89A39.9,39.9,0,0,0,44.62,93.06a1.55,1.55,0,0,0,0,.21l-16.34,84a16,16,0,0,0,13,18.44,16.07,16.07,0,0,0,13.86-4.21L96.9,144.07a12,12,0,0,1,9-4.07Zm55.76,37.31-7-35.95a63.84,63.84,0,0,1-44.27,22.46l24.41,27.72a16,16,0,0,0,26.85-14.23Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.86,207.57a28,28,0,0,1-24.66-7.77L150.09,152H172a51.94,51.94,0,0,0,51.2-61h0l16.36,84.17A28,28,0,0,1,216.86,207.57Z",opacity:"0.2"}),c.createElement("path",{d:"M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l
216.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.44,173.75a.68.68,0,0,0,0-.14L231.05,89.44c0-.06,0-.12,0-.18A60.08,60.08,0,0,0,172,40H83.89a59.88,59.88,0,0,0-59,49.52L8.58,173.61a.68.68,0,0,0,0,.14,36,36,0,0,0,60.9,31.71l.35-.37L109.52,160h37l39.71,45.09c.11.13.23.25.35.37A36.08,36.08,0,0,0,212,216a36,36,0,0,0,35.43-42.25ZM104,112H96v8a8,8,0,0,1-16,0v-8H72a8,8,0,0,1,0-16h8V88a8,8,0,0,1,16,0v8h8a8,8,0,0,1,0,16Zm40-8a8,8,0,0,1,8-8h24a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm84.37,87.47a19.84,19.84,0,0,1-12.9,8.23A20.09,20.09,0,0,1,198,194.31L167.8,160H172a60,60,0,0,0,51-28.38l8.74,45A19.82,19.82,0,0,1,228.37,191.47Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,110H152a6,6,0,0,1,0-12h24a6,6,0,0,1,0,12ZM104,98H94V88a6,6,0,0,0-12,0V98H72a6,6,0,0,0,0,12H82v10a6,6,0,0,0,12,0V110h10a6,6,0,0,0,0-12ZM239.84,199.5A34,34,0,0,1,212,214,34.11,34.11,0,0,1,188,204.05l-.26-.28L147.38,158H108.62L68.31,203.76,68,204A34,34,0,0,1,44,214a34,34,0,0,1-33.46-39.91s0-.06,0-.1L26.9,89.88A57.89,57.89,0,0,1,83.89,42H172a58.07,58.07,0,0,1,57.05,47.63c0,.07,0,.12,0,.19L245.46,174s0,.07,0,.11A33.75,33.75,0,0,1,239.84,199.5ZM172,146a46,46,0,0,0,0-92H83.89A45.9,45.9,0,0,0,38.71,92a.36.36,0,0,0,0,.1L22.33,176.23a22,22,0,0,0,37.11,19.45l42-47.65a6,6,0,0,1,4.5-2Zm61.67,30.23-9.79-50.35A58.06,58.06,0,0,1,172,158h-8.63l33.19,37.68a22,22,0,0,0,37.11-19.45Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,108H152a4,4,0,0,1,0-8h24a4,4,0,0,1,0,8Zm-72-8H92V88a4,4,0,0,0-8,0v12H72a4,4,0,0,0,0,8H84v12a4,4,0,0,0,8,0V108h12a4,4,0,0,0,0-8Zm134.21,98.36a32,32,0,0,1-48.84,4.27l-.17-.18L148.29,156H107.72L66.81,202.44l-.18.19A32.08,32.08,0,0,1,44,212a32,32,0,0,1-31.5-37.56L28.87,90.21A55.87,55.87,0,0,1,83.89,44H172a56.07,56.07,0,0,1,55.1,46.1.29.29,0,0,1,0,.1l16.37,84.16A31.86,31.86,0,0,1,238.21,198.36ZM172,148a48,48,0,1,0,0-96H83.9A47.9,47.9,0,0,0,36.74,91.67L20.36,175.9a24,24,0,0,0,19.48,27.73,24,24,0,0,0,21-6.58l42-47.69a4,4,0,0,1,3-1.36Zm63.63,27.83-11-56.66A56.09,56.09,0,0,1,172,156H159l36.16,41.06a24,24,0,0,0,40.52-21.23Z"}))]]),T0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),M0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H4
20a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z"}))]]),j0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,120a12,12,0,0,1-5.12,9.83l-40,28A12,12,0,0,1,104,148V92a12,12,0,0,1,18.88-9.83l40,28A12,12,0,0,1,168,120Zm68-56V176a28,28,0,0,1-28,28H48a28,28,0,0,1-28-28V64A28,28,0,0,1,48,36H208A28,28,0,0,1,236,64Zm-24,0a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4V176a4,4,0,0,0,4,4H208a4,4,0,0,0,4-4ZM160,216H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,48H48A16,16,0,0,0,32,64V176a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48ZM112,152V88l48,32Z",opacity:"0.2"}),c.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Zm-3.56-110.66-48-32A8,8,0,0,0,104,88v64a8,8,0,0,0,12.44,6.66l48-32a8,8,0,0,0,0-13.32ZM120,137.05V103l25.58,17Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-68,56a8,8,0,0,0-3.41-6.55l-40-28A8,8,0,0,0,108,92v56a8,8,0,0,0,12.59,6.55l40-28A8,8,0,0,0,164,120Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M163.33,115l-48-32A6,6,0,0,0,106,88v64a6,6,0,0,0,9.33,5l48-32a6,6,0,0,0,0-10ZM118,140.79V99.21L149.18,120ZM208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Zm-3.56-110.66-48-32A8,8,0,0,0,104,88v64a8,8,0,0,0,12.44,6.66l48-32a8,8,0,0,0,0-13.32ZM120,137.05V103l25.58,17Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M162.22,116.67l-48-32A4,4,0,0,0,108,88v64a4,4,0,0,0,2.11,3.53,4,4,0,0,0,4.11-.2l48-32a4,4,0,0,0,0-6.66ZM116,144.53V95.47L152.79,120ZM208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Z"}))]]),C0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,28H160a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h40a20,20,0,0,0,20-20V48A20,20,0,0,0,200,28Zm-4,176H164V52h32ZM96,28H56A20,20,0,0,0,36,48V208a20,20,0,0,0,20,20H96a20,20,0,0,0,20-20V48A20,20,0,0,0,96,28ZM92,204H60V52H92Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,48V208a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,208,48ZM96,40H56a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z",opacity:"0.2"}),c.createElement("path",{d:"M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,48V208a16,16,0,0,1-16,16H160a16,
216,0,0,1-16-16V48a16,16,0,0,1,16-16h40A16,16,0,0,1,216,48ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,34H160a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,200,34Zm2,174a2,2,0,0,1-2,2H160a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM96,34H56A14,14,0,0,0,42,48V208a14,14,0,0,0,14,14H96a14,14,0,0,0,14-14V48A14,14,0,0,0,96,34Zm2,174a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H96a2,2,0,0,1,2,2Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,36H160a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,200,36Zm4,172a4,4,0,0,1-4,4H160a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM96,36H56A12,12,0,0,0,44,48V208a12,12,0,0,0,12,12H96a12,12,0,0,0,12-12V48A12,12,0,0,0,96,36Zm4,172a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4Z"}))]]),N0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z",opacity:"0.2"}),c.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z"}))]]),L0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),c.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13
2-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),O0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),c.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),z0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),c.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,
2151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),$0=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),gl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:x0}));gl.displayName="ArrowDownIcon";const vl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:_0}));vl.displayName="ArrowUpIcon";const ti=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:k0}));ti.displayName="ArrowsClockwiseIcon";const yl=c.forwardRef((e,t)=>
2c.createElement(Oe,{ref:t,...e,weights:E0}));yl.displayName="ClockIcon";const bl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:A0}));bl.displayName="CopyIcon";const wl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:S0}));wl.displayName="DownloadSimpleIcon";const xl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:R0}));xl.displayName="GameControllerIcon";const To=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:T0}));To.displayName="InfoIcon";const P0=To,ni=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:M0}));ni.displayName="MinusIcon";const _l=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:j0}));_l.displayName="MonitorPlayIcon";const kl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:C0}));kl.displayName="PauseIcon";const ri=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:N0}));ri.displayName="PlayIcon";const El=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:L0}));El.displayName="StarIcon";const Al=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:O0}));Al.displayName="VideoCameraIcon";const Sl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:z0}));Sl.displayName="WarningIcon";const Rl=c.forwardRef((e,t)=>c.createElement(Oe,{ref:t,...e,weights:$0}));Rl.displayName="XIcon";function I0(e){return Gt(e.defaultTagName??"div",e,e)}const Tl=e=>h.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"link-external-icon",...e,children:[h.jsx("path",{d:"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15"}),h.jsx("path",{d:"M14 4H20M20 4V10M20 4L11 13"})]});Tl.displayName="Link.ExternalIcon";const Z0={variant:{inline:{classes:"text-kumo-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",description:"Inline text link that flows with content"},current:{classes:"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",description:"Link that inherits color from parent text"},plain:{classes:"text-kumo-link hover:text-kumo-link/70 transition-colors",description:"Link without underline decoration"}}},la={variant:"inline"};function D0({variant:e=la.variant}={}){return G(yn(Z0.variant,e,la.variant).classes)}const Ml=c.forwardRef(function({className:t,variant:n="inline",render:r,...o},s){const i=Gd();c.useEffect(()=>{"to"in o&&o.to!==void 0&&console.warn(`[kumo] Link: The \`to\` prop is deprecated. Use \`href\` instead. 3 4If your app uses a client-side router, configure a LinkProvider that 5maps \`href\` to your router's navigation prop. See: 6https://kumo.cfops.it/utilities/link-provider 7 8Migration example: 9 Before: <Link to="/page">â¦</Link> 10 After: <Link href="/page">â¦</Link>`)},[]);const a={"data-kumo-component":"Link",className:G(D0({variant:n}),"group/link inline-flex items-center gap-[0.1875em]")};return I0({render:r??h.jsx(i,{}),ref:s,props:Xs(a,o,{className:t})})});Ml.displayName="Link";const V0=Object.assign(Ml,{ExternalIcon:Tl}),Rs=c.createContext({variant:"default",size:"sm"}),F0={default:{accent:"var(--color-kumo-info)",secondary:"text-inherit ring-kumo-info/50 fill-kumo-info hover:!text-inherit hover:!ring-kumo-info/50 hover:bg-kumo-info/10",ghost:"text-inherit fill-kumo-info hover:bg-kumo-info/10"},alert:{accent:"var(--color-kumo-warning)",secondary:"text-inherit ring-kumo-warning/50 fill-kumo-warning hover:!text-inherit hover:!ring-kumo-warning/50 hover:bg-kumo-warning/10",ghost:"text-inherit fill-kumo-warning hover:bg-kumo-warning/10"},error:{accent:"var(--color-kumo-danger)",secondary:"text-inherit ring-kumo-danger/50 fill-kumo-danger hover:!text-inherit hover:!ring-kumo-danger/50 hover:bg-kumo-danger/10",ghost:"text-inherit fill-kumo-danger hover:bg-kumo-danger/10"},secondary:{accent:"var(--color-neutral-700, oklch(37.1% 0 0))",secondary:"text-inherit ring-kumo-focus/20 fill-kumo-subtle hover:!text-inherit hover:!ring-kumo-focus/20 hover:bg-kumo-contrast/10",ghost:"text-inherit fill-kumo-subtle hover:bg-kumo-contrast/10"}};function H0(e){return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${e}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${e}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${e}, white 15%)`,"--kumo-button-emphasis-gradient-end":e}}const jl=c.forwardRef(function({variant:t="primary",className:n,style:r,...o},s){const i=c.useContext(Rs),a=F0[i.variant];return h.jsx(So,{ref:s,variant:t==="secondary"?"outline":t,size:i.size,className:G(t!=="primary"&&a[t],n),style:t==="primary"?{...H0(a.accent),...r}:r,...o}
10)});jl.displayName="Banner.Action";const U0="flex w-full",Ts={variant:{default:{classes:"bg-kumo-info-tint text-kumo-info",iconClasses:"fill-kumo-info",description:"Informational banner for general messages"},alert:{classes:"bg-kumo-warning-tint text-kumo-warning",iconClasses:"fill-kumo-warning",description:"Warning banner for cautionary messages"},error:{classes:"bg-kumo-danger-tint text-kumo-danger",iconClasses:"fill-kumo-danger",description:"Error banner for critical issues"},secondary:{classes:"bg-kumo-contrast/5 text-kumo-default/70",iconClasses:"fill-kumo-interact",description:"Neutral banner for secondary messages"}},size:{base:{classes:"items-start gap-3 rounded-lg px-4 py-3 text-base",description:"Default banner size"},sm:{classes:"items-center gap-2 rounded-md px-3 py-2 text-sm",description:"Compact banner for dialogs and tight spaces"}}},hn={variant:"default",size:"base"},B0={base:{row:"gap-3",icon:"h-[1.375em]",description:"text-sm",action:"sm"},sm:{row:"gap-2",icon:"h-[1.25em]",description:"text-sm",action:"xs"}};function ua({variant:e=hn.variant,size:t=hn.size}={}){const n=yn(Ts.variant,e,hn.variant),r=yn(Ts.size,t,hn.size);return G(U0,n.classes,r.classes)}const Cl=c.forwardRef(function({icon:t,title:n,description:r,action:o,children:s,text:i,variant:a=hn.variant,size:l=hn.size,className:u,...m},d){const f=yn(Ts.variant,a,hn.variant),p=B0[l],g=l==="sm",b=g&&c.isValidElement(o)&&o.type===V0;if(n||r)return h.jsx(Rs.Provider,{value:{variant:a,size:p.action},children:h.jsxs("div",{ref:d,className:G(ua({variant:a,size:l}),u),...m,children:[t&&h.jsx("span",{className:G("flex shrink-0 items-center",p.icon,f.iconClasses),children:t}),h.jsxs("div",{className:G("flex min-w-0 flex-1 items-center justify-between",p.row,!n&&"pt-px"),children:[g?h.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5",children:[n&&h.jsxs("span",{className:"leading-snug font-medium",children:[n,!r&&b&&h.jsx("span",{className:"ml-1.5 [&_[data-kumo-component=Link]]:inline",children:o})]}),r&&h.jsxs("span",{className:G(p.description,"leading-snug"),children:[r,b&&h.jsx("span",{className:"ml-1.5 [&_[data-kumo-component=Link]]:inline",children:o})]})]}):h.jsxs("div",{className:"flex flex-col gap-0.5",children:[n&&h.jsx("p",{className:"leading-snug font-medium",children:n}),r&&h.jsx("div",{className:G(p.description,"leading-snug"),children:c.isValidElement(r)?r:h.jsx("p",{children:r})})]}),!b&&o!=null&&h.jsx("div",{className:"flex shrink-0 items-center gap-2",children:o})]})]})});const v=s??i,w=c.isValidElement(v)?v:h.jsx("p",{children:v});return h.jsx(Rs.Provider,{value:{variant:a,size:p.action},children:h.jsxs("div",{ref:d,className:G(ua({variant:a,size:l}),u),...m,children:[t&&h.jsx("span",{className:G("shrink-0",f.iconClasses),children:t}),w]})})});Cl.displayName="Banner";const Nl=Object.assign(Cl,{Action:jl});var da;const oi=Object.freeze({status:"aborted"});function T(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const u=i.prototype,m=Object.keys(u);for(let d=0;d<m.length;d++){const f=m[d];f in a||(a[f]=u[f].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var l;const u=n?.Parent?new s:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const m of u._zod.deferred)m();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Cn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ll extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(da=globalThis).__zod_globalConfig??(da.__zod_globalConfig={});const si=globalThis.__zod_globalConfig;function Mt(e){return si}function Ol(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Ms(e,t){return typeof t=="bigint"?t.toString():t}function ii(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ai(e){return e==null}function ci(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function q0(e,t){const n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const fa=Symbol("evaluating");function te(e,t,n){let r;
vendor: 4,713 bytes, line 10
10Object.defineProperty(e,t,{get(){if(r!==fa)return r===void 0&&(r=fa,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function xn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Xt(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ha(e){return JSON.stringify(e)}function W0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const zl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function so(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const J0=ii(()=>{if(si.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function zn(e){if(so(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(so(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function $l(e){return zn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const G0=new Set(["string","number","symbol"]);function $n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yt(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function X0(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Y0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function K0(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Xt(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return xn(this,"shape",i),i},checks:[]});return Yt(e,s)}function Q0(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Xt(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return xn(this,"shape",i),i},checks:[]});return Yt(e,s)}function ef(e,t){if(!zn(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Xt(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return xn(this,"shape",s),s}});return Yt(e,o)}function tf(e,t){if(!zn(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Xt(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return xn(this,"shape",r),r}});return Yt(e,n)}function nf(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Xt(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return xn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Yt(e,n)}function rf(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=Xt(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return xn(this,"shape",l),l},checks:[]});return Yt(t,i)}function of(e,t,n){const r=Xt(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return xn(this,"shape",s),s}});return Yt(t,r)}function Rn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}
10function sf(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Tn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Pr(e){return typeof e=="string"?e:e?.message}function jt(e,t,n){const r=e.message?e.message:Pr(e.inst?._zod.def?.error?.(e))??Pr(t?.error?.(e))??Pr(n.customError?.(e))??Pr(n.localeError?.(e))??"Invalid input",{inst:o,continue:s,input:i,...a}=e;return a.path??(a.path=[]),a.message=r,t?.reportInput&&(a.input=i),a}function li(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hr(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Pl(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function Il(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function af(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Pl(t+n)}function cf(e){return Il(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const Zl=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ms,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dl=T("$ZodError",Zl),Vl=T("$ZodError",Zl,{Parent:Error});function lf(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function uf(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<a.length;){const m=a[u];u===a.length-1?(l[m]=l[m]||{_errors:[]},l[m]._errors.push(t(i))):l[m]=l[m]||{_errors:[]},l=l[m],u++}}}};return r(e),n}const ui=e=>(t,n,r,o)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Cn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(l=>jt(l,s,Mt())));throw zl(a,o?.callee),a}return i.value},di=e=>async(t,n,r,o)=>{const s=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(l=>jt(l,s,Mt())));throw zl(a,o?.callee),a}return i.value},Mo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Cn;return s.issues.length?{success:!1,error:new(e??Dl)(s.issues.map(i=>jt(i,o,Mt())))}:{success:!0,data:s.value}},df=Mo(Vl),jo=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>jt(i,o,Mt())))}:{success:!0,data:s.value}},ff=jo(Vl),hf=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ui(e)(t,n,o)},mf=e=>(t,n,r)=>ui(e)(t,n,r),pf=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return di(e)(t,n,o)},gf=e=>async(t,n,r)=>di(e)(t,n,r),vf=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Mo(e)(t,n,o)},yf=e=>(t,n,r)=>Mo(e)(t,n,r),bf=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return jo(e)(t,n,o)},wf=e=>async(t,n,r)=>jo(e)(t,n,r),xf=/^[cC][0-9a-z]{6,}$/,_f=/^[0-9a-z]+$/,kf=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ef=/^[0-9a-vA-V]{20}$/,Af=/^[A-Za-z0-9]{27}$/,Sf=/^[a-zA-Z0-9_-]{21}$/,Rf=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tf=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ma=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Mf=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Cf(){return new RegExp(jf,"u")}const Nf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Lf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Of=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,zf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$f=/^$|^(?:[0-9a-zA-Z+/]{4}
vendor: 12,913 bytes, lines 10-12
10)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fl=/^[A-Za-z0-9_-]*$/,Pf=/^https?$/,If=/^\+[1-9]\d{6,14}$/,Hl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Zf=new RegExp(`^${Hl}$`);function Ul(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Df(e){return new RegExp(`^${Ul(e)}$`)}function Vf(e){const t=Ul({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Hl}T(?:${r})$`)}const Ff=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Hf=/^-?\d+$/,Bl=/^-?\d+(?:\.\d+)?$/,Uf=/^(?:true|false)$/i,Bf=/^[^A-Z]*$/,qf=/^[^a-z]*$/,He=T("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ql={number:"number",bigint:"bigint",object:"date"},Wl=T("$ZodCheckLessThan",(e,t)=>{He.init(e,t);const n=ql[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jl=T("$ZodCheckGreaterThan",(e,t)=>{He.init(e,t);const n=ql[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wf=T("$ZodCheckMultipleOf",(e,t)=>{He.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):q0(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Jf=T("$ZodCheckNumberFormat",(e,t)=>{He.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Y0[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,n&&(a.pattern=Hf)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Gf=T("$ZodCheckMaxLength",(e,t)=>{var n;He.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ai(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=li(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Xf=T("$ZodCheckMinLength",(e,t)=>{var n;He.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ai(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=li(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Yf=T("$ZodCheckLengthEquals",(e,t)=>{var n;He.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!ai(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=li(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Co=T("$ZodCheckStringFormat",(e,t)=>{var n,r;He.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Kf=T("$ZodCheckRegex",(e,t)=>{Co.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Qf=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Bf),Co.init(e,t)}),eh=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=qf),Co.init(e,t)}),th=T("$ZodCheckIncludes",(e,t)=>{He.init(e,t);const n=$n(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),nh=T("$ZodCheckStartsWith",(e,t)=>{He.init(e,t);const n=new RegExp(`^${$n(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),rh=T("$ZodCheckEndsWith",(e,t)=>{He.init(e,t);const n=new RegExp(`.*${$n(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),oh=T("$ZodCheckOverwrite",(e,t)=>{He.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class sh{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` 11`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(` 12`))}}const ih={major:4,minor:4,patch:3},ge=T("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ih;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,l)=>{let u=Rn(i),m;for(const d of a){if(d._zod.def.when){if(sf(i)||!d._zod.def.when(i))continue}else if(u)continue;const f=i.issues.length,p=d._zod.check(i);if(p instanceof Promise&&l?.async===!1)throw new Cn;if(m||p instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await p,i.issues.length!==f&&(u||(u=Rn(i,f)))});else{if(i.issues.length===f)continue;u||(u=Rn(i,f))}}return m?m.then(()=>i):i},s=(i,a,l)=>{if(Rn(i))return i.aborted=!0,i;const u=o(a,r,l);if(u instanceof Promise){if(l.async===!1)throw new Cn;return u.then(m=>e._zod.parse(m,l))}return e._zod.parse(u,l)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(m=>s(m,i,a)):s(u,i,a)}const l=e._zod.parse(i,a);if(l instanceof Promise){if(a.async===!1)throw new Cn;return l.then(u=>o(u,r,a))}return o(l,r,a)}}te(e,"~standard",()=>({validate:o=>{try{const s=df(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return ff(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),fi=T("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ff(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ye=T("$ZodStringFormat",(e,t)=>{Co.init(e,t),fi.init(e,t)}),ah=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Tf),ye.init(e,t)}),ch=T("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ma(r))}else t.pattern??(t.pattern=ma());ye.init(e,t)}),lh=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mf),ye.init(e,t)}),uh=T("$ZodURL",(e,t)=>{ye.init(e,t),e._zod.check=n=>{try{const r=n.value.trim();if(!t.normalize&&t.protocol?.source===Pf.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),dh=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Cf()),ye.init(e,t)}),fh=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Sf),ye.init(e,t)}),hh=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xf),ye.init(e,t)}),mh=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_f),ye.init(e,t)}),ph=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=kf),ye.init(e,t)}),gh=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ef),ye.init(e,t)}),vh=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Af),ye.init(e,t)}),yh=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Vf(t)),ye.init(e,t)}),bh=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Zf),ye.init(e,t)}),wh=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Df(t)),ye.init(e,t)}),xh=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Rf),ye.init(e,t)}),_h=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Nf),ye.init(e,t),e._zod.bag.format="ipv4"}),kh=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lf),ye.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Eh=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Of),ye.init(e,t)}),Ah=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=zf),ye.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Gl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Sh=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$f),ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Gl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Rh(e){if(!Fl.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");
12return Gl(n)}const Th=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Fl),ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Rh(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Mh=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=If),ye.init(e,t)});function jh(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Ch=T("$ZodJWT",(e,t)=>{ye.init(e,t),e._zod.check=n=>{jh(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Xl=T("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),Nh=T("$ZodNumberFormat",(e,t)=>{Jf.init(e,t),Xl.init(e,t)}),Lh=T("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=Uf,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),Oh=T("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),zh=T("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),$h=T("$ZodDate",(e,t)=>{ge.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const o=n.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),n}});function pa(e,t,n){e.issues.length&&t.issues.push(...Tn(n,e.issues)),t.value[n]=e.value}const Ph=T("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],l=t.element._zod.run({value:a,issues:[]},r);l instanceof Promise?s.push(l.then(u=>pa(u,n,i))):pa(l,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function io(e,t,n,r,o,s){const i=n in r;if(e.issues.length){if(o&&s&&!i)return;t.issues.push(...Tn(n,e.issues))}if(!i&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?i&&(t.value[n]=void 0):t.value[n]=e.value}function Yl(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=X0(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Kl(e,t,n,r,o,s){const i=[],a=o.keySet,l=o.catchall._zod,u=l.def.type,m=l.optin==="optional",d=l.optout==="optional";for(const f in t){if(f==="__proto__"||a.has(f))continue;if(u==="never"){i.push(f);continue}const p=l.run({value:t[f],issues:[]},r);p instanceof Promise?e.push(p.then(g=>io(g,n,f,t,m,d))):io(p,n,f,t,m,d)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const Ih=T("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=ii(()=>Yl(t));te(e._zod,"propValues",()=>{const a=t.shape,l={};for(const u in a){const m=a[u]._zod;if(m.values){l[u]??(l[u]=new Set);for(const d of m.values)l[u].add(d)}}return l});const o=so,s=t.catchall;let i;e._zod.parse=(a,l)=>{i??(i=r.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const m=[],d=i.shape;for(const f of i.keys){const p=d[f],g=p._zod.optin==="optional",b=p._zod.optout==="optional",v=p._zod.run({value:u[f],issues:[]},l);v instanceof Promise?m.push(v.then(w=>io(w,a,f,u,g,b))):io(v,a,f,u,g,b)}return s?Kl(m,u,a,l,r.value,e):m.length?Promise.all(m).then(()=>a):a}}),Zh=T("$ZodObjectJIT",(e,t)=>{Ih.init(e,t);const n=e._zod.parse,r=ii(()=>Yl(t)),o=f=>{const p=new sh(["shape","payload","ctx"]),g=r.value,b=y=>{const k=ha(y);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};p.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const y of g.keys)v[y]=`key_${w++}`;p.write("const newResult = {};");for(const y of g.keys){const k=v[y],x=ha(y),S=f[y],_=S?._zod?.optin==="optional",E=S?._zod?.optout==="optional";p.write(`const ${k} = ${b(y)};`),_&&E?p.write(` 13 if (${k}.issues.length) { 14 if (${x} in input) { 15 payload.issues = payload.issues.concat(${k}.issues.map(iss => ({ 16 ...iss, 17 path: iss.path ? [${x}, ...iss.path] : [${x}] 18 }))); 19 } 20 } 21 22 if (${k}.value === undefined) { 23 if (${x} in input) { 24 newResult[${x}] = undefined; 25 } 26 } else { 27 newResult[${x}] = ${k}.value; 28 } 29 30 `):_?p.write(` 31 if (${k}.issues.length) { 32 payload.issues = payload.issues.concat(${k}.issues.map(iss => ({ 33 ...iss, 34 path: iss.path ? [${x}, ...iss.path] : [${x}] 35 }))); 36 } 37 38 if (${k}.value === undefined) { 39 if (${x} in input) { 40 newResult[${x}] = undefined; 41 } 42 } else { 43 newResult[${x}] = ${k}.value; 44 } 45 46 `):p.write(` 47 const ${k}_present = ${x} in input; 48 if (${k}.issues.length) { 49 payload.issues = payload.issues.concat(${k}.issues.map(iss => ({ 50 ...iss, 51 path: iss.path ? [${x}, ...iss.path] : [${x}] 52 }))); 53 } 54 if (!${k}_present && !${k}.issues.length) { 55 payload.issues.push({
56 code: "invalid_type", 57 expected: "nonoptional", 58 input: undefined, 59 path: [${x}] 60 }); 61 } 62 63 if (${k}_present) { 64 if (${k}.value === undefined) { 65 newResult[${x}] = undefined; 66 } else { 67 newResult[${x}] = ${k}.value; 68 } 69 } 70 71 `)}p.write("payload.value = newResult;"),p.write("return payload;");const A=p.compile();return(y,k)=>A(f,y,k)};let s;const i=so,a=!si.jitless,u=a&&J0.value,m=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=r.value);const g=f.value;return i(g)?a&&u&&p?.async===!1&&p.jitless!==!0?(s||(s=o(t.shape)),f=s(f,p),m?Kl([],g,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function ga(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Rn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>jt(i,r,Mt())))}),t)}const Dh=T("$ZodUnion",(e,t)=>{ge.init(e,t),te(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),te(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),te(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),te(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>ci(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const i=[];for(const a of t.options){const l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)i.push(l),s=!0;else{if(l.issues.length===0)return l;i.push(l)}}return s?Promise.all(i).then(a=>ga(a,r,e,o)):ga(i,r,e,o)}}),Vh=T("$ZodIntersection",(e,t)=>{ge.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([l,u])=>va(n,l,u)):va(n,s,i)}});function js(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zn(e)&&zn(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=js(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=js(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function va(e,t,n){const r=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),Rn(e))return e;const i=js(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const Fh=T("$ZodRecord",(e,t)=>{ge.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!zn(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const m=t.keyType._zod.run({value:u,issues:[]},r);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(p=>jt(p,r,Mt())),input:u,path:[u],inst:e});continue}const d=m.value,f=t.valueType._zod.run({value:o[u],issues:[]},r);f instanceof Promise?s.push(f.then(p=>{p.issues.length&&n.issues.push(...Tn(u,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Tn(u,f.issues)),n.value[d]=f.value)}let l;for(const u in o)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(o)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let l=t.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");
vendor: 11,694 bytes, line 71
71if(typeof a=="string"&&Bl.test(a)&&l.issues.length){const d=t.keyType._zod.run({value:Number(a),issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){t.mode==="loose"?n.value[a]=o[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>jt(d,r,Mt())),input:a,path:[a],inst:e});continue}const m=t.valueType._zod.run({value:o[a],issues:[]},r);m instanceof Promise?s.push(m.then(d=>{d.issues.length&&n.issues.push(...Tn(a,d.issues)),n.value[l.value]=d.value})):(m.issues.length&&n.issues.push(...Tn(a,m.issues)),n.value[l.value]=m.value)}}return s.length?Promise.all(s).then(()=>n):n}}),Hh=T("$ZodEnum",(e,t)=>{ge.init(e,t);const n=Ol(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>G0.has(typeof o)).map(o=>typeof o=="string"?$n(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),Uh=T("$ZodLiteral",(e,t)=>{if(ge.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?$n(r):r?$n(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),Bh=T("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ll(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n.fallback=!0,n));if(o instanceof Promise)throw new Cn;return n.value=o,n.fallback=!0,n}});function ya(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ql=T("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),te(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ci(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>ya(i,o)):ya(s,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),qh=T("$ZodExactOptional",(e,t)=>{Ql.init(e,t),te(e._zod,"values",()=>t.innerType._zod.values),te(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Wh=T("$ZodNullable",(e,t)=>{ge.init(e,t),te(e._zod,"optin",()=>t.innerType._zod.optin),te(e._zod,"optout",()=>t.innerType._zod.optout),te(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ci(n.source)}|null)$`):void 0}),te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Jh=T("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>ba(s,t)):ba(o,t)}});function ba(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Gh=T("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Xh=T("$ZodNonOptional",(e,t)=>{ge.init(e,t),te(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>wa(s,e)):wa(o,e)}});function wa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Yh=T("$ZodCatch",(e,t)=>{ge.init(e,t),e._zod.optin="optional",te(e._zod,"optout",()=>t.innerType._zod.optout),te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>jt(i,r,Mt()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>jt(s,r,Mt()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Kh=T("$ZodPipe",(e,t)=>{ge.init(e,t),te(e._zod,"values",()=>t.in._zod.values),te(e._zod,"optin",()=>t.in._zod.optin),te(e._zod,"optout",()=>t.out._zod.optout),te(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Ir(i,t.in,r)):Ir(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Ir(s,t.out,r)):Ir(o,t.out,r)}});function Ir(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Qh=T("$ZodCodec",(e,t)=>{ge.init(e,t),te(e._zod,"values",()=>t.in._zod.values),te(e._zod,"optin",()=>t.in._zod.optin),te(e._zod,"optout",()=>t.out._zod.optout),te(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Zr(i,t,r)):Zr(s,t,r)}else{const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Zr(i,t,r)):Zr(s,t,r)}}});function Zr(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const o=t.transform(e.value,e);return o instanceof Promise?o.then(s=>Dr(e,s,t.out,n)):Dr(e,o,t.out,n)}else{const o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(s=>Dr(e,s,t.in,n)):Dr(e,o,t.in,n)}}function Dr(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}const e1=T("$ZodReadonly",(e,t)=>{ge.init(e,t),te(e._zod,"propValues",()=>t.innerType._zod.propValues),te(e._zod,"values",()=>t.innerType._zod.values),te(e._zod,"optin",()=>t.innerType?._zod?.optin),te(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(xa):xa(o)}});function xa(e){return e.value=Object.freeze(e.value),e}const t1=T("$ZodCustom",(e,t)=>{He.init(e,t),ge.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>_a(s,n,r,e));_a(o,n,r,e)}});function _a(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(hr(o))}}var ka;class n1{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function r1(){return new n1}(ka=globalThis).__zod_globalRegistry??(ka.__zod_globalRegistry=r1());const ir=globalThis.__zod_globalRegistry;function o1(e,t){return new e({type:"string",...Z(t)})}function s1(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function Ea(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function i1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function a1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function c1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function l1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(t)})}function u1(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}function d1(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function f1(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function h1(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function m1(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function p1(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function g1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function v1(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function y1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function b1(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function w1(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function x1(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function eu(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function tu(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function _1(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function k1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}function E1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function A1(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function S1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function R1(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function T1(e,t){return new e({type:"number",checks:[],...Z(t)})}function M1(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}function j1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function C1(e,t){return new e({type:"boolean",...Z(t)})}function N1(e){return new e({type:"unknown"})}function L1(e,t){return new e({type:"never",...Z(t)})}function O1(e,t){return new e({type:"date",...Z(t)})}function Aa(e,t){return new Wl({check:"less_than",...Z(t),value:e,inclusive:!1})}function Qr(e,t){return new Wl({check:"less_than",...Z(t),value:e,inclusive:!0})}function Sa(e,t){return new Jl({check:"greater_than",...Z(t),value:e,inclusive:!1})}function eo(e,t){return new Jl({check:"greater_than",...Z(t),value:e,inclusive:!0})}function Ra(e,t){return new Wf({check:"multiple_of",...Z(t),value:e})}function nu(e,t){return new Gf({check:"max_length",...Z(t),maximum:e})}function ao(e,t){return new Xf({check:"min_length",...Z(t),minimum:e})}function ru(e,t){return new Yf({check:"length_equals",...Z(t),length:e})}function z1(e,t){return new Kf({check:"string_format",format:"regex",...Z(t),pattern:e})}function $1(e){return new Qf({check:"string_format",format:"lowercase",...Z(e)})}
vendor: 4,146 bytes, lines 71-73
71function P1(e){return new eh({check:"string_format",format:"uppercase",...Z(e)})}function I1(e,t){return new th({check:"string_format",format:"includes",...Z(t),includes:e})}function Z1(e,t){return new nh({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function D1(e,t){return new rh({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function Bn(e){return new oh({check:"overwrite",tx:e})}function V1(e){return Bn(t=>t.normalize(e))}function F1(){return Bn(e=>e.trim())}function H1(){return Bn(e=>e.toLowerCase())}function U1(){return Bn(e=>e.toUpperCase())}function B1(){return Bn(e=>W0(e))}function q1(e,t,n){return new e({type:"array",element:t,...Z(n)})}function W1(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Z(n)})}function J1(e,t){const n=G1(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(hr(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(hr(s))}},e(r.value,r)),t);return n}function G1(e,t){const n=new He({check:"custom",...Z(t)});return n._zod.check=e,n}function ou(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ir,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ae(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,m);else{const f=i.schema,p=t.processors[o.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);p(e,t,f,m)}const d=e._zod.parent;d&&(i.ref||(i.ref=d),Ae(d,t,m),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(i.schema,l),t.io==="input"&&ze(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function su(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const a=e.metadataRegistry.get(i[0])?.id;if(a){const l=r.get(a);if(l&&l!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,i[0])}}const o=i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(i[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};const p=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(i[1]===n)return{ref:"#"};const u=`#/${a}/`,m=i[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:u+m}},s=i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:l,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const m=a.schema;for(const d in m)delete m[d];m.$ref=l};if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root> 72 73Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(t===i[0]){s(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&e.reused==="ref"){s(i);continue}}}function iu(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=a=>{const l=e.seen.get(a);if(l.ref===null)return;const u=l.def??l.schema,m={...u},d=l.ref;
73if(l.ref=null,d){r(d);const p=e.seen.get(d),g=p.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(g)):Object.assign(u,g),Object.assign(u,m),a._zod.parent===d)for(const v in u)v==="$ref"||v==="allOf"||v in m||delete u[v];if(g.$ref&&p.def)for(const v in u)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(u[v])===JSON.stringify(p.def[v])&&delete u[v]}const f=a._zod.parent;if(f&&f!==d){r(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const g in u)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(u[g])===JSON.stringify(p.def[g])&&delete u[g]}e.override({zodSchema:a,jsonSchema:u,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())r(a[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,n.def??n.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&o.id===s&&delete o.id;const i=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,i[l.defId]=l.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:co(t,"input",e.processors),output:co(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function ze(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ze(r.element,n);if(r.type==="set")return ze(r.valueType,n);if(r.type==="lazy")return ze(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ze(r.innerType,n);if(r.type==="intersection")return ze(r.left,n)||ze(r.right,n);if(r.type==="record"||r.type==="map")return ze(r.keyType,n)||ze(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ze(r.in,n)||ze(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ze(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ze(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ze(o,n))return!0;return!!(r.rest&&ze(r.rest,n))}return!1}const X1=(e,t={})=>n=>{const r=ou({...n,processors:t});return Ae(e,r),su(r,e),iu(r,e)},co=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=ou({...o??{},target:s,io:t,processors:n});return Ae(e,i),su(i,e),iu(i,e)},Y1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},K1=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=Y1[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){const m=[...l];m.length===1?o.pattern=m[0].source:m.length>1&&(o.allOf=[...m.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Q1=(e,t,n,r)=>{const o=n,{minimum:s,maximum:i,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:m}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number";const d=typeof m=="number"&&m>=(s??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(o.minimum=m,o.exclusiveMinimum=!0):o.exclusiveMinimum=m:typeof s=="number"&&(o.minimum=s),f?p?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u:typeof i=="number"&&(o.maximum=i),typeof l=="number"&&(o.multipleOf=l)},em=(e,t,n,r)=>{n.type="boolean"},tm=(e,t,n,r)=>{n.not={}},nm=(e,t,n,r)=>{},rm=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},om=(e,t,n,r)=>
vendor: 3,798 bytes, line 73
73{const o=e._zod.def,s=Ol(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},sm=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),s.every(i=>typeof i=="boolean")&&(n.type="boolean"),s.every(i=>i===null)&&(n.type="null"),n.enum=s},im=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},am=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cm=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Ae(s.element,t,{...r,path:[...r.path,"items"]})},lm=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const u in i)o.properties[u]=Ae(i[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(i)),l=new Set([...a].filter(u=>{const m=s.shape[u]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));l.size>0&&(o.required=Array.from(l)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ae(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},um=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,l)=>Ae(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=i:n.anyOf=i},dm=(e,t,n,r)=>{const o=e._zod.def,s=Ae(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ae(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=l},fm=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const i=s.keyType,l=i._zod.bag?.patterns;if(s.mode==="loose"&&l&&l.size>0){const m=Ae(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const d of l)o.patternProperties[d.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ae(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Ae(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=i._zod.values;if(u){const m=[...u].filter(d=>typeof d=="string"||typeof d=="number");m.length>0&&(o.required=m)}},hm=(e,t,n,r)=>{const o=e._zod.def,s=Ae(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},mm=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},pm=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},gm=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},vm=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},ym=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?s?o.out:o.in:o.out;Ae(i,t,r);const a=t.seen.get(e);a.ref=i}
vendor: 5,054 bytes, line 73
73,bm=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},au=(e,t,n,r)=>{const o=e._zod.def;Ae(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},wm=T("ZodISODateTime",(e,t)=>{yh.init(e,t),we.init(e,t)});function cu(e){return E1(wm,e)}const xm=T("ZodISODate",(e,t)=>{bh.init(e,t),we.init(e,t)});function _m(e){return A1(xm,e)}const km=T("ZodISOTime",(e,t)=>{wh.init(e,t),we.init(e,t)});function Em(e){return S1(km,e)}const Am=T("ZodISODuration",(e,t)=>{xh.init(e,t),we.init(e,t)});function Sm(e){return R1(Am,e)}const Rm=(e,t)=>{Dl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>uf(e,n)},flatten:{value:n=>lf(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ms,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ms,2)}},isEmpty:{get(){return e.issues.length===0}}})},et=T("ZodError",Rm,{Parent:Error}),Tm=ui(et),Mm=di(et),jm=Mo(et),Cm=jo(et),Nm=hf(et),Lm=mf(et),Om=pf(et),zm=gf(et),$m=vf(et),Pm=yf(et),Im=bf(et),Zm=wf(et),Ta=new WeakMap;function wr(e,t,n){const r=Object.getPrototypeOf(e);let o=Ta.get(r);if(o||(o=new Set,Ta.set(r,o)),!o.has(t)){o.add(t);for(const s in n){const i=n[s];Object.defineProperty(r,s,{configurable:!0,enumerable:!1,get(){const a=i.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}const be=T("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:co(e,"input"),output:co(e,"output")}}),e.toJSONSchema=X1(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Tm(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>jm(e,n,r),e.parseAsync=async(n,r)=>Mm(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Cm(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Nm(e,n,r),e.decode=(n,r)=>Lm(e,n,r),e.encodeAsync=async(n,r)=>Om(e,n,r),e.decodeAsync=async(n,r)=>zm(e,n,r),e.safeEncode=(n,r)=>$m(e,n,r),e.safeDecode=(n,r)=>Pm(e,n,r),e.safeEncodeAsync=async(n,r)=>Im(e,n,r),e.safeDecodeAsync=async(n,r)=>Zm(e,n,r),wr(e,"ZodType",{check(...n){const r=this.def;return this.clone(Xt(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Yt(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Op(n,r))},superRefine(n,r){return this.check(zp(n,r))},overwrite(n){return this.check(Bn(n))},optional(){return Oa(this)},exactOptional(){return xp(this)},nullable(){return za(this)},nullish(){return Oa(za(this))},nonoptional(n){return Rp(this,n)},array(){return Ct(this)},or(n){return Wt([this,n])},and(n){return mp(this,n)},transform(n){return $a(this,bp(n))},default(n){return Ep(this,n)},prefault(n){return Sp(this,n)},catch(n){return Mp(this,n)},pipe(n){return $a(this,n)},readonly(){return Np(this)},describe(n){const r=this.clone();return ir.add(r,{description:n}),r},meta(...n){if(n.length===0)return ir.get(this);const r=this.clone();return ir.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return ir.get(e)?.description},configurable:!0}),e)),lu=T("_ZodString",(e,t)=>{fi.init(e,t),be.init(e,t),e._zod.processJSONSchema=(r,o,s)=>K1(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,wr(e,"_ZodString",{regex(...r){return this.check(z1(...r))},includes(...r){return this.check(I1(...r))},startsWith(...r){return this.check(Z1(...r))},endsWith(...r){return this.check(D1(...r))},min(...r){return this.check(ao(...r))},max(...r){return this.check(nu(...r))},length(...r){return this.check(ru(...r))},nonempty(...r){return this.check(ao(1,...r))},lowercase(r){return this.check($1(r))},uppercase(r){return this.check(P1(r))},trim(){return this.check(F1())},normalize(...r){return this.check(V1(...r))},toLowerCase(){return this.check(H1())},toUpperCase(){return this.check(U1())},slugify(){return this.check(B1())}})}),Dm=T("ZodString",(e,t)=>{fi.init(e,t),lu.init(e,t),e.email=n=>e.check(s1(Vm,n)),e.url=n=>e.check(u1(Fm,n)),e.jwt=n=>e.check(k1(rp,n)),e.emoji=n=>e.check(d1(Hm,n)),e.guid=n=>e.check(Ea(Ma,n)),e.uuid=n=>e.check(i1(Vr,n)),e.uuidv4=n=>e.check(a1(Vr,n)),e.uuidv6=n=>e.check(c1(Vr,n)),e.uuidv7=n=>e.check(l1(Vr,n)),e.nanoid=n=>e.check(f1(Um,n)),e.guid=n=>e.check(Ea(Ma,n)),e.cuid=n=>e.check(h1(Bm,n)),e.cuid2=n=>e.check(m1(qm,n)),e.ulid=n=>e.check(p1(Wm,n)),e.base64=n=>e.check(eu(uu,n)),e.base64url=n=>e.check(tu(du,n)),e.xid=n=>e.check(g1(Jm,n)),e.ksuid=n=>e.check(v1(Gm,n)),e.ipv4=n=>e.check(y1(Xm,n)),e.ipv6=n=>e.check(b1(Ym,n)),e.cidrv4=n=>e.check(w1(Km,n)),e.cidrv6=n=>e.check(x1(Qm,n)),e.e164=n=>e.check(_1(np,n)),e.datetime=n=>e.check(cu(n)),e.date=n=>e.check(_m(n)),e.time=n=>e.check(Em(n)),e.duration=n=>
73e.check(Sm(n))});function Te(e){return o1(Dm,e)}const we=T("ZodStringFormat",(e,t)=>{ye.init(e,t),lu.init(e,t)}),Vm=T("ZodEmail",(e,t)=>{lh.init(e,t),we.init(e,t)}),Ma=T("ZodGUID",(e,t)=>{ah.init(e,t),we.init(e,t)}),Vr=T("ZodUUID",(e,t)=>{ch.init(e,t),we.init(e,t)}),Fm=T("ZodURL",(e,t)=>{uh.init(e,t),we.init(e,t)}),Hm=T("ZodEmoji",(e,t)=>{dh.init(e,t),we.init(e,t)}),Um=T("ZodNanoID",(e,t)=>{fh.init(e,t),we.init(e,t)}),Bm=T("ZodCUID",(e,t)=>{hh.init(e,t),we.init(e,t)}),qm=T("ZodCUID2",(e,t)=>{mh.init(e,t),we.init(e,t)}),Wm=T("ZodULID",(e,t)=>{ph.init(e,t),we.init(e,t)}),Jm=T("ZodXID",(e,t)=>{gh.init(e,t),we.init(e,t)}),Gm=T("ZodKSUID",(e,t)=>{vh.init(e,t),we.init(e,t)}),Xm=T("ZodIPv4",(e,t)=>{_h.init(e,t),we.init(e,t)}),Ym=T("ZodIPv6",(e,t)=>{kh.init(e,t),we.init(e,t)}),Km=T("ZodCIDRv4",(e,t)=>{Eh.init(e,t),we.init(e,t)}),Qm=T("ZodCIDRv6",(e,t)=>{Ah.init(e,t),we.init(e,t)}),uu=T("ZodBase64",(e,t)=>{Sh.init(e,t),we.init(e,t)});function ep(e){return eu(uu,e)}const du=T("ZodBase64URL",(e,t)=>{Th.init(e,t),we.init(e,t)});function tp(e){return tu(du,e)}const np=T("ZodE164",(e,t)=>{Mh.init(e,t),we.init(e,t)}),rp=T("ZodJWT",(e,t)=>{Ch.init(e,t),we.init(e,t)}),hi=T("ZodNumber",(e,t)=>{Xl.init(e,t),be.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Q1(e,r,o),wr(e,"ZodNumber",{gt(r,o){return this.check(Sa(r,o))},gte(r,o){return this.check(eo(r,o))},min(r,o){return this.check(eo(r,o))},lt(r,o){return this.check(Aa(r,o))},lte(r,o){return this.check(Qr(r,o))},max(r,o){return this.check(Qr(r,o))},int(r){return this.check(ja(r))},safe(r){return this.check(ja(r))},positive(r){return this.check(Sa(0,r))},nonnegative(r){return this.check(eo(0,r))},negative(r){return this.check(Aa(0,r))},nonpositive(r){return this.check(Qr(0,r))},multipleOf(r,o){return this.check(Ra(r,o))},step(r,o){return this.check(Ra(r,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Q(e){return T1(hi,e)}const op=T("ZodNumberFormat",(e,t)=>{Nh.init(e,t),hi.init(e,t)});function ja(e){return j1(op,e)}const sp=T("ZodBoolean",(e,t)=>{Lh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>em(e,n,r)});function Ca(e){return C1(sp,e)}const ip=T("ZodUnknown",(e,t)=>{Oh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nm()});function Na(){return N1(ip)}const ap=T("ZodNever",(e,t)=>{zh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tm(e,n,r)});function cp(e){return L1(ap,e)}const lp=T("ZodDate",(e,t)=>{$h.init(e,t),be.init(e,t),e._zod.processJSONSchema=(r,o,s)=>rm(e,r),e.min=(r,o)=>e.check(eo(r,o)),e.max=(r,o)=>e.check(Qr(r,o));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function No(e){return O1(lp,e)}const up=T("ZodArray",(e,t)=>{Ph.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cm(e,n,r,o),e.element=t.element,wr(e,"ZodArray",{min(n,r){return this.check(ao(n,r))},nonempty(n){return this.check(ao(1,n))},max(n,r){return this.check(nu(n,r))},length(n,r){return this.check(ru(n,r))},unwrap(){return this.element}})});function Ct(e,t){return q1(up,e,t)}const dp=T("ZodObject",(e,t)=>{Zh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lm(e,n,r,o),te(e,"shape",()=>t.shape),wr(e,"ZodObject",{keyof(){return gp(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Na()})},loose(){return this.clone({...this._zod.def,catchall:Na()})},strict(){return this.clone({...this._zod.def,catchall:cp()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return ef(this,n)},safeExtend(n){return tf(this,n)},merge(n){return nf(this,n)},pick(n){return K0(this,n)},omit(n){return Q0(this,n)},partial(...n){return rf(fu,this,n[0])},required(...n){return of(hu,this,n[0])}})});function xe(e,t){const n={type:"object",shape:e??{},...Z(t)};return new dp(n)}const fp=T("ZodUnion",(e,t)=>{Dh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>um(e,n,r,o),e.options=t.options});function Wt(e,t){return new fp({type:"union",options:e,...Z(t)})}const hp=T("ZodIntersection",(e,t)=>{Vh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dm(e,n,r,o)});function mp(e,t){return new hp({type:"intersection",left:e,right:t})}const La=T("ZodRecord",(e,t)=>{Fh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fm(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function pp(e,t,n){return!t||!t._zod?new La({type:"record",keyType:Te(),valueType:e,...Z(t)}):new La({type:"record",keyType:e,valueType:t,...Z(n)})}const Cs=T("ZodEnum",(e,t)=>{Hh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(r,o,s)=>om(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Cs({...t,checks:[],...Z(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Cs({...t,checks:[],...Z(o),entries:s})}});function gp(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Cs({type:"enum",entries:n,...Z(t)})}const vp=T("ZodLiteral",(e,t)=>{Uh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sm(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
73(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ut(e,t){return new vp({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}const yp=T("ZodTransform",(e,t)=>{Bh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>am(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ll(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(hr(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(hr(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function bp(e){return new yp({type:"transform",transform:e})}const fu=T("ZodOptional",(e,t)=>{Ql.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>au(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oa(e){return new fu({type:"optional",innerType:e})}const wp=T("ZodExactOptional",(e,t)=>{qh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>au(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function xp(e){return new wp({type:"optional",innerType:e})}const _p=T("ZodNullable",(e,t)=>{Wh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function za(e){return new _p({type:"nullable",innerType:e})}const kp=T("ZodDefault",(e,t)=>{Jh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ep(e,t){return new kp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$l(t)}})}const Ap=T("ZodPrefault",(e,t)=>{Gh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Sp(e,t){return new Ap({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$l(t)}})}const hu=T("ZodNonOptional",(e,t)=>{Xh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Rp(e,t){return new hu({type:"nonoptional",innerType:e,...Z(t)})}const Tp=T("ZodCatch",(e,t)=>{Yh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Mp(e,t){return new Tp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const mu=T("ZodPipe",(e,t)=>{Kh.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ym(e,n,r,o),e.in=t.in,e.out=t.out});function $a(e,t){return new mu({type:"pipe",in:e,out:t})}const jp=T("ZodCodec",(e,t)=>{mu.init(e,t),Qh.init(e,t)});function Lo(e,t,n){return new jp({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Cp=T("ZodReadonly",(e,t)=>{e1.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bm(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Np(e){return new Cp({type:"readonly",innerType:e})}const Lp=T("ZodCustom",(e,t)=>{t1.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,r,o)=>im(e,n)});function Op(e,t={}){return W1(Lp,e,t)}function zp(e,t){return J1(e,t)}function $p(e){return M1(hi,e)}const Fr="https://swift-daisy-8392.pages.dev",Pp={autoStart:!0,downloadApiUrl:`${Fr}/__down`,uploadApiUrl:`${Fr}/__up`,logMeasurementApiUrl:null,logAimApiUrl:`${Fr}/__results`,turnServerUri:"turn.swift-daisy-8392.pages.dev:50000",turnServerCredsApiUrl:`${Fr}/turn-creds`,turnServerUser:null,turnServerPass:null,rpkiInvalidHost:"invalid.rpki.cloudflare.com",includeCredentials:!1,sessionId:void 0,authorizationToken:null,authorizationEnabled:void 0,allowInsecureAuthorizationToken:!1,measurements:[{type:"latency",numPackets:2},{type:"download",bytes:1e5,count:1,bypassMinDuration:!0},{type:"latency",numPackets:20},{type:"download",bytes:1e5,count:9},{type:"latency",numPackets:2},{type:"download",bytes:1e6,count:8},{type:"latency",numPackets:2},{type:"upload",bytes:1e5,count:8},{type:"latency",numPackets:2},{type:"packetLoss",numPackets:1e3,batchSize:10,batchWaitTime:10,responsesWaitTime:3e3},{type:"upload",bytes:1e6,count:6},{type:"latency",numPackets:2},{type:"download",bytes:1e7,count:6},{type:"latency",numPackets:2},{type:"upload",bytes:1e7,count:4},{type:"latency",numPackets:2},{type:"download",bytes:25e6,count:4},{type:"latency",numPackets:2},{type:"upload",bytes:25e6,count:4},{type:"latency",numPackets:2},{type:"download",bytes:1e8,count:3},{type:"latency",numPackets:2},{type:"upload",bytes:5e7,count:3},{type:"latency",numPackets:2},{type:"download",bytes:25e7,count:2}],measureDownloadLoadedLatency:!0,measureUploadLoadedLatency:!0,loadedLatencyThrottle:400,bandwidthFinishRequestDuration:1e3,estimatedServerTime:0,bandwidthAbortRequestDuration:0,latencyPercentile:.5,bandwidthPercentile:.9,bandwidthMinRequestDuration:10,loadedRequestMinDuration:250,loadedLatencyMaxPoints:20},dn=(e,t)=>n=>{let r=0;for(;r<e.length&&n>=e[r];)r++;return t[r]},Ip={aimMeasurementScoring:{packetLoss:dn([.01,.05,.25,.5],[10,5,0,-10,-20]),latency:dn([10,20,50,100,500],[20,10,5,0,-10,-20]),loadedLatencyIncrease:dn([10,20,50,100,500],[20,10,5,0,-10,-20]),jitter:dn([10,20,100,500],[10,5,0,-10,-20]),download:dn([1e6,1e7,5e7,1e8],[0,5,10,20,30]),upload:dn([1e6,1e7,5e7,1e8],[0,5,10,20,30])},aimExperiencesDefs:{streaming:{input:["latency","packetLoss","download","loadedLatencyIncrease"],pointThresholds:[15,20,40,60]},gaming:{input:["latency","packetLoss","loadedLatencyIncrease"],pointThresholds:[5,15,25,30]},rtc:{input:["latency","jitter","packetLoss","loadedLatencyIncrease"],pointThresholds:[5,15,25,40]}}},Zp=e=>{try{return new URL(e).protocol==="https:"}catch{try{return new URL(e,window.location.origin).protocol==="https:"}catch{return!1}}},Pa=new WeakSet,Dp=e=>{Pa.has(e)||(Pa.add(e),console.warn("Sending the authorization token to an endpoint that is not known to be secure, because allowInsecureAuthorizationToken is enabled. Do not enable this outside local development: the server treats a token seen over plaintext as compromised and revokes it."))}
73,xr=(e,t,n)=>{if(!t?.enabled||!n)return e;const r=t.token?.trim();if(!r)return e;if(!Zp(n)){if(!t.allowInsecure)return e;Dp(t)}const o=new Headers(e.headers);return o.set("Authorization",`Bearer ${r}`),{...e,headers:Object.fromEntries(o)}},Ia=3;var Go=class extends Error{status;retryAfter;constructor(e,t,n){super(t),this.status=e,this.retryAfter=n}};const Vp=e=>{if(!e)return 5e3;const t=Number(e);if(Number.isFinite(t)&&t>=0)return t*1e3;const n=Date.parse(e);return Number.isNaN(n)?5e3:Math.max(0,n-Date.now())},Za=.01,Fp=15,Hp=150,Da=.75,Up=e=>{const t=e.headers.get("server-timing");if(!t)return;const n=t.match(/(?:^|,\s*)cfReq(?:uest)?Dur(?:ation)?;\s*dur=([0-9.]+)/i);if(n&&+n[1]>Za)return+n[1];let r=0;for(const o of t.matchAll(/(?:^|,\s*)cfSpeed[a-zA-Z]*;\s*dur=([0-9.]+)/gi))r+=+o[1];if(r>Za)return r},Bp=e=>e.responseStart-e.requestStart,qp=e=>e.responseEnd-e.responseStart,Wp=({ping:e,payloadDownloadTime:t})=>e+t,Jp=({ttfb:e})=>e,Gp=({duration:e,transferSize:t},n)=>{const r=8*(t||+n*1.005),o=e/1e3;return o?r/o:void 0},Xp=({duration:e},t)=>{const n=8*t*1.005,r=e/1e3;return r?n/r:void 0},Yp=(()=>{const e=new Map;return t=>(e.has(t)||e.set(t,"0".repeat(t)),e.get(t))})();var Va=class{constructor(e,{downloadApiUrl:t,uploadApiUrl:n,throttleMs:r=0,estimatedServerTime:o=0,serverTimeDelta:s=0,authorization:i=null}={}){if(!e)throw new Error("Missing measurements argument");if(!t)throw new Error("Missing downloadApiUrl argument");if(!n)throw new Error("Missing uploadApiUrl argument");this.#d=e,this.#w=t,this.#x=n,this.#_=r,this.#k=Math.max(0,o),this.#s=Math.max(0,s),this.#S=i}get results(){return this.#v}get serverTimeDelta(){return this.#s}#e={};get qsParams(){return this.#e}set qsParams(e){this.#e=e}#r={};get fetchOptions(){return this.#r}set fetchOptions(e){this.#r=e}finishRequestDuration=1e3;abortRequestDuration=0;getServerTime=Up;#t=()=>{};set responseHook(e){this.#t=e}#n=()=>{};set onRunningChange(e){this.#n=e}#o=()=>{};set onNewMeasurementStarted(e){this.#o=e}#c=()=>{};set onMeasurementResult(e){this.#c=e}#a=()=>{};set onFinished(e){this.#a=e}#i=()=>{};set onConnectionError(e){this.#i=e}pause(){this.#h!==void 0&&(clearTimeout(this.#h),this.#h=void 0),this.#T("pause()"),this.#A(!1)}play(){!this.#g&&!this.#f&&(this.#A(!0),this.#E())}#d;#w;#x;#f=!1;#g=!1;#l={down:!1,up:!1};#v={down:{},up:{}};#u=0;#p=0;#y=0;#h;#b=-1/0;#_=0;#k=0;#s=0;#S=null;#m=void 0;#A(e){e!==this.#f&&(this.#f=e,setTimeout(()=>this.#n(this.#f))),e||this.#m?.abort("setRunning(false)")}#R(e,t){const{bytes:n,dir:r}=this.#d[e],o=this.#v,s=o[r].hasOwnProperty(n)?o[r][n]:{timings:[],numMeasurements:this.#d.filter(({bytes:i,dir:a})=>n===i&&r===a).map(i=>i.count).reduce((i,a)=>i+a,0)};t&&s.timings.push(t),s.timings=s.timings.slice(-s.numMeasurements),o[r][n]=s,t?setTimeout(()=>{this.#c({type:r,bytes:n,...t},o)}):this.#o(this.#d[e],o)}#E(){const e=this.#d;let t=e[this.#u];if(this.#p>=t.count){const f=this.#l;if(this.#b>this.finishRequestDuration&&!t.bypassMinDuration){const p=t.dir;this.#l[p]=!0,Object.values(this.#l).every(g=>g)&&this.#a(this.#v)}this.#p=0,this.#b=-1/0,performance.clearResourceTimings();do this.#u+=1;while(this.#u<e.length&&f[e[this.#u].dir]);if(this.#u>=e.length){this.#l={down:!0,up:!0},this.#A(!1),this.#a(this.#v);return}t=e[this.#u]}const n=this.#u;this.#p===0&&this.#R(n);const{bytes:r,dir:o}=t,s=o==="down",i=s?this.#w:this.#x,a=Object.assign({},this.#e);a.bytes=`${r}`;const l=new URL(i,window.location.origin);Object.entries(a).forEach(([f,p])=>l.searchParams.set(f,p));const u=l.href,m=xr(Object.assign({},s?{}:{method:"POST",body:Yp(r)},this.#r),this.#S,u);if((this.#y===0||!this.#m||this.#m.signal.aborted)&&(this.#m?.abort("restarting engine"),this.#m=new AbortController,this.abortRequestDuration)){const f=setTimeout(()=>{const p=`${s?"Download":"Upload"} measurement of ${r} bytes aborted. Measurement exceeded bandwidthAbortRequestDuration (${this.abortRequestDuration}ms)`;this.#y=0,this.pause(),this.#g=!0,this.#i(p)},this.abortRequestDuration);this.#m.signal.addEventListener("abort",()=>clearTimeout(f))}let d;fetch(u,{...m,signal:this.#m.signal}).then(f=>{if(f.ok)return f;throw new Go(f.status,f.statusText,f.headers.get("retry-after"))}).then(f=>(this.getServerTime&&(d=this.getServerTime(f)),f)).then(f=>f.text().then(p=>(this.#t({url:u,headers:f.headers,body:p}),p))).then(()=>{const f=performance.getEntriesByName(u).slice(-1)[0],p={transferSize:f.transferSize,ttfb:Bp(f),payloadDownloadTime:qp(f),serverTime:d||-1,measTime:new Date,ping:0,duration:0,bps:void 0};let g=0;f.secureConnectionStart>
73f.connectStart?g=f.secureConnectionStart-f.connectStart:g=f.connectEnd-f.connectStart;const b=f.nextHopProtocol.match(/([0-9.]+)/),v=b?+b[1]:0;if(d&&g&&v>0&&v<2){const k=Math.max(0,p.ttfb-g)-d;k>0&&k<=Fp&&k<=d&&d<=Hp?(this.#s=this.#s*(1-Da)+k*Da,console.log(`serverTimeDelta (estimated): ${this.#s.toFixed(2)}ms`)):k>0&&console.log(`serverTimeDelta (skipped): ${k.toFixed(2)}ms`)}const w=d||this.#k;p.ping=p.ttfb-w-this.#s,p.ping<=1&&(p.ping=Math.max(0,p.ttfb-w)),p.duration=(s?Wp:Jp)(p),p.bps=(s?Gp:Xp)(p,r);const A=this.#s;if(+r==0?console.log("latency",{phase:`during ${a.during||"idle"}`,ttfb:p.ttfb,serverTime:w,...A&&{serverTimeDelta:A},ping:p.ping}):console.log(s?"download":"upload",{bytes:+r,bps:p.bps,ttfb:p.ttfb,serverTime:w,...A&&{serverTimeDelta:A},ping:p.ping}),s&&r){const k=+r;p.transferSize&&(p.transferSize<k||p.transferSize/k>1.05)&&console.warn(`Requested ${k}B but received ${p.transferSize}B (${Math.round(p.transferSize/k*1e4)/100}%).`)}this.#R(n,p);const y=p.duration;if(this.#b=this.#b<0?y:Math.min(this.#b,y),this.#p+=1,this.#y=0,this.#_){const k=setTimeout(()=>this.#E(),this.#_);this.#m.signal.addEventListener("abort",()=>clearTimeout(k))}else this.#E()}).catch(f=>{if(this.#m.signal.aborted)return;if(console.warn(`Error fetching ${u}: ${f}`),f instanceof Go&&f.status===429&&this.#y++<Ia){this.#h=setTimeout(()=>{this.#h=void 0,this.#f&&!this.#g&&this.#E()},Vp(f.retryAfter));return}const p=f instanceof Go?f.status:void 0,g=p===429?`Connection failed to ${u}. Gave up after ${Ia} retries.`:p===void 0?`Connection failed to ${u}.`:`Request failed with ${p}: ${u}`;this.#y=0,this.pause(),this.#g=!0,this.#i(g,p)})}#T(e){this.#m?.abort(e||"aborted with no reason provided")}},Kp=class extends Va{constructor(e,{measureParallelLatency:t=!1,parallelLatencyThrottleMs:n=100,downloadApiUrl:r,uploadApiUrl:o,estimatedServerTime:s=0,serverTimeDelta:i=0,authorization:a=null,...l}={}){super(e,{downloadApiUrl:r,uploadApiUrl:o,estimatedServerTime:s,serverTimeDelta:i,authorization:a,...l}),t&&(this.#e=new Va([{dir:"down",bytes:0,count:1/0,bypassMinDuration:!0}],{downloadApiUrl:r,uploadApiUrl:o,estimatedServerTime:s,serverTimeDelta:i,authorization:a,throttleMs:n}),this.#e.qsParams={during:`${e[0].dir}load`},super.onRunningChange=this.#t,super.onConnectionError=()=>this.#e.pause())}get latencyResults(){return this.#e&&this.#e.results.down[0].timings}set onParallelLatencyResult(e){this.#e&&(this.#e.onMeasurementResult=t=>e(t))}get fetchOptions(){return super.fetchOptions}set fetchOptions(e){super.fetchOptions=e,this.#e&&(this.#e.fetchOptions=e)}set onRunningChange(e){super.onRunningChange=t=>{this.#t(t),e(t)}}set onConnectionError(e){super.onConnectionError=(...t)=>{this.#e&&this.#e.pause(),e(...t)},this.#e&&(this.#e.onConnectionError=(...t)=>{this.pause(),e(...t)})}#e;#r;#t=e=>{this.#e&&(e?this.#r=setTimeout(()=>this.#e.play(),20):(clearTimeout(this.#r),this.#e.pause()))}},Fa=class extends Kp{constructor(e,{measurementId:t,logApiUrl:n,sessionId:r,authorization:o,...s}={}){super(e,{...s,authorization:o}),this.#e=t,this.#n=n,this.#o=r,this.#c=o??null,super.qsParams=n?{measId:this.#e}:{},super.responseHook=i=>this.#a(i),super.onMeasurementResult=i=>this.#i(i)}set qsParams(e){super.qsParams=this.#n?{measId:this.#e,...e}:e}set responseHook(e){super.responseHook=t=>{e(t),this.#a(t)}}set onMeasurementResult(e){super.onMeasurementResult=(t,...n)=>{e(t,...n),this.#i(t)}}#e;#r;#t;#n;#o;#c;#a(e){this.#n&&(this.#t=+e.headers.get("cf-meta-request-time"),this.#r=e.body.slice(-300).split("___").pop())}#i(e){if(!this.#n)return;const t={type:e.type,bytes:e.bytes,ping:Math.round(e.ping),ttfb:Math.round(e.ttfb),payloadDownloadTime:Math.round(e.payloadDownloadTime),duration:Math.round(e.duration),transferSize:Math.round(e.transferSize),serverTime:Math.round(e.serverTime),token:this.#r,requestTime:this.#t,measId:this.#e,sessionId:this.#o};this.#r=null,this.#t=null,fetch(this.#n,xr({method:"POST",body:JSON.stringify(t),...this.fetchOptions},this.#c,this.#n)).catch(()=>{})}},Qp=class{constructor(e){if(!e)throw new Error("Missing operation to perform");this.#t=e,this.play()}pause(){this.#c(),this.#n(!1)}stop(){this.pause()}play(){this.#e||(this.#n(!0),this.#o())}#e=!1;#r=void 0;#t;#n(e){e!==this.#e&&(this.#e=e)}#o(){const e=this.#r=this.#t().then(()=>{!e._cancel&&this.#o()})}#c(){const e=this.#r;e&&(e._cancel=!0)}},e2=class{constructor({download:e,upload:t,authorization:n=null}={}){if(!e&&!t)throw new Error("Missing at least one of download/upload config");[[e,"download"],[t,"upload"]].filter(o=>
73o[0]!==null&&o[0]!==void 0).forEach(([o,s])=>{const{apiUrl:i,chunkSize:a}=o;if(!i)throw new Error(`Missing ${s} apiUrl argument`);if(!a)throw new Error(`Missing ${s} chunkSize argument`)});const r=({apiUrl:o,qsParams:s={},fetchOptions:i={}})=>new Qp(()=>{const a=Object.assign({},s,this.qsParams),l=new URL(o,window.location.origin);Object.entries(a).forEach(([d,f])=>l.searchParams.set(d,f));const u=l.href,m=Object.assign({},i,this.fetchOptions);return fetch(u,xr(m,n,u)).then(d=>{if(d.ok)return d;throw Error(d.statusText)}).then(d=>d.text())});e&&this.#e.push(r({apiUrl:e.apiUrl,qsParams:{bytes:`${e.chunkSize}`}})),t&&this.#e.push(r({apiUrl:t.apiUrl,fetchOptions:{method:"POST",body:"0".repeat(t.chunkSize)}}))}qsParams={};fetchOptions={};pause(){this.#e.forEach(e=>e.pause())}stop(){this.pause()}play(){this.#e.forEach(e=>e.play())}#e=[]},t2=class{constructor({iceServers:e=[],acceptIceCandidate:t=o=>{let s=o.protocol||"";if(!s&&o.candidate){const i=o.candidate.split(" ");i.length>=3&&(s=i[2])}return s.toLowerCase()==="udp"},dataChannelCfg:n={ordered:!1,maxRetransmits:0},...r}={}){const o=new RTCPeerConnection({iceServers:e,...r}),s=new RTCPeerConnection({iceServers:e,...r}),i=o.createDataChannel("channel",n);i.onopen=()=>{this.#e=!0,this.onOpen()},i.onclose=()=>this.close(),s.ondatachannel=a=>{const l=a.channel;l.onclose=()=>this.close(),l.onmessage=u=>this.onMessageReceived(u.data),this.#o=l},o.onicecandidate=a=>{a.candidate&&t(a.candidate)&&s.addIceCandidate(a.candidate)},s.onicecandidate=a=>{a.candidate&&t(a.candidate)&&o.addIceCandidate(a.candidate)},o.createOffer().then(a=>o.setLocalDescription(a)).then(()=>s.setRemoteDescription(o.localDescription)).then(()=>s.createAnswer()).then(a=>s.setLocalDescription(a)).then(()=>o.setRemoteDescription(s.localDescription)),this.#r=o,this.#t=s,this.#n=i}onOpen=()=>{};onClose=()=>{};onMessageReceived=()=>{};send(e){this.#n.send(String(e))}close(){return this.#r&&this.#r.close(),this.#t&&this.#t.close(),this.#n&&this.#n.close(),this.#o&&this.#o.close(),this.#e&&this.onClose(),this.#e=!1,this}#e=!1;#r;#t;#n;#o},n2=class{constructor({turnServerUri:e,turnServerCredsApi:t,turnServerCredsApiParser:n=({username:f,credential:p,server:g})=>({turnServerUser:f,turnServerPass:p,turnServerUri:g}),turnServerCredsApiIncludeCredentials:r=!1,turnServerUser:o,turnServerPass:s,authorization:i=null,numMsgs:a=100,batchSize:l=10,batchWaitTime:u=10,responsesWaitTime:m=5e3,connectionTimeout:d=5e3}={}){if(!e&&!t)throw new Error("Missing turnServerCredsApi or turnServerUri argument");if((!o||!s)&&!t)throw new Error("Missing either turnServerCredsApi or turnServerUser+turnServerPass arguments");this.#o=a,(!o||!s?fetch(t,xr(r?{credentials:"include"}:{},i,t)).then(f=>f.json()).then(f=>{if(f.error)throw f.error;return f}).then(n):Promise.resolve({turnServerUser:o,turnServerPass:s})).catch(f=>this.#e(f)).then(f=>{if(!f)return;const{turnServerUser:p,turnServerPass:g,turnServerUri:b}=f,v=new t2({iceServers:[{urls:`turn:${b||e}?transport=udp`,username:p,credential:g}],iceTransportPolicy:"relay"});let w=!1;setTimeout(()=>{w||(v.close(),this.#r("ICE connection timeout!"))},d);const A=this.#n;v.onOpen=()=>{w=!0;const y=this;(function k(x){if(x<=a){let S=x;for(;S<=Math.min(a,x+l-1);)A[S]=!1,v.send(S),y.onMsgSent(S),S++;setTimeout(()=>k(S),u)}else{y.onAllMsgsSent(Object.keys(A).length);const S=()=>{v.close(),y.#t(y.results)};let _=setTimeout(S,m),E=Object.values(y.#n).filter(R=>!R).length;v.onMessageReceived=R=>{clearTimeout(_),A[R]=!0,y.onMsgReceived(R),E--,E<=0&&Object.values(y.#n).every(M=>M)?S():_=setTimeout(S,m)}}})(1)},v.onMessageReceived=y=>{A[y]=!0,this.onMsgReceived(y)}}).catch(f=>this.#r(f.toString()))}#e=()=>{};set onCredentialsFailure(e){this.#e=e}#r=()=>{};set onConnectionError(e){this.#r=e}#t=()=>{};set onFinished(e){this.#t=e}onMsgSent=()=>{};onAllMsgsSent=()=>{};onMsgReceived=()=>{};get results(){const e=this.#o,t=Object.keys(this.#n).length,n=Object.entries(this.#n).filter(([,r])=>!r).map(([r])=>+r);return{totalMessages:e,numMessagesSent:t,packetLoss:n.length/t,lostMessages:n}}#n={};#o},r2=class extends n2{constructor({downloadChunkSize:e,uploadChunkSize:t,downloadApiUrl:n,uploadApiUrl:r,authorization:o,...s}={}){super({...s,authorization:o}),(e||t)&&(this.#e=new e2({download:e?{apiUrl:n,chunkSize:e}:null,upload:t?{apiUrl:r,chunkSize:t}:null,authorization:o}),super.onCredentialsFailure=super.onConnectionError=super.onFinished=()=>this.#e.stop())}set qsParams(e){this.#e&&(this.#e.qsParams=e)}set fetchOptions(e){this.#e&&(this.#e.fetchOptions=e)}set onCredentialsFailure(e){super.onCredentialsFailure=(...t)=>{e(...t),this.#e&&this.#e.stop()}}set onConnectionError(e){super.onConnectionError=(...t)=>{e(...t),this.#e&&this.#e.stop()}}set onFinished(e){super.onFinished=(...t)=>{e(...t),this.#e&&this.#e.stop()}}#e},Xo=class{constructor(e,{timeout:t=-1,fetchOptions:n={}}={}){let r=!1;
73const o=({reachable:s,...i})=>{r||(r=!0,this.onFinished({targetUrl:e,reachable:s,...i}))};fetch(e,n).then(s=>{o({reachable:!0,response:s})}).catch(s=>{o({reachable:!1,error:s})}),t>0&&setTimeout(()=>o({reachable:!1,error:"Request timeout"}),t)}onFinished=()=>{}};const o2=e=>e.reduce((t,n)=>t+n,0),Ha=(e,t=.5)=>{if(!e.length)return 0;const n=e.slice().sort((i,a)=>i-a),r=(e.length-1)*t,o=r%1;if(o===0)return n[Math.round(r)];const s=[Math.floor,Math.ceil].map(i=>n[i(r)]);return s[0]+(s[1]-s[0])*o};var s2=class{constructor(e){this.#e=e}getLatencyPoints=e=>e.timings.map(t=>t.ping);getLatency=e=>Ha(this.getLatencyPoints(e),this.#e.latencyPercentile);getJitter(e){const t=this.getLatencyPoints(e);return t.length<2?null:t.reduce(({sumDeltas:n=0,prevLatency:r},o)=>({sumDeltas:n+(r!==void 0?Math.abs(r-o):0),prevLatency:o}),{}).sumDeltas/(t.length-1)}getBandwidthPoints=e=>Object.entries(e).map(([t,{timings:n}])=>n.map(({bps:r,duration:o,ping:s,measTime:i,serverTime:a,transferSize:l})=>({bytes:+t,bps:r,duration:o,ping:s,measTime:i,serverTime:a,transferSize:l}))).flat();getBandwidth=e=>Ha(this.getBandwidthPoints(e).filter(t=>t.duration>=this.#e.bandwidthMinRequestDuration).map(t=>t.bps).filter(t=>t),this.#e.bandwidthPercentile);getLoadedLatency=e=>this.getLatency({timings:this.#r(e)});getLoadedJitter=e=>this.getJitter({timings:this.#r(e)});getLoadedLatencyPoints=e=>this.getLatencyPoints({timings:this.#r(e)});getPacketLoss=e=>e.packetLoss;getPacketLossDetails=e=>e;getReachability=e=>!!e.reachable;getReachabilityDetails=e=>({host:e.host,reachable:e.reachable});#e;#r=e=>Object.values(e).filter(t=>t.timings.length&&Math.min(...t.timings.map(n=>n.duration))>=this.#e.loadedRequestMinDuration).map(t=>t.sideLatency||[]).flat().slice(-this.#e.loadedLatencyMaxPoints)};const i2=["bad","poor","average","good","great"],Ua={loadedLatencyIncrease:e=>e.latency&&(e.downLoadedLatency||e.upLoadedLatency)?Math.max(e.downLoadedLatency,e.upLoadedLatency)-e.latency:void 0},Ba={packetLoss:0};var a2=class{constructor(e){this.#e=e}getScores(e){const t=Object.assign({},...Object.entries(this.#e.aimMeasurementScoring).map(([n,r])=>{const o=Ua.hasOwnProperty(n)?Ua[n](e):e[n];return o===void 0?Ba.hasOwnProperty(n)?{[n]:Ba[n]}:{}:{[n]:+r(o)}}));return Object.assign({},...Object.entries(this.#e.aimExperiencesDefs).filter(([,{input:n}])=>n.every(r=>t.hasOwnProperty(r))).map(([n,{input:r,pointThresholds:o}])=>{const s=Math.max(0,o2(r.map(l=>t[l]))),i=dn(o,[0,1,2,3,4])(s),a=i2[i];return{[n]:{points:s,classificationIdx:i,classificationName:a}}}))}#e},c2=class{constructor(e){this.#e=e,this.clear(),this.#r=new s2(this.#e),this.#t=new a2(this.#e)}raw;get isFinished(){return Object.values(this.raw).filter(e=>e!==null&&typeof e=="object").every(e=>e.finished)}clear(){this.raw=Object.assign({totalDurationMs:void 0},...[...new Set(this.#e.measurements.map(e=>e.type))].map(e=>({[e]:{started:!1,finished:!1,results:{}}})))}getUnloadedLatency=()=>this.#n("getLatency","latency");getUnloadedJitter=()=>this.#n("getJitter","latency");getUnloadedLatencyPoints=()=>this.#n("getLatencyPoints","latency",[]);getDownLoadedLatency=()=>this.#n("getLoadedLatency","download");getDownLoadedJitter=()=>this.#n("getLoadedJitter","download");getDownLoadedLatencyPoints=()=>this.#n("getLoadedLatencyPoints","download",[]);getUpLoadedLatency=()=>this.#n("getLoadedLatency","upload");getUpLoadedJitter=()=>this.#n("getLoadedJitter","upload");getUpLoadedLatencyPoints=()=>this.#n("getLoadedLatencyPoints","upload",[]);getDownloadBandwidth=()=>this.#n("getBandwidth","download");getDownloadBandwidthPoints=()=>this.#n("getBandwidthPoints","download",[]);getUploadBandwidth=()=>this.#n("getBandwidth","upload");getUploadBandwidthPoints=()=>this.#n("getBandwidthPoints","upload",[]);getPacketLoss=()=>this.#n("getPacketLoss","packetLoss");getPacketLossDetails=()=>this.#n("getPacketLossDetails","packetLoss",void 0,!0);getTotalDurationMs=()=>this.raw.totalDurationMs;getSummary(){const e={download:this.getDownloadBandwidth,upload:this.getUploadBandwidth,latency:this.getUnloadedLatency,jitter:this.getUnloadedJitter,downLoadedLatency:this.getDownLoadedLatency,downLoadedJitter:this.getDownLoadedJitter,upLoadedLatency:this.getUpLoadedLatency,upLoadedJitter:this.getUpLoadedJitter,packetLoss:this.getPacketLoss,v4Reachability:this.#o,v6Reachability:this.#a,totalDurationMs:this.getTotalDurationMs};return Object.assign({},...Object.entries(e).map(([t,n])=>{const r=n();return r===void 0?{}:{[t]:r}}))}getScores=()=>this.#t.getScores(this.getSummary());#e;#r;#t;#n=(e,t,n=void 0,r=!1)=>{const o=this.raw[t];if(!o||typeof o!="object"||!o.started)return n;const s=o;return r&&s.error?{error:s.error}:this.#r[e](s.results)};#o=()=>this.#n("getReachability","v4Reachability");#c=()=>this.#n("getReachabilityDetails","v4Reachability");#a=()=>this.#n("getReachability","v6Reachability");#i=()=>this.#n("getReachabilityDetails","v6Reachability")};const mi=(e,t=0)=>e&&Math.round(e*10**t)/10**t,Yo=e=>e.map(t=>mi(t,2)),qa=e=>e.map(t=>({bytes:+t.bytes,bps:mi(t.bps)})),l2=e=>{const t=e;return t.error?void 0:{numMessages:t.numMessagesSent,lossRatio:mi(t.packetLoss,4)}},u2={latencyMs:["getUnloadedLatencyPoints",Yo],download:["getDownloadBandwidthPoints",qa],upload:["getUploadBandwidthPoints",qa],downLoadedLatencyMs:["getDownLoadedLatencyPoints",Yo],upLoadedLatencyMs:["getUpLoadedLatencyPoints",Yo],packetLoss:["getPacketLossDetails",l2],totalDurationMs:["getTotalDurationMs"]},d2=e=>({points:e.points,classification:e.classificationName}
73),f2=async(e,{apiUrl:t,includeCredentials:n,sessionId:r,authorization:o})=>{const s={sessionId:r};Object.entries(u2).forEach(([a,[l,u]])=>{const m=u??(f=>f),d=e[l]();d&&(s[a]=m(d))});const i=e.getScores();i&&(s.scores=Object.assign({},...Object.entries(i).map(([a,l])=>({[a]:d2(l)})))),console.log("results",s);try{const a=await fetch(t,xr({method:"POST",body:JSON.stringify(s),credentials:n?"include":"same-origin"},o,t));return a.ok?await a.json():{requestId:void 0}}catch{return{requestId:void 0}}},h2=1e6,m2=1e6,p2=.5,Ko=["latency","latencyUnderLoad","download","upload"],Wa=()=>`${Math.round(Math.random()*1e16)}`;var g2=class{constructor(e={}){this.#t=Object.assign({},Pp,e,Ip),this.#n={token:this.#t.authorizationToken,enabled:this.#t.authorizationEnabled,allowInsecure:this.#t.allowInsecureAuthorizationToken},this.#o=new c2(this.#t),this.#t.autoStart&&this.play()}get results(){return this.#o}get config(){return this.#t}get authorization(){return this.#n}get isRunning(){return this.#l}get isFinished(){return this.#v}onRunningChange=()=>{};onResultsChange=()=>{};onPhaseChange=()=>{};#e=()=>{};set onFinish(e){this.#e=e}#r=()=>{};set onError(e){this.#r=e}pause(){const e=this.#h();e&&Ko.includes(e)&&this.#d?.pause?.(),this.#p(!1)}play(){!this.#u&&!this.#l&&(performance.clearResourceTimings(),performance.setResourceTimingBufferSize(1e4),this.#p(!0),this.#s())}restart(){this.#_(),this.play()}#t;#n;#o;#c=Wa();#a=0;#i=-1;#d;#w=h2;#x=m2;#f;#g=0;#l=!1;#v=!1;#u=!1;#p(e){e!==this.#l&&(this.#l=e,this.onRunningChange(this.#l)),e?this.#f=performance.now():typeof this.#f<"u"&&(this.#g+=performance.now()-this.#f,this.#f=void 0)}#y(e){e!==this.#v&&(this.#v=e,e&&(this.#o.raw.totalDurationMs=this.#g,setTimeout(()=>this.#e(this.results))))}#h(){return this.#i<0||this.#i>=this.#t.measurements.length?null:this.#t.measurements[this.#i].type}#b(){const e=this.#h();if(e)return this.#o.raw[e]||void 0}#_(){this.#k(),this.#c=Wa(),this.#i=-1,this.#d=void 0,this.#p(!1),this.#y(!1),this.#u=!1,this.#o.clear(),this.#g=0}#k(){const e=this.#d;if(!e)return;e.onFinished=e.onConnectionError=e.onMsgReceived=e.onCredentialsFailure=e.onMeasurementResult=()=>{};const t=this.#h();t&&Ko.includes(t)&&e.pause?.()}#s(){const e=this.#h(),t=this.#b();if(e&&Ko.includes(e)&&t&&t.started&&!t.finished&&!t.finishedCurrentRound&&!t.error){this.#d?.play?.();return}if(this.#i++,this.#i>=this.#t.measurements.length){this.#p(!1),this.#y(!0);return}const{type:n,...r}=this.#t.measurements[this.#i],o=this.#b();this.onPhaseChange({measurementId:this.#i,measurement:{type:n,...r}});const{downloadApiUrl:s,uploadApiUrl:i,estimatedServerTime:a}=this.#t;let l;switch(n){case"v4Reachability":case"v6Reachability":l=new Xo(`https://${r.host}`,{fetchOptions:{method:"GET",mode:"no-cors"}}),l.onFinished=u=>{const m=u;o.finished=!0,o.results={host:r.host,...m},this.onResultsChange({type:n}),this.#s()};break;case"rpki":l=new Xo(`https://${this.#t.rpkiInvalidHost}`,{timeout:5e3}),l.onFinished=u=>{const m=u;(m.response?m.response.json():Promise.resolve()).then(d=>{o.finished=!0,o.results={host:this.#t.rpkiInvalidHost,filteringInvalids:!m.reachable,...d?{asn:d.asn,name:d.name}:{}},this.onResultsChange({type:n}),this.#s()})};break;case"nxdomain":l=new Xo(`https://${r.nxhost}`,{fetchOptions:{mode:"no-cors"}}),l.onFinished=u=>{const m=u;o.finished=!0,o.results={host:r.nxhost,reachable:m.reachable},this.onResultsChange({type:n}),this.#s()};break;case"packetLoss":case"packetLossUnderLoad":{o.finished=!1;const{numPackets:u,...m}=r,{turnServerUri:d,turnServerCredsApiUrl:f,turnServerUser:p,turnServerPass:g,includeCredentials:b}=this.#t;l=new r2({turnServerUri:d,turnServerCredsApi:f,turnServerCredsApiIncludeCredentials:b,turnServerUser:p??void 0,turnServerPass:g??void 0,authorization:this.authorization,numMsgs:u,downloadChunkSize:r.loadDown?this.#w:void 0,uploadChunkSize:r.loadUp?this.#x:void 0,downloadApiUrl:s,uploadApiUrl:i,...m})}l.onMsgReceived=()=>{o.results=Object.assign({},l.results),this.onResultsChange({type:n})},l.onFinished=()=>{o.finished=!0,this.onResultsChange({type:n}),this.#s()},l.onConnectionError=u=>{o.error=u,this.onResultsChange({type:n}),this.#r(`Connection error while measuring packet loss: ${u}`),this.#s()},l.onCredentialsFailure=()=>{o.error="unable to get turn server credentials",this.onResultsChange({type:n}),this.#r("Error while measuring packet loss: unable to get turn server credentials."),this.#s()};break;case"latency":case"latencyUnderLoad":{if(o.finished=!1,l=new Fa([{dir:"down",bytes:0,count:r.numPackets,bypassMinDuration:!0}],{downloadApiUrl:s,uploadApiUrl:i,estimatedServerTime:a,serverTimeDelta:this.#a,logApiUrl:this.#t.logMeasurementApiUrl??void 0,measurementId:this.#c,sessionId:this.#t.sessionId,authorization:this.authorization,downloadChunkSize:r.loadDown?this.#w:void 0,uploadChunkSize:r.loadUp?this.#x:void 0}),l.fetchOptions=this.#t.includeCredentials?{credentials:"include"}:{},l.abortRequestDuration=this.#t.bandwidthAbortRequestDuration,!r.loadDown&&!r.loadUp){const m=l;m.qsParams={...m.qsParams,during:"idle"}}const u=(o.results?.timings||[]).slice();l.onMeasurementResult=l.onNewMeasurementStarted=(m,d)=>{o.results=Object.assign({},d.down[0]),o.results.timings=u.concat(o.results.timings),this.onResultsChange({type:n})},l.onFinished=()=>{this.#a=l.serverTimeDelta,o.finished=!0,this.onResultsChange({type:n}),this.#l&&this.#s()},l.onConnectionError=(m,d)=>{o.error=m,this.#u=!0,this.pause(),this.onResultsChange({type:n}),this.#r(String(m),d)},l.play();break}case"download":case"upload":if(o.finished||o.error)this.#s();else{delete o.finishedCurrentRound;const u=this.#t[`measure${n==="download"?"Down":"Up"}loadLoadedLatency`];
73l=new Fa([{dir:n==="download"?"down":"up",...r}],{downloadApiUrl:s,uploadApiUrl:i,estimatedServerTime:a,serverTimeDelta:this.#a,logApiUrl:this.#t.logMeasurementApiUrl??void 0,measurementId:this.#c,measureParallelLatency:u,parallelLatencyThrottleMs:this.#t.loadedLatencyThrottle,sessionId:this.#t.sessionId,authorization:this.authorization}),l.fetchOptions=this.#t.includeCredentials?{credentials:"include"}:{},l.finishRequestDuration=this.#t.bandwidthFinishRequestDuration,l.abortRequestDuration=this.#t.bandwidthAbortRequestDuration,l.onNewMeasurementStarted=(...m)=>{const{count:d,bytes:f}=m[0],p=o.results=Object.assign({},o.results);!p.hasOwnProperty(f)&&(p[f]={timings:[],numMeasurements:0,sideLatency:u?[]:void 0});const g=p[f];g.numMeasurements-g.timings.length!==d&&(g.numMeasurements+=d,this.onResultsChange({type:n}))},l.onMeasurementResult=(...m)=>{const{bytes:d,...f}=m[0];o.results[d].timings.push(f),o.results=Object.assign({},o.results),this.onResultsChange({type:n})},l.onParallelLatencyResult=m=>{o.results[r.bytes].sideLatency.push(m),o.results=Object.assign({},o.results),this.onResultsChange({type:n})},l.onFinished=m=>{this.#a=l.serverTimeDelta;const d=m,f=!this.#t.measurements.slice(this.#i+1).map(g=>g.type).includes(n),p=Math.min(...Object.values(n==="download"?d.down:d.up).slice(-1)[0].timings.map(g=>g.duration));if(!(f||!r.bypassMinDuration&&p>this.#t.bandwidthFinishRequestDuration))o.finishedCurrentRound=!0;else{o.finished=!0,this.onResultsChange({type:n});const g=Object.keys(o.results).map(b=>+b).sort((b,v)=>v-b)[0]*p2;n==="download"&&(this.#w=g),n==="upload"&&(this.#x=g)}this.#l&&this.#s()},l.onConnectionError=(m,d)=>{o.error=m,this.#u=!0,this.pause(),this.onResultsChange({type:n}),this.#r(String(m),d)},l.play()}break}this.#d=l,o.started=!0,this.onResultsChange({type:n})}},pu=class extends g2{constructor(e={}){super(e),super.onFinish=this.#e}set onFinish(e){super.onFinish=t=>{e(t),this.#e(t)}}onResultsLogged=()=>{};#e=e=>{const t=this.config.logAimApiUrl;t&&f2(e,{apiUrl:t,includeCredentials:this.config.includeCredentials,sessionId:this.config.sessionId,authorization:this.authorization}).then(n=>{this.onResultsLogged(n)})}};const v2="modulepreload",y2=function(e){return"/"+e},Ja={},b2=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(m=>Promise.resolve(m).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=i?.nonce||i?.getAttribute("nonce");o=l(n.map(u=>{if(u=y2(u),u in Ja)return;Ja[u]=!0;const m=u.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=m?"stylesheet":v2,m||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),m)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function gu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=gu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function to(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=gu(e))&&(r&&(r+=" "),r+=t);return r}const Pn=Math.min,pn=Math.max,lo=Math.round,Hr=Math.floor,dt=e=>({x:e,y:e}),w2={left:"right",right:"left",bottom:"top",top:"bottom"};function vu(e,t,n){return pn(e,Pn(t,n))}function _r(e,t){return typeof e=="function"?e(t):e}function In(e){return e.split("-")[0]}function kr(e){return e.split("-")[1]}function yu(e){return e==="x"?"y":"x"}function pi(e){return e==="y"?"height":"width"}function Ut(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function gi(e){return yu(Ut(e))}function x2(e,t,n){n===void 0&&(n=!1);const r=kr(e),o=gi(e),s=pi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=uo(i)),[i,uo(i)]}function _2(e){const t=uo(e);return[Ns(e),t,Ns(t)]}function Ns(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ga=["left","right"],Xa=["right","left"],k2=["top","bottom"],E2=["bottom","top"];function A2(e,t,n){switch(e){case"top":case"bottom":return n?t?Xa:Ga:t?Ga:Xa;case"left":case"right":return t?k2:E2;default:return[]}}function S2(e,t,n,r){const o=kr(e);let s=A2(In(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ns)))),s}function uo(e){const t=In(e);return w2[t]+e.slice(t.length)}function R2(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function bu(e){return typeof e!="number"?R2(e):{top:e,right:e,bottom:e,left:e}}function fo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ya(e,t,n){let{reference:r,floating:o}=e;const s=Ut(t),i=gi(t),a=pi(i),l=In(t),u=s==="y",m=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:m,y:r.y-o.height};break;case"bottom":p={x:m,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const g=kr(t);return g&&(p[i]+=f*(g==="end"?1:-1)*(n&&u?-1:1)),p}async function T2(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=_r(t,e),g=bu(p),v=a[f?d==="floating"?"reference":"floating":d],w=fo(await s.getClippingRect
vendor: 4,148 bytes, line 73
73({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:m,strategy:l})),A=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),k=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},x=fo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:y,strategy:l}):A);return{top:(w.top-x.top+g.top)/k.y,bottom:(x.bottom-w.bottom+g.bottom)/k.y,left:(w.left-x.left+g.left)/k.x,right:(x.right-w.right+g.right)/k.x}}const M2=50,j2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:T2},l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:d}=Ya(u,r,l),f=r,p=0;const g={};for(let b=0;b<s.length;b++){const v=s[b];if(!v)continue;const{name:w,fn:A}=v,{x:y,y:k,data:x,reset:S}=await A({x:m,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});m=y??m,d=k??d,g[w]={...g[w],...x},S&&p<M2&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:m,y:d}=Ya(u,f,l)),b=-1)}return{x:m,y:d,placement:f,strategy:o,middlewareData:g}},C2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:m=0}=_r(e,t)||{};if(u==null)return{};const d=bu(m),f={x:n,y:r},p=gi(o),g=pi(p),b=await i.getDimensions(u),v=p==="y",w=v?"top":"left",A=v?"bottom":"right",y=v?"clientHeight":"clientWidth",k=s.reference[g]+s.reference[p]-f[p]-s.floating[g],x=f[p]-s.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let _=S?S[y]:0;(!_||!await(i.isElement==null?void 0:i.isElement(S)))&&(_=a.floating[y]||s.floating[g]);const E=k/2-x/2,R=_/2-b[g]/2-1,M=Pn(d[w],R),j=Pn(d[A],R),N=_-b[g]-j,z=_/2-b[g]/2+E,O=vu(M,z,N),I=!l.arrow&&kr(o)!=null&&z!==O&&s.reference[g]/2-(z<M?M:j)-b[g]/2<0,D=I?z<M?z-M:z-N:0;return{[p]:f[p]+D,data:{[p]:O,centerOffset:z-O-D,...I&&{alignmentOffset:D}},reset:I}}}),N2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...v}=_r(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=In(o),A=Ut(a),y=In(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(y||!b?[uo(a)]:_2(a)),S=g!=="none";!f&&S&&x.push(...S2(a,b,g,k));const _=[a,...x],E=await l.detectOverflow(t,v),R=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&R.push(E[w]),d){const O=x2(o,i,k);R.push(E[O[0]],E[O[1]])}if(M=[...M,{placement:o,overflows:R}],!R.every(O=>O<=0)){var j,N;const O=(((j=s.flip)==null?void 0:j.index)||0)+1,I=_[O];if(I&&(!(d==="alignment"?A!==Ut(I):!1)||M.every($=>Ut($.placement)===A?$.overflows[0]>0:!0)))return{data:{index:O,overflows:M},reset:{placement:I}};let D=(N=M.filter(H=>H.overflows[0]<=0).sort((H,$)=>H.overflows[1]-$.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(p){case"bestFit":{var z;const H=(z=M.filter($=>{if(S){const C=Ut($.placement);return C===A||C==="y"}return!0}).map($=>[$.placement,$.overflows.filter(C=>C>0).reduce((C,L)=>C+L,0)]).sort(($,C)=>$[1]-C[1])[0])==null?void 0:z[0];H&&(D=H);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}},L2=new Set(["left","top"]);async function O2(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=In(n),a=kr(n),l=Ut(n)==="y",u=L2.has(i)?-1:1,m=s&&l?-1:1,d=_r(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}
73:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*m,y:f*u}:{x:f*u,y:p*m}}const z2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await O2(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:A=>{let{x:y,y:k}=A;return{x:y,y:k}}},...u}=_r(e,t),m={x:n,y:r},d=await s.detectOverflow(t,u),f=Ut(o),p=yu(f);let g=m[p],b=m[f];const v=(A,y)=>vu(y+d[A==="y"?"top":"left"],y,y-d[A==="y"?"bottom":"right"]);i&&(g=v(p,g)),a&&(b=v(f,b));const w=l.fn({...t,[p]:g,[f]:b});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[p]:i,[f]:a}}}}}};function Oo(){return typeof window<"u"}function qn(e){return wu(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mt(e){var t;return(t=(wu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wu(e){return Oo()?e instanceof Node||e instanceof We(e).Node:!1}function it(e){return Oo()?e instanceof Element||e instanceof We(e).Element:!1}function Nt(e){return Oo()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function Ka(e){return!Oo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function Er(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=at(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function P2(e){return/^(table|td|th)$/.test(qn(e))}function zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const I2=/transform|translate|scale|rotate|perspective|filter/,Z2=/paint|layout|strict|content/,on=e=>!!e&&e!=="none";let Qo;function vi(e){const t=it(e)?at(e):e;return on(t.transform)||on(t.translate)||on(t.scale)||on(t.rotate)||on(t.perspective)||!yi()&&(on(t.backdropFilter)||on(t.filter))||I2.test(t.willChange||"")||Z2.test(t.contain||"")}function D2(e){let t=Jt(e);for(;Nt(t)&&!Zn(t);){if(vi(t))return t;if(zo(t))return null;t=Jt(t)}return null}function yi(){return Qo==null&&(Qo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qo}function Zn(e){return/^(html|body|#document)$/.test(qn(e))}function at(e){return We(e).getComputedStyle(e)}function $o(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ka(e)&&e.host||mt(e);return Ka(t)?t.host:t}function xu(e){const t=Jt(e);return Zn(t)?(e.ownerDocument||e).body:Nt(t)&&Er(t)?t:xu(t)}function mr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=xu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=We(o);if(s){const a=Ls(i);return t.concat(i,i.visualViewport||[],Er(o)?o:[],a&&n?mr(a):[])}else return t.concat(o,mr(o,[],n))}function Ls(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _u(e){const t=at(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=lo(n)!==s||lo(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function bi(e){return it(e)?e:e.contextElement}function Nn(e){const t=bi(e);if(!Nt(t))return dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=_u(t);let i=(s?lo(n.width):n.width)/r,a=(s?lo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const V2=dt(0);function ku(e){const t=We(e);return!yi()||!t.visualViewport?V2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function F2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==We(e)?!1:t}function bn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=bi(e);let i=dt(1);t&&(r?it(r)&&(i=Nn(r)):i=Nn(e));const a=F2(s,n,r)?ku(s):dt(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,m=o.width/i.x,d=o.height/i.y;if(s){const f=We(s),p=r&&it(r)?We(r):r;let g=f,b=Ls(g);for(;b&&r&&p!==g;){const v=Nn(b),w=b.getBoundingClientRect(),A=at(b),y=w.left+(b.clientLeft+parseFloat(A.paddingLeft))*v.x,k=w.top+(b.clientTop+parseFloat(A.paddingTop))*v.y;l*=v.x,u*=v.y,m*=v.x,d*=v.y,l+=y,u+=k,g=We(b),b=Ls(g)}}return fo({width:m,height:d,x:l,y:u})}function Po(e,t){const n=$o(e).scrollLeft;return t?t.left+n:bn(mt(e)).left+n}function Eu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Po(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function H2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=mt(r),a=t?zo(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=dt(1);const m=dt(0),d=Nt(r);
73if((d||!d&&!s)&&((qn(r)!=="body"||Er(i))&&(l=$o(r)),d)){const p=bn(r);u=Nn(r),m.x=p.x+r.clientLeft,m.y=p.y+r.clientTop}const f=i&&!d&&!s?Eu(i,l):dt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+f.x,y:n.y*u.y-l.scrollTop*u.y+m.y+f.y}}function U2(e){return Array.from(e.getClientRects())}function B2(e){const t=mt(e),n=$o(e),r=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Po(e);const a=-n.scrollTop;return at(r).direction==="rtl"&&(i+=pn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Qa=25;function q2(e,t){const n=We(e),r=mt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const m=yi();(!m||m&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Po(r);if(u<=0){const m=r.ownerDocument,d=m.body,f=getComputedStyle(d),p=m.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=Qa&&(s-=g)}else u<=Qa&&(s+=u);return{width:s,height:i,x:a,y:l}}function W2(e,t){const n=bn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Nt(e)?Nn(e):dt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function ec(e,t,n){let r;if(t==="viewport")r=q2(e,n);else if(t==="document")r=B2(mt(e));else if(it(t))r=W2(t,n);else{const o=ku(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fo(r)}function Au(e,t){const n=Jt(e);return n===t||!it(n)||Zn(n)?!1:at(n).position==="fixed"||Au(n,t)}function J2(e,t){const n=t.get(e);if(n)return n;let r=mr(e,[],!1).filter(a=>it(a)&&qn(a)!=="body"),o=null;const s=at(e).position==="fixed";let i=s?Jt(e):e;for(;it(i)&&!Zn(i);){const a=at(i),l=vi(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Er(i)&&!l&&Au(e,i))?r=r.filter(m=>m!==i):o=a,i=Jt(i)}return t.set(e,r),r}function G2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?zo(t)?[]:J2(t,this._c):[].concat(n),r],a=ec(t,i[0],o);let l=a.top,u=a.right,m=a.bottom,d=a.left;for(let f=1;f<i.length;f++){const p=ec(t,i[f],o);l=pn(p.top,l),u=Pn(p.right,u),m=Pn(p.bottom,m),d=pn(p.left,d)}return{width:u-d,height:m-l,x:d,y:l}}function X2(e){const{width:t,height:n}=_u(e);return{width:t,height:n}}function Y2(e,t,n){const r=Nt(t),o=mt(t),s=n==="fixed",i=bn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=dt(0);function u(){l.x=Po(o)}if(r||!r&&!s)if((qn(t)!=="body"||Er(o))&&(a=$o(t)),r){const p=bn(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const m=o&&!r&&!s?Eu(o,a):dt(0),d=i.left+a.scrollLeft-l.x-m.x,f=i.top+a.scrollTop-l.y-m.y;return{x:d,y:f,width:i.width,height:i.height}}function es(e){return at(e).position==="static"}function tc(e,t){if(!Nt(e)||at(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mt(e)===n&&(n=n.ownerDocument.body),n}function Su(e,t){const n=We(e);if(zo(e))return n;if(!Nt(e)){let o=Jt(e);for(;o&&!Zn(o);){if(it(o)&&!es(o))return o;o=Jt(o)}return n}let r=tc(e,t);for(;r&&P2(r)&&es(r);)r=tc(r,t);return r&&Zn(r)&&es(r)&&!vi(r)?n:r||D2(e)||n}const K2=async function(e){const t=this.getOffsetParent||Su,n=this.getDimensions,r=await n(e.floating);return{reference:Y2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q2(e){return at(e).direction==="rtl"}const eg={convertOffsetParentRelativeRectToViewportRelativeRect:H2,getDocumentElement:mt,getClippingRect:G2,getOffsetParent:Su,getElementRects:K2,getClientRects:U2,getDimensions:X2,getScale:Nn,isElement:it,isRTL:Q2};function Ru(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tg(e,t){let n=null,r;const o=mt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:m,top:d,width:f,height:p}=u;if(a||t(),!f||!p)return;const g=Hr(d),b=Hr(o.clientWidth-(m+f)),v=Hr(o.clientHeight-(d+p)),w=Hr(m),y={rootMargin:-g+"px "+-b+"px "+-v+"px "+-w+"px",threshold:pn(0,Pn(1,l))||1};let k=!0;function x(S){const _=S[0].intersectionRatio;if(_!==l){if(!k)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},1e3)}_===1&&!Ru(u,e.getBoundingClientRect())&&i(),k=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return i(!0),s}function ng(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=bi(e),m=o||s?[...u?mr(u):[],...t?mr(t):[]]:[];m.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=u&&a?tg(u,n):null;let f=-1,p=null;i&&(p=new ResizeObserver(w=>{let[A]=w;A&&A.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let g,b=l?bn(e):null;l&&v();function v(){const w=bn(e);b&&!Ru(b,w)&&n(),b=w,g=requestAnimationFrame(v)}return n(),()=>{var w;m.forEach(A=>{o&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),d?.(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const rg=z2,og=$2,sg=N2,ig=C2,nc=(e,t,n)=>{const r=new Map,o={platform:eg,...n},s={...o.platform,_c:r};return j2(e,t,{...o,platform:s})};var Ur={};const rc={core:!1,base:!1};function oc({css:e,id:t="react-tooltip-base-styles",type:n="base",ref:r,state:o={}}){if(!e||typeof document>"u"||(o[n]!==void 0?o[n]:rc[n])||n==="core"&&typeof process<"u"&&Ur&&Ur.REACT_TOOLTIP_DISABLE_CORE_STYLES||n==="base"&&typeof process<"u"&&Ur&&Ur.REACT_TOOLTIP_DISABLE_BASE_STYLES)return;n==="core"&&(t="react-tooltip-core-styles"),r||(r={});const{insertAt:s}=r;if(document.getElementById(t))return;const i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.id=t,a.type="text/css",s==="top"&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),o[n]!==void 0?o[n]=!0:rc[n]=!0}const ag=sg({fallbackAxisSideDirection:"start"}),cg=og({padding:5}),sc=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:s="absolute",middlewares:i=[rg(Number(o)),ag,cg],border:a,arrowSize:l=8})=>
73{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const u=[...i];return n?(u.push(ig({element:n,padding:5})),nc(e,t,{placement:r,strategy:s,middleware:u}).then(({x:m,y:d,placement:f,middlewareData:p})=>{var g,b;const v={left:`${m}px`,top:`${d}px`,border:a},{x:w,y:A}=(g=p.arrow)!==null&&g!==void 0?g:{x:0,y:0},y=(b={top:"bottom",right:"left",bottom:"top",left:"right"}[f.split("-")[0]])!==null&&b!==void 0?b:"bottom",k=a&&{borderBottom:a,borderRight:a};let x=0;if(a){const S=`${a}`.match(/(\d+)px/);x=S?.[1]?Number(S[1]):1}return{tooltipStyles:v,tooltipArrowStyles:{left:w!=null?`${w}px`:"",top:A!=null?`${A}px`:"",right:"",bottom:"",...k,[y]:`-${l/2+x-1}px`},place:f}})):nc(e,t,{placement:"bottom",strategy:s,middleware:u}).then(({x:m,y:d,placement:f})=>({tooltipStyles:{left:`${m}px`,top:`${d}px`},tooltipArrowStyles:{},place:f}))},ic=(e,t,n)=>{let r=null,o=e;const s=function(...i){const a=()=>{r=null};r||(o.apply(this,i),r=setTimeout(a,t))};return s.cancel=()=>{r&&(clearTimeout(r),r=null)},s.setCallback=i=>{o=i},s},lg=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"})},ac=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(lg(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ug=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?c.useLayoutEffect:c.useEffect,Me=e=>{e.current&&(clearTimeout(e.current),e.current=null)};var sn={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",content:"core-styles-module_content__BRKdB",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Br={tooltip:"styles-module_tooltip__mnnfp",content:"styles-module_content__ydYdI",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const St=new Map;let Ln=null;function dg(e){const t=e.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return t?t[2].replace(/\\(['"])/g,"$1"):null}function Tu(e){try{return{anchors:Array.from(document.querySelectorAll(e)),error:null}}catch(t){return{anchors:[],error:t instanceof Error?t:new Error(String(t))}}}function cc(e,t){var n,r,o,s;const i=Tu(e),a=(r=(n=i.error)===null||n===void 0?void 0:n.message)!==null&&r!==void 0?r:null,l=(s=(o=t.error)===null||o===void 0?void 0:o.message)!==null&&s!==void 0?s:null;if(u=t.anchors,m=i.anchors,u.length===m.length&&u.every((f,p)=>f===m[p])&&a===l)return;var u,m;const d={...t,anchors:i.anchors,error:i.error};St.set(e,d),(function(f){f.subscribers.forEach(p=>p(f.anchors,f.error))})(d)}let ts=!1,nr=null,ns=!1;function fg(e){if(e?(nr||(nr=new Set),e.forEach(n=>nr.add(n))):ns=!0,ts)return;ts=!0;const t=()=>{ts=!1;const n=ns,r=nr;var o;ns=!1,nr=null,n?St.forEach((s,i)=>{cc(i,s)}):r&&r.size>0&&(o=r,St.forEach((s,i)=>{(s.tooltipId===null||o.has(s.tooltipId))&&cc(i,s)}))};typeof requestAnimationFrame=="function"?requestAnimationFrame(t):Promise.resolve().then(t)}function hg(){Ln||typeof MutationObserver>"u"||(Ln=new MutationObserver(e=>{const t=(function(n){var r;if(St.size<=4)return null;const o=new Set;for(const s of n){if(s.type==="attributes"){const i=s.target,a=(r=i.getAttribute)===null||r===void 0?void 0:r.call(i,"data-tooltip-id");a&&o.add(a),s.oldValue&&o.add(s.oldValue);continue}if(s.type==="childList"){const i=a=>{var l,u;for(let m=0;m<a.length;m++){const d=a[m];if(d.nodeType!==Node.ELEMENT_NODE)continue;const f=d,p=(l=f.getAttribute)===null||l===void 0?void 0:l.call(f,"data-tooltip-id");p&&o.add(p);const g=(u=f.querySelectorAll)===null||u===void 0?void 0:u.call(f,"[data-tooltip-id]");if(g){if(g.length>50)return!0;for(let b=0;b<g.length;b++){const v=g[b].getAttribute("data-tooltip-id");v&&o.add(v)}}}return!1};
73if(i(s.addedNodes)||i(s.removedNodes))return null;continue}}return o})(e);fg(t)}),Ln.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}))}function mg(e,t){let n=St.get(e);if(!n){const r=Tu(e);n={anchors:r.anchors,error:r.error,subscribers:new Set,tooltipId:dg(e)},St.set(e,n)}return n.subscribers.add(t),hg(),t([...n.anchors],n.error),()=>{const r=St.get(e);r&&(r.subscribers.delete(t),r.subscribers.size===0&&St.delete(e),St.size===0&&Ln&&(Ln.disconnect(),Ln=null))}}const rs=new Map;function lc(e,t){return`${e}:${t?"capture":"bubble"}`}function pg(e,t,n={}){const r=!!n.capture,o=lc(e,r),s=(function(i,a){const l=lc(i,a);let u=rs.get(l);if(!u){const m=new Set,d=f=>{m.forEach(p=>{p(f)})};u={handlers:m,dispatch:d,eventType:i,capture:a},rs.set(l,u),document.addEventListener(i,d,{capture:a})}return u})(e,r);return s.handlers.add(t),()=>{s.handlers.delete(t),s.handlers.size===0&&(rs.delete(o),document.removeEventListener(e,s.dispatch,{capture:r}))}}let os=null;var gg=c.memo(({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",portalRoot:s,anchorSelect:i,place:a="top",offset:l=10,openOnClick:u=!1,positionStrategy:m="absolute",middlewares:d,wrapper:f,delayShow:p=0,delayHide:g=0,autoClose:b,float:v=!1,hidden:w=!1,noArrow:A=!1,clickable:y=!1,openEvents:k,closeEvents:x,globalCloseEvents:S,imperativeModeOnly:_,style:E,position:R,afterShow:M,afterHide:j,disableTooltip:N,content:z,contentWrapperRef:O,isOpen:I,defaultIsOpen:D=!1,setIsOpen:H,previousActiveAnchor:$,activeAnchor:C,setActiveAnchor:L,border:F,opacity:oe,arrowColor:q,arrowSize:ee=8,role:ue="tooltip"})=>{var X;const B=c.useRef(null),V=c.useRef(null),K=c.useRef(null),me=c.useRef(null),se=c.useRef(null),pe=c.useRef(null),[re,Pe]=c.useState({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[ve,Ce]=c.useState(!1),[ie,Se]=c.useState(!1),[ae,ct]=c.useState(null),de=c.useRef(!1),tt=c.useRef(null),_n=c.useRef(!1),nt=c.useRef(!1),rt=c.useRef({getBoundingClientRect:()=>({x:0,y:0,width:0,height:0,top:0,left:0,right:0,bottom:0})});ug(()=>(nt.current=!0,()=>{nt.current=!1}),[]);const ce=c.useCallback(P=>{nt.current&&(P&&Se(!0),setTimeout(()=>{nt.current&&(H?.(P),I===void 0&&Ce(P))},10))},[I,H]);c.useEffect(()=>{if(t){if(ve){W($);const ne=P(C),fe=[...new Set([...ne,t])].filter(Boolean).join(" ");C?.setAttribute("aria-describedby",fe)}else W(C);return()=>{W(C),W($)}}function P(ne){var fe;return((fe=ne?.getAttribute("aria-describedby"))===null||fe===void 0?void 0:fe.split(" "))||[]}function W(ne){const fe=P(ne).filter(Xe=>Xe!==t);fe.length?ne?.setAttribute("aria-describedby",fe.join(" ")):ne?.removeAttribute("aria-describedby")}},[C,ve,t,$]),c.useEffect(()=>{if(I===void 0)return()=>null;I&&Se(!0);const P=setTimeout(()=>{Ce(I)},10);return()=>{clearTimeout(P)}},[I]),c.useEffect(()=>{if(ve!==de.current)if(Me(pe),de.current=ve,ve)M?.();else{if(os===null){const W=getComputedStyle(document.body);os=(ne=>{const fe=ne.match(/^([\d.]+)(m?s)$/);if(!fe)return 0;const[,Xe,Kt]=fe;return Number(Xe)*(Kt==="ms"?1:1e3)})(W.getPropertyValue("--rt-transition-show-delay"))}const P=os;pe.current=setTimeout(()=>{Se(!1),ct(null),j?.()},P+25)}},[j,M,ve]),c.useEffect(()=>(Me(se),!ve||!b||b<=0||(se.current=setTimeout(()=>{ce(!1)},b)),()=>{Me(se)}),[C,b,ce,ve]);const Lt=c.useCallback(P=>{nt.current&&Pe(W=>W.place===P.place&&W.tooltipStyles.left===P.tooltipStyles.left&&W.tooltipStyles.top===P.tooltipStyles.top&&W.tooltipStyles.border===P.tooltipStyles.border&&W.tooltipArrowStyles.left===P.tooltipArrowStyles.left&&W.tooltipArrowStyles.top===P.tooltipArrowStyles.top&&W.tooltipArrowStyles.right===P.tooltipArrowStyles.right&&W.tooltipArrowStyles.bottom===P.tooltipArrowStyles.bottom&&W.tooltipArrowStyles.borderBottom===P.tooltipArrowStyles.borderBottom&&W.tooltipArrowStyles.borderRight===P.tooltipArrowStyles.borderRight?W:P)},[]),Ot=c.useRef(ie);Ot.current=ie;const Je=c.useCallback((P=p)=>{K.current&&clearTimeout(K.current),Ot.current?ce(!0):K.current=setTimeout(()=>{ce(!0)},P)},[p,ce]),Ge=c.useCallback((P=g)=>{me.current&&clearTimeout(me.current),me.current=setTimeout(()=>{_n.current||ce(!1)},P)},[g,ce]),zt=c.useCallback(({x:P,y:W})=>{var ne;rt.current.getBoundingClientRect=()=>({x:P,y:W,width:0,height:0,top:W,left:P,right:P,bottom:W}),sc({place:(ne=ae?.place)!==null&&ne!==void 0?ne:a,offset:l,elementReference:rt.current,tooltipReference:B.current,tooltipArrowReference:V.current,strategy:m,middlewares:d,border:F,arrowSize:ee}).then(fe=>{Lt(fe)})},[ae?.place,a,l,m,d,F,ee,Lt]),gt=c.useCallback(()=>{var P,W;const ne=(P=ae?.position)!==null&&P!==void 0?P:R;ne?zt(ne):v?tt.current&&zt(tt.current):C?.isConnected&&sc({place:(W=ae?.place)!==null&&W!==void 0?W:a,offset:l,elementReference:C,tooltipReference:B.current,tooltipArrowReference:V.current,strategy:m,middlewares:d,border:F,arrowSize:ee}).then(fe=>{nt.current&&Lt(fe)})},[ae?.position,ae?.place,R,v,C,a,l,m,d,F,zt,Lt,ee]),Jn=c.useCallback(()=>{Se(!1),ce(!1),L(null),Me(K),Me(me),Me(se)},[ce,L]),vt=ie||D||!!I||!!C||!!ae?.anchorSelect,{anchorElements:yt,
73selector:Gn}=(({id:P,anchorSelect:W,imperativeAnchorSelect:ne,activeAnchor:fe,disableTooltip:Xe,onActiveAnchorRemoved:Kt,trackAnchors:kn})=>{const[bt,Xn]=c.useState([]),[En,Yn]=c.useState(null),It=c.useRef(null),Ye=c.useMemo(()=>(({id:Ie,anchorSelect:Qn,imperativeAnchorSelect:Be})=>{var wt;let er=(wt=Be??Qn)!==null&&wt!==void 0?wt:"";return!er&&Ie&&(er=`[data-tooltip-id='${Ie.replace(/'/g,"\\'")}']`),er})({id:P,anchorSelect:W,imperativeAnchorSelect:ne}),[P,W,ne]),Qt=c.useMemo(()=>bt.filter(Ie=>!Xe?.(Ie)),[bt,Xe]),Kn=c.useMemo(()=>{if(!fe||!Ye)return!1;try{return fe.matches(Ye)}catch{return!1}},[fe,Ye,Qt]);return c.useEffect(()=>Ye&&kn?mg(Ye,(Ie,Qn)=>{Xn(Ie),Yn(Qn)}):(Xn([]),void Yn(null)),[Ye,kn]),c.useEffect(()=>{En&&It.current!==Ye&&(It.current=Ye)},[Ye,En]),c.useEffect(()=>{fe&&(fe.isConnected&&(Qt.includes(fe)||Kn)||Kt())},[fe,Qt,Kn,Kt]),{anchorElements:Qt,selector:Ye}})({id:t,anchorSelect:i,imperativeAnchorSelect:ae?.anchorSelect,activeAnchor:C,disableTooltip:N,onActiveAnchorRemoved:Jn,trackAnchors:vt});(({activeAnchor:P,anchorElements:W,anchorSelector:ne,clickable:fe,closeEvents:Xe,delayHide:Kt,delayShow:kn,disableTooltip:bt,float:Xn,globalCloseEvents:En,handleHideTooltipDelayed:Yn,handleShow:It,handleShowTooltipDelayed:Ye,handleTooltipPosition:Qt,hoveringTooltip:Kn,imperativeModeOnly:Ie,lastFloatPosition:Qn,openEvents:Be,openOnClick:wt,rendered:er,setActiveAnchor:Bo,show:Bi,tooltipHideDelayTimerRef:qi,tooltipRef:tr,tooltipShowDelayTimerRef:en,updateTooltipPosition:Wi})=>{const Fd=c.useRef(ic(Y=>{},50)),Hd=c.useRef(ic(()=>{},50)),Ji=c.useRef(null),Gi=c.useRef(null),Xi=c.useRef(null),Yi=c.useRef(null);P!==Xi.current&&(Xi.current=P,Ji.current=ac(P));const qo=tr.current;qo!==Yi.current&&(Yi.current=qo,Gi.current=ac(qo));const Ki=wt||Be?.click||Be?.dblclick||Be?.mousedown,Zt=c.useMemo(()=>{const Y=Be?{...Be}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};return!Be&&wt&&Object.assign(Y,{mouseenter:!1,focus:!1,click:!0}),Ie&&Object.assign(Y,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Y},[Be,wt,Ie]),tn=c.useMemo(()=>{const Y=Xe?{...Xe}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};return!Xe&&wt&&Object.assign(Y,{mouseleave:!1,blur:!1}),Ie&&Object.assign(Y,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Y},[Xe,wt,Ie]),xt=c.useMemo(()=>{const Y=En?{...En}:{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:Ki||!1};return Ie&&Object.assign(Y,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1}),Y},[En,Ki,Ie]),_t=c.useRef(P);_t.current=P;const Cr=c.useRef(Bi);Cr.current=Bi;const Wo=c.useRef(W);Wo.current=W;const Nr=c.useRef(It);Nr.current=It;const Qi=c.useRef(Qt);Qi.current=Qt;const ea=c.useRef(Wi);ea.current=Wi;const kt=c.useRef(()=>null),Jo=c.useRef(()=>{}),Lr=c.useRef(()=>{}),ta=ne?(function(Y){const Ee=Y.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return Ee?Ee[2].replace(/\\(['"])/g,"$1"):null})(ne):null;kt.current=Y=>{var Ee,Ke;if(!(Y instanceof Element&&Y.isConnected))return null;const Ze=Y;if(ta){const Le=(function(nn,Dt){let Qe=nn;for(;Qe;){const Et=Qe.dataset;if(Et?.tooltipId===Dt)return Qe;Qe=Qe.parentElement}return null})(Ze,ta);if(Le&&!bt?.(Le))return Le}else if(ne)try{const Le=(Ee=Ze.matches(ne)?Ze:Ze.closest(ne))!==null&&Ee!==void 0?Ee:null;if(Le&&!bt?.(Le))return Le}catch{return null}return(Ke=Wo.current.find(Le=>Le===Ze||Le.contains(Ze)))!==null&&Ke!==void 0?Ke:null},Jo.current=Y=>{Y&&(Y.isConnected?bt?.(Y)||(kn&&_t.current&&Y!==_t.current?(en.current&&clearTimeout(en.current),en.current=setTimeout(()=>{Bo(Y),It(!0)},kn)):(Bo(Y),kn?Ye():It(!0)),qi.current&&clearTimeout(qi.current)):Bo(null))},Lr.current=()=>{fe?Yn(Kt||100):Kt?Yn():It(!1),en.current&&clearTimeout(en.current)};const Or=Fd.current,zr=Hd.current;Or.setCallback(Y=>Jo.current(Y)),zr.setCallback(()=>Lr.current()),c.useEffect(()=>{const Y=[],Ee=(J,he,De)=>{Y.push(pg(J,he,De))},Ke=J=>{var he;return!!(J?.target instanceof Node&&(!((he=_t.current)===null||he===void 0)&&he.contains(J.target)))},Ze=J=>{zr.cancel(),Or(J)},Le=()=>{Or.cancel(),zr()},nn=()=>{Ee("mouseover",J=>{const he=kt.current(J.target);he&&kt.current(J.relatedTarget)!==he&&Ze(he)})},Dt=()=>
73{Ee("mouseout",J=>{const he=kt.current(J.target);if(!he&&!Ke(J))return;const De=J.relatedTarget,Ft=he||_t.current;De instanceof Node&&Ft?.contains(De)||Le()})};Zt.mouseenter&&nn(),tn.mouseleave&&Dt(),Zt.mouseover&&nn(),tn.mouseout&&Dt(),Zt.focus&&Ee("focusin",J=>{Ze(kt.current(J.target))}),(Zt.mouseenter||Zt.mouseover||Zt.focus)&&Ee("touchstart",J=>{Ze(kt.current(J.target))}),tn.blur&&Ee("focusout",J=>{const he=kt.current(J.target);if(!he&&!Ke(J))return;const De=J.relatedTarget,Ft=he||_t.current;De instanceof Node&&Ft?.contains(De)||Le()});const Qe=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],Et=["click","dblclick","mousedown","mouseup"],rn=J=>{var he;const De=kt.current((he=J?.target)!==null&&he!==void 0?he:null);De&&(Cr.current&&_t.current===De||Jo.current(De))},$r=J=>{Cr.current&&Ke(J)&&Lr.current()};Object.entries(Zt).forEach(([J,he])=>{he&&!Qe.includes(J)&&Et.includes(J)&&Ee(J,rn,{capture:!0})}),Object.entries(tn).forEach(([J,he])=>{he&&!Qe.includes(J)&&Et.includes(J)&&Ee(J,$r,{capture:!0})}),Xn&&Ee("pointermove",J=>{const he=_t.current;if(!he||kt.current(J.target)!==he)return;const De=J,Ft={x:De.clientX,y:De.clientY};Qi.current(Ft),Qn.current=Ft});const Vt=tr.current,na=()=>{Kn.current=!0},ra=()=>{Kn.current=!1,Lr.current()},oa=fe&&(tn.mouseout||tn.mouseleave);return oa&&(Vt?.addEventListener("mouseover",na),Vt?.addEventListener("mouseout",ra)),()=>{Y.forEach(J=>J()),oa&&(Vt?.removeEventListener("mouseover",na),Vt?.removeEventListener("mouseout",ra)),Or.cancel(),zr.cancel()}},[Zt,tn,Xn,fe,er]),c.useEffect(()=>{const Y=()=>{Nr.current(!1),Me(en)},Ee=Gi.current,Ke=Ji.current;xt.scroll&&(window.addEventListener("scroll",Y),Ke?.addEventListener("scroll",Y),Ee?.addEventListener("scroll",Y));let Ze=null;xt.resize?window.addEventListener("resize",Y):P&&tr.current&&(Ze=ng(P,tr.current,()=>ea.current(),{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Le=Dt=>{Dt.key==="Escape"&&Nr.current(!1)};xt.escape&&window.addEventListener("keydown",Le);const nn=Dt=>{var Qe,Et;if(!Cr.current)return;const rn=Dt.target;rn instanceof Node&&rn.isConnected&&(!((Qe=tr.current)===null||Qe===void 0)&&Qe.contains(rn)||!((Et=_t.current)===null||Et===void 0)&&Et.contains(rn)||Wo.current.some($r=>$r?.contains(rn))||(Nr.current(!1),Me(en)))};return xt.clickOutsideAnchor&&window.addEventListener("click",nn),()=>{xt.scroll&&(window.removeEventListener("scroll",Y),Ke?.removeEventListener("scroll",Y),Ee?.removeEventListener("scroll",Y)),xt.resize&&window.removeEventListener("resize",Y),Ze&&Ze(),xt.escape&&window.removeEventListener("keydown",Le),xt.clickOutsideAnchor&&window.removeEventListener("click",nn)}},[xt,P])})({activeAnchor:C,anchorElements:yt,anchorSelector:Gn,clickable:y,closeEvents:x,delayHide:g,delayShow:p,disableTooltip:N,float:v,globalCloseEvents:S,handleHideTooltipDelayed:Ge,handleShow:ce,handleShowTooltipDelayed:Je,handleTooltipPosition:zt,hoveringTooltip:_n,imperativeModeOnly:_,lastFloatPosition:tt,openEvents:k,openOnClick:u,rendered:ie,setActiveAnchor:L,show:ve,tooltipHideDelayTimerRef:me,tooltipRef:B,tooltipShowDelayTimerRef:K,updateTooltipPosition:gt});const U=c.useRef(gt);U.current=gt,c.useEffect(()=>{ie&>()},[ie,gt]),c.useEffect(()=>{if(!ie||!O?.current)return()=>null;let P=null;const W=new ResizeObserver(()=>{P&&clearTimeout(P),P=setTimeout(()=>{nt.current&&U.current(),P=null},0)});return W.observe(O.current),()=>{W.disconnect(),P&&clearTimeout(P)}},[z,O,ie]),c.useEffect(()=>{var P;if(!(D||I))return;const W=(()=>{if(!C||!ae?.anchorSelect)return!1;try{return C.matches(ae.anchorSelect)}catch{return!1}})();if(!C||!yt.includes(C)){if(W)return;L((P=yt[0])!==null&&P!==void 0?P:null)}},[C,yt,D,ae?.anchorSelect,I,ie,L]),c.useEffect(()=>(D&&ce(!0),()=>{Me(K),Me(me),Me(se),Me(pe)}),[D,ce]),c.useEffect(()=>{K.current&&(Me(K),Je(p))},[p,Je]);const Re=(X=ae?.content)!==null&&X!==void 0?X:z,Ne=Re!=null,_e=ve&&re.tooltipStyles.left!==void 0,Ue=c.useMemo(()=>({...E,...re.tooltipStyles,opacity:oe!==void 0&&_e?oe:void 0}),[E,re.tooltipStyles,oe,_e]),$t=c.useMemo(()=>q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0,[q]),Pt=c.useMemo(()=>({...re.tooltipArrowStyles,background:$t,"--rt-arrow-size":`${ee}px`}),[re.tooltipArrowStyles,$t,ee]);c.useImperativeHandle(e,()=>({open:P=>{let W=null;if(P?.anchorSelect){try{W=document.querySelector(P.anchorSelect)}
73catch{return}if(!W)return}W&&L(W),ct(P??null),P?.delay?Je(P.delay):ce(!0)},close:P=>{P?.delay?Ge(P.delay):ce(!1)},activeAnchor:C,place:re.place,isOpen:!!(ie&&!w&&Ne&&_e)})),c.useEffect(()=>()=>{Me(K),Me(me),Me(se),Me(pe)},[]);const Uo=ie&&!w&&Ne?ke.createElement(f,{id:t,role:ue,className:to("react-tooltip",sn.tooltip,Br.tooltip,Br[o],n,`react-tooltip__place-${re.place}`,sn[_e?"show":"closing"],_e?"react-tooltip__show":"react-tooltip__closing",m==="fixed"&&sn.fixed,y&&sn.clickable),onTransitionEnd:P=>{Me(pe),ve||P.propertyName!=="opacity"||(Se(!1),ct(null),j?.())},style:Ue,ref:B},ke.createElement(f,{className:to("react-tooltip-content-wrapper",sn.content,Br.content)},Re),ke.createElement(f,{className:to("react-tooltip-arrow",sn.arrow,Br.arrow,r,A&&sn.noArrow),style:Pt,ref:V})):null;return Uo?s?p0.createPortal(Uo,s):Uo:null});const an=new Map;let ss=null;const uc={attributes:!0,childList:!1,subtree:!1};function vg(e,t){const n=(ss||(ss=new MutationObserver(o=>{var s;for(const i of o){if(i.type!=="attributes"||!(!((s=i.attributeName)===null||s===void 0)&&s.startsWith("data-tooltip-")))continue;const a=i.target,l=an.get(a);l&&l.forEach(u=>u(a))}})),ss);let r=an.get(e);return r||(r=new Set,an.set(e,r),n.observe(e,uc)),r.add(t),()=>{const o=an.get(e);o&&(o.delete(t),o.size===0&&(an.delete(e),an.size===0?n.disconnect():(n.disconnect(),an.forEach((s,i)=>{n.observe(i,uc)}))))}}const yg=ke.forwardRef(({id:e,anchorSelect:t,content:n,render:r,className:o,classNameArrow:s,variant:i="dark",portalRoot:a,place:l="top",offset:u=10,wrapper:m="div",children:d=null,openOnClick:f=!1,positionStrategy:p="absolute",middlewares:g,delayShow:b=0,delayHide:v=0,autoClose:w,float:A=!1,hidden:y=!1,noArrow:k=!1,clickable:x=!1,openEvents:S,closeEvents:_,globalCloseEvents:E,imperativeModeOnly:R=!1,style:M,position:j,isOpen:N,defaultIsOpen:z=!1,disableStyleInjection:O=!1,border:I,opacity:D,arrowColor:H,arrowSize:$,setIsOpen:C,afterShow:L,afterHide:F,disableTooltip:oe,role:q="tooltip"},ee)=>{var ue,X,B,V,K,me,se,pe;const[re,Pe]=c.useState(null),[ve,Ce]=c.useState({}),ie=c.useRef(null),Se=c.useRef(O),ae=c.useCallback(U=>{Pe(Re=>(U?.isSameNode(Re)||(ie.current=Re),U))},[]),ct=U=>U?.getAttributeNames().reduce((Ne,_e)=>{var Ue;return _e.startsWith("data-tooltip-")&&(Ne[_e.replace(/^data-tooltip-/,"")]=(Ue=U?.getAttribute(_e))!==null&&Ue!==void 0?Ue:null),Ne},{});c.useEffect(()=>{Se.current},[O]),c.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:O==="core",disableBase:O}}))},[]),c.useEffect(()=>{if(!re)return Ce({}),()=>{};const U=Re=>{const Ne=ct(Re);Ce(_e=>{const Ue=Object.keys(Ne),$t=Object.keys(_e);return Ue.length===$t.length&&Ue.every(Pt=>Ne[Pt]===_e[Pt])?_e:Ne})};return U(re),vg(re,U)},[re,t]),c.useEffect(()=>{},[I,D,M?.border,M?.opacity]);const de=re?ct(re):ve,tt=(ue=de.content)!==null&&ue!==void 0?ue:n,_n=(X=de.place)!==null&&X!==void 0?X:l,nt=(B=de.variant)!==null&&B!==void 0?B:i,rt=de.offset==null?u:Number(de.offset),ce=(V=de.wrapper)!==null&&V!==void 0?V:m,Lt=(K=de["position-strategy"])!==null&&K!==void 0?K:p,Ot=de["delay-show"]==null?b:Number(de["delay-show"]),Je=de["delay-hide"]==null?v:Number(de["delay-hide"]),Ge=de["auto-close"]==null?w:Number(de["auto-close"]),zt=de.float==null?A:de.float==="true",gt=de.hidden==null?y:de.hidden==="true",Jn=(me=de["class-name"])!==null&&me!==void 0?me:null;let vt=d;const yt=c.useRef(null);if(r){const U=r({content:(pe=(se=de.content)!==null&&se!==void 0?se:tt)!==null&&pe!==void 0?pe:null,activeAnchor:re});vt=U?ke.createElement("div",{ref:yt,className:"react-tooltip-content-wrapper"},U):null}else tt!=null&&(vt=tt);const Gn={forwardRef:ee,id:e,anchorSelect:t,className:to(o,Jn),classNameArrow:s,content:vt,contentWrapperRef:yt,portalRoot:a,place:_n,variant:nt,offset:rt,wrapper:ce,openOnClick:f,positionStrategy:Lt,middlewares:g,delayShow:Ot,delayHide:Je,autoClose:Ge,float:zt,hidden:gt,noArrow:k,clickable:x,openEvents:S,closeEvents:_,globalCloseEvents:E,imperativeModeOnly:R,style:M,position:j,isOpen:N,defaultIsOpen:z,border:I,opacity:D,arrowColor:H,arrowSize:$,setIsOpen:C,afterShow:L,afterHide:F,disableTooltip:oe,activeAnchor:re,previousActiveAnchor:ie.current,setActiveAnchor:ae,role:q};return ke.createElement(gg,{...Gn})});var bg=c.memo(yg);typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||oc({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0}
73.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.core-styles-module_content__BRKdB{position:relative;z-index:1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out;will-change:opacity}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in;will-change:opacity}",type:"core"}),e.detail.disableBase||oc({css:` 74.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});function wg(e={}){return G("m-0 text-base font-medium text-kumo-default")}function dc(){return G("inline-flex items-center gap-1")}function Mu({children:e,showOptional:t=!1,tooltip:n,className:r,htmlFor:o,asContent:s=!1}){const i=h.jsxs(h.Fragment,{children:[e,t&&h.jsx("span",{className:"font-normal text-kumo-subtle",children:"(optional)"}),n&&h.jsx(Xd,{content:n,render:h.jsx(So,{variant:"ghost",size:"xs",shape:"square","aria-label":"More information",children:h.jsx(P0,{className:"size-4"})})})]});return s?h.jsx("span",{className:G(dc(),r),children:i}):h.jsx("label",{htmlFor:o,className:G(wg(),dc(),r),children:i})}Mu.displayName="Label";const wi=c.createContext(void 0);wi.displayName="FieldsetRootContext";function xi(e=!1){const t=c.useContext(wi);if(!t&&!e)throw new Error("Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.");return t}const ju=c.forwardRef(function(t,n){const{render:r,className:o,style:s,disabled:i=!1,...a}=t,[l,u]=c.useState(void 0),m=xi(!0)?.disabled||i,d=Gt("fieldset",t,{ref:n,state:{disabled:m},props:[{"aria-labelledby":l,disabled:m},a]}),f=c.useMemo(()=>({legendId:l,setLegendId:u,disabled:m}),[l,u,m]);return h.jsx(wi.Provider,{value:f,children:d})});ju.displayName="FieldsetRoot";const _i=c.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,...a}=t,{disabled:l,setLegendId:u}=xi(),m=qt(i);return Tt(()=>(u(m),()=>{u(void 0)}),[u,m]),Gt("div",t,{state:{disabled:l??!1},ref:n,props:[{id:m},a]})});_i.displayName="FieldsetLegend";let fc=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Io={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ar={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},xg={disabled:!1,...ar},Ar={valid(e){return e===null?null:e?{[fc.valid]:""}:{[fc.invalid]:""}}},_g={invalid:void 0,name:void 0,validityData:{state:Io,errors:[],error:"",value:"",initialValue:null},setValidityData:$e,disabled:void 0,touched:ar.touched,setTouched:$e,dirty:ar.dirty,setDirty:$e,filled:ar.filled,setFilled:$e,focused:ar.focused,setFocused:$e,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:xg,markedDirtyRef:{current:!1},registerFieldControl:$e,validation:{getValidationProps:(e,t=Ys)=>t,inputRef:{current:null},registerInput:$e,commit:async()=>{},change:$e}},ki=c.createContext(_g);ki.displayName="FieldRootContext";function Zo(e=!0){const t=c.useContext(ki);if(t.setValidityData===$e&&!e)throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");return t}const Ei=c.createContext({controlId:void 0,registerControlId:$e,labelId:void 0,setLabelId:$e,messageIds:[],setMessageIds:$e,getDescriptionProps:e=>e});Ei.displayName="LabelableContext";function Wn(){return c.useContext(Ei)}const Cu=c.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:$e,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});Cu.displayName="FormContext";function Sr(){return c.useContext(Cu)}function kg(e,t){const n=qt(e);return Tt(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function Eg(e={}){const{id:t,fallbackControlId:n,native:r=!1,setLabelId:o,focusControl:s}=e,{controlId:i,setLabelId:a}=Wn(),l=kg(t,qe(f=>{a(f),o?.(f)})),u=i??n;function m(f){if(s){s(f,u);return}if(!u)return;const p=Kd(f.currentTarget).getElementById(u);Qd(p)&&Ag(p)}function d(f){Yd(f.nativeEvent)?.closest("button,input,select,textarea")||(!f.defaultPrevented&&f.detail>1&&f.preventDefault(),!r&&m(f))}return r?{id:l,htmlFor:u??void 0,onMouseDown:d}:{id:l,onClick:d,onPointerDown(f){f.preventDefault()}}}function Ag(e){e.focus({focusVisible:!0})}const Nu=c.createContext({disabled:!1});Nu.displayName="FieldItemContext";function Lu(){return c.useContext(Nu)}const Ou=function(t){const n=qt(),r=t.controlId===void 0?n:t.controlId,[o,s]=c.useState(r),[i,a]=c.useState(t.labelId),[l,u]=c.useState([]),m=Ks(()=>new Map),{messageIds:d}=Wn(),f=qe((b,v)=>{const w=m.current;if(v===void 0){w.delete(b);return}w.set(b,v),s(A=>{if(w.size===0)return;let y;for(const k of w.values()){if(A!==void 0&&k===A)return A;y===void 0&&(y=k)}return y})}),p=c.useCallback(b=>{const v=b["aria-describedby"]?b["aria-describedby"].split(" "):[];return v.push(...d,...l),{...b,"aria-describedby":Array.from(new Set(v)).join(" ")||void 0}},[d,l]),g=c.useMemo(()=>({controlId:o,registerControlId:f,labelId:i,setLabelId:a,messageIds:l,setMessageIds:u,getDescriptionProps:p}),[o,f,i,a,l,u,p]);return h.jsx(Ei.Provider,{value:g,children:t.children})};Ou.displayName="LabelableProvider";function Os(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}
74const no=Object.keys(Io);function Sg(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of no)n!=="valid"&&(n==="valueMissing"?t=e[n]:e[n]&&(t=!1));return t}function Rg(e){let t=null;for(const n of e)if(!n.disabled){if(!n.validity.valid)return n;t??=n}return t}function hc(e,t){let n=!1;for(const r of t)r.setCustomValidity(""),n||=r===e;n||e.setCustomValidity("")}function Tg(e){const{formRef:t}=Sr(),{setValidityData:n,validate:r,validityData:o,validationDebounceTime:s,invalid:i,markedDirtyRef:a,state:l,shouldValidateOnChange:u,getRegisteredFieldId:m}=e,{controlId:d,getDescriptionProps:f}=Wn(),p=e0(),g=c.useRef(null),b=Ks(()=>new Set).current,v=c.useRef(0),w=c.useCallback(x=>{if(x)return b.add(x),()=>{b.delete(x)}},[b]),A=qe(async(x,S=!1)=>{const _=Rg(b)??g.current;if(!_)return;v.current+=1;const E=v.current;function R(H,$=i){const C=m()??d;if(C==null)return;const L=t.current.fields.get(C);if(!L)return;const F=Os(H,$);t.current.fields.set(C,{...L,validityData:F})}if(S){if(l.valid!==!1)return;const H=_.validity;if(!H.valueMissing){const C={value:x,state:{...Io,valid:!0},error:"",errors:[],initialValue:o.initialValue};hc(_,b),R(C,!1),n(C);return}const $=no.reduce((C,L)=>(C[L]=H[L],C),{});if(!$.valid&&!Sg($))return}function M(H){const $=no.reduce((L,F)=>(L[F]=H.validity[F],L),{});let C=!1;for(const L of no)if(L!=="valid"){if(L==="valueMissing"&&$[L])C=!0;else if($[L])return $}return C&&!a.current&&($.valid=!0,$.valueMissing=!1),$}p.clear();let j=null,N=[];const z=M(_);let O;const I=u();if(_.validationMessage&&!I)O=_.validationMessage,N=[_.validationMessage];else{const H=Array.from(t.current.fields.values()).reduce((C,L)=>(L.name&&(C[L.name]=L.getValue()),C),{}),$=r(x,H);if(typeof $=="object"&&$!==null&&"then"in $){if(j=await $,E!==v.current)return}else j=$;j!==null?(z.valid=!1,z.customError=!0,Array.isArray(j)?(N=j,_.setCustomValidity(j.join(` 75`))):j&&(N=[j],_.setCustomValidity(j))):I&&(hc(_,b),z.customError=!1,_.validationMessage?(O=_.validationMessage,N=[_.validationMessage]):_.validity.valid&&!z.valid&&(z.valid=!0))}const D={value:x,state:z,error:O??(Array.isArray(j)?j[0]:j??""),errors:N,initialValue:o.initialValue};R(D),n(D)}),y=qe(x=>{p.clear();const S=u();S&&x!==""&&s?(v.current+=1,p.start(s,()=>{A(x)})):A(x,!S)}),k=c.useCallback((x,S={})=>Xs(f(S),l.valid===!1&&!l.disabled&&!x?{"aria-invalid":!0}:Ys),[f,l.disabled,l.valid]);return c.useMemo(()=>({getValidationProps:k,inputRef:g,registerInput:w,commit:A,change:y}),[k,w,A,y])}function Mg(e){const{commit:t,invalid:n,markedDirtyRef:r,name:o,setRegisteredFieldName:s,setRegisteredFieldId:i,setValidityData:a,validityData:l}=e,{formRef:u}=Sr(),m=c.useRef(null),d=c.useRef(null),f=c.useRef(null),p=qe(()=>{const y=d.current;if(y)return y.getValue?y.getValue():y.value});function g(y){return y.value===void 0?p():y.value}const b=qe(()=>{const y=d.current;if(r.current=!0,!y){t(l.value);return}t(g(y))});function v(){const y=d.current;!y||!y.id||u.current.fields.set(y.id,{getValue:p,name:o??y.name,controlRef:y.controlRef??f,validityData:Os(l,n),validate:b})}function w(y=d.current?.id){y&&u.current.fields.delete(y)}function A(){const y=d.current;if(!y)return;const k=g(y);l.initialValue===null&&k!==null&&a(x=>({...x,initialValue:k}))}return Tt(()=>{const y=d.current;!y||!y.id||(s(o?void 0:y.name),u.current.fields.set(y.id,{getValue:p,name:o??y.name,controlRef:y.controlRef??f,validityData:Os(l,n),validate:b}))},[u,p,n,o,s,b,l]),Tt(()=>{const y=u.current.fields;return()=>{const k=d.current?.id;k&&y.delete(k)}},[u]),[b,qe((y,k)=>{if(!k){m.current===y&&(m.current=null,w(),d.current=null,s(void 0),i(void 0));return}const x=d.current?.id;m.current=y,d.current=k,o||s(k.name),i(k.id),x&&x!==k.id&&w(x),A(),v()})]}const zu=c.forwardRef(function(t,n){const{errors:r,validationMode:o,submitAttemptedRef:s}=Sr(),{render:i,className:a,validate:l,validationDebounceTime:u=0,validationMode:m=o,name:d,disabled:f=!1,invalid:p,dirty:g,touched:b,actionsRef:v,style:w,...A}=t,y=xi(!0)?.disabled,k=qe(l||(()=>null)),x=y||f,[S,_]=c.useState(!1),[E,R]=c.useState(!1),[M,j]=c.useState(!1),[N,z]=c.useState(!1),O=g??E,I=b??S,D=c.useRef(O),H=c.useRef(void 0),[$,C]=c.useState(),L=d??$;Tt(()=>{g!==void 0&&(D.current=g)},[g]);const F=c.useCallback(()=>H.current,[]),oe=c.useCallback(Se=>{H.current=Se},[]),q=qe(Se=>{g===void 0&&(Se&&(D.current=!0),R(Se))}),ee=qe(Se=>{b===void 0&&_(Se)}),ue=qe(()=>m==="onChange"||m==="onSubmit"&&s.current),X=L&&Object.hasOwn(r,L)?r[L]:null,B=!!(Array.isArray(X)?X.length:X),V=p===!0||B,[K,me]=c.useState({state:Io,error:"",errors:[],value:null,initialValue:null}),se=x?null:!V&&K.state.valid,pe=c.useMemo(()=>({disabled:x,touched:I,dirty:O,valid:se,filled:M,focused:N}),[x,I,O,se,M,N]),re=Tg({setValidityData:me,validate:k,validityData:K,validationDebounceTime:u,invalid:V,markedDirtyRef:D,state:pe,shouldValidateOnChange:ue,getRegisteredFieldId:F}
75),[Pe,ve]=Mg({commit:re.commit,invalid:V,markedDirtyRef:D,name:d,setRegisteredFieldName:C,setRegisteredFieldId:oe,setValidityData:me,validityData:K});c.useImperativeHandle(v,()=>({validate:Pe}),[Pe]);const Ce=c.useMemo(()=>({invalid:V,name:L,validityData:K,setValidityData:me,disabled:x,touched:I,setTouched:ee,dirty:O,setDirty:q,filled:M,setFilled:j,focused:N,setFocused:z,validate:k,validationMode:m,validationDebounceTime:u,shouldValidateOnChange:ue,state:pe,markedDirtyRef:D,registerFieldControl:ve,validation:re}),[V,L,K,x,I,ee,O,q,M,j,N,z,k,m,u,ue,pe,ve,re]),ie=Gt("div",t,{ref:n,state:pe,props:A,stateAttributesMapping:Ar});return h.jsx(ki.Provider,{value:Ce,children:ie})});zu.displayName="FieldRootInner";const $u=c.forwardRef(function(t,n){return h.jsx(Ou,{children:h.jsx(zu,{...t,ref:n})})});$u.displayName="FieldRoot";const Pu=c.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,nativeLabel:a=!0,...l}=t,u=Zo(!1),m=Lu(),{labelId:d}=Wn(),f={...u.state,disabled:u.disabled||m.disabled},p=c.useRef(null),g=Eg({id:d??i,native:a});return c.useEffect(()=>{if(!p.current)return;const b=p.current.tagName==="LABEL";a?b||sa(`<Field.Label> expected a <label> element because the \`nativeLabel\` prop is true. Rendering a non-<label> disables native label association, so \`htmlFor\` will not work. Use a real <label> in the \`render\` prop, or set \`nativeLabel\` to \`false\`.${ia.captureOwnerStack?.()||""}`):b&&sa(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${ia.captureOwnerStack?.()||""}`)},[a]),Gt("label",t,{ref:[n,p],state:f,props:[g,l],stateAttributesMapping:Ar})});Pu.displayName="FieldLabel";function jg(e,t,n,r=!0,o){const[s,i]=c.useState(),a=qt(o?`${o}-label`:void 0),l=e??t??s;return Tt(()=>{const u=e||t||!r?void 0:Cg(n.current,a);s!==u&&i(u)}),l}function Cg(e,t){const n=Ng(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Ng(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const o=e.nextElementSibling;if(o&&o.htmlFor===n)return o}const r=e.labels;return r&&r[0]}function Iu(e,t,n,r,o=!0,s){const{registerFieldControl:i}=Zo(),a=c.useRef(null);a.current||(a.current=Symbol()),Tt(()=>{const l=a.current;if(!(!l||!o))return i(l,{controlRef:e,getValue:r,id:t,name:s,value:n}),()=>{i(l,void 0)}},[e,o,r,t,s,i,n])}const Ai=c.createContext(void 0);Ai.displayName="CheckboxGroupContext";function Lg(e=!0){const t=c.useContext(Ai);if(t===void 0&&!e)throw new Error("Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.");return t}function Og(e){if(!e)return null;for(const t of e.elements){const n=t.tagName;if(n==="BUTTON"||n==="INPUT"){const r=t;if(r.type==="submit")return r}}return null}let mc=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function Zu(e){return c.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[mc.checked]:""}:{[mc.unchecked]:""}},...Ar}),[e.indeterminate])}const Si=c.createContext(void 0);Si.displayName="CheckboxRootContext";function zg(){const e=c.useContext(Si);if(e===void 0)throw new Error("Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.");return e}const $g="data-parent",Ri=c.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:s=!1,"aria-labelledby":i,disabled:a=!1,form:l,id:u,indeterminate:m=!1,inputRef:d,name:f,onCheckedChange:p,parent:g=!1,readOnly:b=!1,render:v,required:w=!1,uncheckedValue:A,value:y,nativeButton:k=!1,style:x,...S}=t,{clearErrors:_}=Sr(),{disabled:E,name:R,setDirty:M,setFilled:j,setFocused:N,setTouched:z,state:O,validationMode:I,validityData:D,validation:
75H}=Zo(),$=Lu(),{labelId:C,controlId:L,registerControlId:F,getDescriptionProps:oe}=Wn(),q=Lg(),ee=q?.parent,ue=ee&&q.allValues,X=E||$.disabled||q?.disabled||a,B=R??f,V=y??B,K=qt(),me=qt();let se=L;ue?se=g?me:`${ee.id}-${V}`:u&&(se=u);let pe={};ue&&(g?pe=q.parent.getParentProps():V&&(pe=q.parent.getChildProps(V)));const{checked:re=r,indeterminate:Pe=m,onCheckedChange:ve,...Ce}=pe,ie=q?.value,Se=q?.setValue,ae=q?.defaultValue,ct=c.useRef(null),de=Ks(()=>Symbol("checkbox-control")),tt=c.useRef(!1),{getButtonProps:_n,buttonRef:nt}=t0({disabled:X,native:k}),rt=q?.validation??H,[ce,Lt]=ml({controlled:V&&ie&&!g?ie.includes(V):re,default:V&&ae&&!g?ae.includes(V):s,name:"Checkbox",state:"checked"}),Ot=ue?!!re:ce,Je=ue&&Pe||m;Tt(()=>{F!==$e&&(tt.current=!0,F(de.current,se))},[se,F,de]),c.useEffect(()=>{const U=de.current;return()=>{!tt.current||F===$e||(tt.current=!1,F(U,void 0))}},[F,de]),Iu(ct,K,ce,void 0,!q&&!X,f);const Ge=c.useRef(null),zt=n0(d,Ge,rt.inputRef,rt.registerInput),gt=jg(i,C,Ge,!k,se??void 0);Tt(()=>{Ge.current&&(Ge.current.indeterminate=Je,ce&&j(!0))},[ce,Je,j]),pl(ce,()=>{q||(_(B),j(ce),M(ce!==D.initialValue),rt.change(ce))});const Jn=Xs({checked:ce,disabled:X,form:l,name:g?void 0:B,id:k?void 0:se??void 0,required:w,ref:zt,style:B?r0:o0,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(U){if(U.nativeEvent.defaultPrevented)return;if(b){U.preventDefault();return}const Re=U.currentTarget.checked,Ne=s0(i0,U.nativeEvent);if(p?.(Re,Ne),!Ne.isCanceled&&(ve?.(Re,Ne),!Ne.isCanceled&&(Lt(Re),V&&ie&&Se&&!g&&!ue))){const _e=Re?[...ie,V]:ie.filter(Ue=>Ue!==V);Se(_e,Ne)}},onFocus(){ct.current?.focus()}},y!==void 0?{value:(q?ce&&y:y)||""}:Ys,oe,U=>rt.getValidationProps(X,U));c.useEffect(()=>{if(!ee||!V)return;const U=ee.disabledStatesRef.current;return U.set(V,X),()=>{U.delete(V)}},[ee,X,V]);const vt=c.useMemo(()=>({...O,checked:Ot,disabled:X,readOnly:b,required:w,indeterminate:Je}),[O,Ot,X,b,w,Je]),yt=Zu(vt),Gn=Gt("span",t,{state:vt,ref:[nt,ct,n,q?.registerControlRef],props:[{id:k?se??void 0:K,role:"checkbox","aria-checked":Je?"mixed":Ot,"aria-readonly":b||void 0,"aria-required":w||void 0,"aria-labelledby":gt,[$g]:g?"":void 0,onFocus(){X||N(!0)},onBlur(){const U=Ge.current;U&&(z(!0),N(!1),I==="onBlur"&&rt.commit(q?ie:U.checked))},onKeyDown(U){if(U.key!=="Enter"||(U.preventBaseUIHandler(),U.defaultPrevented))return;const Re=Ge.current?.form??null,Ne=U.currentTarget,_e=U.nativeEvent,Ue=U.preventDefault,$t=_e.preventDefault;let Pt=!1;U.preventDefault=()=>{Pt=!0,Ue.call(U)},_e.preventDefault=()=>{Pt=!0,$t.call(_e)},$t.call(_e),aa(Ne).queueMicrotask(()=>{U.preventDefault=Ue,_e.preventDefault=$t,Pt||Og(Re)?.click()})},onClick(U){if(b||X)return;U.preventDefault();const Re=Ge.current;Re&&Re.dispatchEvent(new(aa(Re)).PointerEvent("click",{bubbles:!0,shiftKey:U.shiftKey,ctrlKey:U.ctrlKey,altKey:U.altKey,metaKey:U.metaKey}))}},S,Ce,_n,oe,U=>rt.getValidationProps(X,U)],stateAttributesMapping:yt});return h.jsxs(Si.Provider,{value:vt,children:[Gn,!ce&&!q&&B&&!g&&A!==void 0&&h.jsx("input",{type:"hidden",form:l,name:B,value:A,disabled:X}),h.jsx("input",{...Jn,suppressHydrationWarning:!0})]})});Ri.displayName="CheckboxRoot";function Pg(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const pc=[];function Ig(e){const{allValues:t=pc,value:n=pc,onValueChange:r}=e,o=c.useRef(n),s=c.useRef(new Map),[i,a]=c.useState("mixed"),l=qt(),u=n.length===t.length,m=n.length!==t.length&&n.length>0,d=qe(r),f=c.useCallback(()=>({id:l,indeterminate:m,checked:u,"aria-controls":t.map(g=>`${l}-${g}`).join(" "),onCheckedChange(g,b){const v=o.current,w=t.filter(x=>s.current.get(x)&&v.includes(x)),A=t.filter(x=>!s.current.get(x)||s.current.get(x)&&v.includes(x));if(v.length===A.length||v.length===0){n.length===A.length?d(w,b):d(A,b);return}let y="mixed",k=v;i==="mixed"?(y="on",k=A):i==="on"&&(y="off",k=w),d(k,b),b.isCanceled||a(y)}}),[t,u,l,m,d,i,n.length]),p=c.useCallback(g=>({checked:n.includes(g),onCheckedChange(b,v){const w=n.slice();b?w.push(g):w.splice(w.indexOf(g),1),d(w,v),v.isCanceled||(o.current=w,a("mixed"))}}),[d,n]);return c.useMemo(()=>({id:l,indeterminate:m,getParentProps:f,getChildProps:p,disabledStatesRef:s}),[l,m,f,p])}const Du=c.forwardRef(function(t,n){const{allValues:r,className:o,defaultValue:s,disabled:i=!1,id:a,onValueChange:l,render:u,value:m,style:d,...f}=t,{disabled:p,name:g,state:b,validation:v,setFilled:w,setDirty:A,validityData:y}=Zo(),{labelId:k,getDescriptionProps:x}=Wn(),{clearErrors:S}=Sr(),_=p||i,E=c.useMemo(()=>
75{if(m===void 0)return s??[]},[m,s]),[R,M]=ml({controlled:m,default:E,name:"CheckboxGroup",state:"value"}),j=qe((L,F)=>{l?.(L,F),!F.isCanceled&&M(L)}),N=Ig({allValues:r,value:R,onValueChange:j}),z=qt(a),O=c.useRef(null),I=c.useCallback(L=>{O.current==null&&L!=null&&!L.hasAttribute("data-parent")&&(O.current=L)},[]);Iu(O,z,R,void 0,!!g&&!_,g);const D=R??ca;pl(D,()=>{g&&S(g);const L=Array.isArray(y.initialValue)?y.initialValue:ca;w(D.length>0),A(!Pg(D,L)),v.change(D)});const H={...b,disabled:_},$=c.useMemo(()=>({allValues:r,value:R,defaultValue:E,setValue:j,parent:N,disabled:_,validation:v,registerControlRef:I}),[r,R,E,j,N,_,v,I]),C=Gt("div",t,{state:H,ref:n,props:[{id:a,role:"group","aria-labelledby":k},f,x],stateAttributesMapping:Ar});return h.jsx(Ai.Provider,{value:$,children:C})});Du.displayName="CheckboxGroup";const Ti=c.forwardRef(function(t,n){const{render:r,className:o,style:s,keepMounted:i=!1,...a}=t,l=zg(),u=l.checked||l.indeterminate,{mounted:m,transitionStatus:d,setMounted:f}=a0(u),p=c.useRef(null),g={...l,transitionStatus:d};c0({open:u,ref:p,onComplete(){u||f(!1)}});const b={...Zu(l),...l0,...Ar},v=i||m,w=Gt("span",t,{ref:[n,p],state:g,stateAttributesMapping:b,props:a});return v?w:null});Ti.displayName="CheckboxIndicator";const Vu=c.createContext({controlFirst:!0}),Fu=c.forwardRef(({className:e,checked:t,indeterminate:n,disabled:r,variant:o="default",label:s,labelTooltip:i,controlFirst:a=!0,onCheckedChange:l,required:u,name:m,...d},f)=>{{const g=!!s,b=!!d["aria-label"],v=!!d["aria-labelledby"];!g&&!b&&!v&&console.warn(`[Kumo Checkbox]: Checkbox must have an accessible name. Provide either: 76 - label prop: <Checkbox label='Accept terms' /> 77 - aria-label: <Checkbox aria-label='Select item' /> 78 - aria-labelledby for custom label association 79 Note: When used inside Checkbox.Group, label is optional`)}const p=h.jsx(Ri,{ref:f,"data-kumo-component":"Checkbox",name:m,checked:t,indeterminate:n,disabled:r,onCheckedChange:l,className:G("relative flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-none",s&&"mt-0.5",o==="error"?"ring-kumo-danger":"ring-kumo-hairline",!r&&"hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand","data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast",r&&"cursor-not-allowed opacity-50",e),...d,children:h.jsx(Ti,{keepMounted:!0,className:"flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible",render:(g,b)=>h.jsx("span",{...g,children:b.indeterminate?h.jsx(ni,{weight:"bold",size:12}):h.jsx(Qs,{weight:"bold",size:12})})})});return s?h.jsx($u,{className:"inline-flex",children:h.jsxs(Pu,{className:G("!m-0 inline-flex !min-h-0 items-start gap-2 !text-base",a?"flex-row":"flex-row-reverse justify-end",r?"cursor-not-allowed":"cursor-pointer"),children:[p,h.jsx(Mu,{showOptional:u===!1,tooltip:i,asContent:!0,children:s})]})}):p});Fu.displayName="Checkbox";const Hu=c.forwardRef(({className:e,checked:t,indeterminate:n,disabled:r,variant:o="default",label:s,value:i,onCheckedChange:a,name:l},u)=>{const{controlFirst:m}=c.useContext(Vu);return h.jsxs("label",{"data-kumo-component":"Checkbox","data-kumo-part":"item-label",className:G("relative m-0 inline-flex items-start gap-2",!m&&"flex-row-reverse justify-end",r?"cursor-not-allowed opacity-50":"cursor-pointer",e),children:[h.jsx(Ri,{ref:u,"data-kumo-component":"Checkbox","data-kumo-part":"item",value:i,name:l,checked:t,indeterminate:n,disabled:r,onCheckedChange:a,className:G("peer relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2",o==="error"?"ring-kumo-danger":"ring-kumo-hairline",!r&&"group-hover:ring-kumo-hairline hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand","data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast"),children:h.jsx(Ti,{keepMounted:!0,className:"flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible",render:(d,f)=>h.jsx("span",{...d,children:f.indeterminate?h.jsx(ni,{weight:"bold",size:12}):h.jsx(Qs,{weight:"bold",size:12})})})}),h.jsx("span",{className:"text-base text-kumo-default",children:s})]})});Hu.displayName="Checkbox.Item";function Uu({children:e,className:t}){return h.jsx(_i,{className:G("text-base font-medium text-kumo-default",t),children:e})}Uu.displayName="Checkbox.Legend";function Zg({legend:e,children:t,error:n,description:r,defaultValue:o,value:s,onValueChange:i,allValues:a,disabled:l,controlFirst:u=!0,className:m}){return h.jsx(Vu.Provider,{value:{controlFirst:u},children:h.jsx(Du,{defaultValue:o,value:s,onValueChange:i,allValues:a,disabled:l,children:h.jsxs(ju,{className:G("flex flex-col gap-4",m),children:[e&&h.jsx(_i,{className:"text-base font-medium text-kumo-default",children:e}),h.jsx("div",{className:"flex flex-col gap-2",children:t}),n&&h.jsx("p",{className:"text-sm text-kumo-danger",children:n}),r&&h.jsx("p",{className:"text-sm text-kumo-subtle",children:r})]})})})}const Mi=Object.assign(Fu,{Item:Hu,Group:Zg,Legend:Uu});Mi.displayName="Checkbox";const ji={layout:{auto:{classes:"",description:"Auto table layout - columns resize based on content"},fixed:{classes:"table-fixed",description:"Fixed table layout - columns have equal width, controlled via colgroup"}},variant:{default:{classes:"even:bg-kumo-elevated [--kumo-table-row-bg:var(--color-kumo-base)] even:[--kumo-table-row-bg:var(--color-kumo-elevated)]",description:"Default row variant"},selected:{classes:"bg-kumo-tint [--kumo-table-row-bg:var(--color-kumo-tint)]",description:"Selected row variant"}},sticky:{left:{classes:"sticky left-0",description:"Pin column to the left edge of the scroll container"}
79,right:{classes:"sticky right-0",description:"Pin column to the right edge of the scroll container"}}},Bu=(e,t)=>{const n=yn(ji.sticky,e,"left").classes,r=t==="head"?"z-2":"z-1",o=e==="right"?"before:-left-6":"before:-right-6",s="before:pointer-events-none before:absolute before:inset-y-0 before:w-6";return t==="cell"?G(n,r,"bg-(--kumo-table-row-bg)",s,o,e==="right"?"before:bg-gradient-to-r before:from-transparent before:to-(--kumo-table-row-bg)":"before:bg-gradient-to-l before:from-transparent before:to-(--kumo-table-row-bg)"):G(n,r,"bg-kumo-base group-data-[compact]/header:bg-kumo-elevated",s,o,e==="right"?"before:bg-gradient-to-r before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated":"before:bg-gradient-to-l before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated")},zs={layout:"auto",variant:"default"},qu=c.forwardRef(({layout:e="auto",...t},n)=>{const r=G("isolate w-full",yn(ji.layout,e,zs.layout).classes,"[&_td]:p-3","[&_th]:border-b [&_th]:border-kumo-fill [&_th]:p-3 [&_th]:text-base [&_th]:font-semibold","[&_th]:bg-kumo-base","text-left text-base text-kumo-default",t.className);return h.jsx("table",{ref:n,...t,className:r})}),Wu=c.forwardRef(({variant:e="default",sticky:t,...n},r)=>{const o=e==="compact",s=G("group/header",o&&"text-xs text-kumo-strong [&_th]:bg-kumo-elevated [&_th]:py-2",t&&"[&_th]:sticky [&_th]:top-0 [&_th]:z-1",n.className);return h.jsx("thead",{ref:r,...n,className:s,...o&&{"data-compact":""}})}),Ci=c.forwardRef(({sticky:e,...t},n)=>{const r=G("group relative",e&&Bu(e,"head"),t.className);return h.jsx("th",{ref:n,...t,className:r})}),Ju=c.forwardRef(({variant:e=zs.variant,...t},n)=>{const r=G(yn(ji.variant,e,zs.variant).classes,t.className);return h.jsx("tr",{ref:n,...t,className:r})}),Gu=c.forwardRef((e,t)=>h.jsx("tbody",{ref:t,...e})),Ni=c.forwardRef(({sticky:e,...t},n)=>{const r=G(e&&Bu(e,"cell"),t.className);return h.jsx("td",{ref:n,...t,className:r})}),Xu=c.forwardRef((e,t)=>h.jsx("tfoot",{ref:t,...e})),Yu=c.forwardRef((e,t)=>h.jsx("button",{ref:t,...e,type:"button","aria-label":"Resize column",className:G("invisible h-full group-hover:visible","w-[10px]","flex items-center justify-center","cursor-col-resize touch-none select-none","absolute top-0 right-0","m-0 bg-kumo-base p-0","focus-visible:ring-2 focus-visible:ring-kumo-brand"),children:h.jsx("span",{className:"h-5 w-[2px] rounded bg-kumo-hairline"})})),Ku=c.forwardRef(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:o,disabled:s,...i},a)=>h.jsx(Ni,{ref:a,...i,className:G("w-10 leading-none",i.className),children:h.jsx(Mi,{checked:e,indeterminate:t,onCheckedChange:(l,u)=>{n?.(l,u),r?.(l)},"aria-label":o??"Select row",disabled:s,className:"relative before:absolute before:-inset-3 before:content-['']"})})),Qu=c.forwardRef(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:o,disabled:s,...i},a)=>h.jsx(Ci,{ref:a,...i,className:G("w-10 leading-none",i.className),children:h.jsx(Mi,{checked:e,indeterminate:t,onCheckedChange:(l,u)=>{n?.(l,u),r?.(l)},"aria-label":o??"Select all rows",disabled:s,className:"relative before:absolute before:-inset-3 before:content-['']"})}));qu.displayName="Table";Gu.displayName="Table.Body";Ci.displayName="Table.Head";Ju.displayName="Table.Row";Ni.displayName="Table.Cell";Xu.displayName="Table.Footer";Wu.displayName="Table.Header";Yu.displayName="Table.ResizeHandle";Ku.displayName="Table.CheckCell";Qu.displayName="Table.CheckHead";const ot=Object.assign(qu,{Header:Wu,Head:Ci,Row:Ju,Body:Gu,Cell:Ni,CheckCell:Ku,CheckHead:Qu,Footer:Xu,ResizeHandle:Yu}),Dg=.95,Do=({className:e,render:t,...n})=>{const r=t?({content:o,activeAnchor:s})=>t({content:typeof o=="string"?o:null,activeAnchor:s}):void 0;return h.jsx(bg,{className:G("st-tooltip",e),variant:"light",opacity:Dg,style:{zIndex:9001},render:r,...n})},Rr=({content:e,maxWidth:t="21rem",disable:n=!1,children:r,...o})=>{const s=`single_tooltip_${c.useId()}`;return h.jsxs(h.Fragment,{children:[h.jsx("div",{"data-tooltip-id":s,children:r}),!n&&h.jsx(Do,{id:s,content:h.jsx("div",{style:{maxWidth:t},children:e||!1}),...o})]})},ed=ke.memo(function({content:t,size:n="1em",...r}){const{t:o}=le();return h.jsx("div",{className:"inline-flex items-center",children:h.jsx(Rr,{content:t,place:"top",...r,children:h.jsx("span",{className:"pointer-events-none flex",children:h.jsx(To,{size:n,color:"var(--text-color-kumo-subtle)","aria-label":o("common.info")})})})})}),Vg=1e4;function Fg(e,t,n=Vg){const r=new AbortController,o=[e,AbortSignal.timeout(n)];t&&o.push(t);const s=new Map;r.signal.addEventListener("abort",()=>{for(const[i,a]of s)i.removeEventListener("abort",a)},{once:!0});for(const i of o){if(i.aborted){r.abort(i.reason);break}const a=()=>r.abort(i.reason);s.set(i,a),i.addEventListener("abort",a,{once:!0})}return r.signal}function td({url:e,options:t,parse:n,children:r,loadingIndicator:o=h.jsx("div",{className:"py-32 text-center",children:h.jsx(u0,{size:"lg"})}),errorIndicator:s=h.jsx("div",{className:"text-kumo-subtle py-32 text-center",children:"Unable to load data."})}){const[i,a]=c.useState({status:"loading"});return c.useEffect(()=>{let l=!1;const u=new AbortController;return a({status:"loading"}),fetch(e,{...t,signal:Fg(u.signal,t?.signal)}
79).then(m=>{if(!m.ok)throw new Error(`Request failed with status ${m.status}`);return m.json()}).then(m=>n(m)).then(m=>{l||a({status:"loaded",payload:m})}).catch(m=>{l||(m instanceof DOMException&&m.name==="AbortError"||console.error(`Unable to fetch ${e}`,m),a({status:"error"}))}),()=>{l=!0,u.abort()}},[t,n,e]),i.status==="loading"?o:i.status==="error"?s:r?.(i.payload)}const nd=xe({iata:Te(),lat:Q(),lon:Q(),cca2:Te(),region:Te(),city:Te()}),Hg=Ct(nd),Ug={credentials:"include"},Bg=({children:e,loadingIndicator:t})=>h.jsx(td,{url:g0,options:Ug,parse:Hg.parse,loadingIndicator:t,children:e}),gc=Wt([Q(),Te().trim().min(1).pipe($p())]),qg=xe({hostname:Te(),clientIp:Te(),httpProtocol:Te().optional(),asn:Q().optional(),asOrganization:Te().optional(),country:Te().optional(),city:Te().optional(),region:Te().optional(),postalCode:Te().optional(),latitude:gc.pipe(Q().min(-90).max(90)).optional(),longitude:gc.pipe(Q().min(-180).max(180)).optional(),colo:nd.optional()}),Wg={credentials:"include"},Jg=({children:e,loadingIndicator:t})=>h.jsx(td,{url:v0,options:Wg,parse:qg.parse,loadingIndicator:t,children:e}),Gg={streaming:{label:"aim.type.streaming",Icon:_l},gaming:{label:"aim.type.gaming",Icon:xl},rtc:{label:"aim.type.rtc",Icon:Al}},Xg=({results:e,running:t,finished:n})=>{const{t:r}=le(),o=`aim_score_tooltip_${c.useId()}`,s=n?e.getScores():void 0;return h.jsxs("div",{className:"h-full",children:[h.jsx("ul",{className:"list-none h-full flex justify-evenly gap-3 rounded-md border border-solid border-kumo-line p-4",children:Object.entries(Gg).map(([i,{label:a,Icon:l}])=>{const u=s?.[i],m=u?r(`aim.classification.${u.classificationName}`):n?r("aim.unavailable"):r("aim.score-pending",{label:r(a)}),d=u?u.classificationIdx+1:0,f=u?.classificationName==="bad",p=`${o}_${i}_label`,g=`${o}_${i}_status`;return h.jsxs("li",{className:"flex flex-col items-center md:items-start gap-x-1 gap-y-0.25 text-[13px] font-medium text-kumo-strong cursor-help md:pl-[55px] relative","data-tooltip-id":o,"data-tooltip-content":m,children:[h.jsxs("div",{className:"flex items-center gap-1.5 min-w-max",children:[h.jsx(l,{size:25,weight:"thin",className:"md:absolute md:left-0 top-1/2 md:-translate-y-1/2 md:size-[45px]"}),h.jsx("span",{id:p,children:r(a)})]}),h.jsxs("figure",{className:"flex items-center gap-0.25","aria-labelledby":n?`${p} ${g}`:g,children:[Array.from({length:5},(b,v)=>{const w=v<d;return h.jsx(El,{size:17,weight:w?"fill":"regular",className:G("transition-colors",w?f?"text-kumo-danger":"text-kumo-brand":t?"text-kumo-inactive motion-safe:animate-[aim-star-scan_1.2s_ease-in-out_infinite]":"text-kumo-inactive"),style:t?{animationDelay:`${v*100}ms`}:void 0,"aria-hidden":"true"},v)}),h.jsx("span",{id:g,className:"sr-only",children:m})]})]},i)})}),h.jsx(Do,{id:o})]})},Yg=e=>typeof e=="number"?`${[0,4,8,16,32,64,128,256][e]??e}px`:e,ho=c.forwardRef(function({alignItems:t,alignSelf:n,boxShadow:r,className:o,display:s,flex:i,flexDirection:a,height:l,minHeight:u,p:m,position:d,style:f,transition:p,width:g,...b},v){return h.jsx("div",{ref:v,className:`border-kumo-line box-border rounded-md border border-solid${o?` ${o}`:""}`,style:{alignItems:t,alignSelf:n,boxShadow:r,display:s,flex:i,flexDirection:a,height:l,minHeight:u,padding:m===void 0?void 0:Yg(m),position:d,transition:p,width:g,...f},...b})});function cr({width:e="100%",height:t="1em",borderRadius:n="9999px",...r}){return h.jsx("div",{...r,"aria-hidden":"true",className:`skeleton-wave bg-kumo-tint relative block flex-none overflow-hidden${r.className?` ${r.className}`:""}`,style:{width:e,height:t,borderRadius:n}})}function is(){return h.jsxs(ho,{p:3,height:"100%",display:"flex",flexDirection:"column",children:[h.jsx("div",{className:"map-loading-placeholder",children:h.jsx(cr,{width:"100%",height:"100%",borderRadius:"6px"})}),h.jsxs("div",{className:"grid gap-2 mt-[10px] h-[64.5px]","aria-hidden":"true",children:[h.jsx(cr,{width:"45%",height:"1em"}),h.jsx(cr,{width:"62%",height:"1em"}),h.jsx(cr,{width:"52%",height:"1em"})]})]})}function rd(e){const t=new Map;return(n,r)=>{const o=`${n}\0${r?JSON.stringify(r):""}`;let s=t.get(o);return s||(s=e(n,r),t.set(o,s)),s}}const Tr=rd((e,t)=>new Intl.NumberFormat(e,t)),Kg=rd((e,t)=>new Intl.ListFormat(e,t));function Mn(e,t,n=ht){return Tr(n,t).format(e)}const Qg=.001;function e8(e,t,n=0,r=ht){const o=Tr(r,{style:"percent",notation:"compact",trailingZeroDisplay:"str
79ipIfInteger",...Math.abs(e)>n&&e!==0&&n!==0?{minimumFractionDigits:1}:{},...t});return Math.abs(e)<n&&e!==0?`< ${o.format(n)}`:o.format(e)}const t8=[{units:["nanosecond","microsecond","millisecond","second","minute","hour","day"],factors:[1e3,1e3,1e3,60,60,24]},{units:["bit","kilobit","megabit","gigabit","terabit"],factors:[1e3,1e3,1e3,1e3]},{units:["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],factors:[1e3,1e3,1e3,1e3,1e3]}];function od(e,t){const[n,r]=t.split("-per-"),o=t8.find(l=>l.units.includes(n));if(!o)return{value:e,unit:t};const{units:s,factors:i}=o;let a=s.indexOf(n);for(;a<s.length-1&&Math.abs(e)>=i[a];)e/=i[a],a++;for(;a>0&&Math.abs(e)<1&&e!==0;)a--,e*=i[a];return{value:e,unit:r?`${s[a]}-per-${r}`:s[a]}}const sd=(e,t)=>t.includes("bit-per-second")?e.replace("b/s","bps"):e;function Li(e,t,n=ht){const{unit:r,...o}=t,s=od(e,r),i=Tr(n,{style:"unit",notation:"compact",...o,unit:s.unit}).format(s.value);return sd(i,s.unit)}function id(e,t){const n=o=>t.includes(o.type),r=e.filter(o=>!n(o));for(;r.at(-1)?.type==="literal";)r.pop();return{value:r.map(o=>o.value).join(""),unit:e.filter(n).map(o=>o.value).join("")}}function n8(e,t,n=ht){const{unit:r,...o}=t,s=od(e,r),i=Tr(n,{style:"unit",notation:"compact",...o,unit:s.unit}).formatToParts(s.value),{value:a,unit:l}=id(i,["unit"]);return{value:a,unit:sd(l,s.unit)}}function r8(e,t,n=ht){const r=Tr(n,{style:"percent",notation:"compact",trailingZeroDisplay:"stripIfInteger",...t}).formatToParts(e);return id(r,["percentSign","unit"])}function o8(e,t,n=ht){return Kg(n,{style:"long",type:"conjunction",...t}).format(e)}const Dn=e=>e.reduce((t,n)=>t+n,0),ad=e=>Dn(e)/e.length;function gn(e,t=.5){if(!e.length)return 0;const n=e.slice().sort((i,a)=>i-a),r=(e.length-1)*t,o=r%1;if(o===0)return n[Math.round(r)];const s=[Math.floor,Math.ceil].map(i=>n[i(r)]);return s[0]+(s[1]-s[0])*o}function pt(e){const{i18n:t}=le(),n=t.language||ht;return c.useMemo(()=>({formatNumber:(...r)=>Mn(r[0],r[1],r[2]||n),formatPercent:(...r)=>e8(r[0],r[1],r[2],r[3]||n),formatUnit:(...r)=>Li(r[0],r[1],r[2]||n),formatUnitParts:(...r)=>n8(r[0],r[1],r[2]||n),formatPercentParts:(...r)=>r8(r[0],r[1],r[2]||n),formatList:(...r)=>o8(r[0],r[1],r[2]||n)}),[n])}const mo=({height:e})=>{const{t}=le();return h.jsxs("div",{className:"measurement-placeholder w-full",style:{height:`${e}px`},children:[h.jsx(cr,{width:"100%",height:"100%",borderRadius:"6px"}),h.jsx("span",{className:"sr-only",children:t("measurements.empty")})]})},s8={width:"100%",height:"100%"},Oi=({children:e,observeHeight:t=!1})=>{const n=c.useRef(null),[r,o]=c.useState(null);return c.useLayoutEffect(()=>{const s=n.current;if(!s)return;const i=new ResizeObserver(([a])=>{const{width:l,height:u}=a.contentRect;o(m=>m?m.width!==l||t&&m.height!==u?{width:l,height:u}:m:{width:l,height:u})});return i.observe(s),()=>i.disconnect()},[t]),h.jsx("div",{ref:n,style:s8,children:r&&e(r)})};function i8(e){const t=e.filter(Number.isFinite).sort((u,m)=>u-m);if(!t.length)return;const n=t.at(-1);if(n===void 0)return;const r=gn(t,.25),o=gn(t),s=gn(t,.75),i=s-r,a=r-i*1.5,l=s+i*1.5;return{values:t,mean:ad(t),median:o,q1:r,q3:s,lowerWhisker:t.find(u=>u>=a)??t[0],upperWhisker:t.slice().reverse().find(u=>u<=l)??n}}function a8(e,t=5){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(1,t),r=10**Math.floor(Math.log10(n)),o=n/r,i=(o>=Math.sqrt(50)?10:o>=Math.sqrt(10)?5:o>=Math.sqrt(2)?2:1)*r,a=e/i,l=Math.abs(a)*Number.EPSILON*4,u=Math.floor(a+l);return Array.from({length:u+1},(m,d)=>Number((d*i).toPrecision(12)))}const as=35,vc=25,c8=14,l8=22,yc=8,u8=8.5,lt=5,cn=11,d8=25,f8=2,h8=({title:e,xAxisLabel:t,yAxisLabel:n,vals:r=[],rangeMax:o,color:s})=>{const i=`box-plot-${c.useId().replaceAll(":","")}`,a=`${i}-title`,{t:l}=le(),{formatList:u,formatNumber:m}=pt(),d=as+c8+(e?vc:0)+(t?l8:0),f=i8(r);if(!f)return h.jsx(mo,{height:d});const p=f.values.at(-1);if(p===void 0)return h.jsx(mo,{height:d});const g=(v,w)=>`${l(v)}: ${m(w,{maximumSignificantDigits:3})}${n?` ${n}`:""}`,b=`${l("progress.chart.info")} ${u([g("results.min",f.values[0]),g("results.max",p),g("results.average",f.mean),g("results.median",f.median),g("results.percentile-25",f.q1),g("results.percentile-75",f.q3)])}`;return h.jsx(Oi,{children:({width:v})=>{const w=e?vc:0,A=w+as,y=yc+(n?n.length*u8:0),k=Math.max(y+1,v-yc),x=Math.max(1,o||p),S=x*1.01,_=M=>y+Math.max(0,M)/S*(k-y),E=Math.max(2,Math.round((k-y)/160)),R=a8(x,E);return h.jsx("div",{style:{width:"100%",height:d},children:h.jsxs("svg",{width:"100%",height:d,viewBox:`0 0 ${v} ${d}`,role:"img","aria-labelledby":a,children:[h.jsx("title",{id:a,children:b}),h.jsx("defs",{children:h.jsx("clipPath",{id:i,children:h.jsx("rect",{x:y,y:w,width:Math.max(0,k-y),height:as})})}),!!e&&h.jsx("text",{x:v/2,y:14,fill:"var(--text-color-kumo-default)",textAnchor:"middle",fontSize:12,children:e}),!!n&&h.jsx("text",{x:y-5,y:w+lt+cn/2,fill:"var(--text-color-kumo-subtle)",fontSize:12,textAnchor:"end",dominantBaseline:"middle",children:n}),h.jsxs("g",{clipPath:`url(#${i})`,children:[R.slice(1).map(M=>h.jsx("line",{x1:_(M),x2:_(M),y1:w,y2:A,stroke:"var(--color-kumo-line)"},`grid-${M}`)),h.jsx("line",{x1:_(f.lowerWhisker),x2:_(f.upperWhisker),y1:w+lt+cn/2,y2:w+lt+cn/2,stroke:s}),[{name:"lower",value:f.lowerWhisker},{name:"upper",value:f.upperWhisker}].map(({name:M,value:j})=>h.jsx("line",{x1:_(j),x2:_(j),y1:w+lt+1,y2:w+lt+cn-1,stroke:s},M)),h.jsx("rect",{x:_(f.q1),y:w+lt,width:Math.max(1,_(f.q3)-_(f.q1)),height:cn,fill:`color-mix(in oklab, ${s} 50%, var(--color-kumo-base))`,stroke:s}),f.values.map((M,j)=>h.jsx("circle",{cx:_(M),cy:w+d8+(j*7%11-5)/5*f8,r:2,fill:s},`${M}-${j}`)),h.jsx("line",{x1:_(f.median),x2:_(f.median),y1:w+lt,y2:w+lt+cn,stroke:s,strokeWidth:2}),h.jsx("line",{x1:_(f.mean),x2:_(f.mean),y1:w+lt,y2:w+lt+cn,stroke:s,strokeDasharray:"2 2"})]}),R.map(M=>h.jsx("g",{children:h.jsx("text",{x:_(M),y:A+12,fill:"var(--text-color-kumo-subtle)",fontSize:12,textAnchor:"middle",children:m(M,{notation:"compact",maximumSignificantDigits:2})})},M)),!!t&&h.jsx("text",{x:(y+k)/2,y:d-2,fill:"var(--text-color-kumo-subtle)",fontSize:10,textAnchor:"middle",children:t})]})})}})};function cd({isActive:e=!1,startAngle:t=0,endAngle:n=90,duration:r=200,color:o="var(--text-color-kumo-subtle)",size:s="14px"}){const i={"--swivel-angle":`${e?n:t}deg`,"--swivel-duration":`${r}ms`,color:o};return h.jsx("span",{"aria-hidden":"true",className:"relative top-[0.2rem] inline-block leading-0 [&_svg]:[transform:rotate(var(--swivel-angle))] [&_svg]:[transition:transform_var(--swivel-duration)_ease]",style:i,children:h.jsx(d0,{size:s,weight:"bold",color:"currentColor"})})}const m8="#f6821f",Rt={white:"#fff",black:"#000",red:["#3c0501","#5a0801","#780a02","#970d02","#b20f03","#e81403","#fc574a","#fe9f97","#feccc8","#ffefee"],green:["#0a2614","#0e381d","#104122","#15562d","#196535","#228b49","#2db35e","#55d584","#a8e9c0","#e3f8eb"],gray:["#0a0a0a","#313131","#3d3d3d","#4a4a4a","#595959","#797979","#999999","#b6b6b6","#d9d9d9","#f2f2f2"]},Bt={latency:"var(--st-measurement-latency)",download:m8,upload:"var(--st-measurement-upload)"};function p8(e){const t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;const n=parseInt(t[1],16);return[n>>16&255,n>>8&255,n&255]}function g8(e){const t=p8(e);if(!t)return!1;const[n,r,o]=t;return(n*299+r*587+o*114)/1e3<128}function v8(e){const t=n=>n;return(n,r)=>[...new Set([...Object.keys(n),...Object.keys(r)])].every(s=>{const i=Reflect.get(e,s),a=typeof i=="function"?l=>Reflect.apply(i,void 0,[l]):t;return a(Reflect.get(n,s))===a(Reflect.get(r,s))})}const ld=({forceHoverOn:e=!1,interactive:t=!0,expanded:n,onClick:r,className:o,...s})=>{const i=t&&!!r;return h.jsx("div",{className:`${e?"bg-kumo-tint":"bg-kumo-base"} transition-[background-color] duration-200${t?" cursor-pointer hover:bg-kumo-fill-hover focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-kumo-brand":""}${o?` ${o}`:""}`,onClick:i?r:void 0,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-expanded":i?!!n:void 0,onKeyDown:i?a=>{a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),r(a))}:void 0,...s})},y8=({timings:e,bytes:t})=>{const n=!t,{t:r}=le(),{formatNumber:o,formatUnit:s}=pt(),i=l=>s(Number(l),{unit:"millisecond",maximumFractionDigits:2}),a=l=>l?s(l,{unit:"bit-per-second",maximumSignificantDigits:3}):"-";return h.jsxs(ot,{children:[h.jsx(ot.Header,{variant:"compact",children:h.jsxs(ot.Row,{children:[h.jsx(ot.Head,{className:"text-center"}),h.jsx(ot.Head,{className:"text-right",children:r(n?"results.ping":"results.duration")}),!n&&h.jsx(ot.Head,{className:"text-right",children:r("results.speed")})]})}),h.jsx(ot.Body,{children:e.map((l,u)=>h.jsxs(ot.Row,{children:[h.jsx(ot.Cell,{className:"text-center",children:`#${o(u+1)}`}),h.jsx(ot.Cell,{className:"text-right",children:i(n?l.ping:"duration"in l?l.duration:void 0)}),!n&&h.jsx(ot.Cell,{className:"text-right",children:a("bps"in l?l.bps:void 0)})]},u))})]})},b8=({isLatency:e,vals:t})=>{const{t:n}=le(),{formatUnit:r}=pt(),o=e?"millisecond":"bit-per-second",s=[["results.min",Math.min(...t)],["results.max",Math.max(...t)],["results.average",ad(t)],["results.median",gn(t,.5)],["results.percentile-25",gn(t,.25)],["results.percentile-75",gn(t,.75)]];return h.jsxs("div",{className:"grid gap-[8px]",children:[h.jsx("div",{children:n("progress.chart.info")}),h.jsx("ul",{children:s.map(([i,a])=>h.jsxs("li",{children:[n(i),":"," ",h.jsx("b",{translate:"no",children:r(a,{unit:o,maximumSignificantDigits:3})})]},i))})]})},w8=ke.memo(({isOpen:e,isLatency:t,isUpload:n,loaded:r,bytes:o,vals:s,maxVal:i,numMeasurements:a})=>{const{t:l}=le(),{formatNumber:u,formatUnit:m,formatUnitParts:d}=pt();return h.jsx(Rr,{disable:!s?.length,content:h.jsx(b8,{isLatency:t,vals:s}),children:h.jsxs("div",{className:"w-full",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("div",{className:"text-[16px] font-medium leading-none",children:[h.jsx("span",{children:t?l(r?`measurements.latency.loaded.${r}`:"measurements.latency.unloaded"):l(n?"measurements.bandwidth.test.upload":"measurements.bandwidth.test.download",{size:m(o??0,{unit:"byte",maximumFractionDigits:0})})})," ",h.jsxs("span",{translate:"no",className:"text-[80%] font-medium",children:["(",u(s.length),a?`/${u(a)}`:"",")"]})]}),!!s.length&&h.jsx(cd,{isActive:e,color:"var(--text-color-kumo-subtle)",size:"14px",startAngle:90,endAngle:-90})]}),h.jsx("div",{className:"my-[12px]"}),h.jsx(h8,{vals:s.filter(f=>f!==void 0),rangeMax:i,yAxisLabel:d(0,{unit:t?"millisecond":"bit-per-second"}).unit,color:Bt[t?r==="down"?"download":r==="up"?"upload":"latency":n?"upload":"download"]})]})})},v8({vals:Dn})),x8=75,_8=ke.memo(({timings:e,isUpload:t,isLatency:n=!1}
79)=>{const[r,o]=c.useState(),s=l=>n?l.ping:"bps"in l?l.bps:0,i=e.flatMap(({timings:l})=>l.map(s)),a=Math.max(0,...i.map(l=>l||0));return h.jsx(h.Fragment,{children:e.length===0?h.jsx(ho,{p:3,"data-testid":`bandwidth-${t?"upload":"download"}-placeholder`,children:h.jsx(mo,{height:x8})}):e.map(({loaded:l,bytes:u,timings:m,numMeasurements:d})=>{const f=n?l:u,p=m.length>0,g=p&&r===f;return h.jsxs(ho,{boxShadow:g?"0 0 5px 5px var(--color-kumo-shadow-drop)":"initial",transition:"box-shadow 300ms",children:[h.jsx(ld,{forceHoverOn:g,expanded:g,className:"p-[16px]",style:{borderRadius:g?"6px 6px 0 0":"6px"},interactive:p,onClick:p?()=>o(g?void 0:f):void 0,children:h.jsx(w8,{isOpen:g,isLatency:n,isUpload:t,bytes:u,loaded:l,vals:m.map(s),maxVal:a,numMeasurements:d})}),g&&h.jsx("div",{className:"p-[16px]",children:h.jsx(y8,{timings:m,bytes:u,isUpload:t})})]},f===!1?"false":f)})})}),k8=.55,bc=(e,t,n)=>n>=e.length*t*k8,zi=e=>typeof e=="object"&&e!==null,E8=e=>zi(e)&&typeof e.label=="string"?e.label:"",A8=e=>zi(e)&&typeof e.value=="number"?e.value:0,S8=e=>zi(e)&&typeof e.color=="string"?e.color:Rt.gray[6];function R8({data:e,height:t=40,labelAccessor:n=E8,valueAccessor:r=A8,colorAccessor:o=S8,tooltipContent:s,showLabels:i=!0,showPercentage:a=!0,hoverRelMargin:l=.2}){const u=c.useId(),{formatPercent:m}=pt(),d=t*l/2,f=t-d*2,p=12,g=10,b=c.useMemo(()=>{const v=e.map((y,k)=>({datum:y,label:n(y),color:o(y,k),value:r(y)})).filter(({value:y})=>y>0),w=v.reduce((y,{value:k})=>y+k,0);let A=0;return v.map(y=>{const k=w?y.value/w:0,x={...y,offset:A,fraction:k};return A+=k,x})},[e,n,r,o]);return h.jsx(Oi,{children:({width:v})=>h.jsx("div",{className:"relative w-full",style:{height:t},children:h.jsxs("div",{className:"absolute",children:[h.jsx("svg",{width:v,height:t,children:b.map(({label:w,color:A,offset:y,fraction:k},x)=>{const S=k*v,_=y*v+S/2,E=g8(A),R=m(k,{maximumFractionDigits:0});return h.jsxs("g",{"data-tooltip-id":s?u:void 0,"data-tooltip-content":s?String(x):void 0,children:[h.jsx("rect",{className:"transition-[transform] duration-500 hover:duration-250 hover:[transform:scaleY(var(--segment-hover-scale))_translateY(var(--segment-hover-translate))] hover:[transition-timing-function:cubic-bezier(0.175,0.885,0.32,1.275)]",x:y*v,y:d,width:S,height:f,fill:A,stroke:"var(--color-kumo-base)",strokeWidth:1,strokeOpacity:.8,style:{"--segment-hover-scale":1+l,"--segment-hover-translate":`${-(l/2)*100}%`}}),i&&bc(w,p,S)&&h.jsxs(h.Fragment,{children:[h.jsx("text",{x:_,y:t/2-g*.6,dy:"0.35em",fontSize:p,textAnchor:"middle",fill:E?Rt.white:Rt.black,pointerEvents:"none",children:w}),a&&bc(R,g,S)&&h.jsx("text",{x:_,y:t/2+p*.6,dy:"0.35em",fontSize:g,textAnchor:"middle",fill:E?Rt.white:Rt.black,opacity:.6,pointerEvents:"none",children:R})]})]},`${w}-${x}`)})}),s&&h.jsx(Do,{id:u,render:({content:w})=>{const A=b[Number(w)];return A?s(A.datum,{value:A.value,percentage:A.fraction*100}):null}})]})})})}const wc=40,T8=[{key:"received",label:"packet-loss.category.received",color:Rt.green[5]},{key:"lost",label:"packet-loss.category.lost",color:Rt.red[5]},{key:"sending",label:"packet-loss.category.sending",color:Rt.gray[6]}],M8=ke.memo(({totalMessages:e=0,numMessagesSent:t=0,lostMessages:n=[]})=>{const{t:r}=le(),{formatNumber:o,formatPercent:s}=pt(),i=c.useMemo(()=>{const l={received:t-n.length,lost:n.length,sending:e-t};return T8.map(u=>({...u,label:r(u.label),value:l[u.key]}))},[r,e,t,n.length]),a=({label:l},{value:u,percentage:m})=>h.jsxs(h.Fragment,{children:[h.jsx("span",{children:l}),":"," ",h.jsx("b",{children:r("packets",{count:u,formattedCount:o(u)})})," ",h.jsx("span",{translate:"no",children:`(${s(m/100,{maximumFractionDigits:2})})`})]});return e?h.jsx(R8,{data:i,height:wc,tooltipContent:a}):h.jsx(mo,{height:wc})}),j8=({error:e})=>{const{t}=le();return h.jsx(Nl,{variant:"error",size:"sm",icon:h.jsx(Sl,{size:18}),description:t("packet-loss.unable",{error:e})})},xc=ke.memo(({totalMessages:e=0,numMessagesSent:t,packetLoss:n,lostMessages:r=[],error:o})=>{const[s,i]=c.useState(!1),{t:a}=le(),{formatList:l,formatNumber:u,formatPercent:m}=pt();return h.jsxs(ho,{height:"100%",boxShadow:s?"0 0 5px 5px var(--color-kumo-shadow-drop)":"initial",transition:"box-shadow 300ms",children:[h.jsx(ld,{forceHoverOn:s,expanded:s,className:"p-[16px]",style:{borderRadius:s?"6px 6px 0 0":"6px"},interactive:!!e,onClick:e?()=>i(d=>!d):void 0,children:h.jsxs("div",{className:"w-full",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("div",{className:"text-[16px] font-medium leading-none",children:[h.jsx("span",{children:a("packet-loss.title")})," ",!!e&&t!==void 0&&h.jsxs("span",{translate:"no",className:"text-[80%] font-medium",children:["(",u(t),"/",u(e),")"]})]}),!!e&&h.jsx(cd,{isActive:s,color:"var(--text-color-kumo-subtle)",size:"14px",startAngle:90,endAngle:-90})]}),h.jsx("div",{className:"my-[12px]"}),o?h.jsx(j8,{error:o}):h.jsx(M8,{totalMessages:e,numMessagesSent:t,lostMessages:r,packetLoss:n})]})}),s&&!!e&&n!==void 0&&h.jsxs("div",{className:"p-[16px] text-[14px]",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-[700]",children:a("packet-loss.rate")})," ",h.jsx("i",{children:m(n,{maximumFractionDigits:2},Qg)})]}),!!r.length&&h.jsxs("div",{className:"mt-[8px]",children:[h.jsx("span",{className:"font-[700]",children:a("packet-loss.missing-messages")})," ",h.jsx("span",{className:"text-[0.7em]",children:l(r.map(d=>u(d)),{type:"unit"})})]})]})]})}),C8=xe({numMeasurements:Q().optional(),timings:Ct(xe({bps:Q(),ping:Q(),duration:Q(),measTime:No(),serverTime:Q(),transferSize:Q()}))}),lr=ke.memo(({type:e,results:t})=>{const n=e==="packetLoss",r=e==="latency",o=t.raw[e],s=n?[]:r?[{loaded:!1,timings:t.getUnloadedLatencyPoints().map(l
79=>({ping:l}))},{loaded:"down",timings:t.getDownLoadedLatencyPoints().map(l=>({ping:l}))},{loaded:"up",timings:t.getUpLoadedLatencyPoints().map(l=>({ping:l}))}]:o&&typeof o=="object"?Object.entries(o.results).flatMap(([l,u])=>{const m=C8.safeParse(u);return m.success?[{bytes:+l,...m.data}]:(console.error("Unable to display bandwidth measurements",{type:e,bytes:l,error:m.error}),[])}):[],i=Dn(s.map(l=>l.loaded!==void 0?Dn(l.timings.map(({ping:u})=>u)):l.timings.length)),a=c.useMemo(()=>s,[r,i]);if(n){const l=t.getPacketLossDetails();return l?h.jsx(xc,{...l}):h.jsx(xc,{})}return h.jsx(_8,{timings:a,isLatency:r,isUpload:e==="upload"})});lr.displayName="Measurements";const N8=Lo(cu(),No(),{decode:e=>new Date(e),encode:e=>e.toISOString()}),L8=Lo(ep(),Te(),{decode:(e,t)=>{try{return new TextDecoder().decode(Pl(e))}catch(n){return t.issues.push({code:"invalid_format",format:"base64",input:e,message:`${n}`}),oi}},encode:e=>Il(new TextEncoder().encode(e))}),O8=Lo(tp(),Te(),{decode:(e,t)=>{try{return new TextDecoder().decode(af(e))}catch(n){return t.issues.push({code:"invalid_format",format:"base64url",input:e,message:`${n}`}),oi}},encode:e=>cf(new TextEncoder().encode(e))}),ud=e=>Lo(Te(),e,{decode:(t,n)=>{try{return JSON.parse(t)}catch(r){return n.issues.push({code:"invalid_format",format:"json",input:t,message:`${r}`}),oi}},encode:t=>JSON.stringify(t)}),$s=xe({transferSize:Q(),ttfb:Q(),payloadDownloadTime:Q().nonnegative(),serverTime:Wt([Q().positive(),ut(-1)]),measTime:N8,ping:Q().nonnegative(),duration:Q().nonnegative(),bps:Q().nonnegative()}),$i=xe({error:Te(),started:ut(!0),finished:ut(!1),results:xe()}),z8=Wt([$i,xe({started:ut(!0),finished:ut(!0),results:xe({numMeasurements:Q().min(0).max(20),timings:Ct($s).max(42)})})]),_c=Wt([$i,xe({started:ut(!0),finished:ut(!0),results:pp(Q(),xe({numMeasurements:Q().min(0).max(20),timings:Ct($s).max(20),sideLatency:Ct(Wt([$s,xe({bytes:ut(0)})]))}))})]),$8=Wt([$i,xe({started:Ca(),finished:Ca(),results:xe({totalMessages:Q().nonnegative(),numMessagesSent:Q().nonnegative(),packetLoss:Q().nonnegative(),lostMessages:Ct(Q()).max(1e3)})})]),P8=xe({latency:z8,download:_c,upload:_c,packetLoss:$8,totalDurationMs:Q().nonnegative().optional()}),I8=xe({version:ut(1),results:P8}).strict(),dd=O8.pipe(ud(I8)),fd=xe({downSpeed:Q().nonnegative(),upSpeed:Q().nonnegative(),latency:Q().nonnegative(),jitter:Q().nonnegative()}).strict();L8.pipe(ud(fd));function Z8(e){return e==="development"?"http://localhost:9999/speedtest":e==="staging"?"https://staging-radar-frontend-worker-production.radar-cfdata-org.workers.dev/speedtest":"https://radar.cloudflare.com/speedtest"}function D8(e){return dd.safeDecode(e)}function V8(e){const t=e.raw;return dd.safeEncode({version:1,results:t})}function F8(e,t){const n=V8(e);if(n.success){const r=new URL(Z8(t));return r.hash="#"+n.data,r.toString()}else console.warn("Error encoding results.",{error:n.error,results:e})}function H8({size:e="1em",...t}){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.16 13.33",width:e,height:e,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:h.jsx("path",{d:"M3.86.03c.39.04 1.1.19 2.6.96.6.34 1.21.75 1.8 1.24l-.74.74c-.52-.44-1.04-.8-1.55-1.1a7.64 7.64 0 0 0-1.5-.66 3.75 3.75 0 0 0-1.3-.2.7.7 0 0 0-.38.18c-.17.17-.37.73.07 1.92.4 1.1 1.27 2.43 2.51 3.67A10.78 10.78 0 0 0 9.05 9.3c1.03.38 1.58.28 1.83.14v-.01h.01c.16-.17.29-.49.26-.97a4.2 4.2 0 0 0-.25-1 9.69 9.69 0 0 0-1.62-2.7l.76-.77c1.28 1.52 2.04 3.13 2.1 4.4.08.7-.07 1.3-.46 1.69l-.18.14a4.82 4.82 0 0 1-2.88 1.1c.18.48.27 1 .27 1.52l-.5.5H.5l-.5-.5a4.44 4.44 0 0 1 2.7-4.08C-.09 5.77.37 1.96 1.63.63a1.9 1.9 0 0 1 1.33-.6s.32-.07.89 0zM3.5 9.52a3.44 3.44 0 0 0-2.47 2.81h6.81a3.43 3.43 0 0 0-.33-1.04A7.43 7.43 0 0 1 3.5 9.52zm-1.78-6.7c-.08.4-.1.86-.07 1.37.1 1.33.69 2.87 2.09 4.2 1.8 1.72 3.69 2.08 5.1 1.9a11.56 11.56 0 0 1-4.19-2.8 10.85 10.85 0 0 1-2.94-4.68zm9.48-1.2a.8.8 0 0 0-1.58.3l-3.2 3.2.71.7 3.2-3.2c.1.02.2.01.3-.01a.8.8 0 0 0 .57-.99z"})})}function kc({color:e}){return h.jsx("span",{"aria-hidden":"true",className:"inline-block min-h-[0.75em] min-w-[0.75em] rounded-full",style:{backgroundColor:e}})}function hd({title:e,titleColor:t,rows:n}){return h.jsxs("div",{className:"flex flex-col gap-3",children:[!!e&&h.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold",children:[!!t&&h.jsx(kc,{color:t}),h.jsx("span",{children:e})]}),h.jsx("div",{className:"flex flex-col gap-1",children:n.map((r,o)=>h.jsxs("div",{className:"flex items-center gap-2",children:[!!r.color&&h.jsx(kc,{color:r.color}),h.jsxs("span",{children:[!!r.label&&h.jsx("span",{children:`${r.label}: `}),h.jsx("b",{translate:"no",children:r.value})]})]},o))})]})}const md={download:"step.download",upload:"step.upload",latency:"step.latency",packetLoss:"step.packetLoss"},Vo={latency:Bt.latency,download:Bt.download,upload:Bt.upload,packetLoss:Rt.red[4]},Pi=e=>e in Vo;function U8(e,t,n){return e?e.bytes?Li(e.bytes,{unit:"byte",maximumFractionDigits:0},n):e.numPackets?t("packets",{count:e.numPackets,formattedCount:Mn(e.numPackets,void 0,n)}):"":""}const B8=4,cs=2.5,q8=18,W8="md:gap-x-[0.5px]",J8=8,G8=`polygon(0 0, calc(100% - ${cs}px) 0, 100% 50%, calc(100% - ${cs}px) 100%, 0 100%, ${cs}px 50%)`;function Ii(e){return e.type==="packetLoss"?B8:e.count??e.numPackets??1}function Ec(e){return e.count??e.numPackets??1}const pd=e=>!!e.type&&Pi(e.type);function Ac(e,t){return e.reduce((n,r)=>pd(r)?n+Math.ceil(Ii(r)/t):n,0)}function X8(e,t){if(!t)return 1;const n=Math.max(1,Math.floor(t/J8));let r=1;for(;r<64&&Ac(e,r)>n&&Ac(e,r)>e.length;)r++;return r}function Y8(e,t){const n=[];return e.forEach((r,o)=>{if(!pd(r))return;const s=Ii(r);for(let i=0;i<s;i+=t)n.push({entry:o,from:i,to:Math.min(i+t,s),type:r.type})}),n}function K8(e,t,n,r,o){const s=e.type,i=s&&Pi(s)?s:void 0,a=[];return e.bytes&&a.push({label:r("progress.payload"),value:Li(e.bytes,{unit:"byte",maximumFractionDigits:0},o)}),e.count&&a.push({label:r("progress.requests"),value:Mn(e.count,void 0,o)}),e.numPackets&&a.push({label:r("progress.packets"),value:Mn(e.numPackets,void 0,o)}),a.push({label:r("progress.step"),value:r("common.step-of",{current:Mn(t+1,void 0,o),total:Mn(n,void 0,o)})}),{title:i?r(md[i]):s??r("progress.unknown"),color:i?Vo[i]:void 0,rows:a}}function Q8(){const e=c.useRef(null),[t,n]=c.useState(0);return c.useEffect(()=>{const r=e.current;if(!r||typeof ResizeObserver>"u")return;const o=new ResizeObserver(([s])=>n(s.contentRect.width));return o.observe(r),()=>o.disconnect()},[]),[e,t]}function ev({measurements:e,phaseIndex:t,stepDone:n,progress:r,running:o,className:s,ariaLabelledBy:i}){const{t:a,i18n:l}=le(),u=l.language,[m,d]=Q8(),f=c.useMemo(()=>X8(e,d),[e,d]),p=c.useMemo(()=>Y8(e,f),[e,f]),g=`chevron-progress-${c.useId()}`,b=e[t],v=b&&Ec(b)>0?n/Ec(b)*Ii(b):n;return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:m,className:G(W8,s),role:"progressbar","aria-labelledby":i,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(Math.min(100,Math.max(0,r))),style:{display:"flex",alignItems:"stretch",height:`${q8}px`},children:p.map((w,A)=>{const y=Vo[w.type],k=w.entry===t,x=w.entry<t||k&&v>=w.to,S=!x&&!k,_=o&&k&&v>=w.from&&v<w.to,E={flex:"1 1 0",minWidth:0,clipPath:G8,background:S?"var(--color-kumo-interact)":y,opacity:x||S?1:.25};return h.jsx("div",{className:_?"motion-safe:animate-[chevron-pulse_1s_ease-in-out_infinite]":void 0,"data-tooltip-id":g,"data-tooltip-content":String(w.entry),style:E},A)})}),h.jsx(Do,{id:g,render:({content:w})=>{const A=Number(w);if(!Number.isInteger(A)||!e[A])return null;const y=K8(e[A],A,e.length,a,u);return h.jsx(hd,{title:y.title,titleColor:y.color,rows:y.rows})}})]})}const tv=ei.measurements,nv="var(--text-color-kumo-default)";function rv({progress:e,phaseIndex:t,stepDone:n,phase:r,running:o,measurement:s}){const{t:i,i18n:a}=le(),l=s?.type??r,u=Pi(l)?l:void 0,m=U8(s,i,a.language),d=u?Vo[u]:Bt.download,f=`test-status-${c.useId()}`,p=o?h.jsx(Ro,{i18nKey:"progress.measuring",values:{step:u?i(md[u]):r},components:{span:h.jsx("span",{className:"sr-only sm:not-sr-only"})}}):i("progress.paused");return h.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center text-[13px]",children:[o&&h.jsx("span",{"aria-hidden":"true",className:"border-kumo-interact mr-2 h-3 w-3 rounded-full border-2 motion-safe:animate-[spin_0.8s_linear_infinite]",style:{borderTopColor:d}}),h.jsx("span",{id:f,className:"test-status font-bold trim-both","data-test-state":o?"running":"paused","data-test-phase":u??r,style:{color:o?d:nv},children:p},u??r),!!m&&o&&h.jsx("span",{className:"ml-2 font-semibold trim-both",style:{color:d},children:`· ${m}`})]}),h.jsx(ev,{className:"test-progress",ariaLabelledBy:f,measurements:tv,phaseIndex:t,stepDone:n,progress:e,running:o})]})}const ov=({icon:e,...t})=>h.jsx(So,{variant:"secondary",shape:"circle",icon:e,...t}),sv=({href:e,children:t,...n})=>h.jsx(Ss,{href:e,external:!0,variant:"secondary",className:"rounded-full gap-2 px-4",icon:h.jsx(H8,{}),...n,children:t}),Sc={pause:{label:"controls.pause",icon:kl},play:{label:"controls.resume",icon:ri},restart:{label:"controls.retest",icon:ti}},iv=({type:e,onClick:t})=>{const{t:n}=le(),r=n(Sc[e].label),o=Sc[e].icon;return h.jsx(Rr,{content:r,disable:!t,children:h.jsx(ov,{onClick:t,disabled:!t,icon:h.jsx(o,{size:18}),"aria-label":r})})},av=ke.memo(({running:e,finished:t,play:n,pause:r,restart:o,phase:s,progress:i,phaseIndex:a,stepDone:l,measurement:u})=>{const m=[],d=a>=0;return m.push(t?["pause",void 0]:e?["pause",d?r:void 0]:["play",d?n:void 0]),m.push(["restart",d||t?o:void 0]),h.jsxs(h.Fragment,{children:[m.map(([f,p])=>h.jsx(iv,{type:f,onClick:p},f)),!t&&i!==null&&i!==void 0&&h.jsx(rv,{progress:i,phaseIndex:a,stepDone:l,phase:s,running:e,measurement:u})]})}),rr=ke.memo(({label:e="",info:t,tooltipOrientation:n})=>h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"text-[14px] font-semibold",children:e}),t&&h.jsx(ed,{size:"18",content:t,place:n}
79)]}));function cv(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function lv(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ls={},us={exports:{}},ds,Rc;function uv(){if(Rc)return ds;Rc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ds=e,ds}var fs,Tc;function dv(){if(Tc)return fs;Tc=1;var e=uv();function t(){}function n(){}return n.resetWarningCache=t,fs=function(){function r(i,a,l,u,m,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},fs}var Mc;function gd(){return Mc||(Mc=1,us.exports=dv()()),us.exports}var hs={},Vn=0,ur=0,or=0,vd=1e3,po,dr,go=0,wn=0,Fo=0,pr=typeof performance=="object"&&performance.now?performance:Date,yd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Mr(){return wn||(yd(fv),wn=pr.now()+Fo)}function fv(){wn=0}function gr(){this._call=this._time=this._next=null}gr.prototype=Zi.prototype={constructor:gr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Mr():+n)+(t==null?0:+t),!this._next&&dr!==this&&(dr?dr._next=this:po=this,dr=this),this._call=e,this._time=n,Ps()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ps())}};function Zi(e,t,n){var r=new gr;return r.restart(e,t,n),r}function hv(){Mr(),++Vn;for(var e=po,t;e;)(t=wn-e._time)>=0&&e._call.call(null,t),e=e._next;--Vn}function jc(){wn=(go=pr.now())+Fo,Vn=ur=0;try{hv()}finally{Vn=0,pv(),wn=0}}function mv(){var e=pr.now(),t=e-go;t>vd&&(Fo-=t,go=e)}function pv(){for(var e,t=po,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:po=n);dr=e,Ps(r)}function Ps(e){if(!Vn){ur&&(ur=clearTimeout(ur));var t=e-wn;t>24?(e<1/0&&(ur=setTimeout(jc,e-pr.now()-Fo)),or&&(or=clearInterval(or))):(or||(go=pr.now(),or=setInterval(mv,vd)),Vn=1,yd(jc))}}function Is(e,t,n){var r=new gr;return t=t==null?0:+t,r.restart(function(o){r.stop(),e(o+t)},t,n),r}function bd(e,t,n){var r=new gr,o=t;return t==null?(r.restart(e,t,n),r):(t=+t,n=n==null?Mr():+n,r.restart(function s(i){i+=o,r.restart(s,o+=t,n),e(i)},t,n),r)}function ro(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ro=function(n){return typeof n}:ro=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ro(e)}var gv=0;function vv(){return++gv}function Cc(e,t){for(var n in t)e[n]=t[n]}function yv(e){var t=!1;return function(){t||(t=!0,e.call(this))}}function bv(e){return ro(e)==="object"&&Array.isArray(e)===!1}var wv=function(t){return+t},xv={delay:0,duration:250,ease:wv};function _v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var kv=function e(t){var n=this;_v(this,e),this.start=null,this.interrupt=null,this.end=null,t.events&&Object.keys(t.events).forEach(function(r){if(typeof t.events[r]!="function")throw new Error("Event handlers must be a function");n[r]=yv(t.events[r])})};function An(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ev(e,o,n[o])})}return e}function Ev(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Av(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rv(e,t,n){return t&&Sv(e.prototype,t),e}var wd=(function(){function e(t){Av(this,e),this.state=t||{}}return Rv(e,[{key:"transition",value:function(n){if(Array.isArray(n)){var r=!0,o=!1,s=void 0;try{for(var i=n[Symbol.iterator](),a;!(r=(a=i.next()).done);r=!0){var l=a.value;this.parse(l)}}catch(u){o=!0,s=u}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw s}}}else this.parse(n)}},{key:"isTransitioning",value:function(){return!!this.transitionData}},{key:"stopTransitions",value:function(){var n=this.transitionData;
79n&&Object.keys(n).forEach(function(r){n[r].timer.stop()})}},{key:"setState",value:function(n){typeof n=="function"?Cc(this.state,n(this.state)):Cc(this.state,n)}},{key:"parse",value:function(n){var r=this,o=An({},n),s=new kv(o);o.events&&delete o.events;var i=An({},xv,o.timing||{},{time:Mr()});o.timing&&delete o.timing,Object.keys(o).forEach(function(a){var l=[],u=o[a];if(bv(u))Object.keys(u).forEach(function(p){var g=u[p];if(Array.isArray(g))g.length===1?l.push(r.getTween(p,g[0],a)):(r.setState(function(v){var w,A;return A={},A[a]=An({},v[a],(w={},w[p]=g[0],w)),A}),l.push(r.getTween(p,g[1],a)));else if(typeof g=="function"){var b=function(){var w=function(y){r.setState(function(k){var x,S;return S={},S[a]=An({},k[a],(x={},x[p]=g(y),x)),S})};return w};l.push(b)}else r.setState(function(v){var w,A;return A={},A[a]=An({},v[a],(w={},w[p]=g,w)),A}),l.push(r.getTween(p,g,a))});else if(Array.isArray(u))if(u.length===1)l.push(r.getTween(a,u[0],null));else{var m;r.setState((m={},m[a]=u[0],m)),l.push(r.getTween(a,u[1],null))}else if(typeof u=="function"){var d=function(){var g=function(v){var w;r.setState((w={},w[a]=u(v),w))};return g};l.push(d)}else{var f;r.setState((f={},f[a]=u,f)),l.push(r.getTween(a,u,null))}r.update({stateKey:a,timing:i,tweens:l,events:s,status:0})})}},{key:"getTween",value:function(n,r,o){var s=this;return function(){var i=o?s.state[o][n]:s.state[n];if(i===r)return null;var a=s.getInterpolator(i,r,n,o),l;return o===null?l=function(m){var d;s.setState((d={},d[n]=a(m),d))}:l=function(m){s.setState(function(d){var f,p;return p={},p[o]=An({},d[o],(f={},f[n]=a(m),f)),p})},l}}},{key:"update",value:function(n){this.transitionData||(this.transitionData={}),this.init(vv(),n)}},{key:"init",value:function(n,r){var o=this,s=r.tweens.length,i=new Array(s),a=function(f){r.status=1,r.timer.restart(l,r.timing.delay,r.timing.time),r.timing.delay<=f&&l(f-r.timing.delay)};this.transitionData[n]=r,r.timer=Zi(a,0,r.timing.time);var l=function d(f){if(r.status!==1)return m();for(var p in o.transitionData){var g=o.transitionData[p];if(g.stateKey===r.stateKey){if(g.status===3)return Is(d);g.status===4?(g.status=6,g.timer.stop(),g.events.interrupt&&g.events.interrupt.call(o),delete o.transitionData[p]):+p<n&&(g.status=6,g.timer.stop(),delete o.transitionData[p])}}if(Is(function(){r.status===3&&(r.status=4,r.timer.restart(u,r.timing.delay,r.timing.time),u(f))}),r.status=2,r.events.start&&r.events.start.call(o),r.status===2){r.status=3;for(var b=-1,v=0;v<s;++v){var w=r.tweens[v]();w&&(i[++b]=w)}i.length=b+1}},u=function(f){var p=1;f<r.timing.duration?p=r.timing.ease(f/r.timing.duration):(r.timer.restart(m),r.status=5);for(var g=-1;++g<i.length;)i[g](p);r.status===5&&(r.events.end&&r.events.end.call(o),m())},m=function(){r.status=6,r.timer.stop(),delete o.transitionData[n];for(var f in o.transitionData)return;delete o.transitionData}}}]),e})();const Tv=Object.freeze(Object.defineProperty({__proto__:null,BaseNode:wd,interval:bd,now:Mr,timeout:Is,timer:Zi},Symbol.toStringTag,{value:"Module"})),Mv=Ud(Tv);var ms={},Nc;function jv(){return Nc||(Nc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;function t(r,o,s,i){for(var a=[],l=0;l<s.length;l++)a[l]=s[l];for(var u=0;u<r.length;u++)i[r[u]]===void 0&&a.push(r[u]);return a.sort(function(m,d){var f=i[m],p=i[d],g=o[m],b=o[d];if(f!=null&&p!=null)return i[m]-i[d];if(g!=null&&b!=null)return o[m]-o[d];if(f!=null){for(var v=0;v<s.length;v++){var w=s[v];if(o[w]){if(f<i[w]&&b>o[w])return-1;if(f>i[w]&&b<o[w])return 1}}return 1}for(var A=0;A<s.length;A++){var y=s[A];if(o[y]){if(p<i[y]&&g>o[y])return 1;if(p>i[y]&&g<o[y])return-1}}return-1})}var n=t;e.default=n})(ms)),ms}var At={},Lc;function Cv(){if(Lc)return At;Lc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.LEAVE=At.UPDATE=At.ENTER=void 0;var e="ENTER";At.ENTER=e;var t="UPDATE";At.UPDATE=t;var n="LEAVE";return At.LEAVE=n,At}var qr={},Oc;function xd(){if(Oc)return qr;Oc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.numeric=e;function e(t,n){var r=+t,o=+n-r;return function(s){return r+o*s}}return qr}var zc;function Nv(){return zc||(zc=1,(function(e){function t(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(R){return typeof R}:t=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},t(_)}
79Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(hl());a(gd());var r=Mv,o=a(jv()),s=Cv(),i=xd();function a(_){return _&&_.__esModule?_:{default:_}}function l(_){if(typeof WeakMap!="function")return null;var E=new WeakMap,R=new WeakMap;return(l=function(j){return j?R:E})(_)}function u(_,E){if(_&&_.__esModule)return _;if(_===null||t(_)!=="object"&&typeof _!="function")return{default:_};var R=l(E);if(R&&R.has(_))return R.get(_);var M={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in _)if(N!=="default"&&Object.prototype.hasOwnProperty.call(_,N)){var z=j?Object.getOwnPropertyDescriptor(_,N):null;z&&(z.get||z.set)?Object.defineProperty(M,N,z):M[N]=_[N]}return M.default=_,R&&R.set(_,M),M}function m(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function d(_,E){for(var R=0;R<E.length;R++){var M=E[R];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(_,M.key,M)}}function f(_,E,R){return E&&d(_.prototype,E),R&&d(_,R),_}function p(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),E&&g(_,E)}function g(_,E){return g=Object.setPrototypeOf||function(M,j){return M.__proto__=j,M},g(_,E)}function b(_){var E=A();return function(){var M=y(_),j;if(E){var N=y(this).constructor;j=Reflect.construct(M,arguments,N)}else j=M.apply(this,arguments);return v(this,j)}}function v(_,E){return E&&(t(E)==="object"||typeof E=="function")?E:w(_)}function w(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function A(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function y(_){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},y(_)}function k(_,E,R){return E in _?Object.defineProperty(_,E,{value:R,enumerable:!0,configurable:!0,writable:!0}):_[E]=R,_}var x=(function(_){p(R,_);var E=b(R);function R(M){var j;m(this,R),j=E.call(this,M),k(w(j),"animate",function(){var O=j.state,I=O.nodeKeys,D=O.nodeHash;if(!j.unmounting){for(var H=!1,$=[],C=I.length,L=0;L<C;L++){var F=I[L],oe=D[F],q=oe.isTransitioning();q&&(H=!0),oe.type===s.LEAVE&&!q?delete D[F]:$.push(F)}H||j.interval.stop(),j.setState(function(){return{nodeKeys:$,nodes:$.map(function(ee){return D[ee]})}})}}),k(w(j),"interval",null),k(w(j),"unmounting",!1);var N=M.interpolation,z=(function(O){p(D,O);var I=b(D);function D(H,$){var C;return m(this,D),C=I.call(this),k(w(C),"getInterpolator",N),C.key=H,C.data=$,C.type=s.ENTER,C}return D})(r.BaseNode);return j.state={Node:z,nodeKeys:[],nodeHash:{},nodes:[],data:null},j}return f(R,[{key:"componentDidMount",value:function(){this.startInterval()}},{key:"componentDidUpdate",value:function(j){j.data!==this.props.data&&!this.unmounting&&this.startInterval()}},{key:"startInterval",value:function(){this.interval?this.interval.restart(this.animate):this.interval=(0,r.interval)(this.animate)}},{key:"componentWillUnmount",value:function(){var j=this.state,N=j.nodeKeys,z=j.nodeHash;this.unmounting=!0,this.interval&&this.interval.stop(),N.forEach(function(O){z[O].stopTransitions()})}},{key:"render",value:function(){var j=this.props.children(this.state.nodes);return j&&n.default.Children.only(j)}}],[{key:"getDerivedStateFromProps",value:function(j,N){if(j.data!==N.data){for(var z=j.data,O=j.keyAccessor,I=j.start,D=j.enter,H=j.update,$=j.leave,C=N.Node,L=N.nodeKeys,F=N.nodeHash,oe={},q=0;q<L.length;q++)oe[L[q]]=q;for(var ee={},ue=[],X=0;X<z.length;X++){var B=z[X],V=O(B,X);if(ee[V]=X,ue.push(V),oe[V]===void 0){var K=new C;K.key=V,K.data=B,K.type=s.ENTER,F[V]=K}}for(var me=0;me<L.length;me++){var se=L[me],pe=F[se];ee[se]!==void 0?(pe.data=z[ee[se]],pe.type=s.UPDATE):pe.type=s.LEAVE}for(var re=(0,o.default)(L,oe,ue,ee),Pe=0;Pe<re.length;Pe++){var ve=re[Pe],Ce=F[ve],ie=Ce.data;Ce.type===s.ENTER?(Ce.setState(I(ie,ee[ve])),Ce.transition(D(ie,ee[ve]))):Ce.type===s.LEAVE?Ce.transition($(ie,oe[ve])):Ce.transition(H(ie,ee[ve]))}return{data:z,nodes:re.map(function(Se){return F[Se]}),nodeHash:F,nodeKeys:re}}return null}}]),R})(n.Component);x.propTypes={},x.defaultProps={enter:function(){},update:function(){},leave:function(){},interpolation:i.numeric};var S=x;e.default=S})(hs)),hs}var $c;function Lv(){return $c||($c=1,(function(e){function t(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(_){return typeof _}:t=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},t(x)}
79Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(hl());s(gd());var r=s(Nv()),o=xd();function s(x){return x&&x.__esModule?x:{default:x}}function i(x){if(typeof WeakMap!="function")return null;var S=new WeakMap,_=new WeakMap;return(i=function(R){return R?_:S})(x)}function a(x,S){if(x&&x.__esModule)return x;if(x===null||t(x)!=="object"&&typeof x!="function")return{default:x};var _=i(S);if(_&&_.has(x))return _.get(x);var E={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in x)if(M!=="default"&&Object.prototype.hasOwnProperty.call(x,M)){var j=R?Object.getOwnPropertyDescriptor(x,M):null;j&&(j.get||j.set)?Object.defineProperty(E,M,j):E[M]=x[M]}return E.default=x,_&&_.set(x,E),E}function l(x,S){if(!(x instanceof S))throw new TypeError("Cannot call a class as a function")}function u(x,S){for(var _=0;_<S.length;_++){var E=S[_];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(x,E.key,E)}}function m(x,S,_){return S&&u(x.prototype,S),x}function d(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(S&&S.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),S&&f(x,S)}function f(x,S){return f=Object.setPrototypeOf||function(E,R){return E.__proto__=R,E},f(x,S)}function p(x){var S=v();return function(){var E=w(x),R;if(S){var M=w(this).constructor;R=Reflect.construct(E,arguments,M)}else R=E.apply(this,arguments);return g(this,R)}}function g(x,S){return S&&(t(S)==="object"||typeof S=="function")?S:b(x)}function b(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function w(x){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},w(x)}var A=function(){return"$$key$$"},y=(function(x){d(_,x);var S=p(_);function _(){return l(this,_),S.apply(this,arguments)}return m(_,[{key:"render",value:function(){var R=this.props,M=R.show,j=R.start,N=R.enter,z=R.update,O=R.leave,I=R.interpolation,D=R.children,H=typeof j=="function"?j():j;return n.default.createElement(r.default,{data:M?[H]:[],start:function(){return H},keyAccessor:A,interpolation:I,enter:typeof N=="function"?N:function(){return N},update:typeof z=="function"?z:function(){return z},leave:typeof O=="function"?O:function(){return O}},function($){if(!$[0])return null;var C=D($[0].state);return C&&n.default.Children.only(C)})}}]),_})(n.Component);y.propTypes={},y.defaultProps={show:!0,interpolation:o.numeric};var k=y;e.default=k})(ls)),ls}var Ov=Lv();const zv=Bd(Ov),Pc=1e9,Sn=ke.memo(({val:e,unit:t,percent:n,size:r=30,updateDuration:o=500})=>{const s=e!==void 0,{formatUnitParts:i,formatPercentParts:a}=pt(),l=c.useMemo(()=>({duration:o,ease:lv}),[o]);return h.jsx(zv,{start:{value:0},enter:{timing:l,value:[e||0]},update:{timing:l,value:[e||0]},children:({value:u})=>{let m=u,d=!1;t==="bit-per-second"&&m>Pc&&(d=!0,m=Pc);const{value:f,unit:p}=n?a(m,{maximumFractionDigits:2}):i(m,{unit:t,maximumSignificantDigits:d?1:3});return h.jsxs("div",{translate:"no",className:"flex items-baseline gap-x-1",children:[h.jsx("span",{className:"font-semibold trim-both",style:{fontSize:`${r}px`},children:s?f:"-"}),!!s&&h.jsx("span",{className:"font-medium trim-both",style:{fontSize:`${Math.max(16,Math.round(r*.5))}px`},children:`${p}${d?"+":""}`})]})}})});function $v({size:e="1em",...t}){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:h.jsx("path",{d:"M24 12.04C24 5.4 18.63 0 12 0S0 5.4 0 12.04c0 5.65 3.88 10.4 9.1 11.7v-8.01H6.63v-3.69H9.1v-1.58c0-4.1 1.85-6 5.86-6a13 13 0 0 1 2.6.3v3.33q-.68-.05-1.38-.04c-1.97 0-2.73.75-2.73 2.7v1.3h3.92l-.67 3.67h-3.25V24A12.03 12.03 0 0 0 24 12.04"})})}function Pv({size:e="1em",...t}){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"
79currentColor","aria-hidden":"true",focusable:"false",...t,children:h.jsx("path",{d:"m23.99 24-9.3-13.76L23.36 0h-3.03l-7 8.26L7.75 0H.13l8.98 13.26L0 24h3.02l7.43-8.76L16.38 24H24zM6.76 1.93l13.62 20.14h-3.01L3.74 1.93z"})})}const Iv=["downSpeed","upSpeed","latency","jitter"],Zv={downSpeed:0,upSpeed:0,latency:2,jitter:2},Dv=e=>{const t=(n,r=0)=>Math.round(n*Math.pow(10,r))/Math.pow(10,r);return Object.fromEntries(Iv.map(n=>[n,t(e[n],Zv[n])]))},Vv=({summaryData:e})=>{const{downSpeed:t}=e,{t:n}=le(),{formatUnit:r}=pt(),o=r(t,{unit:"bit-per-second",maximumSignificantDigits:3}),s=n("share.text",{speed:o}),i=`${f0}/__preview?results=${encodeURIComponent(btoa(JSON.stringify(Dv(e))))}`,a=`https://x.com/intent/tweet?text=${encodeURIComponent(s)}&url=${encodeURIComponent(i)}&hashtags=speedtest,cloudflare`,l=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(i)}"e=${encodeURIComponent(s)}&hashtag=${encodeURIComponent("#cloudflare")}`;return h.jsxs(h.Fragment,{children:[h.jsx(Ss,{href:a,external:!0,variant:"secondary",shape:"circle",icon:h.jsx(Pv,{size:12}),"aria-label":n("share.x")}),h.jsx(Ss,{href:l,external:!0,variant:"secondary",shape:"circle",icon:h.jsx($v,{size:18}),"aria-label":n("share.facebook")})]})};var Ic={},ps={},gs=34,sr=10,vs=13;function _d(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function Fv(e,t){var n=_d(e);return function(r,o){return t(n(r),o,e)}}function Zc(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var o in r)o in t||n.push(t[o]=o)}),n}function Ve(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function Hv(e){return e<0?"-"+Ve(-e,6):e>9999?"+"+Ve(e,6):Ve(e,4)}function Uv(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),o=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":Hv(e.getUTCFullYear())+"-"+Ve(e.getUTCMonth()+1,2)+"-"+Ve(e.getUTCDate(),2)+(o?"T"+Ve(t,2)+":"+Ve(n,2)+":"+Ve(r,2)+"."+Ve(o,3)+"Z":r?"T"+Ve(t,2)+":"+Ve(n,2)+":"+Ve(r,2)+"Z":n||t?"T"+Ve(t,2)+":"+Ve(n,2)+"Z":"")}function Bv(e){var t=new RegExp('["'+e+` 80\r]`),n=e.charCodeAt(0);function r(d,f){var p,g,b=o(d,function(v,w){if(p)return p(v,w-1);g=v,p=f?Fv(v,f):_d(v)});return b.columns=g||[],b}function o(d,f){var p=[],g=d.length,b=0,v=0,w,A=g<=0,y=!1;d.charCodeAt(g-1)===sr&&--g,d.charCodeAt(g-1)===vs&&--g;function k(){if(A)return ps;if(y)return y=!1,Ic;var S,_=b,E;if(d.charCodeAt(_)===gs){for(;b++<g&&d.charCodeAt(b)!==gs||d.charCodeAt(++b)===gs;);return(S=b)>=g?A=!0:(E=d.charCodeAt(b++))===sr?y=!0:E===vs&&(y=!0,d.charCodeAt(b)===sr&&++b),d.slice(_+1,S-1).replace(/""/g,'"')}for(;b<g;){if((E=d.charCodeAt(S=b++))===sr)y=!0;else if(E===vs)y=!0,d.charCodeAt(b)===sr&&++b;else if(E!==n)continue;return d.slice(_,S)}return A=!0,d.slice(_,g)}for(;(w=k())!==ps;){for(var x=[];w!==Ic&&w!==ps;)x.push(w),w=k();f&&(x=f(x,v++))==null||p.push(x)}return p}function s(d,f){return d.map(function(p){return f.map(function(g){return m(p[g])}).join(e)})}function i(d,f){return f==null&&(f=Zc(d)),[f.map(m).join(e)].concat(s(d,f)).join(` 81`)}function a(d,f){return f==null&&(f=Zc(d)),s(d,f).join(` 82`)}function l(d){return d.map(u).join(` 83`)}function u(d){return d.map(m).join(e)}function m(d){return d==null?"":d instanceof Date?Uv(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:r,parseRows:o,format:i,formatBody:a,formatRows:l,formatRow:u,formatValue:m}}var qv=Bv(","),Wv=qv.format;const Jv=(e,t="data.csv")=>{const n=`data:text/csv;
83base64,${btoa(unescape(encodeURIComponent(Wv(e))))}`,r=document.createElement("a");r.setAttribute("download",t),r.setAttribute("href",n),r.click()},Gv=xe({measTime:No(),ping:Q(),bps:Q(),duration:Q(),serverTime:Q(),transferSize:Q()}),Xv=Wt([xe({measTime:No(),ping:Q()}),xe({bytes:ut(0)})]),Yv=xe({timings:Ct(Gv),sideLatency:Ct(Xv).default([])}),Kv=e=>{const t=[];return["download","upload"].forEach(n=>{const r=e.raw[n];!r||typeof r=="number"||Object.entries(r.results).forEach(([o,s])=>{const i=Yv.safeParse(s);if(!i.success){console.error("Unable to export bandwidth measurements",{direction:n,bytes:o,error:i.error});return}const{timings:a,sideLatency:l}=i.data,u=l.filter(d=>"measTime"in d),m=u.map(d=>{const f=a.findIndex(p=>+p.measTime>+d.measTime);return f>=0?f:a.length-1});a.forEach((d,f)=>{t.push({time:+d.measTime,direction:n,bytes:+o,latency:d.ping,bps:d.bps,duration:d.duration,serverTime:d.serverTime,responseSize:d.transferSize,loadedLatencies:u.filter((p,g)=>m[g]===f).map(p=>+p.ping).join(" ")})})})}),t.sort((n,r)=>n.time-r.time),t},Qv=({results:e})=>{const{t}=le();return h.jsx(Rr,{content:t("share.csv.tooltip"),children:h.jsx(So,{variant:"secondary",shape:"circle",icon:h.jsx(wl,{size:16}),"aria-label":t("share.csv"),onClick:()=>Jv(Kv(e),`speed-results-${Math.round(+new Date/1e3)}.csv`)})})},e4=({results:e,summaryData:t})=>h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t&&h.jsx(Vv,{summaryData:t}),h.jsx(Qv,{results:e})]});function t4(e){return fd.safeParse({...e,jitter:e.jitter===null?0:e.jitter})}const n4={hour:"numeric",minute:"2-digit",second:"2-digit"};function r4(e){return e instanceof Date?e:new Date(e)}function o4(e,t=n4,n=ht){const r=r4(e),o=!!(t.hour||t.minute||t.second||t.timeStyle);return n===ht&&o?new Intl.DateTimeFormat(n,t).formatToParts(r).map(s=>s.type==="literal"&&s.value.trim()==="at"?", ":s.value).join(""):r.toLocaleString(n,t)}function kd(e){const{i18n:t}=le(),n=t.language||ht;return c.useMemo(()=>({formatDate:(...r)=>o4(r[0],r[1],r[2]||n)}),[n])}const s4=({measurementId:e})=>{const{t}=le(),[n,r]=c.useState(!1),o=c.useRef(void 0);c.useEffect(()=>()=>clearTimeout(o.current),[]);const s=c.useCallback(()=>{navigator.clipboard?.writeText(e).then(()=>{r(!0),clearTimeout(o.current),o.current=setTimeout(()=>r(!1),1e3)},()=>{})},[e]);return h.jsxs("div",{children:[t("timestamp.measurement-id"),h.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[h.jsx("span",{className:"break-all font-mono",children:e}),h.jsx("button",{type:"button",onClick:s,"aria-label":t(n?"common.copied":"timestamp.copy-id"),title:t(n?"common.copied":"common.copy"),style:{display:"inline-flex",alignItems:"center",border:"none",background:"none",padding:0,cursor:"pointer",color:n?"var(--text-color-kumo-success)":"inherit",lineHeight:0},children:n?h.jsx(Qs,{size:12}):h.jsx(bl,{size:12})})]})]})},i4=({measTime:e,measurementId:t,finished:n})=>{const{t:r}=le(),{formatDate:o}=kd();return h.jsx("div",{className:G("text-kumo-subtle flex h-4 items-center justify-end ml-auto text-[12px] w-full sm:w-auto",!n&&"invisible sm:hidden"),"aria-hidden":!n,children:n&&h.jsx(Rr,{className:"measurement-id-tooltip",clickable:!0,disable:!t,maxWidth:"27rem",content:t?h.jsx(s4,{measurementId:t}):!1,children:h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx(yl,{size:16,"aria-label":r("timestamp.icon")}),h.jsx("span",{children:h.jsx(Ro,{i18nKey:"timestamp.measured-at",values:{time:o(e)}})})]})})})};function Zs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function a4(e,t){if(Fn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ed(e){var t=a4(e,"string");return Fn(t)=="symbol"?t:t+""}function Dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ed(r.key),r)}}function Ad(e,t,n){return t&&Dc(e.prototype,t),n&&Dc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
83function Ds(e,t){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ds(e,t)}function Vs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ds(e,t)}function fr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sd(e,t){if(t&&(Fn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fr(e)}function Hn(e){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hn(e)}function Wr(e,t,n){return(t=Ed(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c4(e,t,n,r){for(var o=[],s=0;s<n.length;s++)o[s]=n[s];for(var i=0;i<e.length;i++)r[e[i]]===void 0&&o.push(e[i]);return o.sort(function(a,l){var u=r[a],m=r[l],d=t[a],f=t[l];if(u!=null&&m!=null)return r[a]-r[l];if(d!=null&&f!=null)return t[a]-t[l];if(u!=null){for(var p=0;p<n.length;p++){var g=n[p];if(t[g]){if(u<r[g]&&f>t[g])return-1;if(u>r[g]&&f<t[g])return 1}}return 1}for(var b=0;b<n.length;b++){var v=n[b];if(t[v]){if(m<r[v]&&d>t[v])return 1;if(m>r[v]&&d<t[v])return-1}}return-1})}var ys="ENTER",l4="UPDATE",bs="LEAVE";function Rd(e,t){var n=+e,r=+t-n;return function(o){return n+r*o}}function Vc(e){var t=u4();return function(){var r=Hn(e),o;if(t){var s=Hn(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return Sd(this,o)}}function u4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Di=(function(e){Vs(n,e);var t=Vc(n);function n(r){var o;Zs(this,n),o=t.call(this,r),Wr(fr(o),"animate",function(){var a=o.state,l=a.nodeKeys,u=a.nodeHash;if(!o.unmounting){for(var m=!1,d=[],f=l.length,p=0;p<f;p++){var g=l[p],b=u[g],v=b.isTransitioning();v&&(m=!0),b.type===bs&&!v?delete u[g]:d.push(g)}m||o.interval.stop(),o.setState(function(){return{nodeKeys:d,nodes:d.map(function(w){return u[w]})}})}}),Wr(fr(o),"interval",null),Wr(fr(o),"unmounting",!1);var s=r.interpolation,i=(function(a){Vs(u,a);var l=Vc(u);function u(m,d){var f;return Zs(this,u),f=l.call(this),Wr(fr(f),"getInterpolator",s),f.key=m,f.data=d,f.type=ys,f}return u})(wd);return o.state={Node:i,nodeKeys:[],nodeHash:{},nodes:[],data:null},o}return Ad(n,[{key:"componentDidMount",value:function(){this.startInterval()}},{key:"componentDidUpdate",value:function(o){o.data!==this.props.data&&!this.unmounting&&this.startInterval()}},{key:"startInterval",value:function(){this.interval?this.interval.restart(this.animate):this.interval=bd(this.animate)}},{key:"componentWillUnmount",value:function(){var o=this.state,s=o.nodeKeys,i=o.nodeHash;
83this.unmounting=!0,this.interval&&this.interval.stop(),s.forEach(function(a){i[a].stopTransitions()})}},{key:"render",value:function(){var o=this.props.children(this.state.nodes);return o&&ke.Children.only(o)}}],[{key:"getDerivedStateFromProps",value:function(o,s){if(o.data!==s.data){for(var i=o.data,a=o.keyAccessor,l=o.start,u=o.enter,m=o.update,d=o.leave,f=s.Node,p=s.nodeKeys,g=s.nodeHash,b={},v=0;v<p.length;v++)b[p[v]]=v;for(var w={},A=[],y=0;y<i.length;y++){var k=i[y],x=a(k,y);if(w[x]=y,A.push(x),b[x]===void 0){var S=new f;S.key=x,S.data=k,S.type=ys,g[x]=S}}for(var _=0;_<p.length;_++){var E=p[_],R=g[E];w[E]!==void 0?(R.data=i[w[E]],R.type=l4):R.type=bs}for(var M=c4(p,b,A,w),j=0;j<M.length;j++){var N=M[j],z=g[N],O=z.data;z.type===ys?(z.setState(l(O,w[N])),z.transition(u(O,w[N]))):z.type===bs?z.transition(d(O,b[N])):z.transition(m(O,w[N]))}return{data:i,nodes:M.map(function(I){return g[I]}),nodeHash:g,nodeKeys:M}}return null}}]),n})(c.Component);Di.propTypes={};Di.defaultProps={enter:function(){},update:function(){},leave:function(){},interpolation:Rd};function d4(e){var t=f4();return function(){var r=Hn(e),o;if(t){var s=Hn(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return Sd(this,o)}}function f4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var h4=function(){return"$$key$$"},Vi=(function(e){Vs(n,e);var t=d4(n);function n(){return Zs(this,n),t.apply(this,arguments)}return Ad(n,[{key:"render",value:function(){var o=this.props,s=o.show,i=o.start,a=o.enter,l=o.update,u=o.leave,m=o.interpolation,d=o.children,f=typeof i=="function"?i():i;return ke.createElement(Di,{data:s?[f]:[],start:function(){return f},keyAccessor:h4,interpolation:m,enter:typeof a=="function"?a:function(){return a},update:typeof l=="function"?l:function(){return l},leave:typeof u=="function"?u:function(){return u}},function(p){if(!p[0])return null;var g=d(p[0].state);return g&&ke.Children.only(g)})}}]),n})(c.Component);Vi.propTypes={};Vi.defaultProps={show:!0,interpolation:Rd};function oo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function m4(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Td(e){let t,n,r;e.length!==2?(t=oo,n=(a,l)=>oo(e(a),l),r=(a,l)=>e(a)-l):(t=e===oo||e===m4?e:p4,n=e,r=e);function o(a,l,u=0,m=a.length){if(u<m){if(t(l,l)!==0)return m;do{const d=u+m>>>1;n(a[d],l)<0?u=d+1:m=d}while(u<m)}return u}function s(a,l,u=0,m=a.length){if(u<m){if(t(l,l)!==0)return m;do{const d=u+m>>>1;n(a[d],l)<=0?u=d+1:m=d}while(u<m)}return u}function i(a,l,u=0,m=a.length){const d=o(a,l,u,m-1);return d>u&&r(a[d-1],l)>-r(a[d],l)?d-1:d}return{left:o,center:i,right:s}}function p4(){return 0}function g4(e){return e===null?NaN:+e}const v4=Td(oo),y4=v4.right;Td(g4).center;const b4=Math.sqrt(50),w4=Math.sqrt(10),x4=Math.sqrt(2);function vo(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),s=r/Math.pow(10,o),i=s>=b4?10:s>=w4?5:s>=x4?2:1;let a,l,u;return o<0?(u=Math.pow(10,-o)/i,a=Math.round(e*u),l=Math.round(t*u),a/u<e&&++a,l/u>t&&--l,u=-u):(u=Math.pow(10,o)*i,a=Math.round(e/u),l=Math.round(t/u),a*u<e&&++a,l*u>t&&--l),l<a&&.5<=n&&n<2?vo(e,t,n*2):[a,l,u]}function _4(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,s,i]=r?vo(t,e,n):vo(e,t,n);if(!(s>=o))return[];const a=s-o+1,l=new Array(a);if(r)if(i<0)for(let u=0;u<a;++u)l[u]=(s-u)/-i;else for(let u=0;u<a;++u)l[u]=(s-u)*i;else if(i<0)for(let u=0;u<a;++u)l[u]=(o+u)/-i;else for(let u=0;u<a;++u)l[u]=(o+u)*i;return l}function Fs(e,t,n){return t=+t,e=+e,n=+n,vo(e,t,n)[2]}function k4(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?Fs(t,e,n):Fs(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function E4(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Md(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function jr(){}var vr=.7,yo=1/vr,On="\\s*([+-]?\\d+)\\s*",yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",A4=
vendor: 5,425 bytes, line 83
83/^#([0-9a-f]{3,8})$/,S4=new RegExp(`^rgb\\(${On},${On},${On}\\)$`),R4=new RegExp(`^rgb\\(${ft},${ft},${ft}\\)$`),T4=new RegExp(`^rgba\\(${On},${On},${On},${yr}\\)$`),M4=new RegExp(`^rgba\\(${ft},${ft},${ft},${yr}\\)$`),j4=new RegExp(`^hsl\\(${yr},${ft},${ft}\\)$`),C4=new RegExp(`^hsla\\(${yr},${ft},${ft},${yr}\\)$`),Fc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fi(jr,br,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hc,formatHex:Hc,formatHex8:N4,formatHsl:L4,formatRgb:Uc,toString:Uc});function Hc(){return this.rgb().formatHex()}function N4(){return this.rgb().formatHex8()}function L4(){return jd(this).formatHsl()}function Uc(){return this.rgb().formatRgb()}function br(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=A4.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Bc(t):n===3?new Fe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=S4.exec(e))?new Fe(t[1],t[2],t[3],1):(t=R4.exec(e))?new Fe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=T4.exec(e))?Jr(t[1],t[2],t[3],t[4]):(t=M4.exec(e))?Jr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=j4.exec(e))?Jc(t[1],t[2]/100,t[3]/100,1):(t=C4.exec(e))?Jc(t[1],t[2]/100,t[3]/100,t[4]):Fc.hasOwnProperty(e)?Bc(Fc[e]):e==="transparent"?new Fe(NaN,NaN,NaN,0):null}function Bc(e){return new Fe(e>>16&255,e>>8&255,e&255,1)}function Jr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Fe(e,t,n,r)}function O4(e){return e instanceof jr||(e=br(e)),e?(e=e.rgb(),new Fe(e.r,e.g,e.b,e.opacity)):new Fe}function Hs(e,t,n,r){return arguments.length===1?O4(e):new Fe(e,t,n,r??1)}function Fe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fi(Fe,Hs,Md(jr,{brighter(e){return e=e==null?yo:Math.pow(yo,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vr:Math.pow(vr,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fe(vn(this.r),vn(this.g),vn(this.b),bo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qc,formatHex:qc,formatHex8:z4,formatRgb:Wc,toString:Wc}));function qc(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}`}function z4(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}${mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wc(){const e=bo(this.opacity);return`${e===1?"rgb(":"rgba("}${vn(this.r)}, ${vn(this.g)}, ${vn(this.b)}${e===1?")":`, ${e})`}`}function bo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mn(e){return e=vn(e),(e<16?"0":"")+e.toString(16)}
vendor: 16,820 bytes, line 83
83function Jc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new st(e,t,n,r)}function jd(e){if(e instanceof st)return new st(e.h,e.s,e.l,e.opacity);if(e instanceof jr||(e=br(e)),!e)return new st;if(e instanceof st)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=NaN,a=s-o,l=(s+o)/2;return a?(t===s?i=(n-r)/a+(n<r)*6:n===s?i=(r-t)/a+2:i=(t-n)/a+4,a/=l<.5?s+o:2-s-o,i*=60):a=l>0&&l<1?0:i,new st(i,a,l,e.opacity)}function $4(e,t,n,r){return arguments.length===1?jd(e):new st(e,t,n,r??1)}function st(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fi(st,$4,Md(jr,{brighter(e){return e=e==null?yo:Math.pow(yo,e),new st(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vr:Math.pow(vr,e),new st(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Fe(ws(e>=240?e-240:e+120,o,r),ws(e,o,r),ws(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new st(Gc(this.h),Gr(this.s),Gr(this.l),bo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=bo(this.opacity);return`${e===1?"hsl(":"hsla("}${Gc(this.h)}, ${Gr(this.s)*100}%, ${Gr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gc(e){return e=(e||0)%360,e<0?e+360:e}function Gr(e){return Math.max(0,Math.min(1,e||0))}function ws(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Hi=e=>()=>e;function P4(e,t){return function(n){return e+n*t}}function I4(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Z4(e){return(e=+e)==1?Cd:function(t,n){return n-t?I4(t,n,e):Hi(isNaN(t)?n:t)}}function Cd(e,t){var n=t-e;return n?P4(e,n):Hi(isNaN(e)?t:e)}const Xc=(function e(t){var n=Z4(t);function r(o,s){var i=n((o=Hs(o)).r,(s=Hs(s)).r),a=n(o.g,s.g),l=n(o.b,s.b),u=Cd(o.opacity,s.opacity);return function(m){return o.r=i(m),o.g=a(m),o.b=l(m),o.opacity=u(m),o+""}}return r.gamma=e,r})(1);function D4(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(s){for(o=0;o<n;++o)r[o]=e[o]*(1-s)+t[o]*s;return r}}function V4(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function F4(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),s=new Array(n),i;for(i=0;i<r;++i)o[i]=Ho(e[i],t[i]);for(;i<n;++i)s[i]=t[i];return function(a){for(i=0;i<r;++i)s[i]=o[i](a);return s}}function H4(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function wo(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function U4(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Ho(e[o],t[o]):r[o]=t[o];return function(s){for(o in n)r[o]=n[o](s);return r}}var Us=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xs=new RegExp(Us.source,"g");function B4(e){return function(){return e}}function q4(e){return function(t){return e(t)+""}}function W4(e,t){var n=Us.lastIndex=xs.lastIndex=0,r,o,s,i=-1,a=[],l=[];for(e=e+"",t=t+"";(r=Us.exec(e))&&(o=xs.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),a[i]?a[i]+=s:a[++i]=s),(r=r[0])===(o=o[0])?a[i]?a[i]+=o:a[++i]=o:(a[++i]=null,l.push({i,x:wo(r,o)})),n=xs.lastIndex;return n<t.length&&(s=t.slice(n),a[i]?a[i]+=s:a[++i]=s),a.length<2?l[0]?q4(l[0].x):B4(t):(t=l.length,function(u){for(var m=0,d;m<t;++m)a[(d=l[m]).i]=d.x(u);return a.join("")})}function Ho(e,t){var n=typeof t,r;return t==null||n==="boolean"?Hi(t):(n==="number"?wo:n==="string"?(r=br(t))?(t=r,Xc):W4:t instanceof br?Xc:t instanceof Date?H4:V4(t)?D4:Array.isArray(t)?F4:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?U4:wo)(e,t)}function J4(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function G4(e){return function(){return e}}function X4(e){return+e}var Yc=[0,1];function jn(e){return e}function Bs(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:G4(isNaN(t)?NaN:.5)}function Y4(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function K4(e,t,n){var r=e[0],o=e[1],s=t[0],i=t[1];return o<r?(r=Bs(o,r),s=n(i,s)):(r=Bs(r,o),s=n(s,i)),function(a){return s(r(a))}}function Q4(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),s=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)o[i]=Bs(e[i],e[i+1]),s[i]=n(t[i],t[i+1]);return function(a){var l=y4(e,a,1,r)-1;return s[l](o[l](a))}}function e6(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function t6(){var e=Yc,t=Yc,n=Ho,r,o,s,i=jn,a,l,u;function m(){var f=Math.min(e.length,t.length);return i!==jn&&(i=Y4(e[0],e[f-1])),a=f>2?Q4:K4,l=u=null,d}function d(f){return f==null||isNaN(f=+f)?s:(l||(l=a(e.map(r),t,n)))(r(i(f)))}return d.invert=function(f){return i(o((u||(u=a(t,e.map(r),wo)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,X4),m()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),m()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=J4,m()},d.clamp=function(f){return arguments.length?(i=f?!0:jn,m()):i!==jn},d.interpolate=function(f){return arguments.length?(n=f,m()):n},d.unknown=function(f){return arguments.length?(s=f,d):s},function(f,p){return r=f,o=p,m()}}function n6(){return t6()(jn,jn)}function r6(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xo(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Un(e){return e=xo(Math.abs(e)),e?e[1]:NaN}function o6(e,t){return function(n,r){for(var o=n.length,s=[],i=0,a=e[0],l=0;o>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(n.substring(o-=a,o+a)),!((l+=a+1)>r));)a=e[i=(i+1)%e.length];return s.reverse().join(t)}}function s6(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var i6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _o(e){if(!(t=i6.exec(e)))throw new Error("invalid format: "+e);var t;return new Ui({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}_o.prototype=Ui.prototype;function Ui(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ui.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a6(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var ko;function c6(e,t){var n=xo(e,t);if(!n)return ko=void 0,e.toPrecision(t);var r=n[0],o=n[1],s=o-(ko=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,i=r.length;return s===i?r:s>i?r+new Array(s-i+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+xo(e,Math.max(0,t+s-1))[0]}function Kc(e,t){var n=xo(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Qc={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:r6,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Kc(e*100,t),r:Kc,s:c6,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function el(e){return e}var tl=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l6(e){var t=e.grouping===void 0||e.thousands===void 0?el:o6(tl.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?el:s6(tl.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"â":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d,f){d=_o(d);var p=d.fill,g=d.align,b=d.sign,v=d.symbol,w=d.zero,A=d.width,y=d.comma,k=d.precision,x=d.trim,S=d.type;S==="n"?(y=!0,S="g"):Qc[S]||(k===void 0&&(k=12),x=!0,S="g"),(w||p==="0"&&g==="=")&&(w=!0,p="0",g="=");var _=(f&&f.prefix!==void 0?f.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),E=(v==="$"?r:/[%p]/.test(S)?i:"")+(f&&f.suffix!==void 0?f.suffix:""),R=Qc[S],M=/[defgprs%]/.test(S);k=k===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function j(N){var z=_,O=E,I,D,H;if(S==="c")O=R(N)+O,N="";else{N=+N;var $=N<0||1/N<0;if(N=isNaN(N)?l:R(Math.abs(N),k),x&&(N=a6(N)),$&&+N==0&&b!=="+"&&($=!1),z=($?b==="("?b:a:b==="-"||b==="("?"":b)+z,O=(S==="s"&&!isNaN(N)&&ko!==void 0?nl[8+ko/3]:"")+O+($&&b==="("?")":""),M){for(I=-1,D=N.length;++I<D;)if(H=N.charCodeAt(I),48>H||H>57){O=(H===46?o+N.slice(I+1):N.slice(I))+O,N=N.slice(0,I);break}}}y&&!w&&(N=t(N,1/0));var C=z.length+N.length+O.length,L=C<A?new Array(A-C+1).join(p):"";switch(y&&w&&(N=t(L+N,L.length?A-O.length:1/0),L=""),g){case"<":N=z+N+O+L;break;case"=":N=z+L+N+O;break;case"^":N=L.slice(0,C=L.length>>1)+z+N+O+L.slice(C);break;default:N=L+z+N+O;break}return s(N)}return j.toString=function(){return d+""},j}function m(d,f){var p=Math.max(-8,Math.min(8,Math.floor(Un(f)/3)))*3,g=Math.pow(10,-p),b=u((d=_o(d),d.type="f",d),{suffix:nl[8+p/3]});return function(v){return b(g*v)}}return{format:u,formatPrefix:m}}var Xr,Nd,Ld;u6({thousands:",",grouping:[3],currency:["$",""]});function u6(e){return Xr=l6(e),Nd=Xr.format,Ld=Xr.formatPrefix,Xr}function d6(e){return Math.max(0,-Un(Math.abs(e)))}function f6(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Un(t)/3)))*3-Un(Math.abs(e)))}function h6(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Un(t)-Un(e))+1}function m6(e,t,n,r){var o=k4(e,t,n),s;switch(r=_o(r??",f"),r.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=f6(o,i))&&(r.precision=s),Ld(r,i)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=h6(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=d6(o))&&(r.precision=s-(r.type==="%")*2);break}}return Nd(r)}function p6(e){var t=e.domain;return e.ticks=function(n){var r=t();return _4(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return m6(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,s=r.length-1,i=r[o],a=r[s],l,u,m=10;for(a<i&&(u=i,i=a,a=u,u=o,o=s,s=u);m-- >0;){if(u=Fs(i,a,n),u===l)return r[o]=i,r[s]=a,t(r);if(u>0)i=Math.floor(i/u)*u,a=Math.ceil(a/u)*u;else if(u<0)i=Math.ceil(i*u)/u,a=Math.floor(a*u)/u;else break;l=u}return e},e}function qs(){var e=n6();return e.copy=function(){return e6(e,qs())},E4.apply(e,arguments),p6(e)}function je(e){return function(){return e}}const Ws=Math.PI,Js=2*Ws,fn=1e-6,g6=Js-fn;function Od(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function v6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Od;const n=10**t;return function(r){this._+=r[0];for(let o=1,s=r.length;o<s;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class y6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Od:v6(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,s,i){this._append`C${+t},${+n},${+r},${+o},${this._x1=+s},${this._y1=+i}`}arcTo(t,n,r,o,s){if(t=+t,n=+n,r=+r,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let i=this._x1,a=this._y1,l=r-t,u=o-n,m=i-t,d=a-n,f=m*m+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>fn)if(!(Math.abs(d*l-u*m)>fn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-i,g=o-a,b=l*l+u*u,v=p*p+g*g,w=Math.sqrt(b),A=Math.sqrt(f),y=s*Math.tan((Ws-Math.acos((b+f-v)/(2*w*A)))/2),k=y/A,x=y/w;Math.abs(k-1)>fn&&this._append`L${t+k*m},${n+k*d}`,this._append`A${s},${s},0,0,${+(d*p>m*g)},${this._x1=t+x*l},${this._y1=n+x*u}`}}arc(t,n,r,o,s,i){if(t=+t,n=+n,r=+r,i=!!i,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(o),l=r*Math.sin(o),u=t+a,m=n+l,d=1^i,f=i?o-s:s-o;this._x1===null?this._append`M${u},${m}`:(Math.abs(this._x1-u)>fn||Math.abs(this._y1-m)>fn)&&this._append`L${u},${m}`,r&&(f<0&&(f=f%Js+Js),f>g6?this._append`A${r},${r},0,1,${d},${t-a},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=m}`:f>fn&&this._append`A${r},${r},0,${+(f>=Ws)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function zd(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new y6(t)}function $d(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pd(e){this._context=e}Pd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Id(e){return new Pd(e)}function Zd(e){return e[0]}function Dd(e){return e[1]}function b6(e,t){var n=je(!0),r=null,o=Id,s=null,i=zd(a);e=typeof e=="function"?e:e===void 0?Zd:je(e),t=typeof t=="function"?t:t===void 0?Dd:je(t);function a(l){var u,m=(l=$d(l)).length,d,f=!1,p;for(r==null&&(s=o(p=i())),u=0;u<=m;++u)!(u<m&&n(d=l[u],u,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(d,u,l),+t(d,u,l));if(p)return s=null,p+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:je(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:je(+l),a):t},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:je(!!l),a):n},a.curve=function(l){return arguments.length?(o=l,r!=null&&(s=o(r)),a):o},a.context=function(l){return arguments.length?(l==null?r=s=null:s=o(r=l),a):r},a}function w6(e,t,n){var r=null,o=je(!0),s=null,i=Id,a=null,l=zd(u);e=typeof e=="function"?e:e===void 0?Zd:je(+e),t=typeof t=="function"?t:je(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Dd:je(+n);function u(d){var f,p,g,b=(d=$d(d)).length,v,w=!1,A,y=new Array(b),k=new Array(b);for(s==null&&(a=i(A=l())),f=0;f<=b;++f){if(!(f<b&&o(v=d[f],f,d))===w)if(w=!w)p=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=f-1;g>=p;--g)a.point(y[g],k[g]);a.lineEnd(),a.areaEnd()}w&&(y[f]=+e(v,f,d),k[f]=+t(v,f,d),a.point(r?+r(v,f,d):y[f],n?+n(v,f,d):k[f]))}if(A)return a=null,A+""||null}function m(){return b6().defined(o).curve(i).context(s)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:je(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:je(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:je(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:je(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:je(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:je(+d),u):n},u.lineX0=u.lineY0=function(){return m().x(e).y(t)},u.lineY1=function(){return m().x(e).y(n)},u.lineX1=function(){return m().x(r).y(t)},u.defined=function(d){return arguments.length?(o=typeof d=="function"?d:je(!!d),u):o},u.curve=function(d){return arguments.length?(i=d,s!=null&&(a=i(s)),u):i},u.context=function(d){return arguments.length?(d==null?s=a=null:a=i(s=d),u):s},u}function rl(e){return e<0?-1:1}function ol(e,t,n){var r=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(r||o<0&&-0),i=(n-e._y1)/(o||r<0&&-0),a=(s*o+i*r)/(r+o);return(rl(s)+rl(i))*Math.min(Math.abs(s),Math.abs(i),.5*Math.abs(a)
83)||0}function sl(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _s(e,t,n){var r=e._x0,o=e._y0,s=e._x1,i=e._y1,a=(s-r)/3;e._context.bezierCurveTo(r+a,o+a*t,s-a,i-a*n,s,i)}function Eo(e){this._context=e}Eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_s(this,this._t0,sl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_s(this,sl(this,n=ol(this,e,t)),n);break;default:_s(this,this._t0,n=ol(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};Object.create(Eo.prototype).point=function(e,t){Eo.prototype.point.call(this,t,e)};function x6(e){return new Eo(e)}const Ao=15,_6=240,k6=44,il=`calc(-100% - ${Ao}px)`,al=`${Ao}px`;function E6({x:e,y:t,flipH:n,flipV:r,title:o,titleColor:s,rows:i}){return h.jsx("div",{"aria-hidden":"true",className:"pointer-events-none fixed top-0 left-0 z-[1000]",style:{transform:`translate(${e}px, ${t}px) translate(${n?il:al}, ${r?il:al})`},children:h.jsx("div",{className:"max-w-60 overflow-hidden rounded-[var(--st-floating-radius)] border border-solid border-[var(--st-floating-line)] bg-[var(--st-floating-bg)] px-2.5 py-2 text-[14px] leading-[1.35] text-[var(--st-floating-text)] opacity-95 shadow-[var(--st-floating-shadow)]",children:h.jsx(hd,{title:o,titleColor:s,rows:i})})})}const ks={duration:600,ease:cv};function cl(e){return typeof e=="number"?()=>e:typeof e=="function"?e:t=>{const n=Reflect.get(t,e);if(typeof n!="number")throw new TypeError(`Expected ${e} to contain a number`);return n}}function A6({data:e=[],x:t,y:n,color:r="var(--text-color-kumo-default)",yMarkers:o={},showLine:s=!0,showArea:i=!0,showPoints:a=!0,lineWidth:l=1.5,pointRadius:u=2,describePoint:m,label:d,testId:f}){const{t:p}=le(),g=c.useMemo(()=>Math.round(Math.random()*1e9)/1e9,[]),b=c.useMemo(()=>`sparkline_grad_${g}`,[g]),v=!!m,[w,A]=c.useState(null),y=c.useMemo(()=>cl(t),[t]),k=c.useMemo(()=>cl(n),[n]),x=Math.max((s?l:0)/2,a?u:0),S=c.useMemo(()=>[Math.min(...e.map(y)),Math.max(...e.map(y))],[e,y]),_=c.useMemo(()=>[0,Math.max(...e.map(k))],[e,k]),E=c.useMemo(()=>qs().domain(S),[S]),R=c.useMemo(()=>qs().domain(_),[_]),M=c.useMemo(()=>e.slice().sort((C,L)=>y(C)-y(L)),[e,y,k]),j=c.useMemo(()=>w6().curve(x6),[]);j.x(C=>E(y(C))).y(C=>R(k(C)));const N=w===null?null:Math.min(w.idx,Math.max(0,M.length-1)),z=N===null?null:M[N]??null,O=z&&m?m(z):null,I=c.useCallback((C,L,F)=>({idx:C,x:L,y:F,flipH:L+Ao+_6>window.innerWidth,flipV:F+Ao+k6>window.innerHeight}),[]),D=c.useCallback((C,L)=>{const F=M[C];return I(C,L.left+E(y(F)),L.top+R(k(F)))},[I,M,E,R,y,k]),H=c.useCallback(C=>{const L=M.length-1,F=w===null?null:w.idx,oe={ArrowRight:()=>F===null?0:F+1,ArrowLeft:()=>F===null?0:F-1,Home:()=>0,End:()=>L};if(C.key==="Escape"){C.preventDefault(),A(null);return}const q=oe[C.key];if(!q)return;C.preventDefault();const ee=Math.min(Math.max(q(),0),L);A(D(ee,C.currentTarget.getBoundingClientRect()))},[w,D,M.length]),$=c.useCallback(C=>{const L=C.currentTarget.getBoundingClientRect(),F=C.clientX-L.left;let oe=0,q=1/0;M.forEach((ee,ue)=>{const X=Math.abs(E(y(ee))-F);X<q&&(q=X,oe=ue)}),A(I(oe,C.clientX,C.clientY))},[I,M,E,y]);return h.jsx(Oi,{observeHeight:!0,children:({width:C,height:L})=>{E.range([x,+C-x]),R.range([+L-x,x]),j.y1(()=>R.range()[0]);const F=j.lineY0();return h.jsxs("div",{className:`relative h-full w-full${v?" rounded-[2px] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-kumo-brand":""}`,"data-testid":f,...v&&{tabIndex:0,role:"group","aria-label":d,onKeyDown:H,onBlur:()=>A(null)},children:[h.jsxs("svg",{width:"100%",height:"100%",viewBox:[0,0,C||0,L||0].join(" "),children:[!!e.length&&h.jsxs(h.Fragment,{children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:b,x1:"0%",x2:"0%",y1:"0%",y2:"100%",children:[h.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.65}}),h.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:0}})]})}),h.jsx(Vi,{start:{xDomain:S,yDomain:_,opacity:0}
83,enter:{timing:ks,opacity:[1]},update:{timing:ks,xDomain:[S],yDomain:[_]},leave:{timing:ks,opacity:[0]},interpolation:Ho,children:({xDomain:oe,yDomain:q,opacity:ee})=>(E.domain(oe),R.domain(q),h.jsxs("g",{opacity:ee,children:[h.jsx("g",{children:Object.entries(o).map(([ue,X],B)=>{const V=R(X);return h.jsxs("g",{children:[h.jsx("line",{x1:E.range()[0],x2:E.range()[1],y1:V,y2:V,strokeWidth:1.1,stroke:"var(--text-color-kumo-subtle)",opacity:.6}),h.jsx("text",{fill:"var(--text-color-kumo-default)",style:{userSelect:"none"},x:E.range()[0],y:V,dy:(V-R.range()[0])/(R.range()[1]-R.range()[0])>.5?11:-3,fontSize:"11px",children:ue})]},B)})}),i&&h.jsx("path",{d:j(M)??void 0,fill:`url(#${b})`}),s&&h.jsx("path",{d:F(M)??void 0,stroke:r,strokeWidth:l,fill:"none"}),a&&h.jsx("g",{children:M.map((ue,X)=>h.jsx("circle",{cx:E(y(ue)),cy:R(k(ue)),fill:r,r:u},X))}),!!z&&h.jsxs("g",{style:{pointerEvents:"none"},children:[h.jsx("line",{x1:E(y(z)),x2:E(y(z)),y1:R.range()[1],y2:R.range()[0],stroke:r,strokeWidth:1,opacity:.4}),h.jsx("circle",{cx:E(y(z)),cy:R(k(z)),fill:r,stroke:"var(--color-kumo-base)",strokeWidth:1.5,r:u*2.2})]})]}))})]}),v&&!!M.length&&h.jsx("rect",{x:0,y:0,width:C||0,height:L||0,fill:"transparent",onMouseMove:$,onMouseLeave:()=>A(null)})]}),!!O&&w&&h.jsx(E6,{x:w.x,y:w.y,flipH:w.flipH,flipV:w.flipV,rows:[{color:r,label:O.label,value:O.value}]}),v&&h.jsx("span",{className:"sr-only","aria-live":"polite",children:O?p("chart.point-description",{label:O.label,value:O.value,title:O.title}):""})]})}})}const S6=ke.memo(A6),R6=2,ll=ke.memo(({results:e=[],color:t="blue",metricName:n,testId:r})=>{const{t:o}=le(),{formatUnit:s}=pt(),{formatDate:i}=kd(),a=n??o("metric.speed"),l=e.map(f=>({ts:+f.measTime,bps:f.bps})),u=c.useMemo(()=>l,[l.length]),m=c.useMemo(()=>({[o("chart.90th-percentile")]:gn(u.map(f=>f.bps),.9)}),[u,o]),d=c.useCallback(f=>({title:i(f.ts),label:a,value:s(f.bps,{unit:"bit-per-second",maximumSignificantDigits:3})}),[a,i,s]);return u.length>=R6&&h.jsx(S6,{data:u,x:"ts",y:"bps",color:t,yMarkers:m,lineWidth:2,showPoints:!0,describePoint:d,label:o("chart.over-time",{metric:a}),testId:r})}),Yr=({loaded:e,isDown:t})=>{const{t:n}=le(),r=t?gl:vl;return h.jsxs("div",{className:G("md:flex-1 flex items-center gap-x-0.5",e==null&&"invisible"),title:n(t?"metric.loaded.down":"metric.loaded.up"),children:[h.jsx(r,{size:11,weight:"bold",fill:Bt[t?"download":"upload"]}),h.jsx(Sn,{val:e??1,unit:"millisecond",size:14})]})},T6=({phase:e,progress:t=0,phaseIndex:n=-1,stepDone:r=0,measurement:o,results:s,downPoints:i,upPoints:a,downSpeed:l,upSpeed:u,latency:m,jitter:d,downLoadedLatency:f,downLoadedJitter:p,upLoadedLatency:g,upLoadedJitter:b,packetLoss:v,latestMsmTs:w,measurementId:A,environment:y,...k})=>{const{t:x}=le(),S=v!==null,_=c.useMemo(()=>{if(!(!k.finished||!s))try{return F8(s,y)}catch{return}},[k.finished,s,y]),E=c.useMemo(()=>t4({downSpeed:l,upSpeed:u,latency:m,jitter:d}),[l,u,m,d]);return c.useEffect(()=>{k.finished&&!E.success&&console.error("Unable to share incomplete measurement summary",{error:E.error})},[k.finished,E]),h.jsxs("div",{className:"lg:pt-1 h-full flex flex-col gap-6",children:[h.jsxs("div",{className:"flex-1 flex flex-col xl:flex-row gap-x-4 gap-y-6 min-h-[280px]","data-testid":"overview-metrics",children:[h.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[h.jsx(rr,{label:x("metric.download"),info:x("metric.download.info"),tooltipOrientation:"right"}),h.jsx("div",{className:"flex-1"}),h.jsx(Sn,{val:l||void 0,unit:"bit-per-second",size:50}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"mt-auto h-[60px] xl:h-[180px]","data-testid":"download-speed-chart-container",children:h.jsx(ll,{metricName:x("metric.download.speed"),testId:"download-speed-chart",results:i,color:Bt.download})})]}),h.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[h.jsx(rr,{label:x("metric.upload"),info:x("metric.upload.info"),tooltipOrientation:"right"}),h.jsx("div",{className:"flex-1"}),h.jsx(Sn,{val:u||void 0,unit:"bit-per-second"}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"mt-auto h-[60px] xl:h-[180px]",children:h.jsx(ll,{metricName:x("metric.upload.speed"),testId:"upload-speed-chart",results:a,color:Bt.upload})})]}),h.jsxs("div",{className:"flex xl:flex-col gap-x-3 gap-y-4 min-w-[160px]",children:[h.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[h.jsx(rr,{label:x("metric.latency"),info:x("metric.latency.info"),tooltipOrientation:"left"}),h.jsx(Sn,{val:m||void 0,unit:"millisecond"}),h.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap gap-x-2 gap-y-1.5 mt-1",children:[h.jsx(Yr,{isDown:!0,loaded:f}),h.jsx(Yr,{isDown:!1,loaded:g})]})]}),h.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[h.jsx(rr,{label:x("metric.jitter"),info:x("metric.jitter.info"),tooltipOrientation:"left"}),h.jsx(Sn,{val:d||void 0,unit:"millisecond"}),h.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap gap-x-2 gap-y-1.5 mt-1",children:[h.jsx(Yr,{isDown:!0,loaded:p}),h.jsx(Yr,{isDown:!1,loaded:b})]})]}),S&&h.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[h.jsx(rr,{label:x("metric.packet-loss"),info:x("metric.packet-loss.info"),tooltipOrientation:"left"}),h.jsx(Sn,{val:v,percent:!0})]})]})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2","data-testid":"overview-controls",children:[h.jsx(av,{phase:e,progress:t,phaseIndex:n,stepDone:r,measurement:o,...k}),!!_&&h.jsx(sv,{href:_,"data-testid":"radar-compare-link","aria-label":x("share.compare.title"),title:x("share.compare.title"),children:x("share.compare")}),k.finished&&h.jsx(e4,{summaryData:E.success?E.data:void 0,results:s}),h.jsx(i4,{measTime:w,measurementId:A,finished:k.finished})]})]})},M6=({results:e,...t})=>{const n=e.getDownloadBandwidthPoints(),r=c.useMemo(()=>e.getDownloadBandwidth(),[n.length]),o=e.getUploadBandwidthPoints(),s=c.useMemo(()=>e.getUploadBandwidth(),[o.length]),[i,a]=c.useMemo(()=>[e.getUnloadedLatency(),e.getUnloadedJitter()],[e.getUnloadedLatencyPoints().length]),[l,u]=c.useMemo(()=>[e.getDownLoadedLatency(),e.getDownLoadedJitter()],[Dn(e.getDownLoadedLatencyPoints())]),[m,d]=c.useMemo(()=>[e.getUpLoadedLatency(),e.getUpLoadedJitter()],[Dn(e.getUpLoadedLatencyPoints())]),f=e.raw.packetLoss,p=e.raw.hasOwnProperty("packetLoss")?!f||typeof f=="number"||!f.finished?void 0:e.getPacketLoss():null;return h.jsx(T6,{results:e,downPoints:n,upPoints:o,downSpeed:r,upSpeed:s,latency:i,jitter:a,downLoadedLatency:l,downLoadedJitter:u,upLoadedLatency:m,upLoadedJitter:d,packetLoss:p,...t})},j6=c.lazy(()=>b2(()=>import("./component.client-BWvFnpxt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),C6=({headerProps:e,title:t,titleProps:n,titleAs:r="h2",info:o,moreUrl:s,moreLabel:i,moreAccessibleLabel:a,children:l})=>h.jsxs(h.Fragment,{children:[!!t&&h.jsxs("header",{...e,className:G("flex items-center gap-1",e?.className),children:[h.jsx(r,{...n,className:G("text-[18px] font-semibold",n?.className),children:t}),!!o&&h.jsx(ed,{size:20,content:o}),!!s&&h.jsx("a",{href:s,target:"_blank",rel:"noreferrer","aria-label":a,className:"text-[12px] font-semibold",children:i})]}),h.jsx("div",{className:"flex flex-1 flex-col gap-4",children:l||!1})]}),ln=({areaId:e,alignSelf:t,className:n,...r})=>h.jsx("section",{className:G("flex flex-col gap-2",n),style:{gridArea:e,alignSelf:t},children:h.jsx(C6,{...r})}),Es=e=>e.map(t=>`'${t.join(" ")}'`).join(" "),N6=ke.memo(({gate:e,latestMsmTs:t,measurementId:n,results:r,running:o,finished:s,pause:i,play:a,restart:l,phase:u,progress:m,phaseIndex:d,stepDone:f,measurement:p,environment:g})=>{const{t:b}
83=le(),v=r.raw.hasOwnProperty("latency"),w=r.raw.hasOwnProperty("download"),A=r.raw.hasOwnProperty("upload"),y=r.raw.hasOwnProperty("packetLoss"),k=c.useMemo(()=>{const x=[["overview"],["map"],!e&&(v||y)&&["latency"],!e&&w&&["download"],!e&&A&&["upload"]].filter(E=>!!E),S=[["overview","map"],!e&&["latency","latency"],!e&&(w||A)&&["download","upload"]].filter(E=>!!E),_=[["overview","overview","map"],!e&&(w||A||v||y)&&["download","upload","latency"]].filter(E=>!!E);return{"--grid-areas-mobile":Es(x),"--grid-areas-tablet":Es(S),"--grid-areas-desktop":Es(_)}},[v,w,A,y,e]);return h.jsxs("div",{className:"grid auto-rows-auto gap-x-4 gap-y-4 lg:gap-y-6 [grid-auto-columns:1fr] items-stretch [grid-template-areas:var(--grid-areas-mobile)] lg:[grid-template-areas:var(--grid-areas-tablet)] xl:[grid-template-areas:var(--grid-areas-desktop)]",style:k,children:[h.jsxs("div",{className:"relative flex flex-col gap-4 lg:gap-6",style:{gridArea:"overview"},children:[h.jsxs("div",{inert:e?!0:void 0,className:G("flex flex-col gap-4 md:gap-6",e&&"rounded-md overflow-hidden"),children:[h.jsx(ln,{headerProps:{className:"sr-only lg:not-sr-only"},title:b("dashboard.title"),titleAs:"h1",children:h.jsx(M6,{phase:u,progress:m,phaseIndex:d,stepDone:f,measurement:p,latestMsmTs:t,measurementId:n,results:r,running:o,finished:s,pause:i,play:a,restart:l,environment:g})}),h.jsx(ln,{title:b("aim.title"),info:b("aim.info"),moreUrl:"https://developers.cloudflare.com/fundamentals/speed/aim/",moreLabel:b("common.learn-more"),moreAccessibleLabel:b("aim.learn-more"),children:h.jsx(Xg,{results:r,running:o,finished:s})})]}),e]}),h.jsx(ln,{areaId:"map",title:b("map.title"),info:b("map.info"),children:h.jsx(c.Suspense,{fallback:h.jsx(is,{}),children:h.jsx(Jg,{loadingIndicator:h.jsx(is,{}),children:x=>h.jsx(Bg,{loadingIndicator:h.jsx(is,{}),children:S=>h.jsx(j6,{colos:S,...x})})})})}),e?null:h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"relative flex flex-col gap-4 lg:gap-6",style:{gridArea:"latency"},children:[!!v&&h.jsx(ln,{title:b("measurements.latency.title"),info:b("measurements.latency.info"),children:h.jsx(lr,{type:"latency",results:r,latestMsmTs:t})}),!!y&&h.jsx(ln,{title:b("measurements.packet-loss.title"),info:b("measurements.packet-loss.info"),children:h.jsx(lr,{type:"packetLoss",results:r,latestMsmTs:t})})]}),!!w&&h.jsx(ln,{areaId:"download",title:b("measurements.download.title"),info:b("measurements.download.info"),children:h.jsx(lr,{type:"download",results:r,latestMsmTs:t})}),!!A&&h.jsx(ln,{areaId:"upload",title:b("measurements.upload.title"),info:b("measurements.upload.info"),children:h.jsx(lr,{type:"upload",results:r,latestMsmTs:t})})]})]})});function ul(e,t){const n=t&&e[t.type];if(!n||typeof n=="number")return 0;const r="bytes"in t?n.results[String(t.bytes)]:n.results;return typeof r!="object"||r===null||!("timings"in r)||!Array.isArray(r.timings)?0:r.timings.length}function L6(e){const t=new pu({...ei,autoStart:!1});return t.results.raw={...e,totalDurationMs:e.totalDurationMs},t.results}const Vd=c.forwardRef(({gate:e,running:t,finished:n,onPause:r,onResume:o,onRetest:s,onEngineFinished:i,onAuthorizationRejected:a,initialResults:l,environment:u,authorizationToken:m},d)=>{const[f,p]=c.useState(Date.now()),[g,b]=c.useState("stopped"),[v,w]=c.useState(),[A,y]=c.useState(-1),[k,x]=c.useState(),[S,_]=c.useState(0),E=c.useRef(0),R=c.useRef(void 0),M=typeof window>"u"?"":window.location.hostname,j=c.useMemo(()=>{const $=new pu({...y0(M),autoStart:!1,authorizationEnabled:"header",authorizationToken:m??null,...u==="development"?{allowInsecureAuthorizationToken:!0}:{}});return $.onResultsChange=({type:C})=>{b(C),p(Date.now()),_(Math.max(0,ul($.results.raw,R.current)-E.current))},$.onPhaseChange=({measurementId:C,measurement:L})=>{y(C),x(L),R.current=L,E.current=ul($.results.raw,L),_(0)},$.onResultsLogged=({requestId:C})=>w(C),$},[m,u,M]),N=c.useMemo(()=>l&&L6(l),[l]);c.useEffect(()=>()=>{j.pause()},[j]),c.useEffect(()=>{j.onFinish=i},[j,i]),c.useEffect(()=>{if(!t)return;const $=C=>C.preventDefault();return window.addEventListener("vp:stale-version",$),()=>window.removeEventListener("vp:stale-version",$)},[t]),c.useEffect(()=>{j.onError=($,C)=>{C!=null&&(console.log({event:"cfspeed_authorization_refresh",reason:"request-rejected",status:C}),a())}},[j,a]);const z=c.useCallback(()=>{j.pause()},[j]),O=c.useCallback(()=>{y(-1),x(void 0),_(0),E.current=0,R.current=void 0},[]),I=c.useCallback(()=>{w(void 0),j.play()},[j]),D=c.useCallback(()=>{O(),w(void 0),j.restart()},[j,O]);c.useImperativeHandle(d,()=>({pause:z,resume:I,restart:D}),[z,I,D]);const H=l?null:n?100:100*(A+1)/ei.measurements.length;return h.jsx(N6,{gate:e,results:N??j.results,environment:u,latestMsmTs:f,measurementId:v,running:t,phase:g,progress:H,phaseIndex:A,stepDone:S,measurement:k,finished:n,pause:r,play:o,restart:s})});Vd.displayName="MeasureSpeed";const dl="https://www.cloudflare.com/privacypolicy/",O6=()=>{const{t:e}=le(),t=c.useRef(null),n=c.useRef(null);return h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"consent-disclosure text-[14px] text-kumo-strong",children:[h.jsx(Ro,{i18nKey:"consent.intro",components:{link1:h.jsx("a",{href:dl,target:"_blank",rel:"noreferrer"})}})," ",h.jsx("button",{ref:n,type:"button",className:"cursor-pointer font-semibold text-kumo-link underline-offset-2 hover:underline",onClick:()=>t.current?.showModal(),children:e("consent.learn-more")})]}
83),h.jsxs("dialog",{ref:t,"aria-labelledby":"consent-dialog-title",className:"fixed inset-x-0 top-auto bottom-0 m-0 max-h-[85dvh] w-full max-w-none overflow-y-auto rounded-t-xl border-0 bg-kumo-base p-6 text-left text-inherit shadow-2xl backdrop:bg-black/45 min-[640px]:inset-0 min-[640px]:m-auto min-[640px]:max-h-[80dvh] min-[640px]:max-w-[42rem] min-[640px]:rounded-xl",onClose:()=>n.current?.focus(),children:[h.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[h.jsx("h2",{id:"consent-dialog-title",className:"m-0 text-xl font-semibold",children:e("consent.dialog-title")}),h.jsx("button",{type:"button",className:"cursor-pointer rounded-full p-2 hover:bg-kumo-control","aria-label":e("consent.close"),onClick:()=>t.current?.close(),children:h.jsx(Rl,{size:20})})]}),h.jsxs("div",{className:"grid gap-4 leading-6 text-kumo-subtle",children:[h.jsx("p",{children:e("consent.detail.ip-usage")}),h.jsx("p",{children:e("consent.detail.sharing")}),h.jsxs("div",{children:[h.jsx("p",{children:e("consent.detail.collected")}),h.jsxs("ul",{className:"mt-2 list-disc pl-5",children:[h.jsx("li",{children:e("consent.detail.collected.ip")}),h.jsx("li",{children:e("consent.detail.collected.location")}),h.jsx("li",{children:e("consent.detail.collected.asn")})]})]}),h.jsx("p",{children:e("consent.detail.truncation")}),h.jsx("a",{href:dl,target:"_blank",rel:"noreferrer",children:e("footer.privacy-policy")}),h.jsx("p",{className:"font-semibold",children:e("consent.note")})]})]})]})},z6=({attemptId:e,onError:t,onExpired:n,onToken:r,setError:o,turnstileAppearance:s,turnstileSiteKey:i,theme:a})=>{const{t:l}=le(),u=c.useRef(null),m=c.useRef(null),d=c.useRef(()=>{}),f=c.useRef(e),p=c.useEffectEvent(()=>l("error.generic.description")),g=c.useEffectEvent(()=>t?.()),b=c.useEffectEvent(n),v=c.useEffectEvent(r),w=c.useEffectEvent(o);return c.useEffect(()=>{let A=!0;const y=(_,E,R=!0)=>{A&&(console.error({error:E instanceof Error?E.message:String(E),event:_}),w(R?p():void 0),g())},k=async _=>{if(A)try{await v(_),A&&w(void 0)}catch(E){y("turnstile_token_mint_failed",E)}},x=()=>{try{const _=window.turnstile;if(!_){y("turnstile_api_unavailable",new Error("Turnstile API is unavailable"));return}m.current=_.render(u.current,{action:"cfspeed-token",appearance:s,callback:E=>{k(E)},"error-callback":E=>{const R=E==="110600"||E==="110620",M=E.startsWith("300")||E.startsWith("600");return y(R?"turnstile_challenge_timed_out":M?"turnstile_challenge_failed":"turnstile_widget_failed",new Error(`Turnstile error: ${E}`),!R&&!M),!0},"expired-callback":()=>{A&&b()},execution:"execute","refresh-expired":"never","refresh-timeout":"never",retry:"never",sitekey:i,theme:a,"timeout-callback":()=>{y("turnstile_challenge_timed_out",new Error("Turnstile interactive challenge timed out"),!1)}}),_.execute(m.current)}catch(_){y("turnstile_render_failed",_)}};d.current=()=>{if(m.current===null){x();return}try{const _=window.turnstile;if(!_)throw new Error("Turnstile API is unavailable");_.reset(m.current),_.execute(m.current)}catch(_){y("turnstile_retry_failed",_)}};const S=document.getElementById("turnstile-api");return!window.turnstile&&!S?y("turnstile_script_missing",new Error("Turnstile script is missing")):window.turnstile?x():S?.addEventListener("load",x),()=>{A=!1,d.current=()=>{},S?.removeEventListener("load",x),m.current!==null&&(window.turnstile?.remove(m.current),m.current=null)}},[a,s,i]),c.useEffect(()=>{!e||f.current===e||(f.current=e,d.current())},[e]),h.jsx("div",{ref:u,className:"absolute inset-[-2px]"})},$6=({attemptId:e,buttonLabelKey:t,canStart:n,onAgree:r,onTurnstileError:o,onTurnstileToken:s,turnstileAppearance:i,turnstileReady:a,turnstileSiteKey:l})=>{const{t:u}=le(),{theme:m}=h0(),d=u(t),[f,p]=c.useState(!1),[g,b]=c.useState(),v=c.useRef(null);c.useEffect(()=>{n&&v.current?.focus()},[n]);const w=t==="controls.retest"||t==="controls.retry"?ti:ri,A=()=>{t==="controls.retry"&&(b(void 0),p(!1)),r()},y=async k=>(p(!1),s(k));return h.jsxs("section",{className:"start-gate absolute inset-0 lg:top-9 max-w-full flex flex-col xl:flex-row items-center justify-center gap-6 p-4 overflow-y-auto","aria-label":d,"aria-live":"polite",children:[h.jsxs("button",{ref:v,type:"button",className:"start-gate-button","aria-busy":!n&&!g,disabled:!n,onClick:A,children:[h.jsx(w,{"aria-hidden":!0,size:50,weight:"thin"}),h.jsx("span",{className:"trim-both",children:d})]}),h.jsxs("div",{className:"start-gate-support flex max-w-[46ch] flex-col items-center xl:items-start gap-3","data-has-turnstile":!!l,children:[h.jsx(O6,{}),l&&(!f||!!e)&&h.jsxs("div",{className:"relative w-[298px]",children:[h.jsx("div",{className:"relative h-[64px] overflow-hidden rounded-md border border-solid border-kumo-line dark:border-kumo-interact",children:a&&h.jsx(z6,{attemptId:e,onError:o,onExpired:()=>p(!0),onToken:y,setError:b,theme:m,turnstileAppearance:i,turnstileSiteKey:l},m)}),g&&h.jsx("div",{className:"absolute top-[100%] left-0 right-0 mt-1 text-center text-[13px] text-kumo-danger",role:"alert",children:g})]})]})]})};new TextEncoder;const Gs=new TextDecoder;function P6(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function I6(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e=="string"?e:Gs.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=Gs.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return P6(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}
83class Z6 extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(t,n){super(t,n),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class un extends Z6{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}const D6=e=>typeof e=="object"&&e!==null;function V6(e){if(!D6(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function F6(e){if(typeof e!="string")throw new un("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new un("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new un("Invalid JWT");if(!t)throw new un("JWTs must contain a payload");let r;try{r=I6(t)}catch{throw new un("Failed to base64url decode the payload")}let o;try{o=JSON.parse(Gs.decode(r))}catch{throw new un("Failed to parse the decoded payload as JSON")}if(!V6(o))throw new un("Invalid JWT Claims Set");return o}function H6(e,t){return{engine:{status:"waiting-to-start"},authorization:e?{status:"checking-turnstile",attemptId:t}:{status:"disabled"}}}function Ht(e){return{status:"checking-turnstile",attemptId:e}}function As(e){return e?{status:"ready",token:e}:{status:"disabled"}}function fl(e,t){switch(t.type){case"SHARED_RESULTS_LOADED":return{engine:{status:"finished"},authorization:e.authorization.status==="disabled"?e.authorization:{status:"waiting-for-authorization"}};case"START_CLICKED":return e.engine.status!=="waiting-to-start"?e:e.authorization.status==="disabled"?{...e,engine:{status:"running"}}:e.authorization.status!=="ready"?e:Kr(e.authorization.token,t.now)?{...e,authorization:Ht(t.attemptId)}:{...e,engine:{status:"running"}};case"PAUSE_CLICKED":return e.engine.status!=="running"?e:{...e,engine:{status:"paused",reason:"user"}};case"RESUME_CLICKED":return e.engine.status!=="paused"||e.engine.reason!=="user"?e:e.authorization.status==="disabled"?{...e,engine:{status:"running"}}:e.authorization.status==="waiting-for-authorization"?{engine:{status:"paused",reason:"authorization"},authorization:Ht(t.attemptId)}:e.authorization.status!=="ready"?e:Kr(e.authorization.token,t.now)?{engine:{status:"paused",reason:"authorization"},authorization:Ht(t.attemptId)}:{...e,engine:{status:"running"}};case"RETEST_CLICKED":return e.engine.status==="waiting-to-start"?e:e.authorization.status==="waiting-for-retest"?e.authorization.token&&Kr(e.authorization.token,t.now)?{...e,authorization:Ht(t.attemptId)}:{engine:{status:"running"},authorization:As(e.authorization.token)}:e.authorization.status==="disabled"?{...e,engine:{status:"running"}}:e.authorization.status==="waiting-for-authorization"?{engine:e.engine.status==="finished"?e.engine:{status:"paused",reason:"authorization"},authorization:Ht(t.attemptId)}:e.authorization.status!=="ready"?e:Kr(e.authorization.token,t.now)?{engine:e.engine.status==="finished"?e.engine:{status:"paused",reason:"authorization"},authorization:Ht(t.attemptId)}:{...e,engine:{status:"running"}};case"ENGINE_FINISHED":return e.engine.status!=="running"?e:{...e,engine:{status:"finished"}};case"AUTHORIZATION_REJECTED":return e.engine.status!=="running"||e.authorization.status!=="ready"?e:{engine:{status:"paused",reason:"authorization"},authorization:Ht(t.attemptId)};case"TURNSTILE_TOKEN_RECEIVED":return e.authorization.status!=="checking-turnstile"||e.authorization.attemptId!==t.attemptId?e:{...e,authorization:{...e.authorization,status:"minting-token"}};case"TURNSTILE_FAILED":return e.authorization.status!=="checking-turnstile"||e.authorization.attemptId!==t.attemptId?e:{...e,authorization:{...e.authorization,status:"waiting-for-retry"}};case"TOKEN_MINTED":return e.authorization.status!=="minting-token"||e.authorization.attemptId!==t.attemptId?e:{...e,authorization:e.engine.status==="finished"?{status:"waiting-for-retest",token:t.token}:As(t.token)};case"AUTHORIZATION_DISABLED":return e.authorization.status!=="minting-token"||e.authorization.attemptId!==t.attemptId?e:{...e,authorization:e.engine.status==="finished"?{status:"waiting-for-retest",token:null}:As(null)};case"TOKEN_MINT_FAILED":return e.authorization.status!=="minting-token"||e.authorization.attemptId!==t.attemptId?e:{...e,authorization:{...e.authorization,status:"waiting-for-retr
83y"}};case"AUTHORIZATION_RETRY_CLICKED":return e.authorization.status!=="waiting-for-retry"?e:{...e,authorization:Ht(t.attemptId)}}}const U6=2*6e4,B6=4*6e4;function q6(e,t=Date.now()){try{const{exp:n,iat:r}=F6(e);if(typeof n!="number")return;const o=n*1e3,s=typeof r=="number"?r*1e3:t,i=Math.max(0,o-s),a=i<B6?i/2:U6;return{value:e,expiresAt:o,refreshAt:o-a}}catch(n){console.warn({error:n instanceof Error?n.message:String(n),event:"authorization_token_decode_failed"});return}}function Kr(e,t=Date.now()){return t>=e.refreshAt}const W6=xe({token:Te().min(1)});function J6(e){return e.authorization.status==="checking-turnstile"||e.authorization.status==="minting-token"||e.authorization.status==="waiting-for-retry"?e.authorization:void 0}const G6=({cfspeedAuthEnabled:e,environment:t,protocolWarning:n,turnstileAppearance:r,turnstileSiteKey:o})=>{const{t:s}=le(),{hash:i}=qd(),[a,l]=c.useState(),[u,m]=c.useState(!1),[d,f]=c.useState(null),p=c.useRef(null),g=`${c.useId()}-0`,b=c.useRef(0),[v,w]=c.useReducer(fl,void 0,()=>H6(!!o,g)),A=c.useRef(v),y=c.useCallback(()=>(b.current+=1,`${g}-${b.current}`),[g]),k=c.useCallback(B=>{const V=A.current,K=fl(V,B);return K===V?{changed:!1,previous:V,next:K}:(A.current=K,w(B),{changed:!0,previous:V,next:K})},[]);c.useLayoutEffect(()=>{let B;if(i){const V=D8(i.slice(1));V.success&&(B=V.data.results)}f(document.documentElement.dataset.consent==="accepted"),l(B),B&&k({type:"SHARED_RESULTS_LOADED"}),m(!0)},[k,i]);const x=t==="development"||t==="staging"?t:"production",S=c.useCallback(async B=>{const V=await fetch("/jwt",{body:JSON.stringify({turnstileToken:B}),headers:{"content-type":"application/json"},method:"POST",signal:AbortSignal.timeout(1e4)});if(!V.ok)throw new Error("Failed to create authorization token");if(V.status===204)return null;const K=W6.safeParse(await V.json());if(!K.success&&e)throw new Error("Authorization token response is invalid");return K.success?K.data.token:null},[e]),E=J6(v)?.attemptId,R=c.useCallback(async B=>{if(!E)return;const V=k({type:"TURNSTILE_TOKEN_RECEIVED",attemptId:E});if(!V.changed||V.previous.authorization.status!=="checking-turnstile")return;let me;try{me=await S(B)}catch(Pe){throw k({type:"TOKEN_MINT_FAILED",attemptId:E}),Pe}const se=A.current.authorization;if(se.status!=="minting-token"||se.attemptId!==E)return;if(me===null){k({type:"AUTHORIZATION_DISABLED",attemptId:E});return}const pe=q6(me);if(!pe)throw k({type:"TOKEN_MINT_FAILED",attemptId:E}),new Error("Authorization token response is invalid");k({type:"TOKEN_MINTED",attemptId:E,token:pe}).changed},[E,k,S]),M=c.useCallback(()=>{E&&k({type:"TURNSTILE_FAILED",attemptId:E})},[E,k]),j=c.useCallback(()=>{const B=k({type:"START_CLICKED",attemptId:y(),now:Date.now()});B.changed&&B.next.engine.status==="running"&&p.current?.resume()},[k,y]),N=c.useCallback(()=>{k({type:"PAUSE_CLICKED"}).changed&&p.current?.pause()},[k]),z=c.useCallback(()=>{const B=k({type:"RESUME_CLICKED",attemptId:y(),now:Date.now()});B.changed&&B.next.engine.status==="running"&&p.current?.resume()},[k,y]),O=c.useCallback(()=>{history.replaceState("",document.title,window.location.pathname+window.location.search);const B=k({type:"RETEST_CLICKED",attemptId:y(),now:Date.now()});B.changed&&(B.next.authorization.status==="checking-turnstile"?B.previous.engine.status==="running"&&p.current?.pause():B.next.engine.status==="running"&&(l(void 0),p.current?.restart()))},[k,y]),I=c.useCallback(()=>{k({type:"AUTHORIZATION_RETRY_CLICKED",attemptId:y()})},[k,y]),D=c.useCallback(()=>{k({type:"AUTHORIZATION_REJECTED",attemptId:y()}).changed&&p.current?.pause()},[k,y]),H=c.useCallback(()=>{k({type:"ENGINE_FINISHED"})},[k]),$=v.engine.status==="waiting-to-start"||v.engine.status==="paused"&&v.engine.reason==="authorization"||v.authorization.status==="checking-turnstile"||v.authorization.status==="minting-token"||v.authorization.status==="waiting-for-retry"||v.authorization.status==="waiting-for-retest"||d===!1&&v.authorization.status!=="waiting-for-authorization",C=v.authorization.status==="ready"||v.authorization.status==="waiting-for-retest"||v.authorization.status==="waiting-for-retr
83y"||v.authorization.status==="disabled"||v.authorization.status==="waiting-for-authorization",L=v.authorization.status==="waiting-for-retry"?"controls.retry":v.engine.status==="paused"?v.engine.reason==="user"?"controls.resume":"controls.retest":v.engine.status==="finished"?"controls.retest":"start-gate.start",F=c.useMemo(()=>v.authorization.status==="waiting-for-retry"?I:v.engine.status==="waiting-to-start"?j:v.engine.status==="paused"?v.engine.reason==="user"?z:O:v.engine.status==="finished"?O:()=>{},[I,z,O,j,v.authorization.status,v.engine]),oe=c.useCallback(()=>{d!==!0&&(localStorage.setItem(b0,""),document.documentElement.dataset.consent="accepted",f(!0)),F()},[F,d]),q=c.useMemo(()=>$?h.jsx($6,{attemptId:u?E:void 0,buttonLabelKey:L,canStart:C,onAgree:oe,onTurnstileError:M,onTurnstileToken:R,turnstileAppearance:r,turnstileReady:u&&v.authorization.status!=="waiting-for-authorization",turnstileSiteKey:o}):void 0,[E,C,L,oe,M,R,u,$,v.authorization.status,r,o]),ee=v.engine.status==="running",ue=v.engine.status==="finished",X=v.authorization.status==="ready"||v.authorization.status==="waiting-for-retest"?v.authorization.token?.value??null:null;return h.jsxs(m0,{title:s("common.speed-test"),running:ee,footer:h.jsx(w0,{}),children:[n&&h.jsx(Nl,{className:"mb-2.5 lg:mb-5",icon:h.jsx(To,{size:18}),children:h.jsx("p",{className:"m-0 min-w-0",children:h.jsx(Ro,{i18nKey:"protocol-warning",values:{actual:n.httpProtocol,expected:n.expectedProtocol}})})}),h.jsx(Vd,{ref:p,gate:q,running:ee,finished:ue,onPause:N,onResume:z,onRetest:O,onEngineFinished:H,onAuthorizationRejected:D,initialResults:a,environment:x,authorizationToken:X})]})},ty=Wd(function(){const{cfspeedAuthEnabled:t,environment:n,httpProtocol:r,expectedProtocol:o,turnstileAppearance:s,turnstileSiteKey:i}=Jd(),a=r&&r!==o?{httpProtocol:r,expectedProtocol:o}:null;return h.jsx(G6,{environment:n,cfspeedAuthEnabled:t,protocolWarning:a,turnstileAppearance:s,turnstileSiteKey:i})});export{ho as B,m8 as C,Rt as L,ty as _};
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.