From 1ddfd44d298b433a66916472843c0d7da49dc7fd Mon Sep 17 00:00:00 2001 From: xboard Date: Sun, 12 Jan 2025 23:04:03 +0800 Subject: [PATCH] fix: correct know file issues --- .../V1/Client/ClientController.php | 8 +- app/Protocols/ClashMeta.php | 2 +- public/assets/admin/assets/index.js | 8 +- public/assets/admin/assets/vendor.js | 292 +++++++++--------- 4 files changed, 156 insertions(+), 154 deletions(-) diff --git a/app/Http/Controllers/V1/Client/ClientController.php b/app/Http/Controllers/V1/Client/ClientController.php index bcc00bf..f115c20 100644 --- a/app/Http/Controllers/V1/Client/ClientController.php +++ b/app/Http/Controllers/V1/Client/ClientController.php @@ -41,7 +41,8 @@ class ClientController extends Controller 'loon' => '637', 'v2rayng' => '1.9.5', 'v2rayN' => '6.31', - 'surge' => '2398' + 'surge' => '2398', + 'flclash' => '0.8.0' ]; private const ALLOWED_TYPES = ['vmess', 'vless', 'trojan', 'hysteria', 'shadowsocks', 'hysteria2']; @@ -127,12 +128,13 @@ class ClientController extends Controller private function checkHy2Support(string $flag, string $version): bool { + $result = false; foreach (self::CLIENT_VERSIONS as $client => $minVersion) { if (stripos($flag, $client) !== false) { - return version_compare($version, $minVersion, '>='); + $result = $result || version_compare($version, $minVersion, '>='); } } - return true; + return $result || !count(self::CLIENT_VERSIONS); } private function filterServers(array $servers, array $types, ?array $filters, bool $supportHy2): array diff --git a/app/Protocols/ClashMeta.php b/app/Protocols/ClashMeta.php index 8153880..4aa4c9f 100644 --- a/app/Protocols/ClashMeta.php +++ b/app/Protocols/ClashMeta.php @@ -9,7 +9,7 @@ use Symfony\Component\Yaml\Yaml; class ClashMeta implements ProtocolInterface { - public $flags = ['meta', 'verge']; + public $flags = ['meta', 'verge', 'flclash']; private $servers; private $user; diff --git a/public/assets/admin/assets/index.js b/public/assets/admin/assets/index.js index b934b47..4089902 100644 --- a/public/assets/admin/assets/index.js +++ b/public/assets/admin/assets/index.js @@ -1,7 +1,7 @@ -import{r as c,j as e,t as ml,c as hl,I as ba,a as _s,S as Wt,u as ns,b as Jt,d as jl,O as Qt,e as gl,f as A,g as fl,h as pl,i as vl,Q as bl,k as yl,R as Nl,l as wl,P as _l,m as Cl,B as Sl,n as Ka,F as kl,C as Dl,o as Tl,p as Pl,q as Il,s as Vl,v as Rl,z as u,w as qa,x as ae,y as ie,A as Ua,D as _t,E as Ct,G as Zt,H as Me,T as St,J as kt,K as Ba,L as Ga,M as El,N as Fl,U as Ml,V as zl,W as Ya,X as Xt,Y as Wa,Z as Ol,_ as Ja,$ as Qa,a0 as Za,a1 as Xa,a2 as Cs,a3 as en,a4 as Ll,a5 as sn,a6 as tn,a7 as $l,a8 as Al,a9 as Hl,aa as Kl,ab as an,ac as ql,ad as Ul,ae as Ss,af as nn,ag as Bl,ah as Gl,ai as rn,aj as Yl,ak as Wl,al as ya,am as Jl,an as ln,ao as Ql,ap as on,aq as Zl,ar as Xl,as as ei,at as si,au as ti,av as ai,aw as cn,ax as ni,ay as ri,az as li,aA as we,aB as ii,aC as oi,aD as ci,aE as di,aF as dn,aG as un,aH as xn,aI as ui,aJ as mn,aK as hn,aL as jn,aM as xi,aN as mi,aO as hi,aP as gn,aQ as ji,aR as ea,aS as fn,aT as gi,aU as pn,aV as fi,aW as vn,aX as pi,aY as bn,aZ as yn,a_ as vi,a$ as bi,b0 as Nn,b1 as yi,b2 as Ni,b3 as wn,b4 as wi,b5 as _n,b6 as _i,b7 as Ci,b8 as He,b9 as Q,ba as Pe,bb as rt,bc as Si,bd as ki,be as Di,bf as Ti,bg as Pi,bh as Ii,bi as Na,bj as wa,bk as Vi,bl as Ri,bm as Ei,bn as Fi,bo as Mi,bp as zi,bq as Cn,br as Oi,bs as Sn,bt as Li,bu as $i,bv as kn,bw as Ai,bx as de,by as Hi,bz as _a,bA as At,bB as Ht,bC as Ki,bD as qi,bE as Dn,bF as Ui,bG as sa,bH as Bi,bI as Gi,bJ as Yi,bK as Tn,bL as Pn,bM as In,bN as Wi,bO as Ji,bP as Qi,bQ as Zi,bR as Vn,bS as Xi,bT as Je,bU as eo,bV as so,bW as vt,bX as ve,bY as Ca,bZ as to,b_ as Rn,b$ as En,c0 as Fn,c1 as Mn,c2 as zn,c3 as On,c4 as ao,c5 as no,c6 as ro,c7 as Dt,c8 as ks,c9 as rs,ca as Le,cb as $e,cc as Ke,cd as qe,ce as Ue,cf as Sa,cg as lo,ch as io,ci as oo,cj as Kt,ck as ta,cl as aa,cm as co,cn as ls,co as is,cp as lt,cq as uo,cr as xo,cs as ka,ct as Ln,cu as Da,cv as bt,cw as mo,cx as ho,cy as $n,cz as jo,cA as go,cB as An,cC as qt,cD as Hn,cE as fo,cF as Kn,cG as qn,cH as po,cI as vo,cJ as bo,cK as yo,cL as No}from"./vendor.js";import"./index.js";var fh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ph(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function wo(s){if(s.__esModule)return s;var t=s.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(n){var l=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:function(){return s[n]}})}),a}const _o={theme:"system",setTheme:()=>null},Un=c.createContext(_o);function Co({children:s,defaultTheme:t="system",storageKey:a="vite-ui-theme",...n}){const[l,o]=c.useState(()=>localStorage.getItem(a)||t);c.useEffect(()=>{const x=window.document.documentElement;if(x.classList.remove("light","dark"),l==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";x.classList.add(r);return}x.classList.add(l)},[l]);const d={theme:l,setTheme:x=>{localStorage.setItem(a,x),o(x)}};return e.jsx(Un.Provider,{...n,value:d,children:s})}const So=()=>{const s=c.useContext(Un);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},ko=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),Do=function(s,t){return new URL(s,t).href},Ta={},X=function(t,a,n){let l=Promise.resolve();if(a&&a.length>0){const d=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),r=x?.nonce||x?.getAttribute("nonce");l=Promise.allSettled(a.map(i=>{if(i=Do(i,n),i in Ta)return;Ta[i]=!0;const h=i.endsWith(".css"),T=h?'[rel="stylesheet"]':"";if(!!n)for(let w=d.length-1;w>=0;w--){const _=d[w];if(_.href===i&&(!h||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${T}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":ko,h||(m.as="script"),m.crossOrigin="",m.href=i,r&&m.setAttribute("nonce",r),document.head.appendChild(m),h)return new Promise((w,_)=>{m.addEventListener("load",w),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})}))}function o(d){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=d,window.dispatchEvent(x),!x.defaultPrevented)throw d}return l.then(d=>{for(const x of d||[])x.status==="rejected"&&o(x.reason);return t().catch(o)})};function y(...s){return ml(hl(s))}const $s=_s("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),D=c.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,children:l,disabled:o,loading:d=!1,leftSection:x,rightSection:r,...i},h)=>{const T=n?Wt:"button";return e.jsxs(T,{className:y($s({variant:t,size:a,className:s})),disabled:d||o,ref:h,...i,children:[(x&&d||!x&&!r&&d)&&e.jsx(ba,{className:"mr-2 h-4 w-4 animate-spin"}),!d&&x&&e.jsx("div",{className:"mr-2",children:x}),l,!d&&r&&e.jsx("div",{className:"ml-2",children:r}),r&&d&&e.jsx(ba,{className:"ml-2 h-4 w-4 animate-spin"})]})});D.displayName="Button";function Vs({className:s,minimal:t=!1}){const a=ns();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!t&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!t&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(D,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(D,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Pa(){const s=ns();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(D,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(D,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function To(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(D,{variant:"outline",children:"Learn more"})})]})})}function Po(s){return typeof s>"u"}function Io(s){return s===null}function Vo(s){return Io(s)||Po(s)}class Ro{storage;prefixKey;constructor(t){this.storage=t.storage,this.prefixKey=t.prefixKey}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,a,n=null){const l=JSON.stringify({value:a,time:Date.now(),expire:n!==null?new Date().getTime()+n*1e3:null});this.storage.setItem(this.getKey(t),l)}get(t,a=null){const n=this.storage.getItem(this.getKey(t));if(!n)return{value:a,time:0};try{const l=JSON.parse(n),{value:o,time:d,expire:x}=l;return Vo(x)||x>new Date().getTime()?{value:o,time:d}:(this.remove(t),{value:a,time:0})}catch{return this.remove(t),{value:a,time:0}}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}}function Bn({prefixKey:s="",storage:t=sessionStorage}){return new Ro({prefixKey:s,storage:t})}const Gn="Xboard_",Eo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:localStorage})},Fo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Tt=Eo({prefixKey:Gn});Fo({prefixKey:Gn});const Yn="access_token";function Qs(){return Tt.get(Yn)}function Wn(){Tt.remove(Yn)}const Ia=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Mo({children:s}){const t=ns(),a=Jt(),n=Qs();return c.useEffect(()=>{if(!n.value&&!Ia.includes(a.pathname)){const l=encodeURIComponent(a.pathname+a.search);t(`/sign-in?redirect=${l}`)}},[n.value,a.pathname,a.search,t]),Ia.includes(a.pathname)||n.value?e.jsx(e.Fragment,{children:s}):null}const zo=()=>e.jsx(Mo,{children:e.jsx(Qt,{})}),Oo=jl([{path:"/sign-in",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>rc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(zo,{}),children:[{path:"/",lazy:async()=>({Component:(await X(()=>Promise.resolve().then(()=>vc),void 0,import.meta.url)).default}),errorElement:e.jsx(Vs,{}),children:[{index:!0,lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Ud);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Vs,{}),children:[{path:"system",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Yd);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Xd);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>nu);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>cu);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>hu);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>vu);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>_u);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Tu);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Eu);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Lu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Qu);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>ex);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>ix);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>jx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>$x);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Ux);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Qx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Vs,{}),children:[{path:"plan",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>lm);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>vm);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Dm);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Qm);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>hh);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Vs},{path:"/404",Component:Pa},{path:"/503",Component:To},{path:"*",Component:Pa}]),Lo="locale";function $o(){return Tt.get(Lo)}function Jn(){Wn();const s=window.location.pathname,t=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),l=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=l+(t?`?redirect=${s}`:"")}const Ao=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function Ho(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const V=gl.create({baseURL:Ho(),timeout:12e3,headers:{"Content-Type":"application/json"}});V.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const t=Qs();if(!Ao.includes(s.url?.split("?")[0]||"")){if(!t.value)return Jn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=t.value}return s.headers["Content-Language"]=$o().value||"zh-CN",s},s=>Promise.reject(s));V.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const t=s.response?.status,a=s.response?.data?.message;return(t===401||t===403)&&Jn(),A.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[t]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Ko(){return V.get("/user/info")}const Mt={token:Qs()?.value||"",userInfo:null,isLoggedIn:!!Qs()?.value,loading:!1,error:null},Ws=fl("user/fetchUserInfo",async()=>(await Ko()).data,{condition:(s,{getState:t})=>{const{user:a}=t();return!!a.token&&!a.loading}}),Qn=pl({name:"user",initialState:Mt,reducers:{setToken(s,t){s.token=t.payload,s.isLoggedIn=!!t.payload},resetUserState:()=>Mt},extraReducers:s=>{s.addCase(Ws.pending,t=>{t.loading=!0,t.error=null}).addCase(Ws.fulfilled,(t,a)=>{t.loading=!1,t.userInfo=a.payload,t.error=null}).addCase(Ws.rejected,(t,a)=>{if(t.loading=!1,t.error=a.error.message||"Failed to fetch user info",!t.token)return Mt})}}),{setToken:qo,resetUserState:Uo}=Qn.actions,Bo=s=>s.user.userInfo,Go=Qn.reducer,Zn=vl({reducer:{user:Go}});Qs()?.value&&Zn.dispatch(Ws());const Yo=new bl;yl.createRoot(document.getElementById("root")).render(e.jsx(Nl.StrictMode,{children:e.jsx(wl,{client:Yo,children:e.jsx(_l,{store:Zn,children:e.jsxs(Co,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(Cl,{router:Oo}),e.jsx(Sl,{richColors:!0,position:"top-right"})]})})})}));const Ie=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...t}));Ie.displayName="Card";const ze=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...t}));ze.displayName="CardHeader";const Qe=c.forwardRef(({className:s,...t},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...t}));Qe.displayName="CardTitle";const Zs=c.forwardRef(({className:s,...t},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Zs.displayName="CardDescription";const Oe=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...t}));Oe.displayName="CardContent";const Wo=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...t}));Wo.displayName="CardFooter";const Jo=_s("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yt=c.forwardRef(({className:s,...t},a)=>e.jsx(Ka,{ref:a,className:y(Jo(),s),...t}));yt.displayName=Ka.displayName;const oe=kl,Xn=c.createContext({}),g=({...s})=>e.jsx(Xn.Provider,{value:{name:s.name},children:e.jsx(Dl,{...s})}),Pt=()=>{const s=c.useContext(Xn),t=c.useContext(er),{getFieldState:a,formState:n}=Tl(),l=a(s.name,n);if(!s)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:s.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...l}},er=c.createContext({}),j=c.forwardRef(({className:s,...t},a)=>{const n=c.useId();return e.jsx(er.Provider,{value:{id:n},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...t})})});j.displayName="FormItem";const p=c.forwardRef(({className:s,...t},a)=>{const{error:n,formItemId:l}=Pt();return e.jsx(yt,{ref:a,className:y(n&&"text-destructive",s),htmlFor:l,...t})});p.displayName="FormLabel";const b=c.forwardRef(({...s},t)=>{const{error:a,formItemId:n,formDescriptionId:l,formMessageId:o}=Pt();return e.jsx(Wt,{ref:t,id:n,"aria-describedby":a?`${l} ${o}`:`${l}`,"aria-invalid":!!a,...s})});b.displayName="FormControl";const F=c.forwardRef(({className:s,...t},a)=>{const{formDescriptionId:n}=Pt();return e.jsx("p",{ref:a,id:n,className:y("text-[0.8rem] text-muted-foreground",s),...t})});F.displayName="FormDescription";const k=c.forwardRef(({className:s,children:t,...a},n)=>{const{error:l,formMessageId:o}=Pt(),d=l?String(l?.message):t;return d?e.jsx("p",{ref:n,id:o,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:d}):null});k.displayName="FormMessage";const S=c.forwardRef(({className:s,type:t,...a},n)=>e.jsx("input",{type:t,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:n,...a}));S.displayName="Input";const sr=c.forwardRef(({className:s,...t},a)=>{const[n,l]=c.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:n?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}),e.jsx(D,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>l(o=>!o),children:n?e.jsx(Pl,{size:18}):e.jsx(Il,{size:18})})]})});sr.displayName="PasswordInput";const Qo=s=>V({url:"/passport/auth/login",method:"post",data:s}),Ut=s=>s;function re(s=void 0,t="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Rl(s).format(t))}function Zo(s=void 0,t="YYYY-MM-DD"){return re(s,t)}function Fs(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":t.toFixed(2)}function hs(s,t=!0){if(s==null)return t?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return t?"¥0.00":"0.00";const l=(a/100).toFixed(2).replace(/\.?0+$/,o=>o.includes(".")?".00":o);return t?`¥${l}`:l}function Nt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{A.success(Ut("复制成功"))}).catch(t=>{console.error("复制到剪贴板时出错:",t),Va(s)}):Va(s)}function Va(s){const t=document.createElement("button"),a=new Vl(t,{text:()=>s});a.on("success",()=>{A.success(Ut("复制成功")),a.destroy()}),a.on("error",()=>{A.error(Ut("复制失败")),a.destroy()}),t.click()}function zs(s){const t=s/1024,a=t/1024,n=a/1024,l=n/1024;return l>=1?Fs(l)+" TB":n>=1?Fs(n)+" GB":a>=1?Fs(a)+" MB":Fs(t)+" KB"}const Xo="access_token";function ec(s){Tt.set(Xo,s)}const sc=u.object({email:u.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:u.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function tc({className:s,onForgotPassword:t,...a}){const n=ns(),l=qa(),o=ae({resolver:ie(sc),defaultValues:{email:"",password:""}});async function d(x){Qo(x).then(({data:r})=>{ec(r.auth_data),l(qo(r.auth_data)),l(Ws()).unwrap(),n("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(oe,{...o,children:e.jsx("form",{onSubmit:o.handleSubmit(d),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{control:o.control,name:"email",render:({field:x})=>e.jsxs(j,{className:"space-y-1",children:[e.jsx(p,{children:"邮箱地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"name@example.com",...x})}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"password",render:({field:x})=>e.jsxs(j,{className:"space-y-1",children:[e.jsx(p,{children:"密码"}),e.jsx(b,{children:e.jsx(sr,{placeholder:"请输入密码",...x})}),e.jsx(k,{})]})}),e.jsx(D,{className:"mt-2",loading:o.formState.isSubmitting,children:"登录"}),e.jsx(D,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:t,children:"忘记密码?"})]})})})})}const ue=Ua,Re=Ba,ac=Ga,it=Zt,tr=c.forwardRef(({className:s,...t},a)=>e.jsx(_t,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t}));tr.displayName=_t.displayName;const ce=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(ac,{children:[e.jsx(tr,{}),e.jsxs(Ct,{ref:n,className:y("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[t,e.jsxs(Zt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Me,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ce.displayName=Ct.displayName;const je=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...t});je.displayName="DialogHeader";const Ee=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Ee.displayName="DialogFooter";const xe=c.forwardRef(({className:s,...t},a)=>e.jsx(St,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...t}));xe.displayName=St.displayName;const Se=c.forwardRef(({className:s,...t},a)=>e.jsx(kt,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Se.displayName=kt.displayName;const Ls=_s("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),W=c.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,...l},o)=>{const d=n?Wt:"button";return e.jsx(d,{className:y(Ls({variant:t,size:a,className:s})),ref:o,...l})});W.displayName="Button";function nc(){const[s,t]=c.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(Ie,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(tc,{onForgotPassword:()=>t(!0)})]})]})}),e.jsx(ue,{open:s,onOpenChange:t,children:e.jsx(ce,{children:e.jsxs(je,{children:[e.jsx(xe,{children:"忘记密码"}),e.jsx(Se,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(W,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>Nt(a),children:e.jsx(El,{className:"h-4 w-4"})})]})})]})})})]})}const rc=Object.freeze(Object.defineProperty({__proto__:null,default:nc},Symbol.toStringTag,{value:"Module"})),ye=c.forwardRef(({className:s,fadedBelow:t=!1,fixedHeight:a=!1,...n},l)=>e.jsx("div",{ref:l,className:y("relative flex h-full w-full flex-col",t&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...n}));ye.displayName="Layout";const Ne=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...t}));Ne.displayName="LayoutHeader";const _e=c.forwardRef(({className:s,fixedHeight:t,...a},n)=>e.jsx("div",{ref:n,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",t&&"h-[calc(100%-var(--header-height))]",s),...a}));_e.displayName="LayoutBody";const ar=Fl,nr=Ml,rr=zl,Ns=$l,ws=Al,lc=Hl,ic=c.forwardRef(({className:s,inset:t,children:a,...n},l)=>e.jsxs(Ya,{ref:l,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",s),...n,children:[a,e.jsx(Xt,{className:"ml-auto h-4 w-4"})]}));ic.displayName=Ya.displayName;const oc=c.forwardRef(({className:s,...t},a)=>e.jsx(Wa,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...t}));oc.displayName=Wa.displayName;const gs=c.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(Ol,{children:e.jsx(Ja,{ref:n,sideOffset:t,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));gs.displayName=Ja.displayName;const he=c.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(Qa,{ref:n,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",s),...a}));he.displayName=Qa.displayName;const cc=c.forwardRef(({className:s,children:t,checked:a,...n},l)=>e.jsxs(Za,{ref:l,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Xa,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),t]}));cc.displayName=Za.displayName;const dc=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(en,{ref:n,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Xa,{children:e.jsx(Ll,{className:"h-4 w-4 fill-current"})})}),t]}));dc.displayName=en.displayName;const na=c.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(sn,{ref:n,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",s),...a}));na.displayName=sn.displayName;const Xs=c.forwardRef(({className:s,...t},a)=>e.jsx(tn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...t}));Xs.displayName=tn.displayName;const Bt=({className:s,...t})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...t});Bt.displayName="DropdownMenuShortcut";const le=Kl,se=ql,te=Ul,ee=c.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(an,{ref:n,sideOffset:t,className:y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));ee.displayName=an.displayName;function It(){const{pathname:s}=Jt();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const n=a.replace(/^\//,""),l=s.replace(/^\//,"");return n?l.startsWith(n):!1}}}function lr({key:s,defaultValue:t}){const[a,n]=c.useState(()=>{const l=localStorage.getItem(s);return l!==null?JSON.parse(l):t});return c.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,n]}function uc(){const[s,t]=lr({key:"expanded-sidebar-items",defaultValue:["仪表盘","系统管理","节点管理","订阅管理","用户管理"]});return{expandedItems:s,toggleItem:n=>{t(l=>l.includes(n)?l.filter(o=>o!==n):[...l,n])},isExpanded:n=>s.includes(n)}}function xc({links:s,isCollapsed:t,className:a,closeNav:n}){const l=({sub:o,...d})=>{const x=`${d.title}-${d.href}`;return t&&o?c.createElement(jc,{...d,sub:o,key:x,closeNav:n}):t?c.createElement(hc,{...d,key:x,closeNav:n}):o?c.createElement(mc,{...d,sub:o,key:x,closeNav:n}):c.createElement(ir,{...d,key:x,closeNav:n})};return e.jsx("div",{"data-collapsed":t,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(le,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(l)})})})}function ir({title:s,icon:t,label:a,href:n,closeNav:l,subLink:o=!1}){const{checkActiveNav:d}=It();return e.jsxs(Ss,{to:n,onClick:l,className:y($s({variant:d(n)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":d(n)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a})]})}function mc({title:s,icon:t,label:a,sub:n,closeNav:l}){const{checkActiveNav:o}=It(),{isExpanded:d,toggleItem:x}=uc(),r=!!n?.find(h=>o(h.href)),i=d(s)||r;return e.jsxs(ar,{open:i,onOpenChange:()=>x(s),children:[e.jsxs(nr,{className:y($s({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(nn,{stroke:1})})]}),e.jsx(rr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:n.map(h=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(ir,{...h,subLink:!0,closeNav:l})},h.title))})})]})}function hc({title:s,icon:t,label:a,href:n}){const{checkActiveNav:l}=It();return e.jsxs(se,{delayDuration:0,children:[e.jsx(te,{asChild:!0,children:e.jsxs(Ss,{to:n,className:y($s({variant:l(n)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[t,e.jsx("span",{className:"sr-only",children:s})]})}),e.jsxs(ee,{side:"right",className:"flex items-center gap-4",children:[s,a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a})]})]})}function jc({title:s,icon:t,label:a,sub:n}){const{checkActiveNav:l}=It(),o=!!n?.find(d=>l(d.href));return e.jsxs(Ns,{children:[e.jsxs(se,{delayDuration:0,children:[e.jsx(te,{asChild:!0,children:e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:o?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),e.jsxs(ee,{side:"right",className:"flex items-center gap-4",children:[s," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a}),e.jsx(nn,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(gs,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(na,{children:[s," ",a?`(${a})`:""]}),e.jsx(Xs,{}),n.map(({title:d,icon:x,label:r,href:i})=>e.jsx(he,{asChild:!0,children:e.jsxs(Ss,{to:i,className:`${l(i)?"bg-secondary":""}`,children:[x," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:d}),r&&e.jsx("span",{className:"ml-auto text-xs",children:r})]})},`${d}-${i}`))]})]})}const or=[{title:"仪表盘",label:"",href:"/",icon:e.jsx(Bl,{size:18})},{title:"系统管理",label:"",href:"",icon:e.jsx(Gl,{size:18}),sub:[{title:"系统配置",label:"",href:"/config/system",icon:e.jsx(rn,{size:18})},{title:"主题配置",label:"",href:"/config/theme",icon:e.jsx(Yl,{size:18})},{title:"公告管理",label:"",href:"/config/notice",icon:e.jsx(Wl,{size:18})},{title:"支付配置",label:"",href:"/config/payment",icon:e.jsx(ya,{size:18})},{title:"知识库管理",label:"",href:"/config/knowledge",icon:e.jsx(Jl,{size:18})}]},{title:"节点管理",label:"",href:"",icon:e.jsx(ln,{size:18}),sub:[{title:"节点管理",label:"",href:"/server/manage",icon:e.jsx(Ql,{size:18})},{title:"权限组管理",label:"",href:"/server/group",icon:e.jsx(on,{size:18})},{title:"路由管理",label:"",href:"/server/route",icon:e.jsx(Zl,{size:18})}]},{title:"订阅管理",label:"",href:"",icon:e.jsx(Xl,{size:18}),sub:[{title:"套餐管理",label:"",href:"/finance/plan",icon:e.jsx(ei,{size:18})},{title:"订单管理",label:"",href:"/finance/order",icon:e.jsx(ya,{size:18})},{title:"优惠券管理",label:"",href:"/finance/coupon",icon:e.jsx(si,{size:18})}]},{title:"用户管理",label:"",href:"",icon:e.jsx(ti,{size:18}),sub:[{title:"用户管理",label:"",href:"/user/manage",icon:e.jsx(ai,{size:18})},{title:"工单管理",label:"",href:"/user/ticket",icon:e.jsx(cn,{size:18})}]}];function gc({className:s,isCollapsed:t,setIsCollapsed:a}){const[n,l]=c.useState(!1);return c.useEffect(()=>{n?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[n]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${t?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>l(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${n?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(ye,{children:[e.jsxs(Ne,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${t?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${t?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${t?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(D,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Toggle Navigation","aria-controls":"sidebar-menu","aria-expanded":n,onClick:()=>l(o=>!o),children:n?e.jsx(ni,{}):e.jsx(ri,{})})]}),e.jsx(xc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${n?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>l(!1),isCollapsed:t,links:or}),e.jsx(D,{onClick:()=>a(o=>!o),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex",children:e.jsx(li,{stroke:1.5,className:`h-5 w-5 ${t?"rotate-180":""}`})})]})]})}function fc(){const[s,t]=lr({key:"collapsed-sidebar",defaultValue:!1});return c.useEffect(()=>{const a=()=>{t(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,t]),[s,t]}function pc(){const[s,t]=fc();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(gc,{isCollapsed:s,setIsCollapsed:t}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(Qt,{})})]})}const vc=Object.freeze(Object.defineProperty({__proto__:null,default:pc},Symbol.toStringTag,{value:"Module"})),fs=c.forwardRef(({className:s,...t},a)=>e.jsx(we,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...t}));fs.displayName=we.displayName;const bc=({children:s,...t})=>e.jsx(ue,{...t,children:e.jsx(ce,{className:"overflow-hidden p-0",children:e.jsx(fs,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Ds=c.forwardRef(({className:s,...t},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ii,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(we.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...t})]}));Ds.displayName=we.Input.displayName;const ps=c.forwardRef(({className:s,...t},a)=>e.jsx(we.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...t}));ps.displayName=we.List.displayName;const Ts=c.forwardRef((s,t)=>e.jsx(we.Empty,{ref:t,className:"py-6 text-center text-sm",...s}));Ts.displayName=we.Empty.displayName;const Ve=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...t}));Ve.displayName=we.Group.displayName;const As=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...t}));As.displayName=we.Separator.displayName;const be=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...t}));be.displayName=we.Item.displayName;function yc(){const s=[];for(const t of or)if(t.href&&s.push(t),t.sub)for(const a of t.sub)s.push({...a,parent:t.title});return s}function ke(){const[s,t]=c.useState(!1),a=ns(),n=yc();c.useEffect(()=>{const o=d=>{d.key==="k"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),t(x=>!x))};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[]);const l=c.useCallback(o=>{t(!1),a(o)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(W,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>t(!0),children:[e.jsx(oi,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:"搜索..."}),e.jsx("span",{className:"sr-only",children:"搜索"}),e.jsxs("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsxs(bc,{open:s,onOpenChange:t,children:[e.jsx(Ds,{placeholder:"搜索所有菜单和功能..."}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"未找到相关结果"}),e.jsx(Ve,{heading:"菜单导航",children:n.map(o=>e.jsxs(be,{value:`${o.parent?o.parent+" ":""}${o.title}`,onSelect:()=>l(o.href),children:[e.jsx("div",{className:"mr-2",children:o.icon}),e.jsx("span",{children:o.title}),o.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:o.parent})]},o.href))})]})]})]})}function De(){const{theme:s,setTheme:t}=So();return c.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",n=document.querySelector("meta[name='theme-color']");n&&n.setAttribute("content",a)},[s]),e.jsx(D,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>t(s==="light"?"dark":"light"),children:s==="light"?e.jsx(ci,{size:20}):e.jsx(di,{size:20})})}const cr=c.forwardRef(({className:s,...t},a)=>e.jsx(dn,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...t}));cr.displayName=dn.displayName;const dr=c.forwardRef(({className:s,...t},a)=>e.jsx(un,{ref:a,className:y("aspect-square h-full w-full",s),...t}));dr.displayName=un.displayName;const ur=c.forwardRef(({className:s,...t},a)=>e.jsx(xn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...t}));ur.displayName=xn.displayName;function Te(){const s=ns(),t=qa(),a=ui(Bo),n=()=>{Wn(),t(Uo()),s("/sign-in")},l=a?.email?.split("@")[0]||"User",o=l.substring(0,2).toUpperCase();return e.jsxs(Ns,{children:[e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(cr,{className:"h-8 w-8",children:[e.jsx(dr,{src:a?.avatar_url,alt:l}),e.jsx(ur,{children:o})]})})}),e.jsxs(gs,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(na,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:l}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||"user@example.com"})]})}),e.jsx(Xs,{}),e.jsx(he,{asChild:!0,children:e.jsxs(Ss,{to:"/config/system",children:["设置",e.jsx(Bt,{children:"⌘S"})]})}),e.jsx(Xs,{}),e.jsxs(he,{onClick:n,children:["退出登录",e.jsx(Bt,{children:"⇧⌘Q"})]})]})]})}const We=window?.settings?.secure_path,xr=5*60*1e3,Gt=new Map,Nc=s=>{const t=Gt.get(s);return t?Date.now()-t.timestamp>xr?(Gt.delete(s),null):t.data:null},wc=(s,t)=>{Gt.set(s,{data:t,timestamp:Date.now()})},_c=async(s,t=xr)=>{const a=Nc(s);if(a)return a;const n=await V.get(s);return wc(s,n),n},Cc={getList:()=>_c(`${We}/notice/fetch`),save:s=>V.post(`${We}/notice/save`,s),drop:s=>V.post(`${We}/notice/drop`,{id:s}),updateStatus:s=>V.post(`${We}/notice/show`,{id:s}),sort:s=>V.post(`${We}/notice/sort`,{ids:s})},Ra={getSystemStatus:()=>V.get(`${We}/system/getSystemStatus`),getQueueStats:()=>V.get(`${We}/system/getQueueStats`),getQueueWorkload:()=>V.get(`${We}/system/getQueueWorkload`),getQueueMasters:()=>V.get(`${We}/system/getQueueMasters`),getSystemLog:s=>V.get(`${We}/system/getSystemLog`,{params:s})},M=window?.settings?.secure_path,Sc=s=>V.get(M+"/stat/getOrder",{params:s}),kc=()=>V.get(M+"/stat/getStats"),Ea=s=>V.get(M+"/stat/getTrafficRank",{params:s}),Dc=()=>V.get(M+"/theme/getThemes"),Tc=s=>V.post(M+"/theme/getThemeConfig",{name:s}),Pc=(s,t)=>V.post(M+"/theme/saveThemeConfig",{name:s,config:t}),Ic=s=>{const t=new FormData;return t.append("file",s),V.post(M+"/theme/upload",t,{headers:{"Content-Type":"multipart/form-data"}})},Vc=s=>V.post(M+"/theme/delete",{name:s}),Rc=s=>V.post(M+"/config/save",s),mr=()=>V.get(M+"/server/manage/getNodes"),Ec=s=>V.post(M+"/server/manage/save",s),Fc=s=>V.post(M+"/server/manage/drop",s),Mc=s=>V.post(M+"/server/manage/copy",s),zc=s=>V.post(M+"/server/manage/update",s),Oc=s=>V.post(M+"/server/manage/sort",s),Vt=()=>V.get(M+"/server/group/fetch"),Lc=s=>V.post(M+"/server/group/save",s),$c=s=>V.post(M+"/server/group/drop",s),hr=()=>V.get(M+"/server/route/fetch"),Ac=s=>V.post(M+"/server/route/save",s),Hc=s=>V.post(M+"/server/route/drop",s),Kc=()=>V.get(M+"/payment/fetch"),qc=()=>V.get(M+"/payment/getPaymentMethods"),Uc=s=>V.post(M+"/payment/getPaymentForm",s),Bc=s=>V.post(M+"/payment/save",s),Gc=s=>V.post(M+"/payment/drop",s),Yc=s=>V.post(M+"/payment/show",s),Wc=s=>V.post(M+"/payment/sort",s),Jc=()=>V.get(M+"/notice/fetch"),Qc=s=>V.post(M+"/notice/save",s),Zc=s=>V.post(M+"/notice/drop",s),Xc=s=>V.post(M+"/notice/show",s),ed=()=>V.get(M+"/knowledge/fetch"),sd=s=>V.get(M+"/knowledge/fetch?id="+s),td=s=>V.post(M+"/knowledge/save",s),ad=s=>V.post(M+"/knowledge/drop",s),nd=s=>V.post(M+"/knowledge/show",s),rd=s=>V.post(M+"/knowledge/sort",s),Ps=()=>V.get(M+"/plan/fetch"),ld=s=>V.post(M+"/plan/save",s),zt=s=>V.post(M+"/plan/update",s),id=s=>V.post(M+"/plan/drop",s),od=s=>V.post(M+"/plan/sort",{ids:s}),jr=async s=>V.post(M+"/order/fetch",s),cd=s=>V.post(M+"/order/detail",s),dd=s=>V.post(M+"/order/paid",s),ud=s=>V.post(M+"/order/cancel",s),Fa=s=>V.post(M+"/order/update",s),xd=s=>V.post(M+"/order/assign",s),md=s=>V.post(M+"/coupon/fetch",s),hd=s=>V.post(M+"/coupon/generate",s),jd=s=>V.post(M+"/coupon/drop",s),gd=s=>V.post(M+"/coupon/update",s),fd=s=>V.post(M+"/user/fetch",s),pd=s=>V.post(M+"/user/update",s),vd=s=>V.post(M+"/user/resetSecret",s),bd=s=>V.post(M+"/user/generate",s),yd=s=>V.post(M+"/stat/getStatUser",s),gr=s=>V.post(M+"/ticket/fetch",s),Nd=s=>V.get(M+"/ticket/fetch?id= "+s),wd=s=>V.post(M+"/ticket/reply",s),fr=s=>V.post(M+"/ticket/close",{id:s}),os=(s="")=>V.get(M+"/config/fetch?key="+s),cs=s=>V.post(M+"/config/save",s),_d=()=>V.get(M+"/config/getEmailTemplate"),Cd=()=>V.post(M+"/config/testSendMail"),Sd=()=>V.post(M+"/config/setTelegramWebhook"),kd=Cc.sort,pr=xi,ra=c.forwardRef(({className:s,...t},a)=>e.jsx(mn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...t}));ra.displayName=mn.displayName;const et=c.forwardRef(({className:s,...t},a)=>e.jsx(hn,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...t}));et.displayName=hn.displayName;const Dd=c.forwardRef(({className:s,...t},a)=>e.jsx(jn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t}));Dd.displayName=jn.displayName;const G=mi,xs=yi,Y=hi,U=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(gn,{ref:n,className:y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[t,e.jsx(ji,{asChild:!0,children:e.jsx(ea,{className:"h-4 w-4 opacity-50"})})]}));U.displayName=gn.displayName;const vr=c.forwardRef(({className:s,...t},a)=>e.jsx(fn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(gi,{className:"h-4 w-4"})}));vr.displayName=fn.displayName;const br=c.forwardRef(({className:s,...t},a)=>e.jsx(pn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(ea,{className:"h-4 w-4"})}));br.displayName=pn.displayName;const B=c.forwardRef(({className:s,children:t,position:a="popper",...n},l)=>e.jsx(fi,{children:e.jsxs(vn,{ref:l,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...n,children:[e.jsx(vr,{}),e.jsx(pi,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),e.jsx(br,{})]})}));B.displayName=vn.displayName;const Td=c.forwardRef(({className:s,...t},a)=>e.jsx(bn,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...t}));Td.displayName=bn.displayName;const O=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(yn,{ref:n,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(vi,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),e.jsx(bi,{children:t})]}));O.displayName=yn.displayName;const Pd=c.forwardRef(({className:s,...t},a)=>e.jsx(Nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...t}));Pd.displayName=Nn.displayName;function Is({className:s,classNames:t,showOutsideDays:a=!0,...n}){return e.jsx(Ni,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(Ls({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Ls({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({className:l,...o})=>e.jsx(wn,{className:y("h-4 w-4",l),...o}),IconRight:({className:l,...o})=>e.jsx(Xt,{className:y("h-4 w-4",l),...o})},...n})}Is.displayName="Calendar";const Ze=_i,Xe=Ci,Be=c.forwardRef(({className:s,align:t="center",sideOffset:a=4,...n},l)=>e.jsx(wi,{children:e.jsx(_n,{ref:l,align:t,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n})}));Be.displayName=_n.displayName;const ms={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Ys=s=>(s/100).toFixed(2),Id=({active:s,payload:t,label:a})=>s&&t&&t.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),t.map((n,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[n.name,":"]}),e.jsx("span",{className:"font-medium",children:n.name.includes("金额")?`¥${Ys(n.value)}`:`${n.value}笔`})]},l))]}):null,Vd=[{value:"7d",label:"最近7天"},{value:"30d",label:"最近30天"},{value:"90d",label:"最近90天"},{value:"180d",label:"最近180天"},{value:"365d",label:"最近一年"},{value:"custom",label:"自定义范围"}],Rd=(s,t)=>{const a=new Date;if(s==="custom"&&t)return{startDate:t.from,endDate:t.to};let n;switch(s){case"7d":n=He(a,7);break;case"30d":n=He(a,30);break;case"90d":n=He(a,90);break;case"180d":n=He(a,180);break;case"365d":n=He(a,365);break;default:n=He(a,30)}return{startDate:n,endDate:a}};function Ed(){const[s,t]=c.useState("amount"),[a,n]=c.useState("30d"),[l,o]=c.useState({from:He(new Date,7),to:new Date}),{startDate:d,endDate:x}=Rd(a,l),{data:r}=Q({queryKey:["orderStat",{start_date:Pe(d,"yyyy-MM-dd"),end_date:Pe(x,"yyyy-MM-dd")}],queryFn:async()=>{const{data:i}=await Sc({start_date:Pe(d,"yyyy-MM-dd"),end_date:Pe(x,"yyyy-MM-dd")});return i},refetchInterval:3e4});return e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Qe,{children:"收入趋势"}),e.jsx(Zs,{children:`${r?.summary.start_date||""} 至 ${r?.summary.end_date||""}`})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(G,{value:a,onValueChange:i=>n(i),children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(B,{children:Vd.map(i=>e.jsx(O,{value:i.value,children:i.label},i.value))})]}),a==="custom"&&e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!l&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:l?.from?l.to?e.jsxs(e.Fragment,{children:[Pe(l.from,"yyyy-MM-dd")," -"," ",Pe(l.to,"yyyy-MM-dd")]}):Pe(l.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})})]})}),e.jsx(Be,{className:"w-auto p-0",align:"end",children:e.jsx(Is,{mode:"range",defaultMonth:l?.from,selected:{from:l?.from,to:l?.to},onSelect:i=>{i?.from&&i?.to&&o({from:i.from,to:i.to})},numberOfMonths:2})})]})]}),e.jsx(pr,{value:s,onValueChange:i=>t(i),children:e.jsxs(ra,{children:[e.jsx(et,{value:"amount",children:"金额"}),e.jsx(et,{value:"count",children:"笔数"})]})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总收入"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Ys(r?.summary?.paid_total||0)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r?.summary?.paid_count||0," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["平均订单金额 ¥",Ys(r?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总佣金"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Ys(r?.summary?.commission_total||0)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r?.summary?.commission_count||0," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["佣金比率 ",r?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]})]}),e.jsx(Oe,{children:e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Si,{width:"100%",height:"100%",children:e.jsxs(ki,{data:r?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ms.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ms.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ms.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ms.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(Di,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:i=>Pe(new Date(i),"MM-dd",{locale:Vi})}),e.jsx(Ti,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:i=>s==="amount"?`¥${Ys(i)}`:`${i}笔`}),e.jsx(Pi,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Ii,{content:e.jsx(Id,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Na,{type:"monotone",dataKey:"paid_total",name:"收款金额",stroke:ms.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Na,{type:"monotone",dataKey:"commission_total",name:"佣金金额",stroke:ms.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(wa,{dataKey:"paid_count",name:"收款笔数",fill:ms.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(wa,{dataKey:"commission_count",name:"佣金笔数",fill:ms.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})})]})}var me=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(me||{});const Es={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Bs={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var as=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=5]="RESET_FLOW",s))(as||{});const yr={1:"新购",2:"续费",3:"升级",5:"流量重置"};var fe=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(fe||{});const ct={0:"待确认",1:"发放中",2:"有效",3:"无效"},dt={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var ne=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(ne||{});const st={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var pe=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(pe||{});const ys=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ts={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var Rt=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(Rt||{});const la={1:"按金额优惠",2:"按比例优惠"},Fd={0:"正常",1:"锁定"};var Ms=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(Ms||{});const Md={0:"开启",1:"已关闭"};var ss=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(ss||{});const Js={0:"低",1:"中",2:"高"};function zd(){const s=ns(),{data:t}=Q({queryKey:["pendingTickets"],queryFn:()=>gr({filter:[{id:"status",value:0}]}),staleTime:1e3*30,refetchInterval:1e3*30}),{data:a}=Q({queryKey:["pendingCommissions"],queryFn:()=>jr({filter:[{id:"commission_status",value:fe.PENDING},{id:"status",value:me.COMPLETED},{id:"commission_balance",value:"gt:0"}]}),staleTime:1e3*30,refetchInterval:1e3*30}),n=t?.data||[],l=a?.data||[],o=()=>{const d=new URLSearchParams;d.set("commission_status",fe.PENDING.toString()),d.set("status",me.COMPLETED.toString()),d.set("commission_balance","gt:0"),s(`/finance/order?${d.toString()}`)};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(Ie,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${n.length>0?"border-orange-500/50":""}`,onClick:()=>s("/user/ticket"),children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:"待处理工单"}),e.jsx(Ri,{className:`h-4 w-4 ${n.length>0?"text-orange-500":"text-muted-foreground"}`})]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.length>0?"有待处理的工单需要关注":"暂无待处理工单"})]})]}),e.jsxs(Ie,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${l.length>0?"border-blue-500/50":""}`,onClick:o,children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:"待处理佣金"}),e.jsx(Ei,{className:`h-4 w-4 ${l.length>0?"text-blue-500":"text-muted-foreground"}`})]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.length>0?"有待处理的佣金需要确认":"暂无待处理佣金"})]})]})]})}function Fe({className:s,...t}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...t})}function Od(){return e.jsxs(Ie,{children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Fe,{className:"h-4 w-[100px]"}),e.jsx(Fe,{className:"h-4 w-4"})]}),e.jsxs(Oe,{children:[e.jsx(Fe,{className:"h-8 w-[120px]"}),e.jsx("div",{className:"flex items-center pt-1",children:e.jsx(Fe,{className:"h-4 w-[100px]"})})]})]})}function Ld(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((s,t)=>e.jsx(Od,{},t))})}function ut({title:s,value:t,icon:a,trend:n,className:l}){return e.jsxs(Ie,{className:y("transition-colors hover:border-primary/50",l),children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:t}),e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Oi,{className:y("h-4 w-4",n.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",n.isPositive?"text-emerald-500":"text-red-500"),children:[n.isPositive?"+":"-",Math.abs(n.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:n.label})]})]})]})}function $d({className:s}){const{data:t,isLoading:a}=Q({queryKey:["dashboardStats"],queryFn:async()=>(await kc()).data,refetchInterval:3e5});return a||!t?e.jsx(Ld,{}):e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(ut,{title:"今日收入",value:hs(t.todayIncome),icon:e.jsx(Fi,{className:"h-4 w-4 text-emerald-500"}),trend:{value:t.dayIncomeGrowth,label:"vs 昨日",isPositive:t.dayIncomeGrowth>0}}),e.jsx(ut,{title:"本月收入",value:hs(t.currentMonthIncome),icon:e.jsx(Mi,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.monthIncomeGrowth,label:"vs 上月",isPositive:t.monthIncomeGrowth>0}}),e.jsx(ut,{title:"上月佣金支出",value:hs(t.lastMonthCommissionPayout),icon:e.jsx(zi,{className:"h-4 w-4 text-destructive"}),trend:{value:t.commissionGrowth,label:"vs 上上月",isPositive:t.commissionGrowth>0}}),e.jsx(ut,{title:"本月新增用户",value:t.currentMonthNewUsers,icon:e.jsx(Cn,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.userGrowth,label:"vs 上月",isPositive:t.userGrowth>0}})]})}const tt=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(Sn,{ref:n,className:y("relative overflow-hidden",s),...a,children:[e.jsx(Li,{className:"h-full w-full rounded-[inherit]",children:t}),e.jsx(wt,{}),e.jsx($i,{})]}));tt.displayName=Sn.displayName;const wt=c.forwardRef(({className:s,orientation:t="vertical",...a},n)=>e.jsx(kn,{ref:n,orientation:t,className:y("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Ai,{className:"relative flex-1 rounded-full bg-border"})}));wt.displayName=kn.displayName;const Yt={today:{label:"今天",getValue:()=>{const s=Ki();return{start:s,end:qi(s,1)}}},last7days:{label:"最近7天",getValue:()=>{const s=new Date;return{start:He(s,7),end:s}}},last30days:{label:"最近30天",getValue:()=>{const s=new Date;return{start:He(s,30),end:s}}},custom:{label:"自定义范围",getValue:()=>null}};function Ma({selectedRange:s,customDateRange:t,onRangeChange:a,onCustomRangeChange:n}){return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(G,{value:s,onValueChange:a,children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(Yt).map(([l,{label:o}])=>e.jsx(O,{value:l,children:o},l))})]}),s==="custom"&&e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!t&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:t?.from?t.to?e.jsxs(e.Fragment,{children:[Pe(t.from,"yyyy-MM-dd")," -"," ",Pe(t.to,"yyyy-MM-dd")]}):Pe(t.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})})]})}),e.jsx(Be,{className:"w-auto p-0",align:"end",children:e.jsx(Is,{mode:"range",defaultMonth:t?.from,selected:{from:t?.from,to:t?.to},onSelect:l=>{l?.from&&l?.to&&n({from:l.from,to:l.to})},numberOfMonths:2})})]})]})}const Rs=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Ad({className:s}){const[t,a]=c.useState("today"),[n,l]=c.useState({from:He(new Date,7),to:new Date}),[o,d]=c.useState("today"),[x,r]=c.useState({from:He(new Date,7),to:new Date}),i=c.useMemo(()=>t==="custom"?{start:n.from,end:n.to}:Yt[t].getValue(),[t,n]),h=c.useMemo(()=>o==="custom"?{start:x.from,end:x.to}:Yt[o].getValue(),[o,x]),{data:T}=Q({queryKey:["nodeTrafficRank",i.start,i.end],queryFn:()=>Ea({type:"node",start_time:de.round(i.start.getTime()/1e3),end_time:de.round(i.end.getTime()/1e3)}),refetchInterval:3e4}),{data:C}=Q({queryKey:["userTrafficRank",h.start,h.end],queryFn:()=>Ea({type:"user",start_time:de.round(h.start.getTime()/1e3),end_time:de.round(h.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Ie,{children:[e.jsx(ze,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(Qe,{className:"flex items-center text-base font-medium",children:[e.jsx(Hi,{className:"mr-2 h-4 w-4"}),"节点流量排行"]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Ma,{selectedRange:t,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}),e.jsx(_a,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(Oe,{className:"flex-1",children:T?.data?e.jsxs(tt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:T.data.map(m=>e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:m.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?e.jsx(At,{className:"mr-1 h-3 w-3"}):e.jsx(Ht,{className:"mr-1 h-3 w-3"}),Math.abs(m.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${m.value/T.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Rs(m.value)})]})]})})}),e.jsx(ee,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"当前流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.value)}),e.jsx("span",{className:"text-muted-foreground",children:"上期流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.previousValue)}),e.jsx("span",{className:"text-muted-foreground",children:"变化率:"}),e.jsxs("span",{className:y("font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]}),e.jsx("span",{className:"text-muted-foreground",children:"记录时间:"}),e.jsx("span",{className:"font-medium",children:Pe(new Date(m.timestamp),"yyyy-MM-dd HH:mm")})]})})]})},m.id))}),e.jsx(wt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]}),e.jsxs(Ie,{children:[e.jsx(ze,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(Qe,{className:"flex items-center text-base font-medium",children:[e.jsx(Cn,{className:"mr-2 h-4 w-4"}),"用户流量排行"]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Ma,{selectedRange:o,customDateRange:x,onRangeChange:d,onCustomRangeChange:r}),e.jsx(_a,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(Oe,{className:"flex-1",children:C?.data?e.jsxs(tt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:C.data.map(m=>e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:m.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?e.jsx(At,{className:"mr-1 h-3 w-3"}):e.jsx(Ht,{className:"mr-1 h-3 w-3"}),Math.abs(m.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${m.value/C.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Rs(m.value)})]})]})})}),e.jsx(ee,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"当前流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.value)}),e.jsx("span",{className:"text-muted-foreground",children:"上期流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.previousValue)}),e.jsx("span",{className:"text-muted-foreground",children:"变化率:"}),e.jsxs("span",{className:y("font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]}),e.jsx("span",{className:"text-muted-foreground",children:"记录时间:"}),e.jsx("span",{className:"font-medium",children:Pe(new Date(m.timestamp),"yyyy-MM-dd HH:mm")})]})})]})},m.id))}),e.jsx(wt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]})]})}const Hd=_s("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function L({className:s,variant:t,...a}){return e.jsx("div",{className:y(Hd({variant:t}),s),...a})}const pt=c.forwardRef(({className:s,value:t,...a},n)=>e.jsx(Dn,{ref:n,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Ui,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));pt.displayName=Dn.displayName;function Kd(){const[s,t]=c.useState(null),[a,n]=c.useState(null),[l,o]=c.useState(!0),[d,x]=c.useState(!1),r=async()=>{try{x(!0);const[T,C]=await Promise.all([Ra.getSystemStatus(),Ra.getQueueStats()]);t(T.data),n(C.data)}catch(T){console.error("Error fetching system data:",T)}finally{o(!1),x(!1)}};c.useEffect(()=>{r();const T=setInterval(r,3e4);return()=>clearInterval(T)},[]);const i=()=>{r()};if(l)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(sa,{className:"h-6 w-6 animate-spin"})});const h=T=>T?e.jsx(Tn,{className:"h-5 w-5 text-green-500"}):e.jsx(Pn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Ie,{children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(Qe,{className:"flex items-center gap-2",children:[e.jsx(Bi,{className:"h-5 w-5"}),"队列状态"]}),e.jsx(Zs,{children:"当前队列运行状态"})]}),e.jsx(W,{variant:"outline",size:"icon",onClick:i,disabled:d,children:e.jsx(Gi,{className:y("h-4 w-4",d&&"animate-spin")})})]}),e.jsx(Oe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[h(a?.status||!1),e.jsx("span",{className:"font-medium",children:"运行状态"})]}),e.jsx(L,{variant:a?.status?"secondary":"destructive",children:a?.status?"正常":"异常"})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前等待时间:",a?.wait?.default||0," 秒"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"近期任务数"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.recentJobs||0}),e.jsx(pt,{value:(a?.recentJobs||0)/(a?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(ee,{children:e.jsxs("p",{children:["统计时间范围: ",a?.periods?.recentJobs||0," 小时"]})})]})}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"每分钟处理量"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.jobsPerMinute||0}),e.jsx(pt,{value:(a?.jobsPerMinute||0)/(a?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(ee,{children:e.jsxs("p",{children:["最高吞吐量:"," ",a?.queueWithMaxThroughput?.throughput||0]})})]})})]})]})})]}),e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsxs(Qe,{className:"flex items-center gap-2",children:[e.jsx(Yi,{className:"h-5 w-5"}),"作业详情"]}),e.jsx(Zs,{children:"队列处理详细信息"})]}),e.jsx(Oe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"7日报错数量"}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:a?.failedJobs||0}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["保留 ",a?.periods?.failedJobs||0," 小时"]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"最长运行队列"}),e.jsxs("p",{className:"text-2xl font-bold",children:[a?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:a?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"活跃进程"}),e.jsxs("span",{className:"font-medium",children:[a?.processes||0," /"," ",(a?.processes||0)+(a?.pausedMasters||0)]})]}),e.jsx(pt,{value:(a?.processes||0)/((a?.processes||0)+(a?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function qd(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"仪表盘"})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(ke,{}),e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsx(_e,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border-b pb-6",children:e.jsx(zd,{})}),e.jsxs("div",{className:"grid gap-6",children:[e.jsx($d,{}),e.jsx(Ed,{}),e.jsx(Ad,{}),e.jsx(Kd,{})]})]})})]})}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),ge=c.forwardRef(({className:s,orientation:t="horizontal",decorative:a=!0,...n},l)=>e.jsx(In,{ref:l,decorative:a,orientation:t,className:y("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...n}));ge.displayName=In.displayName;function Bd({className:s,items:t,...a}){const{pathname:n}=Jt(),l=ns(),[o,d]=c.useState(n??"/settings"),x=r=>{d(r),l(r)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(G,{value:o,onValueChange:x,children:[e.jsx(U,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(B,{children:t.map(r=>e.jsx(O,{value:r.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:r.icon}),e.jsx("span",{className:"text-md",children:r.title})]})},r.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:t.map(r=>e.jsxs(Ss,{to:r.href,className:y($s({variant:"ghost"}),n===r.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:r.icon}),r.title]},r.href))})})]})}const Nr=[{title:"站点设置",key:"site",icon:e.jsx(Wi,{size:18}),href:"/config/system",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。"},{title:"安全设置",key:"safe",icon:e.jsx(on,{size:18}),href:"/config/system/safe",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"},{title:"订阅设置",key:"subscribe",icon:e.jsx(cn,{size:18}),href:"/config/system/subscribe",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"},{title:"邀请&佣金",key:"invite",icon:e.jsx(Ji,{size:18}),href:"/config/system/invite",description:"管理用户邀请和佣金系统,配置邀请奖励、分销规则等。"},{title:"节点配置",key:"server",icon:e.jsx(ln,{size:18}),href:"/config/system/server",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"},{title:"邮件设置",key:"email",icon:e.jsx(Qi,{size:18}),href:"/config/system/email",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"},{title:"Telegram设置",key:"telegram",icon:e.jsx(Zi,{size:18}),href:"/config/system/telegram",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"},{title:"APP设置",key:"app",icon:e.jsx(rn,{size:18}),href:"/config/system/app",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"}];function Gd(){return e.jsxs(ye,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"系统设置"}),e.jsx("div",{className:"text-muted-foreground",children:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置"})]}),e.jsx(ge,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Bd,{items:Nr})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(Qt,{})})})]})]})]})}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Gd},Symbol.toStringTag,{value:"Module"}));function Wd({title:s,description:t,children:a}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e.jsx(ge,{}),a]})}const H=c.forwardRef(({className:s,...t},a)=>e.jsx(Vn,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...t,ref:a,children:e.jsx(Xi,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));H.displayName=Vn.displayName;const vs=c.forwardRef(({className:s,...t},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}));vs.displayName="Textarea";const Jd=u.object({logo:u.string().nullable().default(""),force_https:u.number().nullable().default(0),stop_register:u.number().nullable().default(0),app_name:u.string().nullable().default(""),app_description:u.string().nullable().default(""),app_url:u.string().nullable().default(""),subscribe_url:u.string().nullable().default(""),try_out_plan_id:u.number().nullable().default(0),try_out_hour:u.coerce.number().nullable().default(0),tos_url:u.string().nullable().default(""),currency:u.string().nullable().default(""),currency_symbol:u.string().nullable().default("")});function Qd(){const[s,t]=c.useState(!1),a=c.useRef(null),{data:n}=Q({queryKey:["settings","site"],queryFn:()=>os("site")}),{data:l}=Q({queryKey:["plans"],queryFn:()=>Ps()}),o=ae({resolver:ie(Jd),defaultValues:{},mode:"onBlur"}),{mutateAsync:d}=Je({mutationFn:cs,onSuccess:i=>{i.data&&A.success("已自动保存")}});c.useEffect(()=>{if(n?.data?.site){const i=n?.data?.site;Object.entries(i).forEach(([h,T])=>{o.setValue(h,T)}),a.current=i}},[n]);const x=c.useCallback(de.debounce(async i=>{if(!de.isEqual(i,a.current)){t(!0);try{const h=Object.entries(i).reduce((T,[C,m])=>(T[C]=m===null?"":m,T),{});await d(h),a.current=i}finally{t(!1)}}},1e3),[d]),r=c.useCallback(i=>{x(i)},[x]);return c.useEffect(()=>{const i=o.watch(h=>{r(h)});return()=>i.unsubscribe()},[o.watch,r]),e.jsx(oe,{...o,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:o.control,name:"app_name",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点名称",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要站点名称的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"app_description",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点描述"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点描述",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要站点描述的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"app_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点网址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"当前网站最新网址,将会在邮件等需要用于网址处体现。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"force_https",render:({field:i})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"强制HTTPS"}),e.jsx(F,{children:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"})]}),e.jsx(b,{children:e.jsx(H,{checked:!!i.value,onCheckedChange:h=>{i.onChange(Number(h)),r(o.getValues())}})})]})}),e.jsx(g,{control:o.control,name:"logo",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"LOGO"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入LOGO URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要LOGO的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"subscribe_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"订阅URL"}),e.jsx(b,{children:e.jsx(vs,{placeholder:"用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于订阅所使用,留空则为站点URL。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"tos_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"用户条款(TOS)URL"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入用户条款URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于跳转到用户条款(TOS)"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"stop_register",render:({field:i})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"停止新用户注册"}),e.jsx(F,{children:"开启后任何人都将无法进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:!!i.value,onCheckedChange:h=>{i.onChange(Number(h)),r(o.getValues())}})})]})}),e.jsx(g,{control:o.control,name:"try_out_plan_id",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"注册试用"}),e.jsx(b,{children:e.jsxs(G,{value:i.value?.toString(),onValueChange:h=>{i.onChange(Number(h)),r(o.getValues())},children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"关闭"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"关闭"}),l?.data?.map(h=>e.jsx(O,{value:h.id.toString(),children:h.name},h.id.toString()))]})]})}),e.jsx(F,{children:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。"}),e.jsx(k,{})]})}),!!o.watch("try_out_plan_id")&&e.jsx(g,{control:o.control,name:"try_out_hour",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"",children:"注册试用时长"}),e.jsx(b,{children:e.jsx(S,{placeholder:"0",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"注册试用时长,单位为小时。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"currency",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"货币单位"}),e.jsx(b,{children:e.jsx(S,{placeholder:"CNY",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"currency_symbol",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"货币符号"}),e.jsx(b,{children:e.jsx(S,{placeholder:"¥",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Zd(){const s=Nr.find(t=>t.key==="site");return e.jsx(Wd,{title:s.title,description:s.description,children:e.jsx(Qd,{})})}const Xd=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"})),eu=u.object({email_verify:u.boolean().nullable(),safe_mode_enable:u.boolean().nullable(),secure_path:u.string().nullable(),email_whitelist_enable:u.boolean().nullable(),email_whitelist_suffix:u.array(u.string().nullable()).nullable(),email_gmail_limit_enable:u.boolean().nullable(),recaptcha_enable:u.boolean().nullable(),recaptcha_key:u.string().nullable(),recaptcha_site_key:u.string().nullable(),register_limit_by_ip_enable:u.boolean().nullable(),register_limit_count:u.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:u.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:u.boolean().nullable(),password_limit_count:u.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:u.coerce.string().transform(s=>s===""?null:s).nullable()}),su={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function tu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(eu),defaultValues:su,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","safe"],queryFn:()=>os("safe")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.safe){const r=l.data.safe;Object.entries(r).forEach(([i,h])=>{typeof h=="number"?n.setValue(i,String(h)):n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"email_verify",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮箱验证"}),e.jsx(F,{children:"开启后将会强制要求用户进行邮箱验证。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"email_gmail_limit_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"禁止使用Gmail多别名"}),e.jsx(F,{children:"开启后Gmail多别名将无法注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"safe_mode_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"安全模式"}),e.jsx(F,{children:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"secure_path",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"后台路径"}),e.jsx(b,{children:e.jsx(S,{placeholder:"admin",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(F,{children:"后台管理路径,修改后将会改变原有的admin路径"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"email_whitelist_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮箱后缀白名单"}),e.jsx(F,{children:"开启后在名单中的邮箱后缀才允许进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("email_whitelist_enable")&&e.jsx(g,{control:n.control,name:"email_whitelist_suffix",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"白名单后缀"}),e.jsx(b,{children:e.jsx(vs,{placeholder:"请输入后缀域名,逗号分割 如:qq.com,gmail.com",value:r.value?.length?r.value.join(","):"",onChange:i=>{const h=i.target.value?i.target.value.split(","):[];r.onChange(h),x(n.getValues())}})}),e.jsx(F,{children:"请使用逗号进行分割,如:qq.com,gmail.com。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"recaptcha_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"防机器人"}),e.jsx(F,{children:"开启后将会使用Google reCAPTCHA防止机器人。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"recaptcha_key",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入密钥",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"recaptcha_site_key",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"站点密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点密钥",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:n.control,name:"register_limit_by_ip_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"IP注册限制"}),e.jsx(F,{children:"开启后同一IP将会被限制注册次数。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"register_limit_count",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制次数"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制次数",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"register_limit_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制时长(分钟)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制时长",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:n.control,name:"password_limit_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"密码错误限制"}),e.jsx(F,{children:"开启后密码错误将会被限制登录。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"password_limit_count",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制次数"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制次数",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"password_limit_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制时长(分钟)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制时长",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function au(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"安全设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"})]}),e.jsx(ge,{}),e.jsx(tu,{})]})}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:au},Symbol.toStringTag,{value:"Module"})),ru=u.object({plan_change_enable:u.boolean().nullable().default(!1),reset_traffic_method:u.coerce.number().nullable().default(0),surplus_enable:u.boolean().nullable().default(!1),new_order_event_id:u.coerce.number().nullable().default(0),renew_order_event_id:u.coerce.number().nullable().default(0),change_order_event_id:u.coerce.number().nullable().default(0),show_info_to_server_enable:u.boolean().nullable().default(!1),show_protocol_to_server_enable:u.boolean().nullable().default(!1),default_remind_expire:u.boolean().nullable().default(!1),default_remind_traffic:u.boolean().nullable().default(!1),remind_mail_enable:u.boolean().nullable().default(!1),subscribe_path:u.string().nullable().default("s")}),lu={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,remind_mail_enable:!1,subscribe_path:"s"};function iu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(ru),defaultValues:lu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","subscribe"],queryFn:()=>os("subscribe")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data?.subscribe){const r=l?.data?.subscribe;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"plan_change_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"允许用户更改订阅"}),e.jsx(F,{children:"开启后用户将会可以对订阅计划进行变更。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"reset_traffic_method",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"月流量重置方式"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"每月1号"}),e.jsx(O,{value:"1",children:"按月重置"}),e.jsx(O,{value:"2",children:"不重置"}),e.jsx(O,{value:"3",children:"每年1月1号"}),e.jsx(O,{value:"4",children:"按年重置"})]})]})})}),e.jsx(F,{children:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"surplus_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"开启折抵方案"}),e.jsx(F,{children:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"new_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅新购时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"新购订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"renew_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅续费时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"续费订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"change_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅变更时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"变更订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"subscribe_path",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"订阅路径"}),e.jsx(b,{children:e.jsx(S,{placeholder:"subscribe",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["订阅路径,修改后将会改变原有的subscribe路径",e.jsx("br",{}),"当前订阅路径格式:",r.value?`${r.value}/xxxxxxxxxx`:"s/xxxxxxxxxx"]}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"show_info_to_server_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"在订阅中展示订阅信息"}),e.jsx(F,{children:"开启后将会在用户订阅节点时输出订阅信息。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"show_protocol_to_server_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"在订阅中线路名称中显示协议名称"}),e.jsx(F,{children:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"remind_mail_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮件提醒"}),e.jsx(F,{children:"开启后用户订阅即将到期时和流量告急时时将发送邮件通知。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function ou(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"订阅设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"})]}),e.jsx(ge,{}),e.jsx(iu,{})]})}const cu=Object.freeze(Object.defineProperty({__proto__:null,default:ou},Symbol.toStringTag,{value:"Module"})),du=u.object({invite_force:u.boolean().default(!1),invite_commission:u.coerce.string().default("0"),invite_gen_limit:u.coerce.string().default("0"),invite_never_expire:u.boolean().default(!1),commission_first_time_enable:u.boolean().default(!1),commission_auto_check_enable:u.boolean().default(!1),commission_withdraw_limit:u.coerce.string().default("0"),commission_withdraw_method:u.array(u.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:u.boolean().default(!1),commission_distribution_enable:u.boolean().default(!1),commission_distribution_l1:u.coerce.number().default(0),commission_distribution_l2:u.coerce.number().default(0),commission_distribution_l3:u.coerce.number().default(0)}),uu={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function xu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(du),defaultValues:uu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","invite"],queryFn:()=>os("invite")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data?.invite){const r=l?.data?.invite;Object.entries(r).forEach(([i,h])=>{typeof h=="number"?n.setValue(i,String(h)):n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"invite_force",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"开启强制邀请"}),e.jsx(F,{children:"开启后只有被邀请的用户才可以进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"invite_commission",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:" 邀请佣金百分比"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"invite_gen_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"用户可创建邀请码上限"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"用户可创建邀请码上限"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"invite_never_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邀请码永不失效"}),e.jsx(F,{children:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_first_time_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"佣金仅首次发放"}),e.jsx(F,{children:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_auto_check_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"佣金自动确认"}),e.jsx(F,{children:"开启后佣金将会在订单完成3日后自动进行确认。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_withdraw_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"提现单申请门槛(元)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"小于门槛金额的提现单将不会被提交。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_withdraw_method",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"提现方式"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:Array.isArray(r.value)?r.value.join(","):"",onChange:i=>{const h=i.target.value.split(",").filter(Boolean);r.onChange(h),x(n.getValues())}})}),e.jsx(F,{children:"可以支持的提现方式,多个用逗号分隔。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"withdraw_close_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"关闭提现"}),e.jsx(F,{children:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"三级分销"}),e.jsx(F,{children:"开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"commission_distribution_l1",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"一级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_l2",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"二级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_l3",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"三级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function mu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邀请&佣金设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"邀请注册、佣金相关设置。"})]}),e.jsx(ge,{}),e.jsx(xu,{})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:mu},Symbol.toStringTag,{value:"Module"})),ju=u.object({frontend_theme:u.string().nullable(),frontend_theme_sidebar:u.string().nullable(),frontend_theme_header:u.string().nullable(),frontend_theme_color:u.string().nullable(),frontend_background_url:u.string().url().nullable()}),gu={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function fu(){const{data:s}=Q({queryKey:["settings","frontend"],queryFn:()=>os("frontend")}),t=ae({resolver:ie(ju),defaultValues:gu,mode:"onChange"});c.useEffect(()=>{if(s?.data?.frontend){const n=s?.data?.frontend;Object.entries(n).forEach(([l,o])=>{t.setValue(l,o)})}},[s]);function a(n){cs(n).then(({data:l})=>{l&&A.success("更新成功")})}return e.jsx(oe,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(g,{control:t.control,name:"frontend_theme_sidebar",render:({field:n})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"边栏风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(b,{children:e.jsx(H,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(g,{control:t.control,name:"frontend_theme_header",render:({field:n})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"头部风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(b,{children:e.jsx(H,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(g,{control:t.control,name:"frontend_theme_color",render:({field:n})=>e.jsxs(j,{children:[e.jsx(p,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(b,{children:e.jsxs("select",{className:y($s({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(ea,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(F,{children:"主题色"}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"frontend_background_url",render:({field:n})=>e.jsxs(j,{children:[e.jsx(p,{children:"背景"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入图片地址",...n})}),e.jsx(F,{children:"将会在后台登录页面进行展示。"}),e.jsx(k,{})]})}),e.jsx(D,{type:"submit",children:"保存设置"})]})})}function pu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(ge,{}),e.jsx(fu,{})]})}const vu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),bu=u.object({server_pull_interval:u.coerce.number().nullable(),server_push_interval:u.coerce.number().nullable(),server_token:u.string().nullable(),device_limit_mode:u.coerce.number().nullable()}),yu={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function Nu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(bu),defaultValues:yu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","server"],queryFn:()=>os("server")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.server){const r=l.data.server;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"server_token",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"通讯密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"Xboard与节点通讯的密钥,以便数据不会被他人获取。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"server_pull_interval",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"节点拉取动作轮询间隔"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):null;r.onChange(h)}})}),e.jsx(F,{children:"节点从面板获取数据的间隔频率。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"server_push_interval",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"节点推送动作轮询间隔"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):null;r.onChange(h)}})}),e.jsx(F,{children:"节点推送数据到面板的间隔频率。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"device_limit_mode",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"设备限制模式"}),e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString()||"0",children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择设备限制模式"})})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"严格模式"}),e.jsx(O,{value:"1",children:"宽松模式"})]})]}),e.jsx(F,{children:"宽松模式下,同一IP地址使用多个节点只统计为一个设备。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function wu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"节点配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"})]}),e.jsx(ge,{}),e.jsx(Nu,{})]})}const _u=Object.freeze(Object.defineProperty({__proto__:null,default:wu},Symbol.toStringTag,{value:"Module"}));function Cu({open:s,onOpenChange:t,result:a}){const n=!a.error;return e.jsx(ue,{open:s,onOpenChange:t,children:e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n?e.jsx(Tn,{className:"h-5 w-5 text-green-500"}):e.jsx(Pn,{className:"h-5 w-5 text-destructive"}),e.jsx(xe,{children:n?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Se,{children:n?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(tt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const Su=u.object({email_template:u.string().nullable().default("classic"),email_host:u.string().nullable().default(""),email_port:u.string().regex(/^\d+$/).nullable().default("465"),email_username:u.string().nullable().default(""),email_password:u.string().nullable().default(""),email_encryption:u.string().nullable().default(""),email_from_address:u.string().email().nullable().default("")});function ku(){const[s,t]=c.useState(null),[a,n]=c.useState(!1),l=c.useRef(null),[o,d]=c.useState(!1),x=ae({resolver:ie(Su),defaultValues:{},mode:"onBlur"}),{data:r}=Q({queryKey:["settings","email"],queryFn:()=>os("email")}),{data:i}=Q({queryKey:["emailTemplate"],queryFn:()=>_d()}),{mutateAsync:h}=Je({mutationFn:cs,onSuccess:_=>{_.data&&A.success("已自动保存")}}),{mutate:T,isPending:C}=Je({mutationFn:Cd,onMutate:()=>{t(null),n(!1)},onSuccess:_=>{t(_.data),n(!0),_.data.error||A.success("发送成功")}});c.useEffect(()=>{if(r?.data.email){const _=r.data.email;Object.entries(_).forEach(([v,N])=>{x.setValue(v,N)}),l.current=_}},[r]);const m=c.useCallback(de.debounce(async _=>{if(!de.isEqual(_,l.current)){d(!0);try{await h(_),l.current=_}finally{d(!1)}}},1e3),[h]),w=c.useCallback(_=>{m(_)},[m]);return c.useEffect(()=>{const _=x.watch(v=>{w(v)});return()=>_.unsubscribe()},[x.watch,w]),e.jsxs(e.Fragment,{children:[e.jsx(oe,{...x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:x.control,name:"email_host",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP服务器地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的服务地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_port",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP服务端口"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"常见的端口有25, 465, 587"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_encryption",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP加密方式"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"465端口加密方式一般为SSL,587端口加密方式一般为TLS"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_username",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP账号"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的账号"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_password",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP密码"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||"",type:"password"})}),e.jsx(F,{children:"由邮件服务商提供的密码"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_from_address",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"发件地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的发件地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_template",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"邮件模板"}),e.jsxs(G,{onValueChange:v=>{_.onChange(v),w(x.getValues())},value:_.value||void 0,children:[e.jsx(b,{children:e.jsx(U,{className:"w-[200px]",children:e.jsx(Y,{placeholder:"选择邮件模板"})})}),e.jsx(B,{children:i?.data?.map(v=>e.jsx(O,{value:v,children:v},v))})]}),e.jsx(F,{children:"你可以在文档查看如何自定义邮件模板"}),e.jsx(k,{})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(D,{onClick:()=>T(),loading:C,disabled:C,children:C?"发送中...":"发送测试邮件"})})]})}),o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."}),s&&e.jsx(Cu,{open:a,onOpenChange:n,result:s})]})}function Du(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邮件设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"})]}),e.jsx(ge,{}),e.jsx(ku,{})]})}const Tu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),Pu=u.object({telegram_bot_enable:u.boolean().nullable(),telegram_bot_token:u.string().nullable(),telegram_discuss_link:u.string().nullable()}),Iu={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function Vu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(Pu),defaultValues:Iu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","telegram"],queryFn:()=>os("telegram")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:h=>{h.data&&A.success("已自动保存")}}),{mutate:d,isPending:x}=Je({mutationFn:Sd,onSuccess:h=>{h.data&&A.success("Webhook设置成功")}});c.useEffect(()=>{if(l?.data.telegram){const h=l.data.telegram;Object.entries(h).forEach(([T,C])=>{n.setValue(T,C)}),a.current=h}},[l]);const r=c.useCallback(de.debounce(async h=>{if(!de.isEqual(h,a.current)){t(!0);try{await o(h),a.current=h}finally{t(!1)}}},1e3),[o]),i=c.useCallback(h=>{r(h)},[r]);return c.useEffect(()=>{const h=n.watch(T=>{i(T)});return()=>h.unsubscribe()},[n.watch,i]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"telegram_bot_token",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"机器人Token"}),e.jsx(b,{children:e.jsx(S,{placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx",...h,value:h.value||""})}),e.jsx(F,{children:"请输入由Botfather提供的token。"}),e.jsx(k,{})]})}),n.watch("telegram_bot_token")&&e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"设置Webhook"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(D,{loading:x,disabled:x,onClick:()=>d(),children:x?"Webhook设置中...":"一键设置"}),s&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"保存中..."})]}),e.jsx(F,{children:"对机器人进行Webhook设置,不设置将无法收到Telegram通知。"}),e.jsx(k,{})]}),e.jsx(g,{control:n.control,name:"telegram_bot_enable",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"开启机器人通知"}),e.jsx(F,{children:"开启后bot将会对绑定了telegram的管理员和用户进行基础通知。"}),e.jsx(b,{children:e.jsx(H,{checked:h.value||!1,onCheckedChange:T=>{h.onChange(T),i(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"telegram_discuss_link",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"群组地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://t.me/xxxxxx",...h,value:h.value||""})}),e.jsx(F,{children:"填写后将会在用户端展示,或者被用于需要的地方。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Ru(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Telegram设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"})]}),e.jsx(ge,{}),e.jsx(Vu,{})]})}const Eu=Object.freeze(Object.defineProperty({__proto__:null,default:Ru},Symbol.toStringTag,{value:"Module"})),Fu=u.object({windows_version:u.string().nullable(),windows_download_url:u.string().nullable(),macos_version:u.string().nullable(),macos_download_url:u.string().nullable(),android_version:u.string().nullable(),android_download_url:u.string().nullable()}),Mu={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function zu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(Fu),defaultValues:Mu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","app"],queryFn:()=>os("app")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.app){const r=l.data.app;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Windows"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Windows端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"windows_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"windows_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.exe",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"macOS"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"macOS端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"macos_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"macos_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.dmg",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Android"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Android端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"android_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"android_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.apk",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Ou(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"APP设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"})]}),e.jsx(ge,{}),e.jsx(zu,{})]})}const Lu=Object.freeze(Object.defineProperty({__proto__:null,default:Ou},Symbol.toStringTag,{value:"Module"})),ia=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...t})}));ia.displayName="Table";const oa=c.forwardRef(({className:s,...t},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...t}));oa.displayName="TableHeader";const ca=c.forwardRef(({className:s,...t},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...t}));ca.displayName="TableBody";const $u=c.forwardRef(({className:s,...t},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...t}));$u.displayName="TableFooter";const js=c.forwardRef(({className:s,...t},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...t}));js.displayName="TableRow";const da=c.forwardRef(({className:s,...t},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));da.displayName="TableHead";const Os=c.forwardRef(({className:s,...t},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));Os.displayName="TableCell";const Au=c.forwardRef(({className:s,...t},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...t}));Au.displayName="TableCaption";function Hu({table:s}){const[t,a]=c.useState("");c.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const n=l=>{const o=parseInt(l);!isNaN(o)&&o>=1&&o<=s.getPageCount()?s.setPageIndex(o-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(G,{value:`${s.getState().pagination.pageSize}`,onValueChange:l=>{s.setPageSize(Number(l))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(l=>e.jsx(O,{value:`${l}`,children:l},l))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(S,{type:"text",value:t,onChange:l=>a(l.target.value),onBlur:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&n(l.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(D,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(eo,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(wn,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(Xt,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(so,{className:"h-4 w-4"})]})]})]})]})}function Ge({table:s,toolbar:t,draggable:a=!1,onDragStart:n,onDragEnd:l,onDragOver:o,onDragLeave:d,onDrop:x,showPagination:r=!0,isLoading:i=!1}){const h=c.useRef(null),T=s.getAllColumns().filter(_=>_.getIsPinned()==="left"),C=s.getAllColumns().filter(_=>_.getIsPinned()==="right"),m=_=>T.slice(0,_).reduce((v,N)=>v+(N.getSize()??0),0),w=_=>C.slice(_+1).reduce((v,N)=>v+(N.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof t=="function"?t(s):t,e.jsx("div",{ref:h,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(ia,{children:[e.jsx(oa,{children:s.getHeaderGroups().map(_=>e.jsx(js,{className:"hover:bg-transparent",children:_.headers.map((v,N)=>{const P=v.column.getIsPinned()==="left",f=v.column.getIsPinned()==="right",R=P?m(T.indexOf(v.column)):void 0,z=f?w(C.indexOf(v.column)):void 0;return e.jsx(da,{colSpan:v.colSpan,style:{width:v.getSize(),...P&&{left:R},...f&&{right:z}},className:y("h-11 bg-card px-4 text-muted-foreground",(P||f)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",P&&"before:right-0",f&&"before:left-0"]),children:v.isPlaceholder?null:vt(v.column.columnDef.header,v.getContext())},v.id)})},_.id))}),e.jsx(ca,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((_,v)=>e.jsx(js,{"data-state":_.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:N=>n?.(N,v),onDragEnd:l,onDragOver:o,onDragLeave:d,onDrop:N=>x?.(N,v),children:_.getVisibleCells().map((N,P)=>{const f=N.column.getIsPinned()==="left",R=N.column.getIsPinned()==="right",z=f?m(T.indexOf(N.column)):void 0,$=R?w(C.indexOf(N.column)):void 0;return e.jsx(Os,{style:{width:N.column.getSize(),...f&&{left:z},...R&&{right:$}},className:y("bg-card",(f||R)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",f&&"before:right-0",R&&"before:left-0"]),children:vt(N.column.columnDef.cell,N.getContext())},N.id)})},_.id)):e.jsx(js,{children:e.jsx(Os,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),r&&e.jsx(Hu,{table:s})]})}const wr=(s,t)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(S,{placeholder:s.placeholder,...t});break;case"textarea":a=e.jsx(vs,{placeholder:s.placeholder,...t});break;case"select":a=e.jsx("select",{className:y(Ls({variant:"outline"}),"w-full appearance-none font-normal"),...t,children:s.select_options&&Object.keys(s.select_options).map(n=>e.jsx("option",{value:n,children:s.select_options?.[n]},n))});break;default:a=null;break}return a},Ku=u.object({id:u.number().nullable(),name:u.string().min(2,"名称至少需要2个字符").max(30,"名称不能超过30个字符"),icon:u.string().optional().nullable(),notify_domain:u.string().refine(s=>!s||/^https?:\/\/\S+/.test(s),"请输入有效的URL").optional().nullable(),handling_fee_fixed:u.coerce.number().min(0).optional().nullable(),handling_fee_percent:u.coerce.number().min(0).max(100).optional().nullable(),payment:u.string().min(1,"请选择支付接口"),config:u.record(u.string(),u.string())}),za={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function _r({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=za}){const[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState([]),[h,T]=c.useState([]),C=ae({resolver:ie(Ku),defaultValues:n,mode:"onChange"}),m=C.watch("payment");c.useEffect(()=>{l&&(async()=>{const{data:v}=await qc();i(v)})()},[l]),c.useEffect(()=>{if(!m||!l)return;(async()=>{const v={payment:m,...a==="edit"&&{id:Number(C.getValues("id"))}};Uc(v).then(({data:N})=>{T(N);const P=N.reduce((f,R)=>(R.field_name&&(f[R.field_name]=R.value??""),f),{});C.setValue("config",P)})})()},[m,l,C,a]);const w=async _=>{x(!0),(await Bc(_)).data&&(A.success("保存成功"),C.reset(za),s(),o(!1)),x(!1)};return e.jsxs(ue,{open:l,onOpenChange:o,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加支付方式"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:a==="add"?"添加支付方式":"编辑支付方式"})}),e.jsx(oe,{...C,children:e.jsxs("form",{onSubmit:C.handleSubmit(w),className:"space-y-4",children:[e.jsx(g,{control:C.control,name:"name",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入支付名称",..._})}),e.jsx(F,{children:"用于前端显示"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"icon",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"图标URL"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://example.com/icon.svg",..._})}),e.jsx(F,{children:"用于前端显示的图标地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"notify_domain",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"通知域名"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://example.com",..._})}),e.jsx(F,{children:"网关通知将发送到该域名"}),e.jsx(k,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(g,{control:C.control,name:"handling_fee_percent",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"百分比手续费(%)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0-100",..._})}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"handling_fee_fixed",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"固定手续费"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0",..._})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:C.control,name:"payment",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"支付接口"}),e.jsxs(G,{value:_.value,onValueChange:_.onChange,children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择支付接口"})})}),e.jsx(B,{children:r.map(v=>e.jsx(O,{value:v,children:v},v))})]}),e.jsx(k,{})]})}),h.map(_=>e.jsx(g,{control:C.control,name:`config.${_.field_name}`,render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:_.label}),e.jsx(b,{children:wr(_,v)}),e.jsx(k,{})]})},_.field_name)),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",disabled:d,className:y(d&&"cursor-not-allowed opacity-50"),children:d?"保存中...":"提交"})]})]})})]})]})}function I({column:s,title:t,tooltip:a,className:n}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(D,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",n),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:t}),a&&e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(Ca,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(ee,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(At,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Ht,{className:"h-4 w-4 text-foreground/70"}):e.jsx(to,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",n),children:[e.jsx("span",{children:t}),a&&e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx(Ca,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(ee,{children:a})]})})]})}const qu=ao,Uu=no,Bu=ro,Cr=c.forwardRef(({className:s,...t},a)=>e.jsx(Rn,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Cr.displayName=Rn.displayName;const Sr=c.forwardRef(({className:s,...t},a)=>e.jsxs(Bu,{children:[e.jsx(Cr,{}),e.jsx(En,{ref:a,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...t})]}));Sr.displayName=En.displayName;const kr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...t});kr.displayName="AlertDialogHeader";const Dr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Dr.displayName="AlertDialogFooter";const Tr=c.forwardRef(({className:s,...t},a)=>e.jsx(Fn,{ref:a,className:y("text-lg font-semibold",s),...t}));Tr.displayName=Fn.displayName;const Pr=c.forwardRef(({className:s,...t},a)=>e.jsx(Mn,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Pr.displayName=Mn.displayName;const Ir=c.forwardRef(({className:s,...t},a)=>e.jsx(zn,{ref:a,className:y(Ls(),s),...t}));Ir.displayName=zn.displayName;const Vr=c.forwardRef(({className:s,...t},a)=>e.jsx(On,{ref:a,className:y(Ls({variant:"outline"}),"mt-2 sm:mt-0",s),...t}));Vr.displayName=On.displayName;function Ye({onConfirm:s,children:t,title:a="确认操作",description:n="确定要执行此操作吗?",cancelText:l="取消",confirmText:o="确认",variant:d="default",className:x}){return e.jsxs(qu,{children:[e.jsx(Uu,{asChild:!0,children:t}),e.jsxs(Sr,{className:y("sm:max-w-[425px]",x),children:[e.jsxs(kr,{children:[e.jsx(Tr,{children:a}),e.jsx(Pr,{children:n})]}),e.jsxs(Dr,{children:[e.jsx(Vr,{asChild:!0,children:e.jsx(D,{variant:"outline",children:l})}),e.jsx(Ir,{asChild:!0,children:e.jsx(D,{variant:d,onClick:s,children:o})})]})]})]})}const Rr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Gu=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:a})=>e.jsx(I,{column:a,title:"启用"}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("enable"),onCheckedChange:async()=>{const{data:n}=await Yc({id:a.original.id});n||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:a})=>e.jsx(I,{column:a,title:"显示名称"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:a})=>e.jsx(I,{column:a,title:"支付接口"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:a})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(I,{column:a,title:"通知地址"}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{className:"ml-1",children:e.jsx(Rr,{className:"h-4 w-4"})}),e.jsx(ee,{children:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。"})]})})]}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:a.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:a})=>e.jsx(I,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(_r,{refetch:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ye,{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",onConfirm:async()=>{const{data:n}=await Gc({id:a.original.id});n&&s()},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function Yu({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽支付方式进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_r,{refetch:t}),e.jsx(S,{placeholder:"搜索支付方式...",value:s.getColumn("name")?.getFilterValue()??"",onChange:o=>s.getColumn("name")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}function Wu(){const[s,t]=c.useState([]),[a,n]=c.useState([]),[l,o]=c.useState(!1),[d,x]=c.useState([]),[r,i]=c.useState({"drag-handle":!1}),[h,T]=c.useState({pageSize:20,pageIndex:0}),{refetch:C}=Q({queryKey:["paymentList"],queryFn:async()=>{const{data:N}=await Kc();return x(N?.map(P=>({...P,enable:!!P.enable}))||[]),N}});c.useEffect(()=>{i({"drag-handle":l}),T({pageSize:l?99999:10,pageIndex:0})},[l]);const m=(N,P)=>{l&&(N.dataTransfer.setData("text/plain",P.toString()),N.currentTarget.classList.add("opacity-50"))},w=(N,P)=>{if(!l)return;N.preventDefault(),N.currentTarget.classList.remove("bg-muted");const f=parseInt(N.dataTransfer.getData("text/plain"));if(f===P)return;const R=[...d],[z]=R.splice(f,1);R.splice(P,0,z),x(R)},_=async()=>{l?Wc({ids:d.map(N=>N.id)}).then(()=>{C(),o(!1),A.success("排序保存成功")}):o(!0)},v=Le({data:d,columns:Gu({refetch:C,isSortMode:l}),state:{sorting:a,columnFilters:s,columnVisibility:r,pagination:h},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),initialState:{columnPinning:{right:["actions"]}},pageCount:l?1:void 0});return e.jsx(Ge,{table:v,toolbar:N=>e.jsx(Yu,{table:N,refetch:C,saveOrder:_,isSortMode:l}),draggable:l,onDragStart:m,onDragEnd:N=>N.currentTarget.classList.remove("opacity-50"),onDragOver:N=>{N.preventDefault(),N.currentTarget.classList.add("bg-muted")},onDragLeave:N=>N.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!l})}function Ju(){return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"支付配置"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置支付方式,包括支付宝、微信等。"})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Wu,{})})]})]})}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Ju},Symbol.toStringTag,{value:"Module"}));function Zu({themeKey:s,themeInfo:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(!1),[d,x]=c.useState(!1),r=ae({defaultValues:t.configs.reduce((T,C)=>(T[C.field_name]="",T),{})}),i=async()=>{o(!0),Tc(s).then(({data:T})=>{Object.entries(T).forEach(([C,m])=>{r.setValue(C,m)})}).finally(()=>{o(!1)})},h=async T=>{x(!0),Pc(s,T).then(()=>{A.success("保存成功"),n(!1)}).finally(()=>{x(!1)})};return e.jsxs(ue,{open:a,onOpenChange:T=>{n(T),T?i():r.reset()},children:[e.jsx(Re,{asChild:!0,children:e.jsx(D,{variant:"outline",children:"主题设置"})}),e.jsxs(ce,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsxs(xe,{children:["配置",t.name,"主题"]}),e.jsx(Se,{children:"修改主题的样式、布局和其他显示选项。"})]}),l?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(sa,{className:"h-6 w-6 animate-spin"})}):e.jsx(oe,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(h),className:"space-y-4",children:[t.configs.map(T=>e.jsx(g,{control:r.control,name:T.field_name,render:({field:C})=>e.jsxs(j,{children:[e.jsx(p,{children:T.label}),e.jsx(b,{children:wr(T,C)}),e.jsx(k,{})]})},T.field_name)),e.jsxs(Ee,{className:"mt-6 gap-2",children:[e.jsx(D,{type:"button",variant:"secondary",onClick:()=>n(!1),children:"取消"}),e.jsx(D,{type:"submit",loading:d,children:"保存"})]})]})})]})]})}function Xu(){const[s,t]=c.useState(null),[a,n]=c.useState(!1),[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState(null),h=c.useRef(null),[T,C]=c.useState(0),{data:m,isLoading:w,refetch:_}=Q({queryKey:["themeList"],queryFn:async()=>{const{data:E}=await Dc();return E}}),v=async E=>{t(E),Rc({frontend_theme:E}).then(()=>{A.success("主题切换成功"),_()}).finally(()=>{t(null)})},N=async E=>{if(!E.name.endsWith(".zip")){A.error("只支持上传 ZIP 格式的主题文件");return}n(!0),Ic(E).then(()=>{A.success("主题上传成功"),o(!1),_()}).finally(()=>{n(!1),h.current&&(h.current.value="")})},P=E=>{E.preventDefault(),E.stopPropagation(),E.type==="dragenter"||E.type==="dragover"?x(!0):E.type==="dragleave"&&x(!1)},f=E=>{E.preventDefault(),E.stopPropagation(),x(!1),E.dataTransfer.files&&E.dataTransfer.files[0]&&N(E.dataTransfer.files[0])},R=()=>{r&&C(E=>E===0?r.images.length-1:E-1)},z=()=>{r&&C(E=>E===r.images.length-1?0:E+1)},$=(E,K)=>{C(0),i({name:E,images:K})};return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"主题配置"})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。"}),e.jsxs(D,{onClick:()=>o(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Sa,{className:"mr-2 h-4 w-4"}),"上传主题"]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:w?e.jsxs(e.Fragment,{children:[e.jsx(Oa,{}),e.jsx(Oa,{})]}):m?.themes&&Object.entries(m.themes).map(([E,K])=>e.jsx(Ie,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:K.background_url?`url(${K.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",K.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!K.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Ye,{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",confirmText:"删除",variant:"destructive",onConfirm:async()=>{if(E===m?.active){A.error("不能删除当前使用的主题");return}t(E),Vc(E).then(()=>{A.success("主题删除成功"),_()}).finally(()=>{t(null)})},children:e.jsx(D,{disabled:s===E,loading:s===E,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(rs,{className:"h-4 w-4"})})})}),e.jsxs(ze,{children:[e.jsx(Qe,{children:K.name}),e.jsx(Zs,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:K.description}),K.version&&e.jsxs("div",{className:"text-sm text-muted-foreground",children:["版本: ",K.version]})]})})]}),e.jsxs(Oe,{className:"flex items-center justify-end space-x-3",children:[K.images&&Array.isArray(K.images)&&K.images.length>0&&e.jsx(D,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>$(K.name,K.images),children:e.jsx(lo,{className:"h-4 w-4"})}),e.jsx(Zu,{themeKey:E,themeInfo:K}),e.jsx(D,{onClick:()=>v(E),disabled:s===E||E===m.active,loading:s===E,variant:E===m.active?"secondary":"default",children:E===m.active?"当前主题":"激活主题"})]})]})},E))}),e.jsx(ue,{open:l,onOpenChange:o,children:e.jsxs(ce,{className:"sm:max-w-md",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"上传主题"}),e.jsx(Se,{children:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。"})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",d&&"border-primary/50 bg-muted/50"),onDragEnter:P,onDragLeave:P,onDragOver:P,onDrop:f,children:[e.jsx("input",{type:"file",ref:h,className:"hidden",accept:".zip",onChange:E=>{const K=E.target.files?.[0];K&&N(K)}}),a?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"正在上传..."})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Sa,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:["将主题文件拖放到此处,或者",e.jsx("button",{type:"button",onClick:()=>h.current?.click(),className:"mx-1 text-primary hover:underline",children:"点击选择"})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"支持 .zip 格式的主题包"})]})]})})]})]})}),e.jsx(ue,{open:!!r,onOpenChange:E=>{E||(i(null),C(0))},children:e.jsxs(ce,{className:"max-w-4xl",children:[e.jsxs(je,{children:[e.jsxs(xe,{children:[r?.name," 主题预览"]}),e.jsx(Se,{className:"text-center",children:r&&`${T+1} / ${r.images.length}`})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:r?.images[T]&&e.jsx("img",{src:r.images[T],alt:`${r.name} 预览图 ${T+1}`,className:"h-full w-full object-contain"})}),r&&r.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(D,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:R,children:e.jsx(io,{className:"h-4 w-4"})}),e.jsx(D,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:z,children:e.jsx(oo,{className:"h-4 w-4"})})]})]}),r&&r.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:r.images.map((E,K)=>e.jsx("button",{onClick:()=>C(K),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",T===K?"border-primary":"border-transparent"),children:e.jsx("img",{src:E,alt:`缩略图 ${K+1}`,className:"h-full w-full object-cover"})},K))})]})})]})]})}function Oa(){return e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsx(Fe,{className:"h-6 w-[200px]"}),e.jsx(Fe,{className:"h-4 w-[300px]"})]}),e.jsxs(Oe,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Fe,{className:"h-10 w-[100px]"}),e.jsx(Fe,{className:"h-10 w-[100px]"})]})]})}const ex=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),ua=c.forwardRef(({className:s,value:t,onChange:a,...n},l)=>{const[o,d]=c.useState("");c.useEffect(()=>{if(o.includes(",")){const r=new Set([...t,...o.split(",").map(i=>i.trim())]);a(Array.from(r)),d("")}},[o,a,t]);const x=()=>{if(o){const r=new Set([...t,o]);a(Array.from(r)),d("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[t.map(r=>e.jsxs(L,{variant:"secondary",children:[r,e.jsx(W,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(t.filter(i=>i!==r))},children:e.jsx(Kt,{className:"w-3"})})]},r)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:o,onChange:r=>d(r.target.value),onKeyDown:r=>{r.key==="Enter"||r.key===","?(r.preventDefault(),x()):r.key==="Backspace"&&o.length===0&&t.length>0&&(r.preventDefault(),a(t.slice(0,-1)))},...n,ref:l})]})});ua.displayName="InputTags";const sx=u.object({id:u.number().nullable(),title:u.string().min(1).max(250),content:u.string().min(1),show:u.boolean(),tags:u.array(u.string()),img_url:u.string().nullable()}),tx={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Er({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=tx}){const[l,o]=c.useState(!1),d=ae({resolver:ie(sx),defaultValues:n,mode:"onChange",shouldFocusError:!0}),x=new ta({html:!0});return e.jsx(oe,{...d,children:e.jsxs(ue,{onOpenChange:o,open:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加公告"})]})}),e.jsxs(ce,{className:"sm:max-w-[1025px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a==="add"?"添加公告":"编辑公告"}),e.jsx(Se,{})]}),e.jsx(g,{control:d.control,name:"title",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入公告标题",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"content",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"公告内容"}),e.jsx(b,{children:e.jsx(aa,{style:{height:"500px"},value:r.value,renderHTML:i=>x.render(i),onChange:({text:i})=>{r.onChange(i)}})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"img_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"公告背景"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入公告背景图片URL",...r,value:r.value||""})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"show",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:r.onChange})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"tags",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点标签"}),e.jsx(b,{children:e.jsx(ua,{value:r.value,onChange:r.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:r=>{r.preventDefault(),d.handleSubmit(async i=>{try{(await Qc(i)).data&&(await s(),o(!1))}catch(h){console.error("Failed to save notice:",h)}})()},children:"提交"})]})]})]})})}function ax({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!n&&e.jsx(Er,{refetch:t}),!n&&e.jsx(S,{placeholder:"搜索公告标题...",value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),l&&!n&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,className:"h-8",size:"sm",children:n?"保存排序":"编辑排序"})})]})}const nx=s=>[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(co,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(L,{variant:"outline",className:"font-mono",children:t.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显示状态"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:t.getValue("show"),onCheckedChange:async()=>{const{data:a}=await Xc({id:t.original.id});a||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:t})=>e.jsx(I,{column:t,title:"标题"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:t.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Er,{refetch:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:t.original}),e.jsx(Ye,{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",onConfirm:async()=>{Zc({id:t.original.id}).then(()=>{A.success("删除成功"),s()})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function rx(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState(!1),[h,T]=c.useState({}),[C,m]=c.useState({pageSize:50,pageIndex:0}),[w,_]=c.useState([]),{refetch:v}=Q({queryKey:["notices"],queryFn:async()=>{const{data:z}=await Jc();return _(z),z}});c.useEffect(()=>{n({"drag-handle":r,content:!r,created_at:!r,actions:!r}),m({pageSize:r?99999:50,pageIndex:0})},[r]);const N=(z,$)=>{r&&(z.dataTransfer.setData("text/plain",$.toString()),z.currentTarget.classList.add("opacity-50"))},P=(z,$)=>{if(!r)return;z.preventDefault(),z.currentTarget.classList.remove("bg-muted");const E=parseInt(z.dataTransfer.getData("text/plain"));if(E===$)return;const K=[...w],[ds]=K.splice(E,1);K.splice($,0,ds),_(K)},f=async()=>{if(!r){i(!0);return}kd(w.map(z=>z.id)).then(()=>{A.success("排序保存成功"),i(!1),v()}).finally(()=>{i(!1)})},R=Le({data:w??[],columns:nx(v),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,columnSizing:h,pagination:C},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,onColumnSizingChange:T,onPaginationChange:m,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:R,toolbar:z=>e.jsx(ax,{table:z,refetch:v,saveOrder:f,isSortMode:r}),draggable:r,onDragStart:N,onDragEnd:z=>z.currentTarget.classList.remove("opacity-50"),onDragOver:z=>{z.preventDefault(),z.currentTarget.classList.add("bg-muted")},onDragLeave:z=>z.currentTarget.classList.remove("bg-muted"),onDrop:P,showPagination:!r})})}function lx(){return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"公告管理"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置公告,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(rx,{})})]})]})}const ix=Object.freeze(Object.defineProperty({__proto__:null,default:lx},Symbol.toStringTag,{value:"Module"})),ox=u.object({id:u.number().nullable(),language:u.string().max(250),category:u.string().max(250),title:u.string().min(1).max(250),body:u.string().min(1),show:u.boolean()}),cx={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Fr({refreshData:s,dialogTrigger:t,type:a="add",defaultFormValues:n=cx}){const[l,o]=c.useState(!1),d=ae({resolver:ie(ox),defaultValues:n,mode:"onChange",shouldFocusError:!0}),x=new ta({html:!0});return c.useEffect(()=>{l&&n.id&&sd(n.id).then(({data:r})=>{d.reset(r)})},[n.id,d,l]),e.jsxs(ue,{onOpenChange:o,open:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加知识"})]})}),e.jsxs(ce,{className:"sm:max-w-[1025px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a==="add"?"添加知识":"编辑知识"}),e.jsx(Se,{})]}),e.jsxs(oe,{...d,children:[e.jsx(g,{control:d.control,name:"title",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入知识标题",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"category",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"分类"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入分类,分类将会自动归类",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"language",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"语言"}),e.jsx(b,{children:e.jsxs(G,{value:r.value,onValueChange:r.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择语言"})}),e.jsx(B,{children:[{field:"English",value:"en-US"},{field:"日本語",value:"ja-JP"},{field:"한국어",value:"ko-KR"},{field:"Tiếng Việt",value:"vi-VN"},{field:"简体中文",value:"zh-CN"},{field:"繁體中文",value:"zh-TW"}].map(i=>e.jsx(O,{value:i.value,className:"cursor-pointer",children:i.field},i.value))})]})})]})}),e.jsx(g,{control:d.control,name:"body",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"内容"}),e.jsx(b,{children:e.jsx(aa,{style:{height:"500px"},value:r.value,renderHTML:i=>x.render(i),onChange:({text:i})=>{r.onChange(i)}})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"show",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:r.onChange})})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:()=>{d.handleSubmit(r=>{td(r).then(({data:i})=>{i&&(d.reset(),A.success("操作成功"),o(!1),s())})})()},children:"提交"})]})]})]})]})}function dx({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function ux({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽知识条目进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Fr,{refreshData:t}),e.jsx(S,{placeholder:"搜索知识...",value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(dx,{column:s.getColumn("category"),title:"分类",options:Array.from(new Set(s.getCoreRowModel().rows.map(o=>o.getValue("category")))).map(o=>({label:o,value:o}))}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}const xx=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",className:"justify-center",children:a.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:a})=>e.jsx(I,{column:a,title:"状态"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{nd({id:a.original.id}).then(({data:n})=>{n||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(I,{column:a,title:"标题"}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:a.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:a})=>e.jsx(I,{column:a,title:"分类"}),cell:({row:a})=>e.jsx(L,{variant:"secondary",className:"max-w-[180px] truncate",children:a.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:a})=>e.jsx(I,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Fr,{refreshData:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{ad({id:a.original.id}).then(({data:n})=>{n&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function mx(){const[s,t]=c.useState([]),[a,n]=c.useState([]),[l,o]=c.useState(!1),[d,x]=c.useState([]),[r,i]=c.useState({"drag-handle":!1}),[h,T]=c.useState({pageSize:20,pageIndex:0}),{refetch:C,isLoading:m,data:w}=Q({queryKey:["knowledge"],queryFn:async()=>{const{data:f}=await ed();return x(f||[]),f}});c.useEffect(()=>{i({"drag-handle":l}),T({pageSize:l?99999:10,pageIndex:0})},[l]);const _=(f,R)=>{l&&(f.dataTransfer.setData("text/plain",R.toString()),f.currentTarget.classList.add("opacity-50"))},v=(f,R)=>{if(!l)return;f.preventDefault(),f.currentTarget.classList.remove("bg-muted");const z=parseInt(f.dataTransfer.getData("text/plain"));if(z===R)return;const $=[...d],[E]=$.splice(z,1);$.splice(R,0,E),x($)},N=async()=>{l?rd({ids:d.map(f=>f.id)}).then(()=>{C(),o(!1),A.success("排序保存成功")}):o(!0)},P=Le({data:d,columns:xx({refetch:C,isSortMode:l}),state:{sorting:a,columnFilters:s,columnVisibility:r,pagination:h},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:P,toolbar:f=>e.jsx(ux,{table:f,refetch:C,saveOrder:N,isSortMode:l}),draggable:l,onDragStart:_,onDragEnd:f=>f.currentTarget.classList.remove("opacity-50"),onDragOver:f=>{f.preventDefault(),f.currentTarget.classList.add("bg-muted")},onDragLeave:f=>f.currentTarget.classList.remove("bg-muted"),onDrop:v,showPagination:!l})}function hx(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"知识库管理"}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置知识库,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(mx,{})})]})]})}const jx=Object.freeze(Object.defineProperty({__proto__:null,default:hx},Symbol.toStringTag,{value:"Module"}));function gx(s,t){const[a,n]=c.useState(s);return c.useEffect(()=>{const l=setTimeout(()=>n(s),t);return()=>{clearTimeout(l)}},[s,t]),a}function Ot(s,t){if(s.length===0)return{};if(!t)return{"":s};const a={};return s.forEach(n=>{const l=n[t]||"";a[l]||(a[l]=[]),a[l].push(n)}),a}function fx(s,t){const a=JSON.parse(JSON.stringify(s));for(const[n,l]of Object.entries(a))a[n]=l.filter(o=>!t.find(d=>d.value===o.value));return a}function px(s,t){for(const[,a]of Object.entries(s))if(a.some(n=>t.find(l=>l.value===n.value)))return!0;return!1}const Mr=c.forwardRef(({className:s,...t},a)=>uo(l=>l.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...t}):null);Mr.displayName="CommandEmpty";const at=c.forwardRef(({value:s,onChange:t,placeholder:a,defaultOptions:n=[],options:l,delay:o,onSearch:d,loadingIndicator:x,emptyIndicator:r,maxSelected:i=Number.MAX_SAFE_INTEGER,onMaxSelected:h,hidePlaceholderWhenSelected:T,disabled:C,groupBy:m,className:w,badgeClassName:_,selectFirstItem:v=!0,creatable:N=!1,triggerSearchOnFocus:P=!1,commandProps:f,inputProps:R,hideClearAllButton:z=!1},$)=>{const E=c.useRef(null),[K,ds]=c.useState(!1),Hs=c.useRef(!1),[fa,pa]=c.useState(!1),[J,Ks]=c.useState(s||[]),[bs,va]=c.useState(Ot(n,m)),[us,Ft]=c.useState(""),qs=gx(us,o||500);c.useImperativeHandle($,()=>({selectedValue:[...J],input:E.current,focus:()=>E.current?.focus()}),[J]);const ot=c.useCallback(q=>{const Z=J.filter(Ce=>Ce.value!==q.value);Ks(Z),t?.(Z)},[t,J]),il=c.useCallback(q=>{const Z=E.current;Z&&((q.key==="Delete"||q.key==="Backspace")&&Z.value===""&&J.length>0&&(J[J.length-1].fixed||ot(J[J.length-1])),q.key==="Escape"&&Z.blur())},[ot,J]);c.useEffect(()=>{s&&Ks(s)},[s]),c.useEffect(()=>{if(!l||d)return;const q=Ot(l||[],m);JSON.stringify(q)!==JSON.stringify(bs)&&va(q)},[n,l,m,d,bs]),c.useEffect(()=>{const q=async()=>{pa(!0);const Ce=await d?.(qs);va(Ot(Ce||[],m)),pa(!1)};(async()=>{!d||!K||(P&&await q(),qs&&await q())})()},[qs,m,K,P]);const ol=()=>{if(!N||px(bs,[{value:us,label:us}])||J.find(Z=>Z.value===us))return;const q=e.jsx(be,{value:us,className:"cursor-pointer",onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation()},onSelect:Z=>{if(J.length>=i){h?.(J.length);return}Ft("");const Ce=[...J,{value:Z,label:Z}];Ks(Ce),t?.(Ce)},children:`Create "${us}"`});if(!d&&us.length>0||d&&qs.length>0&&!fa)return q},cl=c.useCallback(()=>{if(r)return d&&!N&&Object.keys(bs).length===0?e.jsx(be,{value:"-",disabled:!0,children:r}):e.jsx(Mr,{children:r})},[N,r,d,bs]),dl=c.useMemo(()=>fx(bs,J),[bs,J]),ul=c.useCallback(()=>{if(f?.filter)return f.filter;if(N)return(q,Z)=>q.toLowerCase().includes(Z.toLowerCase())?1:-1},[N,f?.filter]),xl=c.useCallback(()=>{const q=J.filter(Z=>Z.fixed);Ks(q),t?.(q)},[t,J]);return e.jsxs(fs,{...f,onKeyDown:q=>{il(q),f?.onKeyDown?.(q)},className:y("h-auto overflow-visible bg-transparent",f?.className),shouldFilter:f?.shouldFilter!==void 0?f.shouldFilter:!d,filter:ul(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":J.length!==0,"cursor-text":!C&&J.length!==0},w),onClick:()=>{C||E.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[J.map(q=>e.jsxs(L,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",_),"data-fixed":q.fixed,"data-disabled":C||void 0,children:[q.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(C||q.fixed)&&"hidden"),onKeyDown:Z=>{Z.key==="Enter"&&ot(q)},onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:()=>ot(q),children:e.jsx(Kt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},q.value)),e.jsx(we.Input,{...R,ref:E,value:us,disabled:C,onValueChange:q=>{Ft(q),R?.onValueChange?.(q)},onBlur:q=>{Hs.current===!1&&ds(!1),R?.onBlur?.(q)},onFocus:q=>{ds(!0),P&&d?.(qs),R?.onFocus?.(q)},placeholder:T&&J.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":T,"px-3 py-2":J.length===0,"ml-1":J.length!==0},R?.className)}),e.jsx("button",{type:"button",onClick:xl,className:y((z||C||J.length<1||J.filter(q=>q.fixed).length===J.length)&&"hidden"),children:e.jsx(Kt,{})})]})}),e.jsx("div",{className:"relative",children:K&&e.jsx(ps,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Hs.current=!1},onMouseEnter:()=>{Hs.current=!0},onMouseUp:()=>{E.current?.focus()},children:fa?e.jsx(e.Fragment,{children:x}):e.jsxs(e.Fragment,{children:[cl(),ol(),!v&&e.jsx(be,{value:"-",className:"hidden"}),Object.entries(dl).map(([q,Z])=>e.jsx(Ve,{heading:q,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:Z.map(Ce=>e.jsx(be,{value:Ce.value,disabled:Ce.disable,onMouseDown:Us=>{Us.preventDefault(),Us.stopPropagation()},onSelect:()=>{if(J.length>=i){h?.(J.length);return}Ft("");const Us=[...J,Ce];Ks(Us),t?.(Us)},className:y("cursor-pointer",Ce.disable&&"cursor-default text-muted-foreground"),children:Ce.label},Ce.value))})},q))]})})})]})});at.displayName="MultipleSelector";const vx=u.object({id:u.number().optional(),name:u.string().min(2,"组名至少需要2个字符").max(50,"组名不能超过50个字符").regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,"组名只能包含字母、数字、中文、下划线和连字符")});function Et({refetch:s,dialogTrigger:t,defaultValues:a={name:""},type:n="add"}){const l=ae({resolver:ie(vx),defaultValues:a,mode:"onChange"}),[o,d]=c.useState(!1),[x,r]=c.useState(!1),i=async h=>{r(!0),Lc(h).then(()=>{A.success(n==="edit"?"更新成功":"创建成功"),s&&s(),l.reset(),d(!1)}).finally(()=>{r(!1)})};return e.jsxs(ue,{open:o,onOpenChange:d,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("span",{children:"添加权限组"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:n==="edit"?"编辑权限组":"创建权限组"}),e.jsx(Se,{children:n==="edit"?"修改权限组信息,更新后会立即生效。":"创建新的权限组,可以为不同的用户分配不同的权限。"})]}),e.jsx(oe,{...l,children:e.jsxs("form",{onSubmit:l.handleSubmit(i),className:"space-y-4",children:[e.jsx(g,{control:l.control,name:"name",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{children:"组名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入权限组名称",...h,className:"w-full"})}),e.jsx(F,{children:"权限组名称用于标识不同的用户组,建议使用有意义的名称。"}),e.jsx(k,{})]})}),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsxs(D,{type:"submit",disabled:x||!l.formState.isValid,children:[x&&e.jsx(sa,{className:"mr-2 h-4 w-4 animate-spin"}),n==="edit"?"更新":"创建"]})]})]})})]})]})}const zr=c.createContext(void 0);function bx({children:s,refetch:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null),[d,x]=c.useState(pe.Shadowsocks);return e.jsx(zr.Provider,{value:{isOpen:a,setIsOpen:n,editingServer:l,setEditingServer:o,serverType:d,setServerType:x,refetch:t},children:s})}function Or(){const s=c.useContext(zr);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Lt({dialogTrigger:s,value:t,setValue:a,templateType:n}){c.useEffect(()=>{console.log(t)},[t]);const[l,o]=c.useState(!1),[d,x]=c.useState(()=>{if(!t||Object.keys(t).length===0)return"";try{return JSON.stringify(t,null,2)}catch{return""}}),[r,i]=c.useState(null),h=v=>{if(!v)return null;try{const N=JSON.parse(v);return typeof N!="object"||N===null?"配置必须是一个JSON对象":null}catch{return"无效的JSON格式"}},T={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},C=()=>{switch(n){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},m=()=>{const v=h(d||"");if(v){A.error(v);return}try{if(!d){a(null),o(!1);return}a(JSON.parse(d)),o(!1)}catch{A.error("保存时发生错误")}},w=v=>{x(v),i(h(v))},_=v=>{const N=T[v];if(N){const P=JSON.stringify(N.content,null,2);x(P),i(null)}};return c.useEffect(()=>{l&&console.log(t)},[l,t]),c.useEffect(()=>{l&&t&&Object.keys(t).length>0&&x(JSON.stringify(t,null,2))},[l,t]),e.jsxs(ue,{open:l,onOpenChange:v=>{!v&&l&&m(),o(v)},children:[e.jsx(Re,{asChild:!0,children:s??e.jsx(W,{variant:"link",children:"编辑协议"})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:"编辑协议配置"})}),e.jsxs("div",{className:"space-y-4",children:[C().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:C().map(v=>e.jsxs(W,{variant:"outline",size:"sm",onClick:()=>_(v),children:["使用",T[v].label,"模板"]},v))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(vs,{className:`min-h-[200px] font-mono text-sm ${r?"border-red-500 focus-visible:ring-red-500":""}`,value:d,placeholder:`请输入JSON配置${C().length>0?"或选择上方模板":""}`,onChange:v=>w(v.target.value)}),r&&e.jsx("p",{className:"text-sm text-red-500",children:r})]})]}),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(W,{variant:"outline",onClick:()=>o(!1),children:"取消"}),e.jsx(W,{onClick:m,disabled:!!r,children:"确定"})]})]})]})}function vh(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const yx={},Nx=Object.freeze(Object.defineProperty({__proto__:null,default:yx},Symbol.toStringTag,{value:"Module"})),bh=wo(Nx),La=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),wx=()=>{try{const s=xo.box.keyPair(),t=La(ka.encodeBase64(s.secretKey)),a=La(ka.encodeBase64(s.publicKey));return{privateKey:t,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},_x=()=>{try{return wx()}catch(s){throw console.error("Error generating key pair:",s),s}},Cx=s=>{const t=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(t),Array.from(t).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},Sx=()=>{const s=Math.floor(Math.random()*8)*2+2;return Cx(s)},kx=u.object({cipher:u.string().default("aes-128-gcm"),obfs:u.string().default("0"),obfs_settings:u.object({path:u.string().default(""),host:u.string().default("")}).default({})}),Dx=u.object({tls:u.coerce.number().default(0),tls_settings:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({})}),Tx=u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({})}),Px=u.object({version:u.coerce.number().default(2),alpn:u.string().default("h2"),obfs:u.object({open:u.coerce.boolean().default(!1),type:u.string().default("salamander"),password:u.string().default("")}).default({}),tls:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),bandwidth:u.object({up:u.string().default(""),down:u.string().default("")}).default({})}),Ix=u.object({tls:u.coerce.number().default(0),tls_settings:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),reality_settings:u.object({server_port:u.coerce.number().default(443),server_name:u.string().default(""),allow_insecure:u.boolean().default(!1),public_key:u.string().default(""),private_key:u.string().default(""),short_id:u.string().default("")}).default({}),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({}),flow:u.string().default("")}),es={shadowsocks:{schema:kx,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:Dx,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:Tx,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:Px,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:Ix,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},Vx=({serverType:s,value:t,onChange:a})=>{const n=s?es[s]:null,l=n?.schema||u.record(u.any()),o=s?l.parse({}):{},d=ae({resolver:ie(l),defaultValues:o,mode:"onChange"});return c.useEffect(()=>{if(!t||Object.keys(t).length===0){if(s){const m=l.parse({});d.reset(m)}}else d.reset(t)},[s,t,a,d,l]),c.useEffect(()=>{const m=d.watch(w=>{a(w)});return()=>m.unsubscribe()},[d,a]),!s||!n?null:{shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"cipher",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"加密算法"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择加密算法"})}),e.jsx(B,{children:e.jsx(xs,{children:es.shadowsocks.ciphers.map(w=>e.jsx(O,{value:w,children:w},w))})})]})})]})}),e.jsx(g,{control:d.control,name:"obfs",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"混淆"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆方式"})}),e.jsx(B,{children:e.jsxs(xs,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"http",children:"HTTP"})]})})]})})]})}),d.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"obfs_settings.path",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"路径",...m})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"obfs_settings.host",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"Host",...m})}),e.jsx(k,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"tls",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"TLS"}),e.jsx(b,{children:e.jsxs(G,{value:m.value?.toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不支持"}),e.jsx(O,{value:"1",children:"支持"})]})]})})]})}),d.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"不使用请留空",...m})})]})}),e.jsx(g,{control:d.control,name:"tls_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings"),setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.vmess.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"当节点地址于证书不一致时用于证书验证",...m,value:m.value||""})})]})}),e.jsx(g,{control:d.control,name:"allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings")||{},setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")||"tcp"})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value||"tcp",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.trojan.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"version",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"协议版本"}),e.jsx(b,{children:e.jsxs(G,{value:(m.value||2).toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"协议版本"})}),e.jsx(B,{children:e.jsx(xs,{children:es.hysteria.versions.map(w=>e.jsxs(O,{value:w,className:"cursor-pointer",children:["V",w]},w))})})]})})]})}),d.watch("version")==1&&e.jsx(g,{control:d.control,name:"alpn",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"ALPN"}),e.jsx(b,{children:e.jsxs(G,{value:m.value||"h2",onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"ALPN"})}),e.jsx(B,{children:e.jsx(xs,{children:es.hysteria.alpnOptions.map(w=>e.jsx(O,{value:w,children:w},w))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"obfs.open",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"混淆"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})}),!!d.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[d.watch("version")=="2"&&e.jsx(g,{control:d.control,name:"obfs.type",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"混淆实现"}),e.jsx(b,{children:e.jsxs(G,{value:m.value||"salamander",onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆实现"})}),e.jsx(B,{children:e.jsx(xs,{children:e.jsx(O,{value:"salamander",children:"Salamander"})})})]})})]})}),e.jsx(g,{control:d.control,name:"obfs.password",render:({field:m})=>e.jsxs(j,{className:d.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(p,{children:"混淆密码"}),e.jsxs("div",{className:"relative",children:[e.jsx(b,{children:e.jsx(S,{placeholder:"请输入混淆密码",...m,value:m.value||"",className:"pr-9"})}),e.jsx(W,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",_=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(v=>w[v%w.length]).join("");d.setValue("obfs.password",_),A.success("混淆密码生成成功")},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(ve,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"当节点地址于证书不一致时用于证书验证",...m,value:m.value||""})})]})}),e.jsx(g,{control:d.control,name:"tls.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"bandwidth.up",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"上行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入上行宽带"+(d.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...m,value:m.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})}),e.jsx(g,{control:d.control,name:"bandwidth.down",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"下行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入下行宽带"+(d.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...m,value:m.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"tls",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"安全性"}),e.jsx(b,{children:e.jsxs(G,{value:m.value?.toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"1",children:"TLS"}),e.jsx(O,{value:"2",children:"Reality"})]})]})})]})}),d.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"不使用请留空",...m})})]})}),e.jsx(g,{control:d.control,name:"tls_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),d.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"reality_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"伪装站点(dest)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"例如:example.com",...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.server_port",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"端口(port)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"例如:443",...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx(g,{control:d.control,name:"reality_settings.private_key",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"私钥(Private key)"}),e.jsx(b,{children:e.jsx(S,{...m})})]})}),e.jsxs(W,{variant:"outline",className:"",onClick:()=>{try{const m=_x();d.setValue("reality_settings.private_key",m.privateKey),d.setValue("reality_settings.public_key",m.publicKey),A.success("密钥对生成成功")}catch{A.error("生成密钥对失败")}},children:[e.jsx(ve,{icon:"ion:key-outline",className:"mr-2 h-4 w-4"}),"生成密钥对"]})]}),e.jsx(g,{control:d.control,name:"reality_settings.public_key",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"公钥(Public key)"}),e.jsx(b,{children:e.jsx(S,{...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.short_id",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"Short ID"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(b,{children:e.jsx(S,{...m,placeholder:"可留空,长度为2的倍数,最长16位"})}),e.jsxs(W,{variant:"outline",onClick:()=>{const w=Sx();d.setValue("reality_settings.short_id",w),A.success("Short ID 生成成功")},children:[e.jsx(ve,{icon:"ion:refresh-outline",className:"mr-2 h-4 w-4"}),"生成"]})]}),e.jsx(F,{className:"text-xs text-muted-foreground",children:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符"})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings"),setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.vless.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})}),e.jsx(g,{control:d.control,name:"flow",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"流控"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:w=>m.onChange(w==="none"?null:w),value:m.value||"none",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流控"})}),e.jsx(B,{children:es.vless.flowOptions.map(w=>e.jsx(O,{value:w,children:w},w))})]})})]})})]})}[s]?.()},Rx=u.object({id:u.number().optional().nullable(),code:u.string().optional(),name:u.string().min(1,"Please enter a valid name."),rate:u.string().min(1,"Please enter a valid rate."),tags:u.array(u.string()).default([]),excludes:u.array(u.string()).default([]),ips:u.array(u.string()).default([]),group_ids:u.array(u.string()).default([]),host:u.string().min(1,"Please enter a valid host."),port:u.string().min(1,"Please enter a valid port."),server_port:u.string().min(1,"Please enter a valid server port."),parent_id:u.string().default("0").nullable(),route_ids:u.array(u.string()).default([]),protocol_settings:u.record(u.any()).default({}).nullable()}),xt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function Ex(){const{isOpen:s,setIsOpen:t,editingServer:a,setEditingServer:n,serverType:l,setServerType:o,refetch:d}=Or(),[x,r]=c.useState([]),[i,h]=c.useState([]),[T,C]=c.useState([]),m=ae({resolver:ie(Rx),defaultValues:xt,mode:"onChange"});c.useEffect(()=>{w()},[s]),c.useEffect(()=>{a?.type&&a.type!==l&&o(a.type)},[a,l,o]),c.useEffect(()=>{a?a.type===l&&m.reset({...xt,...a}):m.reset({...xt,protocol_settings:es[l].schema.parse({})})},[a,m,l]);const w=async()=>{if(!s)return;const[f,R,z]=await Promise.all([Vt(),hr(),mr()]);r(f.data?.map($=>({label:$.name,value:$.id.toString()}))||[]),h(R.data?.map($=>({label:$.remarks,value:$.id.toString()}))||[]),C(z.data||[])},_=c.useMemo(()=>T?.filter(f=>(f.parent_id===0||f.parent_id===null)&&f.type===l&&f.id!==m.watch("id")),[l,T,m]),v=()=>e.jsxs(Ns,{children:[e.jsx(ws,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加节点"})]})}),e.jsx(gs,{align:"start",children:e.jsx(lc,{children:ys.map(({type:f,label:R})=>e.jsx(he,{onClick:()=>{o(f),t(!0)},className:"cursor-pointer",children:e.jsx(L,{variant:"outline",className:"text-white",style:{background:ts[f]},children:R})},f))})})]}),N=()=>{t(!1),n(null),m.reset(xt)},P=async()=>{const f=m.getValues();(await Ec({...f,type:l})).data&&(N(),A.success("提交成功"),d())};return e.jsxs(ue,{open:s,onOpenChange:N,children:[v(),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a?"编辑节点":"新建节点"}),e.jsx(Se,{})]}),e.jsxs(oe,{...m,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:m.control,name:"name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"节点名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入节点名称",...f})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"rate",render:({field:f})=>e.jsxs(j,{className:"flex-[1]",children:[e.jsx(p,{children:"倍率"}),e.jsx("div",{className:"relative flex",children:e.jsx(b,{children:e.jsx(S,{type:"number",min:"0",step:"0.1",...f})})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:m.control,name:"code",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(p,{children:["自定义节点ID",e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(选填)"})]}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入自定义节点ID",...f,value:f.value||""})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"tags",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点标签"}),e.jsx(b,{children:e.jsx(ua,{value:f.value,onChange:f.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"group_ids",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center justify-between",children:["权限组",e.jsx(Et,{dialogTrigger:e.jsx(D,{variant:"link",children:"添加权限组"}),refetch:w})]}),e.jsx(b,{children:e.jsx(at,{options:x,onChange:R=>f.onChange(R.map(z=>z.value)),value:x?.filter(R=>f.value.includes(R.value)),placeholder:"请选择权限组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(k,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:m.control,name:"host",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入节点域名或者IP",...f})}),e.jsx(k,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(g,{control:m.control,name:"port",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(p,{className:"flex items-center gap-1.5",children:["连接端口",e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(ee,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。"})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{children:e.jsx(S,{placeholder:"用户连接端口",...f})}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const R=f.value;R&&m.setValue("server_port",R)},children:e.jsx(ve,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(ee,{side:"right",children:e.jsx("p",{children:"同步到服务端口"})})]})})]}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"server_port",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(p,{className:"flex items-center gap-1.5",children:["服务端口",e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(ee,{side:"top",className:"max-w-80 p-3",children:e.jsx("p",{children:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"})})]})})]}),e.jsx(b,{children:e.jsx(S,{placeholder:"服务端开放端口",...f})}),e.jsx(k,{})]})})]})]}),s&&e.jsx(Vx,{serverType:l,value:m.watch("protocol_settings"),onChange:f=>m.setValue("protocol_settings",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(g,{control:m.control,name:"parent_id",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"父节点"}),e.jsxs(G,{onValueChange:f.onChange,value:f.value?.toString()||"0",children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择父节点"})})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"无"}),_?.map(R=>e.jsx(O,{value:R.id.toString(),className:"cursor-pointer",children:R.name},R.id))]})]}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"route_ids",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"路由组"}),e.jsx(b,{children:e.jsx(at,{options:i,onChange:R=>f.onChange(R.map(z=>z.value)),value:i?.filter(R=>f.value.includes(R.value)),placeholder:"选择路由组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(k,{})]})})]}),e.jsxs(Ee,{className:"mt-6",children:[e.jsx(D,{type:"button",variant:"outline",onClick:N,children:"取消"}),e.jsx(D,{type:"submit",onClick:P,children:"提交"})]})]})]})]})}function $a({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Fx=[{value:pe.Shadowsocks,label:ys.find(s=>s.type===pe.Shadowsocks)?.label,color:ts[pe.Shadowsocks]},{value:pe.Vmess,label:ys.find(s=>s.type===pe.Vmess)?.label,color:ts[pe.Vmess]},{value:pe.Trojan,label:ys.find(s=>s.type===pe.Trojan)?.label,color:ts[pe.Trojan]},{value:pe.Hysteria,label:ys.find(s=>s.type===pe.Hysteria)?.label,color:ts[pe.Hysteria]},{value:pe.Vless,label:ys.find(s=>s.type===pe.Vless)?.label,color:ts[pe.Vless]}];function Mx({table:s,saveOrder:t,isSortMode:a,groups:n}){const l=s.getState().columnFilters.length>0,o=n.map(d=>({label:d,value:d}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(Ex,{}),e.jsx(S,{placeholder:"搜索节点...",value:s.getColumn("name")?.getFilterValue()??"",onChange:d=>s.getColumn("name")?.setFilterValue(d.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx($a,{column:s.getColumn("type"),title:"类型",options:Fx}),s.getColumn("groups")&&e.jsx($a,{column:s.getColumn("groups"),title:"权限组",options:o})]}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽节点进行排序,完成后点击保存"})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:a?"default":"outline",onClick:t,size:"sm",children:a?"保存排序":"编辑排序"})})]})}const nt=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),mt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},ht={0:"未运行",1:"无人使用或异常",2:"运行正常"},zx=s=>[{id:"drag-handle",header:({column:t})=>e.jsx(I,{column:t,title:"排序"}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Dt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"节点ID"}),cell:({row:t})=>{const a=t.getValue("id"),n=t.original.code;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(L,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ts[t.original.type]},children:[e.jsx(Ln,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:n??a}),t.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:t.original.parent?.code||t.original.parent?.id})]}):""]})]}),e.jsx(D,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:l=>{l.stopPropagation(),Nt(n||a.toString())},children:e.jsx(Da,{className:"size-3"})})]})}),e.jsxs(ee,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[ys.find(l=>l.type===t.original.type)?.label,t.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显隐"}),cell:({row:t})=>{const[a,n]=c.useState(!!t.getValue("show"));return e.jsx(H,{checked:a,onCheckedChange:async l=>{n(l),zc({id:t.original.id,type:t.original.type,show:l?1:0}).catch(()=>{n(!l),s()})},style:{backgroundColor:a?ts[t.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(I,{column:t,title:"节点",tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[0])}),e.jsx("span",{className:"text-sm font-medium",children:ht[0]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[1])}),e.jsx("span",{className:"text-sm font-medium",children:ht[1]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[2])}),e.jsx("span",{className:"text-sm font-medium",children:ht[2]})]})]})})}),cell:({row:t})=>e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",mt[t.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:t.getValue("name")})]})}),e.jsx(ee,{children:e.jsx("p",{className:"font-medium",children:ht[t.original.available_status]})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:t})=>e.jsx(I,{column:t,title:"地址"}),cell:({row:t})=>{const a=`${t.original.host}:${t.original.port}`,n=t.original.port!==t.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[t.original.host,":",t.original.port]})}),n&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(内部端口 ",t.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(le,{delayDuration:0,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:l=>{l.stopPropagation(),Nt(a)},children:e.jsx(Da,{className:"size-3"})})}),e.jsx(ee,{side:"top",sideOffset:10,children:"复制连接地址"})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:t})=>e.jsx(I,{column:t,title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(nt,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:t})=>e.jsx(I,{column:t,title:"倍率",tooltip:"流量扣费倍率"}),cell:({row:t})=>e.jsxs(L,{variant:"secondary",className:"font-medium",children:[t.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:t})=>e.jsx(I,{column:t,title:"权限组",tooltip:"可订阅到该节点的权限组"}),cell:({row:t})=>{const a=t.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:a.length>0?a.map((n,l)=>e.jsx(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:n.name},l)):e.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})},enableSorting:!1,size:600,filterFn:(t,a,n)=>{const l=t.getValue(a);return l?n.some(o=>l.includes(o)):!1}},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type");return e.jsx(L,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ts[a]},children:a})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingServer:n,setServerType:l}=Or();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(Ns,{modal:!1,children:[e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(bt,{className:"size-4"})})}),e.jsxs(gs,{align:"end",className:"w-40",children:[e.jsx(he,{className:"cursor-pointer",onClick:()=>{l(t.original.type),n(t.original),a(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(mo,{className:"mr-2 size-4"}),"编辑"]})}),e.jsxs(he,{className:"cursor-pointer",onClick:async()=>{Mc({id:t.original.id}).then(({data:o})=>{o&&(A.success("复制成功"),s())})},children:[e.jsx(ho,{className:"mr-2 size-4"}),"复制"]}),e.jsx(Xs,{}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:o=>o.preventDefault(),children:e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Fc({id:t.original.id}).then(({data:o})=>{o&&(A.success("删除成功"),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(rs,{className:"mr-2 size-4"}),"删除"]})})})]})]})})},size:50}];function Ox(){const[s,t]=c.useState({}),[a,n]=c.useState({"drag-handle":!1}),[l,o]=c.useState([]),[d,x]=c.useState({pageSize:500,pageIndex:0}),[r,i]=c.useState([]),[h,T]=c.useState(!1),[C,m]=c.useState({}),[w,_]=c.useState([]),{refetch:v}=Q({queryKey:["nodeList"],queryFn:async()=>{const{data:$}=await mr();return _($),$}}),N=c.useMemo(()=>{const $=new Set;return w.forEach(E=>{E.groups&&E.groups.forEach(K=>$.add(K.name))}),Array.from($).sort()},[w]);c.useEffect(()=>{n({"drag-handle":h,show:!h,host:!h,online:!h,rate:!h,groups:!h,type:!1,actions:!h}),m({name:h?2e3:200}),x({pageSize:h?99999:500,pageIndex:0})},[h]);const P=($,E)=>{h&&($.dataTransfer.setData("text/plain",E.toString()),$.currentTarget.classList.add("opacity-50"))},f=($,E)=>{if(!h)return;$.preventDefault(),$.currentTarget.classList.remove("bg-muted");const K=parseInt($.dataTransfer.getData("text/plain"));if(K===E)return;const ds=[...w],[Hs]=ds.splice(K,1);ds.splice(E,0,Hs),_(ds)},R=async()=>{if(!h){T(!0);return}const $=w?.map((E,K)=>({id:E.id,order:K+1}));Oc($).then(()=>{A.success("排序保存成功"),T(!1),v()}).finally(()=>{T(!1)})},z=Le({data:w||[],columns:zx(v),state:{sorting:r,columnVisibility:a,rowSelection:s,columnFilters:l,columnSizing:C,pagination:d},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:i,onColumnFiltersChange:o,onColumnVisibilityChange:n,onColumnSizingChange:m,onPaginationChange:x,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(bx,{refetch:v,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:z,toolbar:$=>e.jsx(Mx,{table:$,refetch:v,saveOrder:R,isSortMode:h,groups:N}),draggable:h,onDragStart:P,onDragEnd:$=>$.currentTarget.classList.remove("opacity-50"),onDragOver:$=>{$.preventDefault(),$.currentTarget.classList.add("bg-muted")},onDragLeave:$=>$.currentTarget.classList.remove("bg-muted"),onDrop:f,showPagination:!h})})})}function Lx(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"节点管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"管理所有节点,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ox,{})})]})]})}const $x=Object.freeze(Object.defineProperty({__proto__:null,default:Lx},Symbol.toStringTag,{value:"Module"}));function Ax({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Et,{refetch:t}),e.jsx(S,{placeholder:"搜索权限组...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}const Hx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"组名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:t.getValue("name")})})},{accessorKey:"users_count",header:({column:t})=>e.jsx(I,{column:t,title:"用户数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(nt,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:t})=>e.jsx(I,{column:t,title:"节点数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(Ln,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Et,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{$c({id:t.original.id}).then(({data:a})=>{a&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Kx(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),{data:r,refetch:i,isLoading:h}=Q({queryKey:["serverGroupList"],queryFn:async()=>{const{data:C}=await Vt();return C}}),T=Le({data:r||[],columns:Hx(i),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:T,toolbar:C=>e.jsx(Ax,{table:C,refetch:i}),isLoading:h})}function qx(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"权限组管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有权限组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Kx,{})})]})]})}const Ux=Object.freeze(Object.defineProperty({__proto__:null,default:qx},Symbol.toStringTag,{value:"Module"})),Bx=u.object({remarks:u.string().min(1,"Please enter a valid remarks."),match:u.array(u.string()),action:u.enum(["block","dns"]),action_value:u.string().optional()});function Lr({refetch:s,dialogTrigger:t,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:n="add"}){const l=ae({resolver:ie(Bx),defaultValues:a,mode:"onChange"}),[o,d]=c.useState(!1);return e.jsxs(ue,{open:o,onOpenChange:d,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加路由"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:n==="edit"?"编辑路由":"创建路由"}),e.jsx(Se,{})]}),e.jsxs(oe,{...l,children:[e.jsx(g,{control:l.control,name:"remarks",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入备注",...x})})}),e.jsx(k,{})]})}),e.jsx(g,{control:l.control,name:"match",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(vs,{className:"min-h-[120px]",placeholder:`example.com +import{r as c,j as e,t as hl,c as jl,I as ba,a as _s,S as Wt,u as ns,b as Jt,d as gl,O as Qt,e as fl,f as A,g as pl,h as vl,i as bl,Q as yl,k as Nl,R as wl,l as _l,P as Cl,m as Sl,B as kl,n as qa,F as Dl,C as Tl,o as Pl,p as Il,q as Vl,s as Rl,v as El,z as u,w as Ua,x as ae,y as ie,A as Ba,D as _t,E as Ct,G as Zt,H as Me,T as St,J as kt,K as Ga,L as Ya,M as Fl,N as Ml,U as zl,V as Ol,W as Wa,X as Xt,Y as Ja,Z as Ll,_ as Qa,$ as Za,a0 as Xa,a1 as en,a2 as Cs,a3 as sn,a4 as $l,a5 as tn,a6 as an,a7 as Al,a8 as Hl,a9 as Kl,aa as ql,ab as nn,ac as Ul,ad as Bl,ae as Ss,af as rn,ag as Gl,ah as Yl,ai as ln,aj as Wl,ak as Jl,al as ya,am as Ql,an as on,ao as Zl,ap as cn,aq as Xl,ar as ei,as as si,at as ti,au as ai,av as ni,aw as dn,ax as ri,ay as li,az as ii,aA as we,aB as oi,aC as ci,aD as di,aE as ui,aF as un,aG as xn,aH as mn,aI as xi,aJ as hn,aK as jn,aL as gn,aM as mi,aN as hi,aO as ji,aP as fn,aQ as gi,aR as ea,aS as pn,aT as fi,aU as vn,aV as pi,aW as bn,aX as vi,aY as yn,aZ as Nn,a_ as bi,a$ as yi,b0 as wn,b1 as Ni,b2 as wi,b3 as _n,b4 as _i,b5 as Cn,b6 as Ci,b7 as Si,b8 as He,b9 as Q,ba as Pe,bb as rt,bc as ki,bd as Di,be as Ti,bf as Pi,bg as Ii,bh as Vi,bi as Na,bj as wa,bk as Ri,bl as Ei,bm as Fi,bn as Mi,bo as zi,bp as Oi,bq as Sn,br as Li,bs as kn,bt as $i,bu as Ai,bv as Dn,bw as Hi,bx as de,by as Ki,bz as _a,bA as At,bB as Ht,bC as qi,bD as Ui,bE as Tn,bF as Bi,bG as sa,bH as Gi,bI as Yi,bJ as Wi,bK as Pn,bL as In,bM as Vn,bN as Ji,bO as Qi,bP as Zi,bQ as Xi,bR as Rn,bS as eo,bT as Je,bU as so,bV as to,bW as vt,bX as ve,bY as Ca,bZ as ao,b_ as En,b$ as Fn,c0 as Mn,c1 as zn,c2 as On,c3 as Ln,c4 as no,c5 as ro,c6 as lo,c7 as Dt,c8 as ks,c9 as rs,ca as Le,cb as $e,cc as Ke,cd as qe,ce as Ue,cf as Sa,cg as io,ch as oo,ci as co,cj as Kt,ck as ta,cl as aa,cm as uo,cn as ls,co as is,cp as lt,cq as xo,cr as mo,cs as ka,ct as Da,cu as $n,cv as Ta,cw as bt,cx as ho,cy as jo,cz as An,cA as go,cB as fo,cC as Hn,cD as qt,cE as Kn,cF as po,cG as qn,cH as Un,cI as vo,cJ as bo,cK as yo,cL as No,cM as wo}from"./vendor.js";import"./index.js";var ph=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function _o(s){if(s.__esModule)return s;var t=s.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(n){var l=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:function(){return s[n]}})}),a}const Co={theme:"system",setTheme:()=>null},Bn=c.createContext(Co);function So({children:s,defaultTheme:t="system",storageKey:a="vite-ui-theme",...n}){const[l,o]=c.useState(()=>localStorage.getItem(a)||t);c.useEffect(()=>{const x=window.document.documentElement;if(x.classList.remove("light","dark"),l==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";x.classList.add(r);return}x.classList.add(l)},[l]);const d={theme:l,setTheme:x=>{localStorage.setItem(a,x),o(x)}};return e.jsx(Bn.Provider,{...n,value:d,children:s})}const ko=()=>{const s=c.useContext(Bn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Do=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),To=function(s,t){return new URL(s,t).href},Pa={},X=function(t,a,n){let l=Promise.resolve();if(a&&a.length>0){const d=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),r=x?.nonce||x?.getAttribute("nonce");l=Promise.allSettled(a.map(i=>{if(i=To(i,n),i in Pa)return;Pa[i]=!0;const h=i.endsWith(".css"),T=h?'[rel="stylesheet"]':"";if(!!n)for(let w=d.length-1;w>=0;w--){const _=d[w];if(_.href===i&&(!h||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${T}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":Do,h||(m.as="script"),m.crossOrigin="",m.href=i,r&&m.setAttribute("nonce",r),document.head.appendChild(m),h)return new Promise((w,_)=>{m.addEventListener("load",w),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})}))}function o(d){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=d,window.dispatchEvent(x),!x.defaultPrevented)throw d}return l.then(d=>{for(const x of d||[])x.status==="rejected"&&o(x.reason);return t().catch(o)})};function y(...s){return hl(jl(s))}const $s=_s("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),D=c.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,children:l,disabled:o,loading:d=!1,leftSection:x,rightSection:r,...i},h)=>{const T=n?Wt:"button";return e.jsxs(T,{className:y($s({variant:t,size:a,className:s})),disabled:d||o,ref:h,...i,children:[(x&&d||!x&&!r&&d)&&e.jsx(ba,{className:"mr-2 h-4 w-4 animate-spin"}),!d&&x&&e.jsx("div",{className:"mr-2",children:x}),l,!d&&r&&e.jsx("div",{className:"ml-2",children:r}),r&&d&&e.jsx(ba,{className:"ml-2 h-4 w-4 animate-spin"})]})});D.displayName="Button";function Vs({className:s,minimal:t=!1}){const a=ns();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!t&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!t&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(D,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(D,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ia(){const s=ns();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(D,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(D,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Po(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(D,{variant:"outline",children:"Learn more"})})]})})}function Io(s){return typeof s>"u"}function Vo(s){return s===null}function Ro(s){return Vo(s)||Io(s)}class Eo{storage;prefixKey;constructor(t){this.storage=t.storage,this.prefixKey=t.prefixKey}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,a,n=null){const l=JSON.stringify({value:a,time:Date.now(),expire:n!==null?new Date().getTime()+n*1e3:null});this.storage.setItem(this.getKey(t),l)}get(t,a=null){const n=this.storage.getItem(this.getKey(t));if(!n)return{value:a,time:0};try{const l=JSON.parse(n),{value:o,time:d,expire:x}=l;return Ro(x)||x>new Date().getTime()?{value:o,time:d}:(this.remove(t),{value:a,time:0})}catch{return this.remove(t),{value:a,time:0}}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}}function Gn({prefixKey:s="",storage:t=sessionStorage}){return new Eo({prefixKey:s,storage:t})}const Yn="Xboard_",Fo=function(s={}){return Gn({prefixKey:s.prefixKey||"",storage:localStorage})},Mo=function(s={}){return Gn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Tt=Fo({prefixKey:Yn});Mo({prefixKey:Yn});const Wn="access_token";function Qs(){return Tt.get(Wn)}function Jn(){Tt.remove(Wn)}const Va=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function zo({children:s}){const t=ns(),a=Jt(),n=Qs();return c.useEffect(()=>{if(!n.value&&!Va.includes(a.pathname)){const l=encodeURIComponent(a.pathname+a.search);t(`/sign-in?redirect=${l}`)}},[n.value,a.pathname,a.search,t]),Va.includes(a.pathname)||n.value?e.jsx(e.Fragment,{children:s}):null}const Oo=()=>e.jsx(zo,{children:e.jsx(Qt,{})}),Lo=gl([{path:"/sign-in",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>lc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(Oo,{}),children:[{path:"/",lazy:async()=>({Component:(await X(()=>Promise.resolve().then(()=>bc),void 0,import.meta.url)).default}),errorElement:e.jsx(Vs,{}),children:[{index:!0,lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Bd);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Vs,{}),children:[{path:"system",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Wd);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>eu);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>ru);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>du);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>ju);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>bu);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Cu);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Pu);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Fu);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>$u);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Zu);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>sx);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>ox);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>gx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Ax);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Bx);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Zx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Vs,{}),children:[{path:"plan",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>im);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>bm);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Tm);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>Zm);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await X(async()=>{const{default:s}=await Promise.resolve().then(()=>jh);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Vs},{path:"/404",Component:Ia},{path:"/503",Component:Po},{path:"*",Component:Ia}]),$o="locale";function Ao(){return Tt.get($o)}function Qn(){Jn();const s=window.location.pathname,t=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),l=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=l+(t?`?redirect=${s}`:"")}const Ho=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function Ko(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const V=fl.create({baseURL:Ko(),timeout:12e3,headers:{"Content-Type":"application/json"}});V.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const t=Qs();if(!Ho.includes(s.url?.split("?")[0]||"")){if(!t.value)return Qn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=t.value}return s.headers["Content-Language"]=Ao().value||"zh-CN",s},s=>Promise.reject(s));V.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const t=s.response?.status,a=s.response?.data?.message;return(t===401||t===403)&&Qn(),A.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[t]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function qo(){return V.get("/user/info")}const Mt={token:Qs()?.value||"",userInfo:null,isLoggedIn:!!Qs()?.value,loading:!1,error:null},Ws=pl("user/fetchUserInfo",async()=>(await qo()).data,{condition:(s,{getState:t})=>{const{user:a}=t();return!!a.token&&!a.loading}}),Zn=vl({name:"user",initialState:Mt,reducers:{setToken(s,t){s.token=t.payload,s.isLoggedIn=!!t.payload},resetUserState:()=>Mt},extraReducers:s=>{s.addCase(Ws.pending,t=>{t.loading=!0,t.error=null}).addCase(Ws.fulfilled,(t,a)=>{t.loading=!1,t.userInfo=a.payload,t.error=null}).addCase(Ws.rejected,(t,a)=>{if(t.loading=!1,t.error=a.error.message||"Failed to fetch user info",!t.token)return Mt})}}),{setToken:Uo,resetUserState:Bo}=Zn.actions,Go=s=>s.user.userInfo,Yo=Zn.reducer,Xn=bl({reducer:{user:Yo}});Qs()?.value&&Xn.dispatch(Ws());const Wo=new yl;Nl.createRoot(document.getElementById("root")).render(e.jsx(wl.StrictMode,{children:e.jsx(_l,{client:Wo,children:e.jsx(Cl,{store:Xn,children:e.jsxs(So,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(Sl,{router:Lo}),e.jsx(kl,{richColors:!0,position:"top-right"})]})})})}));const Ie=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...t}));Ie.displayName="Card";const ze=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...t}));ze.displayName="CardHeader";const Qe=c.forwardRef(({className:s,...t},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...t}));Qe.displayName="CardTitle";const Zs=c.forwardRef(({className:s,...t},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Zs.displayName="CardDescription";const Oe=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...t}));Oe.displayName="CardContent";const Jo=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...t}));Jo.displayName="CardFooter";const Qo=_s("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yt=c.forwardRef(({className:s,...t},a)=>e.jsx(qa,{ref:a,className:y(Qo(),s),...t}));yt.displayName=qa.displayName;const oe=Dl,er=c.createContext({}),g=({...s})=>e.jsx(er.Provider,{value:{name:s.name},children:e.jsx(Tl,{...s})}),Pt=()=>{const s=c.useContext(er),t=c.useContext(sr),{getFieldState:a,formState:n}=Pl(),l=a(s.name,n);if(!s)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:s.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...l}},sr=c.createContext({}),j=c.forwardRef(({className:s,...t},a)=>{const n=c.useId();return e.jsx(sr.Provider,{value:{id:n},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...t})})});j.displayName="FormItem";const p=c.forwardRef(({className:s,...t},a)=>{const{error:n,formItemId:l}=Pt();return e.jsx(yt,{ref:a,className:y(n&&"text-destructive",s),htmlFor:l,...t})});p.displayName="FormLabel";const b=c.forwardRef(({...s},t)=>{const{error:a,formItemId:n,formDescriptionId:l,formMessageId:o}=Pt();return e.jsx(Wt,{ref:t,id:n,"aria-describedby":a?`${l} ${o}`:`${l}`,"aria-invalid":!!a,...s})});b.displayName="FormControl";const F=c.forwardRef(({className:s,...t},a)=>{const{formDescriptionId:n}=Pt();return e.jsx("p",{ref:a,id:n,className:y("text-[0.8rem] text-muted-foreground",s),...t})});F.displayName="FormDescription";const k=c.forwardRef(({className:s,children:t,...a},n)=>{const{error:l,formMessageId:o}=Pt(),d=l?String(l?.message):t;return d?e.jsx("p",{ref:n,id:o,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:d}):null});k.displayName="FormMessage";const S=c.forwardRef(({className:s,type:t,...a},n)=>e.jsx("input",{type:t,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:n,...a}));S.displayName="Input";const tr=c.forwardRef(({className:s,...t},a)=>{const[n,l]=c.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:n?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}),e.jsx(D,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>l(o=>!o),children:n?e.jsx(Il,{size:18}):e.jsx(Vl,{size:18})})]})});tr.displayName="PasswordInput";const Zo=s=>V({url:"/passport/auth/login",method:"post",data:s}),Ut=s=>s;function re(s=void 0,t="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),El(s).format(t))}function Xo(s=void 0,t="YYYY-MM-DD"){return re(s,t)}function Fs(s){const t=typeof s=="string"?parseFloat(s):s;return isNaN(t)?"0.00":t.toFixed(2)}function hs(s,t=!0){if(s==null)return t?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return t?"¥0.00":"0.00";const l=(a/100).toFixed(2).replace(/\.?0+$/,o=>o.includes(".")?".00":o);return t?`¥${l}`:l}function Nt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{A.success(Ut("复制成功"))}).catch(t=>{console.error("复制到剪贴板时出错:",t),Ra(s)}):Ra(s)}function Ra(s){const t=document.createElement("button"),a=new Rl(t,{text:()=>s});a.on("success",()=>{A.success(Ut("复制成功")),a.destroy()}),a.on("error",()=>{A.error(Ut("复制失败")),a.destroy()}),t.click()}function zs(s){const t=s/1024,a=t/1024,n=a/1024,l=n/1024;return l>=1?Fs(l)+" TB":n>=1?Fs(n)+" GB":a>=1?Fs(a)+" MB":Fs(t)+" KB"}const ec="access_token";function sc(s){Tt.set(ec,s)}const tc=u.object({email:u.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:u.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function ac({className:s,onForgotPassword:t,...a}){const n=ns(),l=Ua(),o=ae({resolver:ie(tc),defaultValues:{email:"",password:""}});async function d(x){Zo(x).then(({data:r})=>{sc(r.auth_data),l(Uo(r.auth_data)),l(Ws()).unwrap(),n("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(oe,{...o,children:e.jsx("form",{onSubmit:o.handleSubmit(d),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{control:o.control,name:"email",render:({field:x})=>e.jsxs(j,{className:"space-y-1",children:[e.jsx(p,{children:"邮箱地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"name@example.com",...x})}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"password",render:({field:x})=>e.jsxs(j,{className:"space-y-1",children:[e.jsx(p,{children:"密码"}),e.jsx(b,{children:e.jsx(tr,{placeholder:"请输入密码",...x})}),e.jsx(k,{})]})}),e.jsx(D,{className:"mt-2",loading:o.formState.isSubmitting,children:"登录"}),e.jsx(D,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:t,children:"忘记密码?"})]})})})})}const ue=Ba,Re=Ga,nc=Ya,it=Zt,ar=c.forwardRef(({className:s,...t},a)=>e.jsx(_t,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t}));ar.displayName=_t.displayName;const ce=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(nc,{children:[e.jsx(ar,{}),e.jsxs(Ct,{ref:n,className:y("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[t,e.jsxs(Zt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Me,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ce.displayName=Ct.displayName;const je=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...t});je.displayName="DialogHeader";const Ee=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Ee.displayName="DialogFooter";const xe=c.forwardRef(({className:s,...t},a)=>e.jsx(St,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...t}));xe.displayName=St.displayName;const Se=c.forwardRef(({className:s,...t},a)=>e.jsx(kt,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Se.displayName=kt.displayName;const Ls=_s("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),W=c.forwardRef(({className:s,variant:t,size:a,asChild:n=!1,...l},o)=>{const d=n?Wt:"button";return e.jsx(d,{className:y(Ls({variant:t,size:a,className:s})),ref:o,...l})});W.displayName="Button";function rc(){const[s,t]=c.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(Ie,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(ac,{onForgotPassword:()=>t(!0)})]})]})}),e.jsx(ue,{open:s,onOpenChange:t,children:e.jsx(ce,{children:e.jsxs(je,{children:[e.jsx(xe,{children:"忘记密码"}),e.jsx(Se,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(W,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>Nt(a),children:e.jsx(Fl,{className:"h-4 w-4"})})]})})]})})})]})}const lc=Object.freeze(Object.defineProperty({__proto__:null,default:rc},Symbol.toStringTag,{value:"Module"})),ye=c.forwardRef(({className:s,fadedBelow:t=!1,fixedHeight:a=!1,...n},l)=>e.jsx("div",{ref:l,className:y("relative flex h-full w-full flex-col",t&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...n}));ye.displayName="Layout";const Ne=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...t}));Ne.displayName="LayoutHeader";const _e=c.forwardRef(({className:s,fixedHeight:t,...a},n)=>e.jsx("div",{ref:n,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",t&&"h-[calc(100%-var(--header-height))]",s),...a}));_e.displayName="LayoutBody";const nr=Ml,rr=zl,lr=Ol,Ns=Al,ws=Hl,ic=Kl,oc=c.forwardRef(({className:s,inset:t,children:a,...n},l)=>e.jsxs(Wa,{ref:l,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",s),...n,children:[a,e.jsx(Xt,{className:"ml-auto h-4 w-4"})]}));oc.displayName=Wa.displayName;const cc=c.forwardRef(({className:s,...t},a)=>e.jsx(Ja,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...t}));cc.displayName=Ja.displayName;const gs=c.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(Ll,{children:e.jsx(Qa,{ref:n,sideOffset:t,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));gs.displayName=Qa.displayName;const he=c.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(Za,{ref:n,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",s),...a}));he.displayName=Za.displayName;const dc=c.forwardRef(({className:s,children:t,checked:a,...n},l)=>e.jsxs(Xa,{ref:l,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(en,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),t]}));dc.displayName=Xa.displayName;const uc=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(sn,{ref:n,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(en,{children:e.jsx($l,{className:"h-4 w-4 fill-current"})})}),t]}));uc.displayName=sn.displayName;const na=c.forwardRef(({className:s,inset:t,...a},n)=>e.jsx(tn,{ref:n,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",s),...a}));na.displayName=tn.displayName;const Xs=c.forwardRef(({className:s,...t},a)=>e.jsx(an,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...t}));Xs.displayName=an.displayName;const Bt=({className:s,...t})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...t});Bt.displayName="DropdownMenuShortcut";const le=ql,se=Ul,te=Bl,ee=c.forwardRef(({className:s,sideOffset:t=4,...a},n)=>e.jsx(nn,{ref:n,sideOffset:t,className:y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));ee.displayName=nn.displayName;function It(){const{pathname:s}=Jt();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const n=a.replace(/^\//,""),l=s.replace(/^\//,"");return n?l.startsWith(n):!1}}}function ir({key:s,defaultValue:t}){const[a,n]=c.useState(()=>{const l=localStorage.getItem(s);return l!==null?JSON.parse(l):t});return c.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,n]}function xc(){const[s,t]=ir({key:"expanded-sidebar-items",defaultValue:["仪表盘","系统管理","节点管理","订阅管理","用户管理"]});return{expandedItems:s,toggleItem:n=>{t(l=>l.includes(n)?l.filter(o=>o!==n):[...l,n])},isExpanded:n=>s.includes(n)}}function mc({links:s,isCollapsed:t,className:a,closeNav:n}){const l=({sub:o,...d})=>{const x=`${d.title}-${d.href}`;return t&&o?c.createElement(gc,{...d,sub:o,key:x,closeNav:n}):t?c.createElement(jc,{...d,key:x,closeNav:n}):o?c.createElement(hc,{...d,sub:o,key:x,closeNav:n}):c.createElement(or,{...d,key:x,closeNav:n})};return e.jsx("div",{"data-collapsed":t,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(le,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(l)})})})}function or({title:s,icon:t,label:a,href:n,closeNav:l,subLink:o=!1}){const{checkActiveNav:d}=It();return e.jsxs(Ss,{to:n,onClick:l,className:y($s({variant:d(n)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":d(n)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a})]})}function hc({title:s,icon:t,label:a,sub:n,closeNav:l}){const{checkActiveNav:o}=It(),{isExpanded:d,toggleItem:x}=xc(),r=!!n?.find(h=>o(h.href)),i=d(s)||r;return e.jsxs(nr,{open:i,onOpenChange:()=>x(s),children:[e.jsxs(rr,{className:y($s({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:t}),s,a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:a}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(rn,{stroke:1})})]}),e.jsx(lr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:n.map(h=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(or,{...h,subLink:!0,closeNav:l})},h.title))})})]})}function jc({title:s,icon:t,label:a,href:n}){const{checkActiveNav:l}=It();return e.jsxs(se,{delayDuration:0,children:[e.jsx(te,{asChild:!0,children:e.jsxs(Ss,{to:n,className:y($s({variant:l(n)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[t,e.jsx("span",{className:"sr-only",children:s})]})}),e.jsxs(ee,{side:"right",className:"flex items-center gap-4",children:[s,a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a})]})]})}function gc({title:s,icon:t,label:a,sub:n}){const{checkActiveNav:l}=It(),o=!!n?.find(d=>l(d.href));return e.jsxs(Ns,{children:[e.jsxs(se,{delayDuration:0,children:[e.jsx(te,{asChild:!0,children:e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:o?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),e.jsxs(ee,{side:"right",className:"flex items-center gap-4",children:[s," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:a}),e.jsx(rn,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(gs,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(na,{children:[s," ",a?`(${a})`:""]}),e.jsx(Xs,{}),n.map(({title:d,icon:x,label:r,href:i})=>e.jsx(he,{asChild:!0,children:e.jsxs(Ss,{to:i,className:`${l(i)?"bg-secondary":""}`,children:[x," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:d}),r&&e.jsx("span",{className:"ml-auto text-xs",children:r})]})},`${d}-${i}`))]})]})}const cr=[{title:"仪表盘",label:"",href:"/",icon:e.jsx(Gl,{size:18})},{title:"系统管理",label:"",href:"",icon:e.jsx(Yl,{size:18}),sub:[{title:"系统配置",label:"",href:"/config/system",icon:e.jsx(ln,{size:18})},{title:"主题配置",label:"",href:"/config/theme",icon:e.jsx(Wl,{size:18})},{title:"公告管理",label:"",href:"/config/notice",icon:e.jsx(Jl,{size:18})},{title:"支付配置",label:"",href:"/config/payment",icon:e.jsx(ya,{size:18})},{title:"知识库管理",label:"",href:"/config/knowledge",icon:e.jsx(Ql,{size:18})}]},{title:"节点管理",label:"",href:"",icon:e.jsx(on,{size:18}),sub:[{title:"节点管理",label:"",href:"/server/manage",icon:e.jsx(Zl,{size:18})},{title:"权限组管理",label:"",href:"/server/group",icon:e.jsx(cn,{size:18})},{title:"路由管理",label:"",href:"/server/route",icon:e.jsx(Xl,{size:18})}]},{title:"订阅管理",label:"",href:"",icon:e.jsx(ei,{size:18}),sub:[{title:"套餐管理",label:"",href:"/finance/plan",icon:e.jsx(si,{size:18})},{title:"订单管理",label:"",href:"/finance/order",icon:e.jsx(ya,{size:18})},{title:"优惠券管理",label:"",href:"/finance/coupon",icon:e.jsx(ti,{size:18})}]},{title:"用户管理",label:"",href:"",icon:e.jsx(ai,{size:18}),sub:[{title:"用户管理",label:"",href:"/user/manage",icon:e.jsx(ni,{size:18})},{title:"工单管理",label:"",href:"/user/ticket",icon:e.jsx(dn,{size:18})}]}];function fc({className:s,isCollapsed:t,setIsCollapsed:a}){const[n,l]=c.useState(!1);return c.useEffect(()=>{n?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[n]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${t?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>l(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${n?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(ye,{children:[e.jsxs(Ne,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${t?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${t?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${t?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(D,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Toggle Navigation","aria-controls":"sidebar-menu","aria-expanded":n,onClick:()=>l(o=>!o),children:n?e.jsx(ri,{}):e.jsx(li,{})})]}),e.jsx(mc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${n?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>l(!1),isCollapsed:t,links:cr}),e.jsx(D,{onClick:()=>a(o=>!o),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex",children:e.jsx(ii,{stroke:1.5,className:`h-5 w-5 ${t?"rotate-180":""}`})})]})]})}function pc(){const[s,t]=ir({key:"collapsed-sidebar",defaultValue:!1});return c.useEffect(()=>{const a=()=>{t(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,t]),[s,t]}function vc(){const[s,t]=pc();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(fc,{isCollapsed:s,setIsCollapsed:t}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(Qt,{})})]})}const bc=Object.freeze(Object.defineProperty({__proto__:null,default:vc},Symbol.toStringTag,{value:"Module"})),fs=c.forwardRef(({className:s,...t},a)=>e.jsx(we,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...t}));fs.displayName=we.displayName;const yc=({children:s,...t})=>e.jsx(ue,{...t,children:e.jsx(ce,{className:"overflow-hidden p-0",children:e.jsx(fs,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Ds=c.forwardRef(({className:s,...t},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(oi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(we.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...t})]}));Ds.displayName=we.Input.displayName;const ps=c.forwardRef(({className:s,...t},a)=>e.jsx(we.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...t}));ps.displayName=we.List.displayName;const Ts=c.forwardRef((s,t)=>e.jsx(we.Empty,{ref:t,className:"py-6 text-center text-sm",...s}));Ts.displayName=we.Empty.displayName;const Ve=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...t}));Ve.displayName=we.Group.displayName;const As=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...t}));As.displayName=we.Separator.displayName;const be=c.forwardRef(({className:s,...t},a)=>e.jsx(we.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...t}));be.displayName=we.Item.displayName;function Nc(){const s=[];for(const t of cr)if(t.href&&s.push(t),t.sub)for(const a of t.sub)s.push({...a,parent:t.title});return s}function ke(){const[s,t]=c.useState(!1),a=ns(),n=Nc();c.useEffect(()=>{const o=d=>{d.key==="k"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),t(x=>!x))};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[]);const l=c.useCallback(o=>{t(!1),a(o)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(W,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>t(!0),children:[e.jsx(ci,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:"搜索..."}),e.jsx("span",{className:"sr-only",children:"搜索"}),e.jsxs("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsxs(yc,{open:s,onOpenChange:t,children:[e.jsx(Ds,{placeholder:"搜索所有菜单和功能..."}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"未找到相关结果"}),e.jsx(Ve,{heading:"菜单导航",children:n.map(o=>e.jsxs(be,{value:`${o.parent?o.parent+" ":""}${o.title}`,onSelect:()=>l(o.href),children:[e.jsx("div",{className:"mr-2",children:o.icon}),e.jsx("span",{children:o.title}),o.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:o.parent})]},o.href))})]})]})]})}function De(){const{theme:s,setTheme:t}=ko();return c.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",n=document.querySelector("meta[name='theme-color']");n&&n.setAttribute("content",a)},[s]),e.jsx(D,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>t(s==="light"?"dark":"light"),children:s==="light"?e.jsx(di,{size:20}):e.jsx(ui,{size:20})})}const dr=c.forwardRef(({className:s,...t},a)=>e.jsx(un,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...t}));dr.displayName=un.displayName;const ur=c.forwardRef(({className:s,...t},a)=>e.jsx(xn,{ref:a,className:y("aspect-square h-full w-full",s),...t}));ur.displayName=xn.displayName;const xr=c.forwardRef(({className:s,...t},a)=>e.jsx(mn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...t}));xr.displayName=mn.displayName;function Te(){const s=ns(),t=Ua(),a=xi(Go),n=()=>{Jn(),t(Bo()),s("/sign-in")},l=a?.email?.split("@")[0]||"User",o=l.substring(0,2).toUpperCase();return e.jsxs(Ns,{children:[e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(dr,{className:"h-8 w-8",children:[e.jsx(ur,{src:a?.avatar_url,alt:l}),e.jsx(xr,{children:o})]})})}),e.jsxs(gs,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(na,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:l}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||"user@example.com"})]})}),e.jsx(Xs,{}),e.jsx(he,{asChild:!0,children:e.jsxs(Ss,{to:"/config/system",children:["设置",e.jsx(Bt,{children:"⌘S"})]})}),e.jsx(Xs,{}),e.jsxs(he,{onClick:n,children:["退出登录",e.jsx(Bt,{children:"⇧⌘Q"})]})]})]})}const We=window?.settings?.secure_path,mr=5*60*1e3,Gt=new Map,wc=s=>{const t=Gt.get(s);return t?Date.now()-t.timestamp>mr?(Gt.delete(s),null):t.data:null},_c=(s,t)=>{Gt.set(s,{data:t,timestamp:Date.now()})},Cc=async(s,t=mr)=>{const a=wc(s);if(a)return a;const n=await V.get(s);return _c(s,n),n},Sc={getList:()=>Cc(`${We}/notice/fetch`),save:s=>V.post(`${We}/notice/save`,s),drop:s=>V.post(`${We}/notice/drop`,{id:s}),updateStatus:s=>V.post(`${We}/notice/show`,{id:s}),sort:s=>V.post(`${We}/notice/sort`,{ids:s})},Ea={getSystemStatus:()=>V.get(`${We}/system/getSystemStatus`),getQueueStats:()=>V.get(`${We}/system/getQueueStats`),getQueueWorkload:()=>V.get(`${We}/system/getQueueWorkload`),getQueueMasters:()=>V.get(`${We}/system/getQueueMasters`),getSystemLog:s=>V.get(`${We}/system/getSystemLog`,{params:s})},M=window?.settings?.secure_path,kc=s=>V.get(M+"/stat/getOrder",{params:s}),Dc=()=>V.get(M+"/stat/getStats"),Fa=s=>V.get(M+"/stat/getTrafficRank",{params:s}),Tc=()=>V.get(M+"/theme/getThemes"),Pc=s=>V.post(M+"/theme/getThemeConfig",{name:s}),Ic=(s,t)=>V.post(M+"/theme/saveThemeConfig",{name:s,config:t}),Vc=s=>{const t=new FormData;return t.append("file",s),V.post(M+"/theme/upload",t,{headers:{"Content-Type":"multipart/form-data"}})},Rc=s=>V.post(M+"/theme/delete",{name:s}),Ec=s=>V.post(M+"/config/save",s),hr=()=>V.get(M+"/server/manage/getNodes"),Fc=s=>V.post(M+"/server/manage/save",s),Mc=s=>V.post(M+"/server/manage/drop",s),zc=s=>V.post(M+"/server/manage/copy",s),Oc=s=>V.post(M+"/server/manage/update",s),Lc=s=>V.post(M+"/server/manage/sort",s),Vt=()=>V.get(M+"/server/group/fetch"),$c=s=>V.post(M+"/server/group/save",s),Ac=s=>V.post(M+"/server/group/drop",s),jr=()=>V.get(M+"/server/route/fetch"),Hc=s=>V.post(M+"/server/route/save",s),Kc=s=>V.post(M+"/server/route/drop",s),qc=()=>V.get(M+"/payment/fetch"),Uc=()=>V.get(M+"/payment/getPaymentMethods"),Bc=s=>V.post(M+"/payment/getPaymentForm",s),Gc=s=>V.post(M+"/payment/save",s),Yc=s=>V.post(M+"/payment/drop",s),Wc=s=>V.post(M+"/payment/show",s),Jc=s=>V.post(M+"/payment/sort",s),Qc=()=>V.get(M+"/notice/fetch"),Zc=s=>V.post(M+"/notice/save",s),Xc=s=>V.post(M+"/notice/drop",s),ed=s=>V.post(M+"/notice/show",s),sd=()=>V.get(M+"/knowledge/fetch"),td=s=>V.get(M+"/knowledge/fetch?id="+s),ad=s=>V.post(M+"/knowledge/save",s),nd=s=>V.post(M+"/knowledge/drop",s),rd=s=>V.post(M+"/knowledge/show",s),ld=s=>V.post(M+"/knowledge/sort",s),Ps=()=>V.get(M+"/plan/fetch"),id=s=>V.post(M+"/plan/save",s),zt=s=>V.post(M+"/plan/update",s),od=s=>V.post(M+"/plan/drop",s),cd=s=>V.post(M+"/plan/sort",{ids:s}),gr=async s=>V.post(M+"/order/fetch",s),dd=s=>V.post(M+"/order/detail",s),ud=s=>V.post(M+"/order/paid",s),xd=s=>V.post(M+"/order/cancel",s),Ma=s=>V.post(M+"/order/update",s),md=s=>V.post(M+"/order/assign",s),hd=s=>V.post(M+"/coupon/fetch",s),jd=s=>V.post(M+"/coupon/generate",s),gd=s=>V.post(M+"/coupon/drop",s),fd=s=>V.post(M+"/coupon/update",s),pd=s=>V.post(M+"/user/fetch",s),vd=s=>V.post(M+"/user/update",s),bd=s=>V.post(M+"/user/resetSecret",s),yd=s=>V.post(M+"/user/generate",s),Nd=s=>V.post(M+"/stat/getStatUser",s),fr=s=>V.post(M+"/ticket/fetch",s),wd=s=>V.get(M+"/ticket/fetch?id= "+s),_d=s=>V.post(M+"/ticket/reply",s),pr=s=>V.post(M+"/ticket/close",{id:s}),os=(s="")=>V.get(M+"/config/fetch?key="+s),cs=s=>V.post(M+"/config/save",s),Cd=()=>V.get(M+"/config/getEmailTemplate"),Sd=()=>V.post(M+"/config/testSendMail"),kd=()=>V.post(M+"/config/setTelegramWebhook"),Dd=Sc.sort,vr=mi,ra=c.forwardRef(({className:s,...t},a)=>e.jsx(hn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...t}));ra.displayName=hn.displayName;const et=c.forwardRef(({className:s,...t},a)=>e.jsx(jn,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...t}));et.displayName=jn.displayName;const Td=c.forwardRef(({className:s,...t},a)=>e.jsx(gn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...t}));Td.displayName=gn.displayName;const G=hi,xs=Ni,Y=ji,U=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(fn,{ref:n,className:y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[t,e.jsx(gi,{asChild:!0,children:e.jsx(ea,{className:"h-4 w-4 opacity-50"})})]}));U.displayName=fn.displayName;const br=c.forwardRef(({className:s,...t},a)=>e.jsx(pn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(fi,{className:"h-4 w-4"})}));br.displayName=pn.displayName;const yr=c.forwardRef(({className:s,...t},a)=>e.jsx(vn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(ea,{className:"h-4 w-4"})}));yr.displayName=vn.displayName;const B=c.forwardRef(({className:s,children:t,position:a="popper",...n},l)=>e.jsx(pi,{children:e.jsxs(bn,{ref:l,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...n,children:[e.jsx(br,{}),e.jsx(vi,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),e.jsx(yr,{})]})}));B.displayName=bn.displayName;const Pd=c.forwardRef(({className:s,...t},a)=>e.jsx(yn,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...t}));Pd.displayName=yn.displayName;const O=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(Nn,{ref:n,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(bi,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),e.jsx(yi,{children:t})]}));O.displayName=Nn.displayName;const Id=c.forwardRef(({className:s,...t},a)=>e.jsx(wn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...t}));Id.displayName=wn.displayName;function Is({className:s,classNames:t,showOutsideDays:a=!0,...n}){return e.jsx(wi,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(Ls({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Ls({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({className:l,...o})=>e.jsx(_n,{className:y("h-4 w-4",l),...o}),IconRight:({className:l,...o})=>e.jsx(Xt,{className:y("h-4 w-4",l),...o})},...n})}Is.displayName="Calendar";const Ze=Ci,Xe=Si,Be=c.forwardRef(({className:s,align:t="center",sideOffset:a=4,...n},l)=>e.jsx(_i,{children:e.jsx(Cn,{ref:l,align:t,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n})}));Be.displayName=Cn.displayName;const ms={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Ys=s=>(s/100).toFixed(2),Vd=({active:s,payload:t,label:a})=>s&&t&&t.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),t.map((n,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[n.name,":"]}),e.jsx("span",{className:"font-medium",children:n.name.includes("金额")?`¥${Ys(n.value)}`:`${n.value}笔`})]},l))]}):null,Rd=[{value:"7d",label:"最近7天"},{value:"30d",label:"最近30天"},{value:"90d",label:"最近90天"},{value:"180d",label:"最近180天"},{value:"365d",label:"最近一年"},{value:"custom",label:"自定义范围"}],Ed=(s,t)=>{const a=new Date;if(s==="custom"&&t)return{startDate:t.from,endDate:t.to};let n;switch(s){case"7d":n=He(a,7);break;case"30d":n=He(a,30);break;case"90d":n=He(a,90);break;case"180d":n=He(a,180);break;case"365d":n=He(a,365);break;default:n=He(a,30)}return{startDate:n,endDate:a}};function Fd(){const[s,t]=c.useState("amount"),[a,n]=c.useState("30d"),[l,o]=c.useState({from:He(new Date,7),to:new Date}),{startDate:d,endDate:x}=Ed(a,l),{data:r}=Q({queryKey:["orderStat",{start_date:Pe(d,"yyyy-MM-dd"),end_date:Pe(x,"yyyy-MM-dd")}],queryFn:async()=>{const{data:i}=await kc({start_date:Pe(d,"yyyy-MM-dd"),end_date:Pe(x,"yyyy-MM-dd")});return i},refetchInterval:3e4});return e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Qe,{children:"收入趋势"}),e.jsx(Zs,{children:`${r?.summary.start_date||""} 至 ${r?.summary.end_date||""}`})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(G,{value:a,onValueChange:i=>n(i),children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(B,{children:Rd.map(i=>e.jsx(O,{value:i.value,children:i.label},i.value))})]}),a==="custom"&&e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!l&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:l?.from?l.to?e.jsxs(e.Fragment,{children:[Pe(l.from,"yyyy-MM-dd")," -"," ",Pe(l.to,"yyyy-MM-dd")]}):Pe(l.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})})]})}),e.jsx(Be,{className:"w-auto p-0",align:"end",children:e.jsx(Is,{mode:"range",defaultMonth:l?.from,selected:{from:l?.from,to:l?.to},onSelect:i=>{i?.from&&i?.to&&o({from:i.from,to:i.to})},numberOfMonths:2})})]})]}),e.jsx(vr,{value:s,onValueChange:i=>t(i),children:e.jsxs(ra,{children:[e.jsx(et,{value:"amount",children:"金额"}),e.jsx(et,{value:"count",children:"笔数"})]})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总收入"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Ys(r?.summary?.paid_total||0)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r?.summary?.paid_count||0," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["平均订单金额 ¥",Ys(r?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总佣金"}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Ys(r?.summary?.commission_total||0)]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["共 ",r?.summary?.commission_count||0," 笔"]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["佣金比率 ",r?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]})]}),e.jsx(Oe,{children:e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(ki,{width:"100%",height:"100%",children:e.jsxs(Di,{data:r?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ms.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ms.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:ms.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:ms.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(Ti,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:i=>Pe(new Date(i),"MM-dd",{locale:Ri})}),e.jsx(Pi,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:i=>s==="amount"?`¥${Ys(i)}`:`${i}笔`}),e.jsx(Ii,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Vi,{content:e.jsx(Vd,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Na,{type:"monotone",dataKey:"paid_total",name:"收款金额",stroke:ms.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Na,{type:"monotone",dataKey:"commission_total",name:"佣金金额",stroke:ms.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(wa,{dataKey:"paid_count",name:"收款笔数",fill:ms.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(wa,{dataKey:"commission_count",name:"佣金笔数",fill:ms.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})})]})}var me=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(me||{});const Es={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Bs={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var as=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=5]="RESET_FLOW",s))(as||{});const Nr={1:"新购",2:"续费",3:"升级",5:"流量重置"};var fe=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(fe||{});const ct={0:"待确认",1:"发放中",2:"有效",3:"无效"},dt={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var ne=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(ne||{});const st={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var pe=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(pe||{});const ys=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ts={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var Rt=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(Rt||{});const la={1:"按金额优惠",2:"按比例优惠"},Md={0:"正常",1:"锁定"};var Ms=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(Ms||{});const zd={0:"开启",1:"已关闭"};var ss=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(ss||{});const Js={0:"低",1:"中",2:"高"};function Od(){const s=ns(),{data:t}=Q({queryKey:["pendingTickets"],queryFn:()=>fr({filter:[{id:"status",value:0}],pageSize:999}),staleTime:1e3*30,refetchInterval:1e3*30}),{data:a}=Q({queryKey:["pendingCommissions"],queryFn:()=>gr({filter:[{id:"commission_status",value:fe.PENDING},{id:"status",value:me.COMPLETED},{id:"commission_balance",value:"gt:0"}]}),staleTime:1e3*30,refetchInterval:1e3*30}),n=t?.data||[],l=a?.data||[],o=()=>{const d=new URLSearchParams;d.set("commission_status",fe.PENDING.toString()),d.set("status",me.COMPLETED.toString()),d.set("commission_balance","gt:0"),d.set("page_size","999"),s(`/finance/order?${d.toString()}`)};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(Ie,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${n.length>0?"border-orange-500/50":""}`,onClick:()=>s("/user/ticket"),children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:"待处理工单"}),e.jsx(Ei,{className:`h-4 w-4 ${n.length>0?"text-orange-500":"text-muted-foreground"}`})]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.length>0?"有待处理的工单需要关注":"暂无待处理工单"})]})]}),e.jsxs(Ie,{className:`cursor-pointer transition-colors hover:bg-muted/50 ${l.length>0?"border-blue-500/50":""}`,onClick:o,children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:"待处理佣金"}),e.jsx(Fi,{className:`h-4 w-4 ${l.length>0?"text-blue-500":"text-muted-foreground"}`})]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.length>0?"有待处理的佣金需要确认":"暂无待处理佣金"})]})]})]})}function Fe({className:s,...t}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...t})}function Ld(){return e.jsxs(Ie,{children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Fe,{className:"h-4 w-[100px]"}),e.jsx(Fe,{className:"h-4 w-4"})]}),e.jsxs(Oe,{children:[e.jsx(Fe,{className:"h-8 w-[120px]"}),e.jsx("div",{className:"flex items-center pt-1",children:e.jsx(Fe,{className:"h-4 w-[100px]"})})]})]})}function $d(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((s,t)=>e.jsx(Ld,{},t))})}function ut({title:s,value:t,icon:a,trend:n,className:l}){return e.jsxs(Ie,{className:y("transition-colors hover:border-primary/50",l),children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Qe,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(Oe,{children:[e.jsx("div",{className:"text-2xl font-bold",children:t}),e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Li,{className:y("h-4 w-4",n.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",n.isPositive?"text-emerald-500":"text-red-500"),children:[n.isPositive?"+":"-",Math.abs(n.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:n.label})]})]})]})}function Ad({className:s}){const{data:t,isLoading:a}=Q({queryKey:["dashboardStats"],queryFn:async()=>(await Dc()).data,refetchInterval:3e5});return a||!t?e.jsx($d,{}):e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(ut,{title:"今日收入",value:hs(t.todayIncome),icon:e.jsx(Mi,{className:"h-4 w-4 text-emerald-500"}),trend:{value:t.dayIncomeGrowth,label:"vs 昨日",isPositive:t.dayIncomeGrowth>0}}),e.jsx(ut,{title:"本月收入",value:hs(t.currentMonthIncome),icon:e.jsx(zi,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.monthIncomeGrowth,label:"vs 上月",isPositive:t.monthIncomeGrowth>0}}),e.jsx(ut,{title:"上月佣金支出",value:hs(t.lastMonthCommissionPayout),icon:e.jsx(Oi,{className:"h-4 w-4 text-destructive"}),trend:{value:t.commissionGrowth,label:"vs 上上月",isPositive:t.commissionGrowth>0}}),e.jsx(ut,{title:"本月新增用户",value:t.currentMonthNewUsers,icon:e.jsx(Sn,{className:"h-4 w-4 text-blue-500"}),trend:{value:t.userGrowth,label:"vs 上月",isPositive:t.userGrowth>0}})]})}const tt=c.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(kn,{ref:n,className:y("relative overflow-hidden",s),...a,children:[e.jsx($i,{className:"h-full w-full rounded-[inherit]",children:t}),e.jsx(wt,{}),e.jsx(Ai,{})]}));tt.displayName=kn.displayName;const wt=c.forwardRef(({className:s,orientation:t="vertical",...a},n)=>e.jsx(Dn,{ref:n,orientation:t,className:y("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Hi,{className:"relative flex-1 rounded-full bg-border"})}));wt.displayName=Dn.displayName;const Yt={today:{label:"今天",getValue:()=>{const s=qi();return{start:s,end:Ui(s,1)}}},last7days:{label:"最近7天",getValue:()=>{const s=new Date;return{start:He(s,7),end:s}}},last30days:{label:"最近30天",getValue:()=>{const s=new Date;return{start:He(s,30),end:s}}},custom:{label:"自定义范围",getValue:()=>null}};function za({selectedRange:s,customDateRange:t,onRangeChange:a,onCustomRangeChange:n}){return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(G,{value:s,onValueChange:a,children:[e.jsx(U,{className:"w-[120px]",children:e.jsx(Y,{placeholder:"选择时间范围"})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(Yt).map(([l,{label:o}])=>e.jsx(O,{value:l,children:o},l))})]}),s==="custom"&&e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!t&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:t?.from?t.to?e.jsxs(e.Fragment,{children:[Pe(t.from,"yyyy-MM-dd")," -"," ",Pe(t.to,"yyyy-MM-dd")]}):Pe(t.from,"yyyy-MM-dd"):e.jsx("span",{children:"选择日期范围"})})]})}),e.jsx(Be,{className:"w-auto p-0",align:"end",children:e.jsx(Is,{mode:"range",defaultMonth:t?.from,selected:{from:t?.from,to:t?.to},onSelect:l=>{l?.from&&l?.to&&n({from:l.from,to:l.to})},numberOfMonths:2})})]})]})}const Rs=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Hd({className:s}){const[t,a]=c.useState("today"),[n,l]=c.useState({from:He(new Date,7),to:new Date}),[o,d]=c.useState("today"),[x,r]=c.useState({from:He(new Date,7),to:new Date}),i=c.useMemo(()=>t==="custom"?{start:n.from,end:n.to}:Yt[t].getValue(),[t,n]),h=c.useMemo(()=>o==="custom"?{start:x.from,end:x.to}:Yt[o].getValue(),[o,x]),{data:T}=Q({queryKey:["nodeTrafficRank",i.start,i.end],queryFn:()=>Fa({type:"node",start_time:de.round(i.start.getTime()/1e3),end_time:de.round(i.end.getTime()/1e3)}),refetchInterval:3e4}),{data:C}=Q({queryKey:["userTrafficRank",h.start,h.end],queryFn:()=>Fa({type:"user",start_time:de.round(h.start.getTime()/1e3),end_time:de.round(h.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Ie,{children:[e.jsx(ze,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(Qe,{className:"flex items-center text-base font-medium",children:[e.jsx(Ki,{className:"mr-2 h-4 w-4"}),"节点流量排行"]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(za,{selectedRange:t,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}),e.jsx(_a,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(Oe,{className:"flex-1",children:T?.data?e.jsxs(tt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:T.data.map(m=>e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:m.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?e.jsx(At,{className:"mr-1 h-3 w-3"}):e.jsx(Ht,{className:"mr-1 h-3 w-3"}),Math.abs(m.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${m.value/T.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Rs(m.value)})]})]})})}),e.jsx(ee,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"当前流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.value)}),e.jsx("span",{className:"text-muted-foreground",children:"上期流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.previousValue)}),e.jsx("span",{className:"text-muted-foreground",children:"变化率:"}),e.jsxs("span",{className:y("font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]}),e.jsx("span",{className:"text-muted-foreground",children:"记录时间:"}),e.jsx("span",{className:"font-medium",children:Pe(new Date(m.timestamp),"yyyy-MM-dd HH:mm")})]})})]})},m.id))}),e.jsx(wt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]}),e.jsxs(Ie,{children:[e.jsx(ze,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(Qe,{className:"flex items-center text-base font-medium",children:[e.jsx(Sn,{className:"mr-2 h-4 w-4"}),"用户流量排行"]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(za,{selectedRange:o,customDateRange:x,onRangeChange:d,onCustomRangeChange:r}),e.jsx(_a,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(Oe,{className:"flex-1",children:C?.data?e.jsxs(tt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:C.data.map(m=>e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:m.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?e.jsx(At,{className:"mr-1 h-3 w-3"}):e.jsx(Ht,{className:"mr-1 h-3 w-3"}),Math.abs(m.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${m.value/C.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:Rs(m.value)})]})]})})}),e.jsx(ee,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"当前流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.value)}),e.jsx("span",{className:"text-muted-foreground",children:"上期流量:"}),e.jsx("span",{className:"font-medium",children:Rs(m.previousValue)}),e.jsx("span",{className:"text-muted-foreground",children:"变化率:"}),e.jsxs("span",{className:y("font-medium",m.change>=0?"text-green-600":"text-red-600"),children:[m.change>=0?"+":"",m.change,"%"]}),e.jsx("span",{className:"text-muted-foreground",children:"记录时间:"}),e.jsx("span",{className:"font-medium",children:Pe(new Date(m.timestamp),"yyyy-MM-dd HH:mm")})]})})]})},m.id))}),e.jsx(wt,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:"Loading..."})})})]})]})}const Kd=_s("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function L({className:s,variant:t,...a}){return e.jsx("div",{className:y(Kd({variant:t}),s),...a})}const pt=c.forwardRef(({className:s,value:t,...a},n)=>e.jsx(Tn,{ref:n,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(Bi,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));pt.displayName=Tn.displayName;function qd(){const[s,t]=c.useState(null),[a,n]=c.useState(null),[l,o]=c.useState(!0),[d,x]=c.useState(!1),r=async()=>{try{x(!0);const[T,C]=await Promise.all([Ea.getSystemStatus(),Ea.getQueueStats()]);t(T.data),n(C.data)}catch(T){console.error("Error fetching system data:",T)}finally{o(!1),x(!1)}};c.useEffect(()=>{r();const T=setInterval(r,3e4);return()=>clearInterval(T)},[]);const i=()=>{r()};if(l)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(sa,{className:"h-6 w-6 animate-spin"})});const h=T=>T?e.jsx(Pn,{className:"h-5 w-5 text-green-500"}):e.jsx(In,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Ie,{children:[e.jsxs(ze,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(Qe,{className:"flex items-center gap-2",children:[e.jsx(Gi,{className:"h-5 w-5"}),"队列状态"]}),e.jsx(Zs,{children:"当前队列运行状态"})]}),e.jsx(W,{variant:"outline",size:"icon",onClick:i,disabled:d,children:e.jsx(Yi,{className:y("h-4 w-4",d&&"animate-spin")})})]}),e.jsx(Oe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[h(a?.status||!1),e.jsx("span",{className:"font-medium",children:"运行状态"})]}),e.jsx(L,{variant:a?.status?"secondary":"destructive",children:a?.status?"正常":"异常"})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前等待时间:",a?.wait?.default||0," 秒"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"近期任务数"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.recentJobs||0}),e.jsx(pt,{value:(a?.recentJobs||0)/(a?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(ee,{children:e.jsxs("p",{children:["统计时间范围: ",a?.periods?.recentJobs||0," 小时"]})})]})}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"每分钟处理量"}),e.jsx("p",{className:"text-2xl font-bold",children:a?.jobsPerMinute||0}),e.jsx(pt,{value:(a?.jobsPerMinute||0)/(a?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(ee,{children:e.jsxs("p",{children:["最高吞吐量:"," ",a?.queueWithMaxThroughput?.throughput||0]})})]})})]})]})})]}),e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsxs(Qe,{className:"flex items-center gap-2",children:[e.jsx(Wi,{className:"h-5 w-5"}),"作业详情"]}),e.jsx(Zs,{children:"队列处理详细信息"})]}),e.jsx(Oe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"7日报错数量"}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:a?.failedJobs||0}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["保留 ",a?.periods?.failedJobs||0," 小时"]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"最长运行队列"}),e.jsxs("p",{className:"text-2xl font-bold",children:[a?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:a?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"活跃进程"}),e.jsxs("span",{className:"font-medium",children:[a?.processes||0," /"," ",(a?.processes||0)+(a?.pausedMasters||0)]})]}),e.jsx(pt,{value:(a?.processes||0)/((a?.processes||0)+(a?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Ud(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"仪表盘"})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(ke,{}),e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsx(_e,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border-b pb-6",children:e.jsx(Od,{})}),e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Ad,{}),e.jsx(Fd,{}),e.jsx(Hd,{}),e.jsx(qd,{})]})]})})]})}const Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Ud},Symbol.toStringTag,{value:"Module"})),ge=c.forwardRef(({className:s,orientation:t="horizontal",decorative:a=!0,...n},l)=>e.jsx(Vn,{ref:l,decorative:a,orientation:t,className:y("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...n}));ge.displayName=Vn.displayName;function Gd({className:s,items:t,...a}){const{pathname:n}=Jt(),l=ns(),[o,d]=c.useState(n??"/settings"),x=r=>{d(r),l(r)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(G,{value:o,onValueChange:x,children:[e.jsx(U,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(B,{children:t.map(r=>e.jsx(O,{value:r.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:r.icon}),e.jsx("span",{className:"text-md",children:r.title})]})},r.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:t.map(r=>e.jsxs(Ss,{to:r.href,className:y($s({variant:"ghost"}),n===r.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:r.icon}),r.title]},r.href))})})]})}const wr=[{title:"站点设置",key:"site",icon:e.jsx(Ji,{size:18}),href:"/config/system",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。"},{title:"安全设置",key:"safe",icon:e.jsx(cn,{size:18}),href:"/config/system/safe",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"},{title:"订阅设置",key:"subscribe",icon:e.jsx(dn,{size:18}),href:"/config/system/subscribe",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"},{title:"邀请&佣金",key:"invite",icon:e.jsx(Qi,{size:18}),href:"/config/system/invite",description:"管理用户邀请和佣金系统,配置邀请奖励、分销规则等。"},{title:"节点配置",key:"server",icon:e.jsx(on,{size:18}),href:"/config/system/server",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"},{title:"邮件设置",key:"email",icon:e.jsx(Zi,{size:18}),href:"/config/system/email",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"},{title:"Telegram设置",key:"telegram",icon:e.jsx(Xi,{size:18}),href:"/config/system/telegram",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"},{title:"APP设置",key:"app",icon:e.jsx(ln,{size:18}),href:"/config/system/app",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"}];function Yd(){return e.jsxs(ye,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:"系统设置"}),e.jsx("div",{className:"text-muted-foreground",children:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置"})]}),e.jsx(ge,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Gd,{items:wr})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(Qt,{})})})]})]})]})}const Wd=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"}));function Jd({title:s,description:t,children:a}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e.jsx(ge,{}),a]})}const H=c.forwardRef(({className:s,...t},a)=>e.jsx(Rn,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...t,ref:a,children:e.jsx(eo,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));H.displayName=Rn.displayName;const vs=c.forwardRef(({className:s,...t},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...t}));vs.displayName="Textarea";const Qd=u.object({logo:u.string().nullable().default(""),force_https:u.number().nullable().default(0),stop_register:u.number().nullable().default(0),app_name:u.string().nullable().default(""),app_description:u.string().nullable().default(""),app_url:u.string().nullable().default(""),subscribe_url:u.string().nullable().default(""),try_out_plan_id:u.number().nullable().default(0),try_out_hour:u.coerce.number().nullable().default(0),tos_url:u.string().nullable().default(""),currency:u.string().nullable().default(""),currency_symbol:u.string().nullable().default("")});function Zd(){const[s,t]=c.useState(!1),a=c.useRef(null),{data:n}=Q({queryKey:["settings","site"],queryFn:()=>os("site")}),{data:l}=Q({queryKey:["plans"],queryFn:()=>Ps()}),o=ae({resolver:ie(Qd),defaultValues:{},mode:"onBlur"}),{mutateAsync:d}=Je({mutationFn:cs,onSuccess:i=>{i.data&&A.success("已自动保存")}});c.useEffect(()=>{if(n?.data?.site){const i=n?.data?.site;Object.entries(i).forEach(([h,T])=>{o.setValue(h,T)}),a.current=i}},[n]);const x=c.useCallback(de.debounce(async i=>{if(!de.isEqual(i,a.current)){t(!0);try{const h=Object.entries(i).reduce((T,[C,m])=>(T[C]=m===null?"":m,T),{});await d(h),a.current=i}finally{t(!1)}}},1e3),[d]),r=c.useCallback(i=>{x(i)},[x]);return c.useEffect(()=>{const i=o.watch(h=>{r(h)});return()=>i.unsubscribe()},[o.watch,r]),e.jsx(oe,{...o,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:o.control,name:"app_name",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点名称",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要站点名称的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"app_description",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点描述"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点描述",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要站点描述的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"app_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"站点网址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"当前网站最新网址,将会在邮件等需要用于网址处体现。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"force_https",render:({field:i})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"强制HTTPS"}),e.jsx(F,{children:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"})]}),e.jsx(b,{children:e.jsx(H,{checked:!!i.value,onCheckedChange:h=>{i.onChange(Number(h)),r(o.getValues())}})})]})}),e.jsx(g,{control:o.control,name:"logo",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"LOGO"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入LOGO URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于显示需要LOGO的地方。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"subscribe_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"订阅URL"}),e.jsx(b,{children:e.jsx(vs,{placeholder:"用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于订阅所使用,留空则为站点URL。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"tos_url",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"用户条款(TOS)URL"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入用户条款URL,末尾不要/",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"用于跳转到用户条款(TOS)"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"stop_register",render:({field:i})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"停止新用户注册"}),e.jsx(F,{children:"开启后任何人都将无法进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:!!i.value,onCheckedChange:h=>{i.onChange(Number(h)),r(o.getValues())}})})]})}),e.jsx(g,{control:o.control,name:"try_out_plan_id",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"注册试用"}),e.jsx(b,{children:e.jsxs(G,{value:i.value?.toString(),onValueChange:h=>{i.onChange(Number(h)),r(o.getValues())},children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"关闭"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"关闭"}),l?.data?.map(h=>e.jsx(O,{value:h.id.toString(),children:h.name},h.id.toString()))]})]})}),e.jsx(F,{children:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。"}),e.jsx(k,{})]})}),!!o.watch("try_out_plan_id")&&e.jsx(g,{control:o.control,name:"try_out_hour",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"",children:"注册试用时长"}),e.jsx(b,{children:e.jsx(S,{placeholder:"0",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"注册试用时长,单位为小时。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"currency",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"货币单位"}),e.jsx(b,{children:e.jsx(S,{placeholder:"CNY",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(k,{})]})}),e.jsx(g,{control:o.control,name:"currency_symbol",render:({field:i})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"货币符号"}),e.jsx(b,{children:e.jsx(S,{placeholder:"¥",...i,value:i.value||"",onChange:h=>{i.onChange(h),r(o.getValues())}})}),e.jsx(F,{children:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Xd(){const s=wr.find(t=>t.key==="site");return e.jsx(Jd,{title:s.title,description:s.description,children:e.jsx(Zd,{})})}const eu=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),su=u.object({email_verify:u.boolean().nullable(),safe_mode_enable:u.boolean().nullable(),secure_path:u.string().nullable(),email_whitelist_enable:u.boolean().nullable(),email_whitelist_suffix:u.array(u.string().nullable()).nullable(),email_gmail_limit_enable:u.boolean().nullable(),recaptcha_enable:u.boolean().nullable(),recaptcha_key:u.string().nullable(),recaptcha_site_key:u.string().nullable(),register_limit_by_ip_enable:u.boolean().nullable(),register_limit_count:u.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:u.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:u.boolean().nullable(),password_limit_count:u.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:u.coerce.string().transform(s=>s===""?null:s).nullable()}),tu={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function au(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(su),defaultValues:tu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","safe"],queryFn:()=>os("safe")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.safe){const r=l.data.safe;Object.entries(r).forEach(([i,h])=>{typeof h=="number"?n.setValue(i,String(h)):n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"email_verify",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮箱验证"}),e.jsx(F,{children:"开启后将会强制要求用户进行邮箱验证。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"email_gmail_limit_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"禁止使用Gmail多别名"}),e.jsx(F,{children:"开启后Gmail多别名将无法注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"safe_mode_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"安全模式"}),e.jsx(F,{children:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"secure_path",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"后台路径"}),e.jsx(b,{children:e.jsx(S,{placeholder:"admin",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(F,{children:"后台管理路径,修改后将会改变原有的admin路径"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"email_whitelist_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮箱后缀白名单"}),e.jsx(F,{children:"开启后在名单中的邮箱后缀才允许进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("email_whitelist_enable")&&e.jsx(g,{control:n.control,name:"email_whitelist_suffix",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"白名单后缀"}),e.jsx(b,{children:e.jsx(vs,{placeholder:"请输入后缀域名,逗号分割 如:qq.com,gmail.com",value:r.value?.length?r.value.join(","):"",onChange:i=>{const h=i.target.value?i.target.value.split(","):[];r.onChange(h),x(n.getValues())}})}),e.jsx(F,{children:"请使用逗号进行分割,如:qq.com,gmail.com。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"recaptcha_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"防机器人"}),e.jsx(F,{children:"开启后将会使用Google reCAPTCHA防止机器人。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"recaptcha_key",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入密钥",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"recaptcha_site_key",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"站点密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入站点密钥",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:n.control,name:"register_limit_by_ip_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"IP注册限制"}),e.jsx(F,{children:"开启后同一IP将会被限制注册次数。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"register_limit_count",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制次数"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制次数",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"register_limit_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制时长(分钟)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制时长",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:n.control,name:"password_limit_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"密码错误限制"}),e.jsx(F,{children:"开启后密码错误将会被限制登录。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"password_limit_count",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制次数"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制次数",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"password_limit_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限制时长(分钟)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入限制时长",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsx(k,{})]})})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function nu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"安全设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。"})]}),e.jsx(ge,{}),e.jsx(au,{})]})}const ru=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),lu=u.object({plan_change_enable:u.boolean().nullable().default(!1),reset_traffic_method:u.coerce.number().nullable().default(0),surplus_enable:u.boolean().nullable().default(!1),new_order_event_id:u.coerce.number().nullable().default(0),renew_order_event_id:u.coerce.number().nullable().default(0),change_order_event_id:u.coerce.number().nullable().default(0),show_info_to_server_enable:u.boolean().nullable().default(!1),show_protocol_to_server_enable:u.boolean().nullable().default(!1),default_remind_expire:u.boolean().nullable().default(!1),default_remind_traffic:u.boolean().nullable().default(!1),remind_mail_enable:u.boolean().nullable().default(!1),subscribe_path:u.string().nullable().default("s")}),iu={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,remind_mail_enable:!1,subscribe_path:"s"};function ou(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(lu),defaultValues:iu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","subscribe"],queryFn:()=>os("subscribe")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data?.subscribe){const r=l?.data?.subscribe;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"plan_change_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"允许用户更改订阅"}),e.jsx(F,{children:"开启后用户将会可以对订阅计划进行变更。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"reset_traffic_method",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"月流量重置方式"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"每月1号"}),e.jsx(O,{value:"1",children:"按月重置"}),e.jsx(O,{value:"2",children:"不重置"}),e.jsx(O,{value:"3",children:"每年1月1号"}),e.jsx(O,{value:"4",children:"按年重置"})]})]})})}),e.jsx(F,{children:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"surplus_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"开启折抵方案"}),e.jsx(F,{children:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"new_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅新购时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"新购订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"renew_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅续费时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"续费订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"change_order_event_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"当订阅变更时触发事件"}),e.jsx("div",{className:"relative w-max",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString(),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不执行任何动作"}),e.jsx(O,{value:"1",children:"重置用户流量"})]})]})})}),e.jsx(F,{children:"变更订阅完成时将触发该任务。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"subscribe_path",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"订阅路径"}),e.jsx(b,{children:e.jsx(S,{placeholder:"subscribe",...r,value:r.value||"",onChange:i=>{r.onChange(i),x(n.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["订阅路径,修改后将会改变原有的subscribe路径",e.jsx("br",{}),"当前订阅路径格式:",r.value?`${r.value}/xxxxxxxxxx`:"s/xxxxxxxxxx"]}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"show_info_to_server_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"在订阅中展示订阅信息"}),e.jsx(F,{children:"开启后将会在用户订阅节点时输出订阅信息。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"show_protocol_to_server_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"在订阅中线路名称中显示协议名称"}),e.jsx(F,{children:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"remind_mail_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邮件提醒"}),e.jsx(F,{children:"开启后用户订阅即将到期时和流量告急时时将发送邮件通知。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value||!1,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function cu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"订阅设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。"})]}),e.jsx(ge,{}),e.jsx(ou,{})]})}const du=Object.freeze(Object.defineProperty({__proto__:null,default:cu},Symbol.toStringTag,{value:"Module"})),uu=u.object({invite_force:u.boolean().default(!1),invite_commission:u.coerce.string().default("0"),invite_gen_limit:u.coerce.string().default("0"),invite_never_expire:u.boolean().default(!1),commission_first_time_enable:u.boolean().default(!1),commission_auto_check_enable:u.boolean().default(!1),commission_withdraw_limit:u.coerce.string().default("0"),commission_withdraw_method:u.array(u.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:u.boolean().default(!1),commission_distribution_enable:u.boolean().default(!1),commission_distribution_l1:u.coerce.number().default(0),commission_distribution_l2:u.coerce.number().default(0),commission_distribution_l3:u.coerce.number().default(0)}),xu={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function mu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(uu),defaultValues:xu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","invite"],queryFn:()=>os("invite")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data?.invite){const r=l?.data?.invite;Object.entries(r).forEach(([i,h])=>{typeof h=="number"?n.setValue(i,String(h)):n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"invite_force",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"开启强制邀请"}),e.jsx(F,{children:"开启后只有被邀请的用户才可以进行注册。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"invite_commission",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:" 邀请佣金百分比"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"invite_gen_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"用户可创建邀请码上限"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"用户可创建邀请码上限"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"invite_never_expire",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"邀请码永不失效"}),e.jsx(F,{children:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_first_time_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"佣金仅首次发放"}),e.jsx(F,{children:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_auto_check_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"佣金自动确认"}),e.jsx(F,{children:"开启后佣金将会在订单完成3日后自动进行确认。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_withdraw_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"提现单申请门槛(元)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"小于门槛金额的提现单将不会被提交。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_withdraw_method",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"提现方式"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:Array.isArray(r.value)?r.value.join(","):"",onChange:i=>{const h=i.target.value.split(",").filter(Boolean);r.onChange(h),x(n.getValues())}})}),e.jsx(F,{children:"可以支持的提现方式,多个用逗号分隔。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"withdraw_close_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"关闭提现"}),e.jsx(F,{children:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"三级分销"}),e.jsx(F,{children:"开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。"})]}),e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:i=>{r.onChange(i),x(n.getValues())}})})]})}),n.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:n.control,name:"commission_distribution_l1",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"一级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_l2",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"二级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"commission_distribution_l3",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"三级邀请人比例"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入比例如:50",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):0;r.onChange(h),x(n.getValues())}})}),e.jsx(k,{})]})})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function hu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邀请&佣金设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"邀请注册、佣金相关设置。"})]}),e.jsx(ge,{}),e.jsx(mu,{})]})}const ju=Object.freeze(Object.defineProperty({__proto__:null,default:hu},Symbol.toStringTag,{value:"Module"})),gu=u.object({frontend_theme:u.string().nullable(),frontend_theme_sidebar:u.string().nullable(),frontend_theme_header:u.string().nullable(),frontend_theme_color:u.string().nullable(),frontend_background_url:u.string().url().nullable()}),fu={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function pu(){const{data:s}=Q({queryKey:["settings","frontend"],queryFn:()=>os("frontend")}),t=ae({resolver:ie(gu),defaultValues:fu,mode:"onChange"});c.useEffect(()=>{if(s?.data?.frontend){const n=s?.data?.frontend;Object.entries(n).forEach(([l,o])=>{t.setValue(l,o)})}},[s]);function a(n){cs(n).then(({data:l})=>{l&&A.success("更新成功")})}return e.jsx(oe,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(a),className:"space-y-8",children:[e.jsx(g,{control:t.control,name:"frontend_theme_sidebar",render:({field:n})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"边栏风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(b,{children:e.jsx(H,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(g,{control:t.control,name:"frontend_theme_header",render:({field:n})=>e.jsxs(j,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(p,{className:"text-base",children:"头部风格"}),e.jsx(F,{children:"边栏风格"})]}),e.jsx(b,{children:e.jsx(H,{checked:n.value,onCheckedChange:n.onChange})})]})}),e.jsx(g,{control:t.control,name:"frontend_theme_color",render:({field:n})=>e.jsxs(j,{children:[e.jsx(p,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(b,{children:e.jsxs("select",{className:y($s({variant:"outline"}),"w-[200px] appearance-none font-normal"),...n,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(ea,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(F,{children:"主题色"}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"frontend_background_url",render:({field:n})=>e.jsxs(j,{children:[e.jsx(p,{children:"背景"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入图片地址",...n})}),e.jsx(F,{children:"将会在后台登录页面进行展示。"}),e.jsx(k,{})]})}),e.jsx(D,{type:"submit",children:"保存设置"})]})})}function vu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(ge,{}),e.jsx(pu,{})]})}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:vu},Symbol.toStringTag,{value:"Module"})),yu=u.object({server_pull_interval:u.coerce.number().nullable(),server_push_interval:u.coerce.number().nullable(),server_token:u.string().nullable(),device_limit_mode:u.coerce.number().nullable()}),Nu={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function wu(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(yu),defaultValues:Nu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","server"],queryFn:()=>os("server")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.server){const r=l.data.server;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"server_token",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"通讯密钥"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",...r,value:r.value||""})}),e.jsx(F,{children:"Xboard与节点通讯的密钥,以便数据不会被他人获取。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"server_pull_interval",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"节点拉取动作轮询间隔"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):null;r.onChange(h)}})}),e.jsx(F,{children:"节点从面板获取数据的间隔频率。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"server_push_interval",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"节点推送动作轮询间隔"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入",...r,value:r.value||"",onChange:i=>{const h=i.target.value?Number(i.target.value):null;r.onChange(h)}})}),e.jsx(F,{children:"节点推送数据到面板的间隔频率。"}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"device_limit_mode",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"设备限制模式"}),e.jsxs(G,{onValueChange:r.onChange,value:r.value?.toString()||"0",children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择设备限制模式"})})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"严格模式"}),e.jsx(O,{value:"1",children:"宽松模式"})]})]}),e.jsx(F,{children:"宽松模式下,同一IP地址使用多个节点只统计为一个设备。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function _u(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"节点配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。"})]}),e.jsx(ge,{}),e.jsx(wu,{})]})}const Cu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"}));function Su({open:s,onOpenChange:t,result:a}){const n=!a.error;return e.jsx(ue,{open:s,onOpenChange:t,children:e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n?e.jsx(Pn,{className:"h-5 w-5 text-green-500"}):e.jsx(In,{className:"h-5 w-5 text-destructive"}),e.jsx(xe,{children:n?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Se,{children:n?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(tt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const ku=u.object({email_template:u.string().nullable().default("classic"),email_host:u.string().nullable().default(""),email_port:u.string().regex(/^\d+$/).nullable().default("465"),email_username:u.string().nullable().default(""),email_password:u.string().nullable().default(""),email_encryption:u.string().nullable().default(""),email_from_address:u.string().email().nullable().default("")});function Du(){const[s,t]=c.useState(null),[a,n]=c.useState(!1),l=c.useRef(null),[o,d]=c.useState(!1),x=ae({resolver:ie(ku),defaultValues:{},mode:"onBlur"}),{data:r}=Q({queryKey:["settings","email"],queryFn:()=>os("email")}),{data:i}=Q({queryKey:["emailTemplate"],queryFn:()=>Cd()}),{mutateAsync:h}=Je({mutationFn:cs,onSuccess:_=>{_.data&&A.success("已自动保存")}}),{mutate:T,isPending:C}=Je({mutationFn:Sd,onMutate:()=>{t(null),n(!1)},onSuccess:_=>{t(_.data),n(!0),_.data.error||A.success("发送成功")}});c.useEffect(()=>{if(r?.data.email){const _=r.data.email;Object.entries(_).forEach(([v,N])=>{x.setValue(v,N)}),l.current=_}},[r]);const m=c.useCallback(de.debounce(async _=>{if(!de.isEqual(_,l.current)){d(!0);try{await h(_),l.current=_}finally{d(!1)}}},1e3),[h]),w=c.useCallback(_=>{m(_)},[m]);return c.useEffect(()=>{const _=x.watch(v=>{w(v)});return()=>_.unsubscribe()},[x.watch,w]),e.jsxs(e.Fragment,{children:[e.jsx(oe,{...x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:x.control,name:"email_host",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP服务器地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的服务地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_port",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP服务端口"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"常见的端口有25, 465, 587"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_encryption",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP加密方式"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"465端口加密方式一般为SSL,587端口加密方式一般为TLS"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_username",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP账号"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的账号"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_password",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"SMTP密码"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||"",type:"password"})}),e.jsx(F,{children:"由邮件服务商提供的密码"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_from_address",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"发件地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入",..._,value:_.value||""})}),e.jsx(F,{children:"由邮件服务商提供的发件地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"email_template",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"邮件模板"}),e.jsxs(G,{onValueChange:v=>{_.onChange(v),w(x.getValues())},value:_.value||void 0,children:[e.jsx(b,{children:e.jsx(U,{className:"w-[200px]",children:e.jsx(Y,{placeholder:"选择邮件模板"})})}),e.jsx(B,{children:i?.data?.map(v=>e.jsx(O,{value:v,children:v},v))})]}),e.jsx(F,{children:"你可以在文档查看如何自定义邮件模板"}),e.jsx(k,{})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(D,{onClick:()=>T(),loading:C,disabled:C,children:C?"发送中...":"发送测试邮件"})})]})}),o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."}),s&&e.jsx(Su,{open:a,onOpenChange:n,result:s})]})}function Tu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"邮件设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。"})]}),e.jsx(ge,{}),e.jsx(Du,{})]})}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:Tu},Symbol.toStringTag,{value:"Module"})),Iu=u.object({telegram_bot_enable:u.boolean().nullable(),telegram_bot_token:u.string().nullable(),telegram_discuss_link:u.string().nullable()}),Vu={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function Ru(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(Iu),defaultValues:Vu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","telegram"],queryFn:()=>os("telegram")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:h=>{h.data&&A.success("已自动保存")}}),{mutate:d,isPending:x}=Je({mutationFn:kd,onSuccess:h=>{h.data&&A.success("Webhook设置成功")}});c.useEffect(()=>{if(l?.data.telegram){const h=l.data.telegram;Object.entries(h).forEach(([T,C])=>{n.setValue(T,C)}),a.current=h}},[l]);const r=c.useCallback(de.debounce(async h=>{if(!de.isEqual(h,a.current)){t(!0);try{await o(h),a.current=h}finally{t(!1)}}},1e3),[o]),i=c.useCallback(h=>{r(h)},[r]);return c.useEffect(()=>{const h=n.watch(T=>{i(T)});return()=>h.unsubscribe()},[n.watch,i]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:n.control,name:"telegram_bot_token",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"机器人Token"}),e.jsx(b,{children:e.jsx(S,{placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx",...h,value:h.value||""})}),e.jsx(F,{children:"请输入由Botfather提供的token。"}),e.jsx(k,{})]})}),n.watch("telegram_bot_token")&&e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"设置Webhook"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(D,{loading:x,disabled:x,onClick:()=>d(),children:x?"Webhook设置中...":"一键设置"}),s&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"保存中..."})]}),e.jsx(F,{children:"对机器人进行Webhook设置,不设置将无法收到Telegram通知。"}),e.jsx(k,{})]}),e.jsx(g,{control:n.control,name:"telegram_bot_enable",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"开启机器人通知"}),e.jsx(F,{children:"开启后bot将会对绑定了telegram的管理员和用户进行基础通知。"}),e.jsx(b,{children:e.jsx(H,{checked:h.value||!1,onCheckedChange:T=>{h.onChange(T),i(n.getValues())}})}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"telegram_discuss_link",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"群组地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://t.me/xxxxxx",...h,value:h.value||""})}),e.jsx(F,{children:"填写后将会在用户端展示,或者被用于需要的地方。"}),e.jsx(k,{})]})}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Eu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Telegram设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。"})]}),e.jsx(ge,{}),e.jsx(Ru,{})]})}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),Mu=u.object({windows_version:u.string().nullable(),windows_download_url:u.string().nullable(),macos_version:u.string().nullable(),macos_download_url:u.string().nullable(),android_version:u.string().nullable(),android_download_url:u.string().nullable()}),zu={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Ou(){const[s,t]=c.useState(!1),a=c.useRef(null),n=ae({resolver:ie(Mu),defaultValues:zu,mode:"onBlur"}),{data:l}=Q({queryKey:["settings","app"],queryFn:()=>os("app")}),{mutateAsync:o}=Je({mutationFn:cs,onSuccess:r=>{r.data&&A.success("已自动保存")}});c.useEffect(()=>{if(l?.data.app){const r=l.data.app;Object.entries(r).forEach(([i,h])=>{n.setValue(i,h)}),a.current=r}},[l]);const d=c.useCallback(de.debounce(async r=>{if(!de.isEqual(r,a.current)){t(!0);try{await o(r),a.current=r}finally{t(!1)}}},1e3),[o]),x=c.useCallback(r=>{d(r)},[d]);return c.useEffect(()=>{const r=n.watch(i=>{x(i)});return()=>r.unsubscribe()},[n.watch,x]),e.jsx(oe,{...n,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Windows"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Windows端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"windows_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"windows_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.exe",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"macOS"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"macOS端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"macos_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"macos_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.dmg",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Android"}),e.jsx("div",{className:"text-[0.8rem] text-muted-foreground",children:"Android端版本号及下载地址"}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1",children:e.jsx(g,{control:n.control,name:"android_version",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"1.0.0",...r,value:r.value||""})}),e.jsx(k,{})]})})}),e.jsx("div",{children:e.jsx(g,{control:n.control,name:"android_download_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(S,{placeholder:"https://xxx.com/xxx.apk",...r,value:r.value||""})}),e.jsx(k,{})]})})})]})]}),s&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"保存中..."})]})})}function Lu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"APP设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。"})]}),e.jsx(ge,{}),e.jsx(Ou,{})]})}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),ia=c.forwardRef(({className:s,...t},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...t})}));ia.displayName="Table";const oa=c.forwardRef(({className:s,...t},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...t}));oa.displayName="TableHeader";const ca=c.forwardRef(({className:s,...t},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...t}));ca.displayName="TableBody";const Au=c.forwardRef(({className:s,...t},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...t}));Au.displayName="TableFooter";const js=c.forwardRef(({className:s,...t},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...t}));js.displayName="TableRow";const da=c.forwardRef(({className:s,...t},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));da.displayName="TableHead";const Os=c.forwardRef(({className:s,...t},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t}));Os.displayName="TableCell";const Hu=c.forwardRef(({className:s,...t},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...t}));Hu.displayName="TableCaption";function Ku({table:s}){const[t,a]=c.useState("");c.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const n=l=>{const o=parseInt(l);!isNaN(o)&&o>=1&&o<=s.getPageCount()?s.setPageIndex(o-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(G,{value:`${s.getState().pagination.pageSize}`,onValueChange:l=>{s.setPageSize(Number(l))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(l=>e.jsx(O,{value:`${l}`,children:l},l))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(S,{type:"text",value:t,onChange:l=>a(l.target.value),onBlur:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&n(l.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(D,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(so,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(_n,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(Xt,{className:"h-4 w-4"})]}),e.jsxs(D,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(to,{className:"h-4 w-4"})]})]})]})]})}function Ge({table:s,toolbar:t,draggable:a=!1,onDragStart:n,onDragEnd:l,onDragOver:o,onDragLeave:d,onDrop:x,showPagination:r=!0,isLoading:i=!1}){const h=c.useRef(null),T=s.getAllColumns().filter(_=>_.getIsPinned()==="left"),C=s.getAllColumns().filter(_=>_.getIsPinned()==="right"),m=_=>T.slice(0,_).reduce((v,N)=>v+(N.getSize()??0),0),w=_=>C.slice(_+1).reduce((v,N)=>v+(N.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof t=="function"?t(s):t,e.jsx("div",{ref:h,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(ia,{children:[e.jsx(oa,{children:s.getHeaderGroups().map(_=>e.jsx(js,{className:"hover:bg-transparent",children:_.headers.map((v,N)=>{const P=v.column.getIsPinned()==="left",f=v.column.getIsPinned()==="right",R=P?m(T.indexOf(v.column)):void 0,z=f?w(C.indexOf(v.column)):void 0;return e.jsx(da,{colSpan:v.colSpan,style:{width:v.getSize(),...P&&{left:R},...f&&{right:z}},className:y("h-11 bg-card px-4 text-muted-foreground",(P||f)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",P&&"before:right-0",f&&"before:left-0"]),children:v.isPlaceholder?null:vt(v.column.columnDef.header,v.getContext())},v.id)})},_.id))}),e.jsx(ca,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((_,v)=>e.jsx(js,{"data-state":_.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:N=>n?.(N,v),onDragEnd:l,onDragOver:o,onDragLeave:d,onDrop:N=>x?.(N,v),children:_.getVisibleCells().map((N,P)=>{const f=N.column.getIsPinned()==="left",R=N.column.getIsPinned()==="right",z=f?m(T.indexOf(N.column)):void 0,$=R?w(C.indexOf(N.column)):void 0;return e.jsx(Os,{style:{width:N.column.getSize(),...f&&{left:z},...R&&{right:$}},className:y("bg-card",(f||R)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",f&&"before:right-0",R&&"before:left-0"]),children:vt(N.column.columnDef.cell,N.getContext())},N.id)})},_.id)):e.jsx(js,{children:e.jsx(Os,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),r&&e.jsx(Ku,{table:s})]})}const _r=(s,t)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(S,{placeholder:s.placeholder,...t});break;case"textarea":a=e.jsx(vs,{placeholder:s.placeholder,...t});break;case"select":a=e.jsx("select",{className:y(Ls({variant:"outline"}),"w-full appearance-none font-normal"),...t,children:s.select_options&&Object.keys(s.select_options).map(n=>e.jsx("option",{value:n,children:s.select_options?.[n]},n))});break;default:a=null;break}return a},qu=u.object({id:u.number().nullable(),name:u.string().min(2,"名称至少需要2个字符").max(30,"名称不能超过30个字符"),icon:u.string().optional().nullable(),notify_domain:u.string().refine(s=>!s||/^https?:\/\/\S+/.test(s),"请输入有效的URL").optional().nullable(),handling_fee_fixed:u.coerce.number().min(0).optional().nullable(),handling_fee_percent:u.coerce.number().min(0).max(100).optional().nullable(),payment:u.string().min(1,"请选择支付接口"),config:u.record(u.string(),u.string())}),Oa={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function Cr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=Oa}){const[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState([]),[h,T]=c.useState([]),C=ae({resolver:ie(qu),defaultValues:n,mode:"onChange"}),m=C.watch("payment");c.useEffect(()=>{l&&(async()=>{const{data:v}=await Uc();i(v)})()},[l]),c.useEffect(()=>{if(!m||!l)return;(async()=>{const v={payment:m,...a==="edit"&&{id:Number(C.getValues("id"))}};Bc(v).then(({data:N})=>{T(N);const P=N.reduce((f,R)=>(R.field_name&&(f[R.field_name]=R.value??""),f),{});C.setValue("config",P)})})()},[m,l,C,a]);const w=async _=>{x(!0),(await Gc(_)).data&&(A.success("保存成功"),C.reset(Oa),s(),o(!1)),x(!1)};return e.jsxs(ue,{open:l,onOpenChange:o,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加支付方式"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:a==="add"?"添加支付方式":"编辑支付方式"})}),e.jsx(oe,{...C,children:e.jsxs("form",{onSubmit:C.handleSubmit(w),className:"space-y-4",children:[e.jsx(g,{control:C.control,name:"name",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入支付名称",..._})}),e.jsx(F,{children:"用于前端显示"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"icon",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"图标URL"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://example.com/icon.svg",..._})}),e.jsx(F,{children:"用于前端显示的图标地址"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"notify_domain",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"通知域名"}),e.jsx(b,{children:e.jsx(S,{placeholder:"https://example.com",..._})}),e.jsx(F,{children:"网关通知将发送到该域名"}),e.jsx(k,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(g,{control:C.control,name:"handling_fee_percent",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"百分比手续费(%)"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0-100",..._})}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"handling_fee_fixed",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"固定手续费"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0",..._})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:C.control,name:"payment",render:({field:_})=>e.jsxs(j,{children:[e.jsx(p,{children:"支付接口"}),e.jsxs(G,{value:_.value,onValueChange:_.onChange,children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择支付接口"})})}),e.jsx(B,{children:r.map(v=>e.jsx(O,{value:v,children:v},v))})]}),e.jsx(k,{})]})}),h.map(_=>e.jsx(g,{control:C.control,name:`config.${_.field_name}`,render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:_.label}),e.jsx(b,{children:_r(_,v)}),e.jsx(k,{})]})},_.field_name)),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",disabled:d,className:y(d&&"cursor-not-allowed opacity-50"),children:d?"保存中...":"提交"})]})]})})]})]})}function I({column:s,title:t,tooltip:a,className:n}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(D,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",n),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:t}),a&&e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(Ca,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(ee,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(At,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Ht,{className:"h-4 w-4 text-foreground/70"}):e.jsx(ao,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",n),children:[e.jsx("span",{children:t}),a&&e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx(Ca,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(ee,{children:a})]})})]})}const Uu=no,Bu=ro,Gu=lo,Sr=c.forwardRef(({className:s,...t},a)=>e.jsx(En,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Sr.displayName=En.displayName;const kr=c.forwardRef(({className:s,...t},a)=>e.jsxs(Gu,{children:[e.jsx(Sr,{}),e.jsx(Fn,{ref:a,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...t})]}));kr.displayName=Fn.displayName;const Dr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...t});Dr.displayName="AlertDialogHeader";const Tr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Tr.displayName="AlertDialogFooter";const Pr=c.forwardRef(({className:s,...t},a)=>e.jsx(Mn,{ref:a,className:y("text-lg font-semibold",s),...t}));Pr.displayName=Mn.displayName;const Ir=c.forwardRef(({className:s,...t},a)=>e.jsx(zn,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));Ir.displayName=zn.displayName;const Vr=c.forwardRef(({className:s,...t},a)=>e.jsx(On,{ref:a,className:y(Ls(),s),...t}));Vr.displayName=On.displayName;const Rr=c.forwardRef(({className:s,...t},a)=>e.jsx(Ln,{ref:a,className:y(Ls({variant:"outline"}),"mt-2 sm:mt-0",s),...t}));Rr.displayName=Ln.displayName;function Ye({onConfirm:s,children:t,title:a="确认操作",description:n="确定要执行此操作吗?",cancelText:l="取消",confirmText:o="确认",variant:d="default",className:x}){return e.jsxs(Uu,{children:[e.jsx(Bu,{asChild:!0,children:t}),e.jsxs(kr,{className:y("sm:max-w-[425px]",x),children:[e.jsxs(Dr,{children:[e.jsx(Pr,{children:a}),e.jsx(Ir,{children:n})]}),e.jsxs(Tr,{children:[e.jsx(Rr,{asChild:!0,children:e.jsx(D,{variant:"outline",children:l})}),e.jsx(Vr,{asChild:!0,children:e.jsx(D,{variant:d,onClick:s,children:o})})]})]})]})}const Er=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Yu=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:a})=>e.jsx(I,{column:a,title:"启用"}),cell:({row:a})=>e.jsx(H,{defaultChecked:a.getValue("enable"),onCheckedChange:async()=>{const{data:n}=await Wc({id:a.original.id});n||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:a})=>e.jsx(I,{column:a,title:"显示名称"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:a})=>e.jsx(I,{column:a,title:"支付接口"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:a.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:a})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(I,{column:a,title:"通知地址"}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{className:"ml-1",children:e.jsx(Er,{className:"h-4 w-4"})}),e.jsx(ee,{children:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。"})]})})]}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:a.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:a})=>e.jsx(I,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Cr,{refetch:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ye,{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",onConfirm:async()=>{const{data:n}=await Yc({id:a.original.id});n&&s()},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function Wu({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽支付方式进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Cr,{refetch:t}),e.jsx(S,{placeholder:"搜索支付方式...",value:s.getColumn("name")?.getFilterValue()??"",onChange:o=>s.getColumn("name")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}function Ju(){const[s,t]=c.useState([]),[a,n]=c.useState([]),[l,o]=c.useState(!1),[d,x]=c.useState([]),[r,i]=c.useState({"drag-handle":!1}),[h,T]=c.useState({pageSize:20,pageIndex:0}),{refetch:C}=Q({queryKey:["paymentList"],queryFn:async()=>{const{data:N}=await qc();return x(N?.map(P=>({...P,enable:!!P.enable}))||[]),N}});c.useEffect(()=>{i({"drag-handle":l}),T({pageSize:l?99999:10,pageIndex:0})},[l]);const m=(N,P)=>{l&&(N.dataTransfer.setData("text/plain",P.toString()),N.currentTarget.classList.add("opacity-50"))},w=(N,P)=>{if(!l)return;N.preventDefault(),N.currentTarget.classList.remove("bg-muted");const f=parseInt(N.dataTransfer.getData("text/plain"));if(f===P)return;const R=[...d],[z]=R.splice(f,1);R.splice(P,0,z),x(R)},_=async()=>{l?Jc({ids:d.map(N=>N.id)}).then(()=>{C(),o(!1),A.success("排序保存成功")}):o(!0)},v=Le({data:d,columns:Yu({refetch:C,isSortMode:l}),state:{sorting:a,columnFilters:s,columnVisibility:r,pagination:h},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),initialState:{columnPinning:{right:["actions"]}},pageCount:l?1:void 0});return e.jsx(Ge,{table:v,toolbar:N=>e.jsx(Wu,{table:N,refetch:C,saveOrder:_,isSortMode:l}),draggable:l,onDragStart:m,onDragEnd:N=>N.currentTarget.classList.remove("opacity-50"),onDragOver:N=>{N.preventDefault(),N.currentTarget.classList.add("bg-muted")},onDragLeave:N=>N.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!l})}function Qu(){return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"支付配置"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置支付方式,包括支付宝、微信等。"})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ju,{})})]})]})}const Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Qu},Symbol.toStringTag,{value:"Module"}));function Xu({themeKey:s,themeInfo:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(!1),[d,x]=c.useState(!1),r=ae({defaultValues:t.configs.reduce((T,C)=>(T[C.field_name]="",T),{})}),i=async()=>{o(!0),Pc(s).then(({data:T})=>{Object.entries(T).forEach(([C,m])=>{r.setValue(C,m)})}).finally(()=>{o(!1)})},h=async T=>{x(!0),Ic(s,T).then(()=>{A.success("保存成功"),n(!1)}).finally(()=>{x(!1)})};return e.jsxs(ue,{open:a,onOpenChange:T=>{n(T),T?i():r.reset()},children:[e.jsx(Re,{asChild:!0,children:e.jsx(D,{variant:"outline",children:"主题设置"})}),e.jsxs(ce,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsxs(xe,{children:["配置",t.name,"主题"]}),e.jsx(Se,{children:"修改主题的样式、布局和其他显示选项。"})]}),l?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(sa,{className:"h-6 w-6 animate-spin"})}):e.jsx(oe,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(h),className:"space-y-4",children:[t.configs.map(T=>e.jsx(g,{control:r.control,name:T.field_name,render:({field:C})=>e.jsxs(j,{children:[e.jsx(p,{children:T.label}),e.jsx(b,{children:_r(T,C)}),e.jsx(k,{})]})},T.field_name)),e.jsxs(Ee,{className:"mt-6 gap-2",children:[e.jsx(D,{type:"button",variant:"secondary",onClick:()=>n(!1),children:"取消"}),e.jsx(D,{type:"submit",loading:d,children:"保存"})]})]})})]})]})}function ex(){const[s,t]=c.useState(null),[a,n]=c.useState(!1),[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState(null),h=c.useRef(null),[T,C]=c.useState(0),{data:m,isLoading:w,refetch:_}=Q({queryKey:["themeList"],queryFn:async()=>{const{data:E}=await Tc();return E}}),v=async E=>{t(E),Ec({frontend_theme:E}).then(()=>{A.success("主题切换成功"),_()}).finally(()=>{t(null)})},N=async E=>{if(!E.name.endsWith(".zip")){A.error("只支持上传 ZIP 格式的主题文件");return}n(!0),Vc(E).then(()=>{A.success("主题上传成功"),o(!1),_()}).finally(()=>{n(!1),h.current&&(h.current.value="")})},P=E=>{E.preventDefault(),E.stopPropagation(),E.type==="dragenter"||E.type==="dragover"?x(!0):E.type==="dragleave"&&x(!1)},f=E=>{E.preventDefault(),E.stopPropagation(),x(!1),E.dataTransfer.files&&E.dataTransfer.files[0]&&N(E.dataTransfer.files[0])},R=()=>{r&&C(E=>E===0?r.images.length-1:E-1)},z=()=>{r&&C(E=>E===r.images.length-1?0:E+1)},$=(E,K)=>{C(0),i({name:E,images:K})};return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"主题配置"})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。"}),e.jsxs(D,{onClick:()=>o(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Sa,{className:"mr-2 h-4 w-4"}),"上传主题"]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:w?e.jsxs(e.Fragment,{children:[e.jsx(La,{}),e.jsx(La,{})]}):m?.themes&&Object.entries(m.themes).map(([E,K])=>e.jsx(Ie,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:K.background_url?`url(${K.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",K.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!K.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Ye,{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",confirmText:"删除",variant:"destructive",onConfirm:async()=>{if(E===m?.active){A.error("不能删除当前使用的主题");return}t(E),Rc(E).then(()=>{A.success("主题删除成功"),_()}).finally(()=>{t(null)})},children:e.jsx(D,{disabled:s===E,loading:s===E,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(rs,{className:"h-4 w-4"})})})}),e.jsxs(ze,{children:[e.jsx(Qe,{children:K.name}),e.jsx(Zs,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:K.description}),K.version&&e.jsxs("div",{className:"text-sm text-muted-foreground",children:["版本: ",K.version]})]})})]}),e.jsxs(Oe,{className:"flex items-center justify-end space-x-3",children:[K.images&&Array.isArray(K.images)&&K.images.length>0&&e.jsx(D,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>$(K.name,K.images),children:e.jsx(io,{className:"h-4 w-4"})}),e.jsx(Xu,{themeKey:E,themeInfo:K}),e.jsx(D,{onClick:()=>v(E),disabled:s===E||E===m.active,loading:s===E,variant:E===m.active?"secondary":"default",children:E===m.active?"当前主题":"激活主题"})]})]})},E))}),e.jsx(ue,{open:l,onOpenChange:o,children:e.jsxs(ce,{className:"sm:max-w-md",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"上传主题"}),e.jsx(Se,{children:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。"})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",d&&"border-primary/50 bg-muted/50"),onDragEnter:P,onDragLeave:P,onDragOver:P,onDrop:f,children:[e.jsx("input",{type:"file",ref:h,className:"hidden",accept:".zip",onChange:E=>{const K=E.target.files?.[0];K&&N(K)}}),a?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"正在上传..."})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Sa,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:["将主题文件拖放到此处,或者",e.jsx("button",{type:"button",onClick:()=>h.current?.click(),className:"mx-1 text-primary hover:underline",children:"点击选择"})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"支持 .zip 格式的主题包"})]})]})})]})]})}),e.jsx(ue,{open:!!r,onOpenChange:E=>{E||(i(null),C(0))},children:e.jsxs(ce,{className:"max-w-4xl",children:[e.jsxs(je,{children:[e.jsxs(xe,{children:[r?.name," 主题预览"]}),e.jsx(Se,{className:"text-center",children:r&&`${T+1} / ${r.images.length}`})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:r?.images[T]&&e.jsx("img",{src:r.images[T],alt:`${r.name} 预览图 ${T+1}`,className:"h-full w-full object-contain"})}),r&&r.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(D,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:R,children:e.jsx(oo,{className:"h-4 w-4"})}),e.jsx(D,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:z,children:e.jsx(co,{className:"h-4 w-4"})})]})]}),r&&r.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:r.images.map((E,K)=>e.jsx("button",{onClick:()=>C(K),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",T===K?"border-primary":"border-transparent"),children:e.jsx("img",{src:E,alt:`缩略图 ${K+1}`,className:"h-full w-full object-cover"})},K))})]})})]})]})}function La(){return e.jsxs(Ie,{children:[e.jsxs(ze,{children:[e.jsx(Fe,{className:"h-6 w-[200px]"}),e.jsx(Fe,{className:"h-4 w-[300px]"})]}),e.jsxs(Oe,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Fe,{className:"h-10 w-[100px]"}),e.jsx(Fe,{className:"h-10 w-[100px]"})]})]})}const sx=Object.freeze(Object.defineProperty({__proto__:null,default:ex},Symbol.toStringTag,{value:"Module"})),ua=c.forwardRef(({className:s,value:t,onChange:a,...n},l)=>{const[o,d]=c.useState("");c.useEffect(()=>{if(o.includes(",")){const r=new Set([...t,...o.split(",").map(i=>i.trim())]);a(Array.from(r)),d("")}},[o,a,t]);const x=()=>{if(o){const r=new Set([...t,o]);a(Array.from(r)),d("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[t.map(r=>e.jsxs(L,{variant:"secondary",children:[r,e.jsx(W,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(t.filter(i=>i!==r))},children:e.jsx(Kt,{className:"w-3"})})]},r)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:o,onChange:r=>d(r.target.value),onKeyDown:r=>{r.key==="Enter"||r.key===","?(r.preventDefault(),x()):r.key==="Backspace"&&o.length===0&&t.length>0&&(r.preventDefault(),a(t.slice(0,-1)))},...n,ref:l})]})});ua.displayName="InputTags";const tx=u.object({id:u.number().nullable(),title:u.string().min(1).max(250),content:u.string().min(1),show:u.boolean(),tags:u.array(u.string()),img_url:u.string().nullable()}),ax={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Fr({refetch:s,dialogTrigger:t,type:a="add",defaultFormValues:n=ax}){const[l,o]=c.useState(!1),d=ae({resolver:ie(tx),defaultValues:n,mode:"onChange",shouldFocusError:!0}),x=new ta({html:!0});return e.jsx(oe,{...d,children:e.jsxs(ue,{onOpenChange:o,open:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加公告"})]})}),e.jsxs(ce,{className:"sm:max-w-[1025px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a==="add"?"添加公告":"编辑公告"}),e.jsx(Se,{})]}),e.jsx(g,{control:d.control,name:"title",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入公告标题",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"content",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"公告内容"}),e.jsx(b,{children:e.jsx(aa,{style:{height:"500px"},value:r.value,renderHTML:i=>x.render(i),onChange:({text:i})=>{r.onChange(i)}})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"img_url",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"公告背景"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入公告背景图片URL",...r,value:r.value||""})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"show",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:r.onChange})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"tags",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点标签"}),e.jsx(b,{children:e.jsx(ua,{value:r.value,onChange:r.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:r=>{r.preventDefault(),d.handleSubmit(async i=>{try{(await Zc(i)).data&&(await s(),o(!1))}catch(h){console.error("Failed to save notice:",h)}})()},children:"提交"})]})]})]})})}function nx({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!n&&e.jsx(Fr,{refetch:t}),!n&&e.jsx(S,{placeholder:"搜索公告标题...",value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),l&&!n&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,className:"h-8",size:"sm",children:n?"保存排序":"编辑排序"})})]})}const rx=s=>[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(uo,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(L,{variant:"outline",className:"font-mono",children:t.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显示状态"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:t.getValue("show"),onCheckedChange:async()=>{const{data:a}=await ed({id:t.original.id});a||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:t})=>e.jsx(I,{column:t,title:"标题"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:t.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Fr,{refetch:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:t.original}),e.jsx(Ye,{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",onConfirm:async()=>{Xc({id:t.original.id}).then(()=>{A.success("删除成功"),s()})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function lx(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState(!1),[h,T]=c.useState({}),[C,m]=c.useState({pageSize:50,pageIndex:0}),[w,_]=c.useState([]),{refetch:v}=Q({queryKey:["notices"],queryFn:async()=>{const{data:z}=await Qc();return _(z),z}});c.useEffect(()=>{n({"drag-handle":r,content:!r,created_at:!r,actions:!r}),m({pageSize:r?99999:50,pageIndex:0})},[r]);const N=(z,$)=>{r&&(z.dataTransfer.setData("text/plain",$.toString()),z.currentTarget.classList.add("opacity-50"))},P=(z,$)=>{if(!r)return;z.preventDefault(),z.currentTarget.classList.remove("bg-muted");const E=parseInt(z.dataTransfer.getData("text/plain"));if(E===$)return;const K=[...w],[ds]=K.splice(E,1);K.splice($,0,ds),_(K)},f=async()=>{if(!r){i(!0);return}Dd(w.map(z=>z.id)).then(()=>{A.success("排序保存成功"),i(!1),v()}).finally(()=>{i(!1)})},R=Le({data:w??[],columns:rx(v),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,columnSizing:h,pagination:C},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,onColumnSizingChange:T,onPaginationChange:m,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:R,toolbar:z=>e.jsx(nx,{table:z,refetch:v,saveOrder:f,isSortMode:r}),draggable:r,onDragStart:N,onDragEnd:z=>z.currentTarget.classList.remove("opacity-50"),onDragOver:z=>{z.preventDefault(),z.currentTarget.classList.add("bg-muted")},onDragLeave:z=>z.currentTarget.classList.remove("bg-muted"),onDrop:P,showPagination:!r})})}function ix(){return e.jsxs(ye,{children:[e.jsxs(Ne,{className:"flex items-center justify-between",children:[e.jsx(ke,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"公告管理"})}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置公告,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(lx,{})})]})]})}const ox=Object.freeze(Object.defineProperty({__proto__:null,default:ix},Symbol.toStringTag,{value:"Module"})),cx=u.object({id:u.number().nullable(),language:u.string().max(250),category:u.string().max(250),title:u.string().min(1).max(250),body:u.string().min(1),show:u.boolean()}),dx={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Mr({refreshData:s,dialogTrigger:t,type:a="add",defaultFormValues:n=dx}){const[l,o]=c.useState(!1),d=ae({resolver:ie(cx),defaultValues:n,mode:"onChange",shouldFocusError:!0}),x=new ta({html:!0});return c.useEffect(()=>{l&&n.id&&td(n.id).then(({data:r})=>{d.reset(r)})},[n.id,d,l]),e.jsxs(ue,{onOpenChange:o,open:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加知识"})]})}),e.jsxs(ce,{className:"sm:max-w-[1025px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a==="add"?"添加知识":"编辑知识"}),e.jsx(Se,{})]}),e.jsxs(oe,{...d,children:[e.jsx(g,{control:d.control,name:"title",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"标题"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入知识标题",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"category",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"分类"}),e.jsx("div",{className:"relative ",children:e.jsx(b,{children:e.jsx(S,{placeholder:"请输入分类,分类将会自动归类",...r})})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"language",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"语言"}),e.jsx(b,{children:e.jsxs(G,{value:r.value,onValueChange:r.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择语言"})}),e.jsx(B,{children:[{field:"English",value:"en-US"},{field:"日本語",value:"ja-JP"},{field:"한국어",value:"ko-KR"},{field:"Tiếng Việt",value:"vi-VN"},{field:"简体中文",value:"zh-CN"},{field:"繁體中文",value:"zh-TW"}].map(i=>e.jsx(O,{value:i.value,className:"cursor-pointer",children:i.field},i.value))})]})})]})}),e.jsx(g,{control:d.control,name:"body",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"内容"}),e.jsx(b,{children:e.jsx(aa,{style:{height:"500px"},value:r.value,renderHTML:i=>x.render(i),onChange:({text:i})=>{r.onChange(i)}})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"show",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"显示"}),e.jsx("div",{className:"relative py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value,onCheckedChange:r.onChange})})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:()=>{d.handleSubmit(r=>{ad(r).then(({data:i})=>{i&&(d.reset(),A.success("操作成功"),o(!1),s())})})()},children:"提交"})]})]})]})]})}function ux({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function xx({table:s,refetch:t,saveOrder:a,isSortMode:n}){const l=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽知识条目进行排序,完成后点击保存"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Mr,{refreshData:t}),e.jsx(S,{placeholder:"搜索知识...",value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(ux,{column:s.getColumn("category"),title:"分类",options:Array.from(new Set(s.getCoreRowModel().rows.map(o=>o.getValue("category")))).map(o=>({label:o,value:o}))}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:n?"default":"outline",onClick:a,size:"sm",children:n?"保存排序":"编辑排序"})})]})}const mx=({refetch:s,isSortMode:t=!1})=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:t?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",className:"justify-center",children:a.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:a})=>e.jsx(I,{column:a,title:"状态"}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(H,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{rd({id:a.original.id}).then(({data:n})=>{n||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(I,{column:a,title:"标题"}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:a.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:a})=>e.jsx(I,{column:a,title:"分类"}),cell:({row:a})=>e.jsx(L,{variant:"secondary",className:"max-w-[180px] truncate",children:a.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:a})=>e.jsx(I,{className:"justify-end",column:a,title:"操作"}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Mr,{refreshData:s,dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{nd({id:a.original.id}).then(({data:n})=>{n&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]}),size:100}];function hx(){const[s,t]=c.useState([]),[a,n]=c.useState([]),[l,o]=c.useState(!1),[d,x]=c.useState([]),[r,i]=c.useState({"drag-handle":!1}),[h,T]=c.useState({pageSize:20,pageIndex:0}),{refetch:C,isLoading:m,data:w}=Q({queryKey:["knowledge"],queryFn:async()=>{const{data:f}=await sd();return x(f||[]),f}});c.useEffect(()=>{i({"drag-handle":l}),T({pageSize:l?99999:10,pageIndex:0})},[l]);const _=(f,R)=>{l&&(f.dataTransfer.setData("text/plain",R.toString()),f.currentTarget.classList.add("opacity-50"))},v=(f,R)=>{if(!l)return;f.preventDefault(),f.currentTarget.classList.remove("bg-muted");const z=parseInt(f.dataTransfer.getData("text/plain"));if(z===R)return;const $=[...d],[E]=$.splice(z,1);$.splice(R,0,E),x($)},N=async()=>{l?ld({ids:d.map(f=>f.id)}).then(()=>{C(),o(!1),A.success("排序保存成功")}):o(!0)},P=Le({data:d,columns:mx({refetch:C,isSortMode:l}),state:{sorting:a,columnFilters:s,columnVisibility:r,pagination:h},onSortingChange:n,onColumnFiltersChange:t,onColumnVisibilityChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:P,toolbar:f=>e.jsx(xx,{table:f,refetch:C,saveOrder:N,isSortMode:l}),draggable:l,onDragStart:_,onDragEnd:f=>f.currentTarget.classList.remove("opacity-50"),onDragOver:f=>{f.preventDefault(),f.currentTarget.classList.add("bg-muted")},onDragLeave:f=>f.currentTarget.classList.remove("bg-muted"),onDrop:v,showPagination:!l})}function jx(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"知识库管理"}),e.jsx("p",{className:"text-muted-foreground",children:"在这里可以配置知识库,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(hx,{})})]})]})}const gx=Object.freeze(Object.defineProperty({__proto__:null,default:jx},Symbol.toStringTag,{value:"Module"}));function fx(s,t){const[a,n]=c.useState(s);return c.useEffect(()=>{const l=setTimeout(()=>n(s),t);return()=>{clearTimeout(l)}},[s,t]),a}function Ot(s,t){if(s.length===0)return{};if(!t)return{"":s};const a={};return s.forEach(n=>{const l=n[t]||"";a[l]||(a[l]=[]),a[l].push(n)}),a}function px(s,t){const a=JSON.parse(JSON.stringify(s));for(const[n,l]of Object.entries(a))a[n]=l.filter(o=>!t.find(d=>d.value===o.value));return a}function vx(s,t){for(const[,a]of Object.entries(s))if(a.some(n=>t.find(l=>l.value===n.value)))return!0;return!1}const zr=c.forwardRef(({className:s,...t},a)=>xo(l=>l.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...t}):null);zr.displayName="CommandEmpty";const at=c.forwardRef(({value:s,onChange:t,placeholder:a,defaultOptions:n=[],options:l,delay:o,onSearch:d,loadingIndicator:x,emptyIndicator:r,maxSelected:i=Number.MAX_SAFE_INTEGER,onMaxSelected:h,hidePlaceholderWhenSelected:T,disabled:C,groupBy:m,className:w,badgeClassName:_,selectFirstItem:v=!0,creatable:N=!1,triggerSearchOnFocus:P=!1,commandProps:f,inputProps:R,hideClearAllButton:z=!1},$)=>{const E=c.useRef(null),[K,ds]=c.useState(!1),Hs=c.useRef(!1),[fa,pa]=c.useState(!1),[J,Ks]=c.useState(s||[]),[bs,va]=c.useState(Ot(n,m)),[us,Ft]=c.useState(""),qs=fx(us,o||500);c.useImperativeHandle($,()=>({selectedValue:[...J],input:E.current,focus:()=>E.current?.focus()}),[J]);const ot=c.useCallback(q=>{const Z=J.filter(Ce=>Ce.value!==q.value);Ks(Z),t?.(Z)},[t,J]),ol=c.useCallback(q=>{const Z=E.current;Z&&((q.key==="Delete"||q.key==="Backspace")&&Z.value===""&&J.length>0&&(J[J.length-1].fixed||ot(J[J.length-1])),q.key==="Escape"&&Z.blur())},[ot,J]);c.useEffect(()=>{s&&Ks(s)},[s]),c.useEffect(()=>{if(!l||d)return;const q=Ot(l||[],m);JSON.stringify(q)!==JSON.stringify(bs)&&va(q)},[n,l,m,d,bs]),c.useEffect(()=>{const q=async()=>{pa(!0);const Ce=await d?.(qs);va(Ot(Ce||[],m)),pa(!1)};(async()=>{!d||!K||(P&&await q(),qs&&await q())})()},[qs,m,K,P]);const cl=()=>{if(!N||vx(bs,[{value:us,label:us}])||J.find(Z=>Z.value===us))return;const q=e.jsx(be,{value:us,className:"cursor-pointer",onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation()},onSelect:Z=>{if(J.length>=i){h?.(J.length);return}Ft("");const Ce=[...J,{value:Z,label:Z}];Ks(Ce),t?.(Ce)},children:`Create "${us}"`});if(!d&&us.length>0||d&&qs.length>0&&!fa)return q},dl=c.useCallback(()=>{if(r)return d&&!N&&Object.keys(bs).length===0?e.jsx(be,{value:"-",disabled:!0,children:r}):e.jsx(zr,{children:r})},[N,r,d,bs]),ul=c.useMemo(()=>px(bs,J),[bs,J]),xl=c.useCallback(()=>{if(f?.filter)return f.filter;if(N)return(q,Z)=>q.toLowerCase().includes(Z.toLowerCase())?1:-1},[N,f?.filter]),ml=c.useCallback(()=>{const q=J.filter(Z=>Z.fixed);Ks(q),t?.(q)},[t,J]);return e.jsxs(fs,{...f,onKeyDown:q=>{ol(q),f?.onKeyDown?.(q)},className:y("h-auto overflow-visible bg-transparent",f?.className),shouldFilter:f?.shouldFilter!==void 0?f.shouldFilter:!d,filter:xl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":J.length!==0,"cursor-text":!C&&J.length!==0},w),onClick:()=>{C||E.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[J.map(q=>e.jsxs(L,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",_),"data-fixed":q.fixed,"data-disabled":C||void 0,children:[q.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(C||q.fixed)&&"hidden"),onKeyDown:Z=>{Z.key==="Enter"&&ot(q)},onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:()=>ot(q),children:e.jsx(Kt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},q.value)),e.jsx(we.Input,{...R,ref:E,value:us,disabled:C,onValueChange:q=>{Ft(q),R?.onValueChange?.(q)},onBlur:q=>{Hs.current===!1&&ds(!1),R?.onBlur?.(q)},onFocus:q=>{ds(!0),P&&d?.(qs),R?.onFocus?.(q)},placeholder:T&&J.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":T,"px-3 py-2":J.length===0,"ml-1":J.length!==0},R?.className)}),e.jsx("button",{type:"button",onClick:ml,className:y((z||C||J.length<1||J.filter(q=>q.fixed).length===J.length)&&"hidden"),children:e.jsx(Kt,{})})]})}),e.jsx("div",{className:"relative",children:K&&e.jsx(ps,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Hs.current=!1},onMouseEnter:()=>{Hs.current=!0},onMouseUp:()=>{E.current?.focus()},children:fa?e.jsx(e.Fragment,{children:x}):e.jsxs(e.Fragment,{children:[dl(),cl(),!v&&e.jsx(be,{value:"-",className:"hidden"}),Object.entries(ul).map(([q,Z])=>e.jsx(Ve,{heading:q,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:Z.map(Ce=>e.jsx(be,{value:Ce.value,disabled:Ce.disable,onMouseDown:Us=>{Us.preventDefault(),Us.stopPropagation()},onSelect:()=>{if(J.length>=i){h?.(J.length);return}Ft("");const Us=[...J,Ce];Ks(Us),t?.(Us)},className:y("cursor-pointer",Ce.disable&&"cursor-default text-muted-foreground"),children:Ce.label},Ce.value))})},q))]})})})]})});at.displayName="MultipleSelector";const bx=u.object({id:u.number().optional(),name:u.string().min(2,"组名至少需要2个字符").max(50,"组名不能超过50个字符").regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,"组名只能包含字母、数字、中文、下划线和连字符")});function Et({refetch:s,dialogTrigger:t,defaultValues:a={name:""},type:n="add"}){const l=ae({resolver:ie(bx),defaultValues:a,mode:"onChange"}),[o,d]=c.useState(!1),[x,r]=c.useState(!1),i=async h=>{r(!0),$c(h).then(()=>{A.success(n==="edit"?"更新成功":"创建成功"),s&&s(),l.reset(),d(!1)}).finally(()=>{r(!1)})};return e.jsxs(ue,{open:o,onOpenChange:d,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("span",{children:"添加权限组"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:n==="edit"?"编辑权限组":"创建权限组"}),e.jsx(Se,{children:n==="edit"?"修改权限组信息,更新后会立即生效。":"创建新的权限组,可以为不同的用户分配不同的权限。"})]}),e.jsx(oe,{...l,children:e.jsxs("form",{onSubmit:l.handleSubmit(i),className:"space-y-4",children:[e.jsx(g,{control:l.control,name:"name",render:({field:h})=>e.jsxs(j,{children:[e.jsx(p,{children:"组名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入权限组名称",...h,className:"w-full"})}),e.jsx(F,{children:"权限组名称用于标识不同的用户组,建议使用有意义的名称。"}),e.jsx(k,{})]})}),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{type:"button",variant:"outline",children:"取消"})}),e.jsxs(D,{type:"submit",disabled:x||!l.formState.isValid,children:[x&&e.jsx(sa,{className:"mr-2 h-4 w-4 animate-spin"}),n==="edit"?"更新":"创建"]})]})]})})]})]})}const Or=c.createContext(void 0);function yx({children:s,refetch:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null),[d,x]=c.useState(pe.Shadowsocks);return e.jsx(Or.Provider,{value:{isOpen:a,setIsOpen:n,editingServer:l,setEditingServer:o,serverType:d,setServerType:x,refetch:t},children:s})}function Lr(){const s=c.useContext(Or);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Lt({dialogTrigger:s,value:t,setValue:a,templateType:n}){c.useEffect(()=>{console.log(t)},[t]);const[l,o]=c.useState(!1),[d,x]=c.useState(()=>{if(!t||Object.keys(t).length===0)return"";try{return JSON.stringify(t,null,2)}catch{return""}}),[r,i]=c.useState(null),h=v=>{if(!v)return null;try{const N=JSON.parse(v);return typeof N!="object"||N===null?"配置必须是一个JSON对象":null}catch{return"无效的JSON格式"}},T={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},C=()=>{switch(n){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},m=()=>{const v=h(d||"");if(v){A.error(v);return}try{if(!d){a(null),o(!1);return}a(JSON.parse(d)),o(!1)}catch{A.error("保存时发生错误")}},w=v=>{x(v),i(h(v))},_=v=>{const N=T[v];if(N){const P=JSON.stringify(N.content,null,2);x(P),i(null)}};return c.useEffect(()=>{l&&console.log(t)},[l,t]),c.useEffect(()=>{l&&t&&Object.keys(t).length>0&&x(JSON.stringify(t,null,2))},[l,t]),e.jsxs(ue,{open:l,onOpenChange:v=>{!v&&l&&m(),o(v)},children:[e.jsx(Re,{asChild:!0,children:s??e.jsx(W,{variant:"link",children:"编辑协议"})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:"编辑协议配置"})}),e.jsxs("div",{className:"space-y-4",children:[C().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:C().map(v=>e.jsxs(W,{variant:"outline",size:"sm",onClick:()=>_(v),children:["使用",T[v].label,"模板"]},v))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(vs,{className:`min-h-[200px] font-mono text-sm ${r?"border-red-500 focus-visible:ring-red-500":""}`,value:d,placeholder:`请输入JSON配置${C().length>0?"或选择上方模板":""}`,onChange:v=>w(v.target.value)}),r&&e.jsx("p",{className:"text-sm text-red-500",children:r})]})]}),e.jsxs(Ee,{className:"gap-2",children:[e.jsx(W,{variant:"outline",onClick:()=>o(!1),children:"取消"}),e.jsx(W,{onClick:m,disabled:!!r,children:"确定"})]})]})]})}function bh(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const Nx={},wx=Object.freeze(Object.defineProperty({__proto__:null,default:Nx},Symbol.toStringTag,{value:"Module"})),yh=_o(wx),$a=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),_x=()=>{try{const s=mo.box.keyPair(),t=$a(ka.encodeBase64(s.secretKey)),a=$a(ka.encodeBase64(s.publicKey));return{privateKey:t,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},Cx=()=>{try{return _x()}catch(s){throw console.error("Error generating key pair:",s),s}},Sx=s=>{const t=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(t),Array.from(t).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},kx=()=>{const s=Math.floor(Math.random()*8)*2+2;return Sx(s)},Dx=u.object({cipher:u.string().default("aes-128-gcm"),obfs:u.string().default("0"),obfs_settings:u.object({path:u.string().default(""),host:u.string().default("")}).default({})}),Tx=u.object({tls:u.coerce.number().default(0),tls_settings:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({})}),Px=u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({})}),Ix=u.object({version:u.coerce.number().default(2),alpn:u.string().default("h2"),obfs:u.object({open:u.coerce.boolean().default(!1),type:u.string().default("salamander"),password:u.string().default("")}).default({}),tls:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),bandwidth:u.object({up:u.string().default(""),down:u.string().default("")}).default({})}),Vx=u.object({tls:u.coerce.number().default(0),tls_settings:u.object({server_name:u.string().default(""),allow_insecure:u.boolean().default(!1)}).default({}),reality_settings:u.object({server_port:u.coerce.number().default(443),server_name:u.string().default(""),allow_insecure:u.boolean().default(!1),public_key:u.string().default(""),private_key:u.string().default(""),short_id:u.string().default("")}).default({}),network:u.string().default("tcp"),network_settings:u.record(u.any()).default({}),flow:u.string().default("")}),es={shadowsocks:{schema:Dx,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:Tx,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:Px,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:Ix,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:Vx,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},Rx=({serverType:s,value:t,onChange:a})=>{const n=s?es[s]:null,l=n?.schema||u.record(u.any()),o=s?l.parse({}):{},d=ae({resolver:ie(l),defaultValues:o,mode:"onChange"});return c.useEffect(()=>{if(!t||Object.keys(t).length===0){if(s){const m=l.parse({});d.reset(m)}}else d.reset(t)},[s,t,a,d,l]),c.useEffect(()=>{const m=d.watch(w=>{a(w)});return()=>m.unsubscribe()},[d,a]),!s||!n?null:{shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"cipher",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"加密算法"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择加密算法"})}),e.jsx(B,{children:e.jsx(xs,{children:es.shadowsocks.ciphers.map(w=>e.jsx(O,{value:w,children:w},w))})})]})})]})}),e.jsx(g,{control:d.control,name:"obfs",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"混淆"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆方式"})}),e.jsx(B,{children:e.jsxs(xs,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"http",children:"HTTP"})]})})]})})]})}),d.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"obfs_settings.path",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"路径",...m})}),e.jsx(k,{})]})}),e.jsx(g,{control:d.control,name:"obfs_settings.host",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"Host",...m})}),e.jsx(k,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"tls",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"TLS"}),e.jsx(b,{children:e.jsxs(G,{value:m.value?.toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"不支持"}),e.jsx(O,{value:"1",children:"支持"})]})]})})]})}),d.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"不使用请留空",...m})})]})}),e.jsx(g,{control:d.control,name:"tls_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings"),setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.vmess.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"当节点地址于证书不一致时用于证书验证",...m,value:m.value||""})})]})}),e.jsx(g,{control:d.control,name:"allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings")||{},setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")||"tcp"})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value||"tcp",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.trojan.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"version",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"协议版本"}),e.jsx(b,{children:e.jsxs(G,{value:(m.value||2).toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"协议版本"})}),e.jsx(B,{children:e.jsx(xs,{children:es.hysteria.versions.map(w=>e.jsxs(O,{value:w,className:"cursor-pointer",children:["V",w]},w))})})]})})]})}),d.watch("version")==1&&e.jsx(g,{control:d.control,name:"alpn",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"ALPN"}),e.jsx(b,{children:e.jsxs(G,{value:m.value||"h2",onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"ALPN"})}),e.jsx(B,{children:e.jsx(xs,{children:es.hysteria.alpnOptions.map(w=>e.jsx(O,{value:w,children:w},w))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"obfs.open",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"混淆"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})}),!!d.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[d.watch("version")=="2"&&e.jsx(g,{control:d.control,name:"obfs.type",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"混淆实现"}),e.jsx(b,{children:e.jsxs(G,{value:m.value||"salamander",onValueChange:m.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择混淆实现"})}),e.jsx(B,{children:e.jsx(xs,{children:e.jsx(O,{value:"salamander",children:"Salamander"})})})]})})]})}),e.jsx(g,{control:d.control,name:"obfs.password",render:({field:m})=>e.jsxs(j,{className:d.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(p,{children:"混淆密码"}),e.jsxs("div",{className:"relative",children:[e.jsx(b,{children:e.jsx(S,{placeholder:"请输入混淆密码",...m,value:m.value||"",className:"pr-9"})}),e.jsx(W,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",_=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(v=>w[v%w.length]).join("");d.setValue("obfs.password",_),A.success("混淆密码生成成功")},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(ve,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"当节点地址于证书不一致时用于证书验证",...m,value:m.value||""})})]})}),e.jsx(g,{control:d.control,name:"tls.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value||!1,onCheckedChange:m.onChange})})})]})})]}),e.jsx(g,{control:d.control,name:"bandwidth.up",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"上行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入上行宽带"+(d.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...m,value:m.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})}),e.jsx(g,{control:d.control,name:"bandwidth.down",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"下行宽带"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入下行宽带"+(d.watch("version")==2?",留空则使用BBR":""),className:"rounded-br-none rounded-tr-none",...m,value:m.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:"Mbps"})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(g,{control:d.control,name:"tls",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"安全性"}),e.jsx(b,{children:e.jsxs(G,{value:m.value?.toString(),onValueChange:w=>m.onChange(Number(w)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择安全性"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"无"}),e.jsx(O,{value:"1",children:"TLS"}),e.jsx(O,{value:"2",children:"Reality"})]})]})})]})}),d.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"tls_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"服务器名称指示(SNI)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"不使用请留空",...m})})]})}),e.jsx(g,{control:d.control,name:"tls_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),d.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:d.control,name:"reality_settings.server_name",render:({field:m})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"伪装站点(dest)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"例如:example.com",...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.server_port",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"端口(port)"}),e.jsx(b,{children:e.jsx(S,{placeholder:"例如:443",...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.allow_insecure",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"允许不安全?"}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(b,{children:e.jsx(H,{checked:m.value,onCheckedChange:m.onChange})})})]})})]}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx(g,{control:d.control,name:"reality_settings.private_key",render:({field:m})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"私钥(Private key)"}),e.jsx(b,{children:e.jsx(S,{...m})})]})}),e.jsxs(W,{variant:"outline",className:"",onClick:()=>{try{const m=Cx();d.setValue("reality_settings.private_key",m.privateKey),d.setValue("reality_settings.public_key",m.publicKey),A.success("密钥对生成成功")}catch{A.error("生成密钥对失败")}},children:[e.jsx(ve,{icon:"ion:key-outline",className:"mr-2 h-4 w-4"}),"生成密钥对"]})]}),e.jsx(g,{control:d.control,name:"reality_settings.public_key",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"公钥(Public key)"}),e.jsx(b,{children:e.jsx(S,{...m})})]})}),e.jsx(g,{control:d.control,name:"reality_settings.short_id",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"Short ID"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(b,{children:e.jsx(S,{...m,placeholder:"可留空,长度为2的倍数,最长16位"})}),e.jsxs(W,{variant:"outline",onClick:()=>{const w=kx();d.setValue("reality_settings.short_id",w),A.success("Short ID 生成成功")},children:[e.jsx(ve,{icon:"ion:refresh-outline",className:"mr-2 h-4 w-4"}),"生成"]})]}),e.jsx(F,{className:"text-xs text-muted-foreground",children:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符"})]})})]}),e.jsx(g,{control:d.control,name:"network",render:({field:m})=>e.jsxs(j,{children:[e.jsxs(p,{children:["传输协议",e.jsx(Lt,{value:d.watch("network_settings"),setValue:w=>d.setValue("network_settings",w),templateType:d.watch("network")})]}),e.jsx(b,{children:e.jsxs(G,{onValueChange:m.onChange,value:m.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择传输协议"})}),e.jsx(B,{children:e.jsx(xs,{children:es.vless.networkOptions.map(w=>e.jsx(O,{value:w.value,className:"cursor-pointer",children:w.label},w.value))})})]})})]})}),e.jsx(g,{control:d.control,name:"flow",render:({field:m})=>e.jsxs(j,{children:[e.jsx(p,{children:"流控"}),e.jsx(b,{children:e.jsxs(G,{onValueChange:w=>m.onChange(w==="none"?null:w),value:m.value||"none",children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流控"})}),e.jsx(B,{children:es.vless.flowOptions.map(w=>e.jsx(O,{value:w,children:w},w))})]})})]})})]})}[s]?.()},Ex=u.object({id:u.number().optional().nullable(),code:u.string().optional(),name:u.string().min(1,"Please enter a valid name."),rate:u.string().min(1,"Please enter a valid rate."),tags:u.array(u.string()).default([]),excludes:u.array(u.string()).default([]),ips:u.array(u.string()).default([]),group_ids:u.array(u.string()).default([]),host:u.string().min(1,"Please enter a valid host."),port:u.string().min(1,"Please enter a valid port."),server_port:u.string().min(1,"Please enter a valid server port."),parent_id:u.string().default("0").nullable(),route_ids:u.array(u.string()).default([]),protocol_settings:u.record(u.any()).default({}).nullable()}),xt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function Fx(){const{isOpen:s,setIsOpen:t,editingServer:a,setEditingServer:n,serverType:l,setServerType:o,refetch:d}=Lr(),[x,r]=c.useState([]),[i,h]=c.useState([]),[T,C]=c.useState([]),m=ae({resolver:ie(Ex),defaultValues:xt,mode:"onChange"});c.useEffect(()=>{w()},[s]),c.useEffect(()=>{a?.type&&a.type!==l&&o(a.type)},[a,l,o]),c.useEffect(()=>{a?a.type===l&&m.reset({...xt,...a}):m.reset({...xt,protocol_settings:es[l].schema.parse({})})},[a,m,l]);const w=async()=>{if(!s)return;const[f,R,z]=await Promise.all([Vt(),jr(),hr()]);r(f.data?.map($=>({label:$.name,value:$.id.toString()}))||[]),h(R.data?.map($=>({label:$.remarks,value:$.id.toString()}))||[]),C(z.data||[])},_=c.useMemo(()=>T?.filter(f=>(f.parent_id===0||f.parent_id===null)&&f.type===l&&f.id!==m.watch("id")),[l,T,m]),v=()=>e.jsxs(Ns,{children:[e.jsx(ws,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加节点"})]})}),e.jsx(gs,{align:"start",children:e.jsx(ic,{children:ys.map(({type:f,label:R})=>e.jsx(he,{onClick:()=>{o(f),t(!0)},className:"cursor-pointer",children:e.jsx(L,{variant:"outline",className:"text-white",style:{background:ts[f]},children:R})},f))})})]}),N=()=>{t(!1),n(null),m.reset(xt)},P=async()=>{const f=m.getValues();(await Fc({...f,type:l})).data&&(N(),A.success("提交成功"),d())};return e.jsxs(ue,{open:s,onOpenChange:N,children:[v(),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:a?"编辑节点":"新建节点"}),e.jsx(Se,{})]}),e.jsxs(oe,{...m,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{control:m.control,name:"name",render:({field:f})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"节点名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入节点名称",...f})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"rate",render:({field:f})=>e.jsxs(j,{className:"flex-[1]",children:[e.jsx(p,{children:"倍率"}),e.jsx("div",{className:"relative flex",children:e.jsx(b,{children:e.jsx(S,{type:"number",min:"0",step:"0.1",...f})})}),e.jsx(k,{})]})})]}),e.jsx(g,{control:m.control,name:"code",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(p,{children:["自定义节点ID",e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(选填)"})]}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入自定义节点ID",...f,value:f.value||""})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"tags",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点标签"}),e.jsx(b,{children:e.jsx(ua,{value:f.value,onChange:f.onChange,placeholder:"输入后回车添加标签",className:"w-full"})}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"group_ids",render:({field:f})=>e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center justify-between",children:["权限组",e.jsx(Et,{dialogTrigger:e.jsx(D,{variant:"link",children:"添加权限组"}),refetch:w})]}),e.jsx(b,{children:e.jsx(at,{options:x,onChange:R=>f.onChange(R.map(z=>z.value)),value:x?.filter(R=>f.value.includes(R.value)),placeholder:"请选择权限组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(k,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:m.control,name:"host",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"节点地址"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入节点域名或者IP",...f})}),e.jsx(k,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(g,{control:m.control,name:"port",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(p,{className:"flex items-center gap-1.5",children:["连接端口",e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(Da,{children:e.jsx(ee,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。"})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{children:e.jsx(S,{placeholder:"用户连接端口",...f})}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const R=f.value;R&&m.setValue("server_port",R)},children:e.jsx(ve,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(ee,{side:"right",children:e.jsx("p",{children:"同步到服务端口"})})]})})]}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"server_port",render:({field:f})=>e.jsxs(j,{className:"flex-1",children:[e.jsxs(p,{className:"flex items-center gap-1.5",children:["服务端口",e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(ve,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(Da,{children:e.jsx(ee,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"})})})]})})]}),e.jsx(b,{children:e.jsx(S,{placeholder:"服务端开放端口",...f})}),e.jsx(k,{})]})})]})]}),s&&e.jsx(Rx,{serverType:l,value:m.watch("protocol_settings"),onChange:f=>m.setValue("protocol_settings",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(g,{control:m.control,name:"parent_id",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"父节点"}),e.jsxs(G,{onValueChange:f.onChange,value:f.value?.toString()||"0",children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择父节点"})})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"无"}),_?.map(R=>e.jsx(O,{value:R.id.toString(),className:"cursor-pointer",children:R.name},R.id))]})]}),e.jsx(k,{})]})}),e.jsx(g,{control:m.control,name:"route_ids",render:({field:f})=>e.jsxs(j,{children:[e.jsx(p,{children:"路由组"}),e.jsx(b,{children:e.jsx(at,{options:i,onChange:R=>f.onChange(R.map(z=>z.value)),value:i?.filter(R=>f.value.includes(R.value)),placeholder:"选择路由组",emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:"no results found."})})}),e.jsx(k,{})]})})]}),e.jsxs(Ee,{className:"mt-6",children:[e.jsx(D,{type:"button",variant:"outline",onClick:N,children:"取消"}),e.jsx(D,{type:"submit",onClick:P,children:"提交"})]})]})]})]})}function Aa({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Mx=[{value:pe.Shadowsocks,label:ys.find(s=>s.type===pe.Shadowsocks)?.label,color:ts[pe.Shadowsocks]},{value:pe.Vmess,label:ys.find(s=>s.type===pe.Vmess)?.label,color:ts[pe.Vmess]},{value:pe.Trojan,label:ys.find(s=>s.type===pe.Trojan)?.label,color:ts[pe.Trojan]},{value:pe.Hysteria,label:ys.find(s=>s.type===pe.Hysteria)?.label,color:ts[pe.Hysteria]},{value:pe.Vless,label:ys.find(s=>s.type===pe.Vless)?.label,color:ts[pe.Vless]}];function zx({table:s,saveOrder:t,isSortMode:a,groups:n}){const l=s.getState().columnFilters.length>0,o=n.map(d=>({label:d,value:d}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(Fx,{}),e.jsx(S,{placeholder:"搜索节点...",value:s.getColumn("name")?.getFilterValue()??"",onChange:d=>s.getColumn("name")?.setFilterValue(d.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx(Aa,{column:s.getColumn("type"),title:"类型",options:Mx}),s.getColumn("groups")&&e.jsx(Aa,{column:s.getColumn("groups"),title:"权限组",options:o})]}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"拖拽节点进行排序,完成后点击保存"})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:a?"default":"outline",onClick:t,size:"sm",children:a?"保存排序":"编辑排序"})})]})}const nt=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),mt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},ht={0:"未运行",1:"无人使用或异常",2:"运行正常"},Ox=s=>[{id:"drag-handle",header:({column:t})=>e.jsx(I,{column:t,title:"排序"}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Dt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"节点ID"}),cell:({row:t})=>{const a=t.getValue("id"),n=t.original.code;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(L,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ts[t.original.type]},children:[e.jsx($n,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:n??a}),t.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:t.original.parent?.code||t.original.parent?.id})]}):""]})]}),e.jsx(D,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:l=>{l.stopPropagation(),Nt(n||a.toString())},children:e.jsx(Ta,{className:"size-3"})})]})}),e.jsxs(ee,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[ys.find(l=>l.type===t.original.type)?.label,t.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显隐"}),cell:({row:t})=>{const[a,n]=c.useState(!!t.getValue("show"));return e.jsx(H,{checked:a,onCheckedChange:async l=>{n(l),Oc({id:t.original.id,type:t.original.type,show:l?1:0}).catch(()=>{n(!l),s()})},style:{backgroundColor:a?ts[t.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx(I,{column:t,title:"节点",tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[0])}),e.jsx("span",{className:"text-sm font-medium",children:ht[0]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[1])}),e.jsx("span",{className:"text-sm font-medium",children:ht[1]})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",mt[2])}),e.jsx("span",{className:"text-sm font-medium",children:ht[2]})]})]})})}),cell:({row:t})=>e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",mt[t.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:t.getValue("name")})]})}),e.jsx(ee,{children:e.jsx("p",{className:"font-medium",children:ht[t.original.available_status]})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:t})=>e.jsx(I,{column:t,title:"地址"}),cell:({row:t})=>{const a=`${t.original.host}:${t.original.port}`,n=t.original.port!==t.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[t.original.host,":",t.original.port]})}),n&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(内部端口 ",t.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(le,{delayDuration:0,children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:l=>{l.stopPropagation(),Nt(a)},children:e.jsx(Ta,{className:"size-3"})})}),e.jsx(ee,{side:"top",sideOffset:10,children:"复制连接地址"})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:t})=>e.jsx(I,{column:t,title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(nt,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:t})=>e.jsx(I,{column:t,title:"倍率",tooltip:"流量扣费倍率"}),cell:({row:t})=>e.jsxs(L,{variant:"secondary",className:"font-medium",children:[t.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:t})=>e.jsx(I,{column:t,title:"权限组",tooltip:"可订阅到该节点的权限组"}),cell:({row:t})=>{const a=t.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:a.length>0?a.map((n,l)=>e.jsx(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:n.name},l)):e.jsx("span",{className:"text-sm text-muted-foreground",children:"--"})})},enableSorting:!1,size:600,filterFn:(t,a,n)=>{const l=t.getValue(a);return l?n.some(o=>l.includes(o)):!1}},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type");return e.jsx(L,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ts[a]},children:a})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingServer:n,setServerType:l}=Lr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(Ns,{modal:!1,children:[e.jsx(ws,{asChild:!0,children:e.jsx(D,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(bt,{className:"size-4"})})}),e.jsxs(gs,{align:"end",className:"w-40",children:[e.jsx(he,{className:"cursor-pointer",onClick:()=>{l(t.original.type),n(t.original),a(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ho,{className:"mr-2 size-4"}),"编辑"]})}),e.jsxs(he,{className:"cursor-pointer",onClick:async()=>{zc({id:t.original.id}).then(({data:o})=>{o&&(A.success("复制成功"),s())})},children:[e.jsx(jo,{className:"mr-2 size-4"}),"复制"]}),e.jsx(Xs,{}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:o=>o.preventDefault(),children:e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Mc({id:t.original.id}).then(({data:o})=>{o&&(A.success("删除成功"),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(rs,{className:"mr-2 size-4"}),"删除"]})})})]})]})})},size:50}];function Lx(){const[s,t]=c.useState({}),[a,n]=c.useState({"drag-handle":!1}),[l,o]=c.useState([]),[d,x]=c.useState({pageSize:500,pageIndex:0}),[r,i]=c.useState([]),[h,T]=c.useState(!1),[C,m]=c.useState({}),[w,_]=c.useState([]),{refetch:v}=Q({queryKey:["nodeList"],queryFn:async()=>{const{data:$}=await hr();return _($),$}}),N=c.useMemo(()=>{const $=new Set;return w.forEach(E=>{E.groups&&E.groups.forEach(K=>$.add(K.name))}),Array.from($).sort()},[w]);c.useEffect(()=>{n({"drag-handle":h,show:!h,host:!h,online:!h,rate:!h,groups:!h,type:!1,actions:!h}),m({name:h?2e3:200}),x({pageSize:h?99999:500,pageIndex:0})},[h]);const P=($,E)=>{h&&($.dataTransfer.setData("text/plain",E.toString()),$.currentTarget.classList.add("opacity-50"))},f=($,E)=>{if(!h)return;$.preventDefault(),$.currentTarget.classList.remove("bg-muted");const K=parseInt($.dataTransfer.getData("text/plain"));if(K===E)return;const ds=[...w],[Hs]=ds.splice(K,1);ds.splice(E,0,Hs),_(ds)},R=async()=>{if(!h){T(!0);return}const $=w?.map((E,K)=>({id:E.id,order:K+1}));Lc($).then(()=>{A.success("排序保存成功"),T(!1),v()}).finally(()=>{T(!1)})},z=Le({data:w||[],columns:Ox(v),state:{sorting:r,columnVisibility:a,rowSelection:s,columnFilters:l,columnSizing:C,pagination:d},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:i,onColumnFiltersChange:o,onColumnVisibilityChange:n,onColumnSizingChange:m,onPaginationChange:x,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(yx,{refetch:v,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:z,toolbar:$=>e.jsx(zx,{table:$,refetch:v,saveOrder:R,isSortMode:h,groups:N}),draggable:h,onDragStart:P,onDragEnd:$=>$.currentTarget.classList.remove("opacity-50"),onDragOver:$=>{$.preventDefault(),$.currentTarget.classList.add("bg-muted")},onDragLeave:$=>$.currentTarget.classList.remove("bg-muted"),onDrop:f,showPagination:!h})})})}function $x(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"节点管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"管理所有节点,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Lx,{})})]})]})}const Ax=Object.freeze(Object.defineProperty({__proto__:null,default:$x},Symbol.toStringTag,{value:"Module"}));function Hx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Et,{refetch:t}),e.jsx(S,{placeholder:"搜索权限组...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}const Kx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"组名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:t.getValue("name")})})},{accessorKey:"users_count",header:({column:t})=>e.jsx(I,{column:t,title:"用户数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(nt,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:t})=>e.jsx(I,{column:t,title:"节点数量"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx($n,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:t.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Et,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Ac({id:t.original.id}).then(({data:a})=>{a&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function qx(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),{data:r,refetch:i,isLoading:h}=Q({queryKey:["serverGroupList"],queryFn:async()=>{const{data:C}=await Vt();return C}}),T=Le({data:r||[],columns:Kx(i),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l},enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:T,toolbar:C=>e.jsx(Hx,{table:C,refetch:i}),isLoading:h})}function Ux(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"权限组管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有权限组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(qx,{})})]})]})}const Bx=Object.freeze(Object.defineProperty({__proto__:null,default:Ux},Symbol.toStringTag,{value:"Module"})),Gx=u.object({remarks:u.string().min(1,"Please enter a valid remarks."),match:u.array(u.string()),action:u.enum(["block","dns"]),action_value:u.string().optional()});function $r({refetch:s,dialogTrigger:t,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:n="add"}){const l=ae({resolver:ie(Gx),defaultValues:a,mode:"onChange"}),[o,d]=c.useState(!1);return e.jsxs(ue,{open:o,onOpenChange:d,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(ve,{icon:"ion:add"})," ",e.jsx("div",{children:"添加路由"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:n==="edit"?"编辑路由":"创建路由"}),e.jsx(Se,{})]}),e.jsxs(oe,{...l,children:[e.jsx(g,{control:l.control,name:"remarks",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入备注",...x})})}),e.jsx(k,{})]})}),e.jsx(g,{control:l.control,name:"match",render:({field:x})=>e.jsxs(j,{className:"flex-[2]",children:[e.jsx(p,{children:"备注"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(vs,{className:"min-h-[120px]",placeholder:`example.com *.example.com`,value:x.value.join(` `),onChange:r=>{x.onChange(r.target.value.split(` -`))}})})}),e.jsx(k,{})]})}),e.jsx(g,{control:l.control,name:"action",render:({field:x})=>e.jsxs(j,{children:[e.jsx(p,{children:"动作"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择动作"})}),e.jsxs(B,{children:[e.jsx(O,{value:"block",children:"禁止访问"}),e.jsx(O,{value:"dns",children:"指定DNS服务器进行解析"})]})]})})}),e.jsx(k,{})]})}),l.watch("action")==="dns"&&e.jsx(g,{control:l.control,name:"action_value",render:({field:x})=>e.jsxs(j,{children:[e.jsx(p,{children:"DNS服务器"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入DNS服务器",...x})})})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:()=>{Ac(l.getValues()).then(({data:x})=>{x&&(d(!1),s&&s(),l.reset())})},children:"提交"})]})]})]})]})}function Gx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Lr,{refetch:t}),e.jsx(S,{placeholder:"搜索路由...",value:s.getColumn("remarks")?.getFilterValue()??"",onChange:n=>s.getColumn("remarks")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}function Yx({columns:s,data:t,refetch:a}){const[n,l]=c.useState({}),[o,d]=c.useState({}),[x,r]=c.useState([]),[i,h]=c.useState([]),T=Le({data:t,columns:s,state:{sorting:i,columnVisibility:o,rowSelection:n,columnFilters:x},enableRowSelection:!0,onRowSelectionChange:l,onSortingChange:h,onColumnFiltersChange:r,onColumnVisibilityChange:d,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:T,toolbar:C=>e.jsx(Gx,{table:C,refetch:a})})}const Wx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:t})=>e.jsx(I,{column:t,title:"备注"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsxs("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:["匹配 ",t.original.match?.length," 条规则"]})}),enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:t})=>e.jsx(I,{column:t,title:"动作"}),cell:({row:t})=>{const a={dns:"指定DNS服务器进行解析",block:"禁止访问"};return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a[t.getValue("action")]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Lr,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Hc({id:t.original.id}).then(({data:a})=>{a&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Jx(){const[s,t]=c.useState([]);function a(){hr().then(({data:n})=>{t(n)})}return c.useEffect(()=>{a()},[]),e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"路由管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有路由组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Yx,{data:s,columns:Wx(a),refetch:a})})]})]})}const Qx=Object.freeze(Object.defineProperty({__proto__:null,default:Jx},Symbol.toStringTag,{value:"Module"})),$r=c.createContext(void 0);function Zx({children:s,refreshData:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null);return e.jsx($r.Provider,{value:{isOpen:a,setIsOpen:n,editingPlan:l,setEditingPlan:o,refreshData:t},children:s})}function xa(){const s=c.useContext($r);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function Xx({table:s,saveOrder:t,isSortMode:a}){const{setIsOpen:n}=xa();return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(D,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>n(!0),children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加套餐"})]}),e.jsx(S,{placeholder:"搜索套餐...",value:s.getColumn("name")?.getFilterValue()??"",onChange:l=>s.getColumn("name")?.setFilterValue(l.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:a?"default":"outline",onClick:t,size:"sm",children:a?"保存排序":"编辑排序"})})]})}const Aa={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},em=s=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显示"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("show"),onCheckedChange:a=>{zt({id:t.original.id,show:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:t})=>e.jsx(I,{column:t,title:"销售"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("sell"),onCheckedChange:a=>{zt({id:t.original.id,sell:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:t})=>e.jsx(I,{column:t,title:"续费",tooltip:"在订阅停止销售时,已购用户是否可以续费"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("renew"),onCheckedChange:a=>{zt({id:t.original.id,renew:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:t})=>e.jsx(I,{column:t,title:"统计"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(nt,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:t})=>e.jsx(I,{column:t,title:"权限组"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:t.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:t})=>e.jsx(I,{column:t,title:"价格"}),cell:({row:t})=>{const a=t.getValue("prices"),n=[{period:"月付",key:"monthly",unit:"元/月"},{period:"季付",key:"quarterly",unit:"元/季"},{period:"半年付",key:"half_yearly",unit:"元/半年"},{period:"年付",key:"yearly",unit:"元/年"},{period:"两年付",key:"two_yearly",unit:"元/两年"},{period:"三年付",key:"three_yearly",unit:"元/三年"},{period:"流量包",key:"onetime",unit:"元"},{period:"重置包",key:"reset_traffic",unit:"元/次"}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n.map(({period:l,key:o,unit:d})=>a[o]!=null&&e.jsxs(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Aa[o].color,Aa[o].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[l," ¥",a[o],d]},o))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingPlan:n}=xa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{n(t.original),a(!0)},children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{id({id:t.original.id}).then(({data:l})=>{l&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}],sm=u.object({id:u.number().nullable(),group_id:u.union([u.number(),u.string()]).nullable().optional(),name:u.string().min(1).max(250),content:u.string().nullable().optional(),transfer_enable:u.union([u.number().min(0),u.string().min(1)]),prices:u.object({monthly:u.union([u.number(),u.string()]).nullable().optional(),quarterly:u.union([u.number(),u.string()]).nullable().optional(),half_yearly:u.union([u.number(),u.string()]).nullable().optional(),yearly:u.union([u.number(),u.string()]).nullable().optional(),two_yearly:u.union([u.number(),u.string()]).nullable().optional(),three_yearly:u.union([u.number(),u.string()]).nullable().optional(),onetime:u.union([u.number(),u.string()]).nullable().optional(),reset_traffic:u.union([u.number(),u.string()]).nullable().optional()}).default({}),speed_limit:u.union([u.number(),u.string()]).nullable().optional(),capacity_limit:u.union([u.number(),u.string()]).nullable().optional(),device_limit:u.union([u.number(),u.string()]).nullable().optional(),force_update:u.boolean().optional(),reset_traffic_method:u.number().nullable(),users_count:u.number().optional()}),Ar=c.forwardRef(({className:s,...t},a)=>e.jsx($n,{ref:a,className:y("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...t,children:e.jsx(jo,{className:y("flex items-center justify-center text-current"),children:e.jsx(Cs,{className:"h-4 w-4"})})}));Ar.displayName=$n.displayName;const jt={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},tm=[{value:0,label:"跟随系统设置"},{value:1,label:"每月1号"},{value:2,label:"按月重置"},{value:3,label:"不重置"},{value:4,label:"每年1月1日"},{value:5,label:"按年重置"}];function am(){const{isOpen:s,setIsOpen:t,editingPlan:a,setEditingPlan:n,refreshData:l}=xa(),[o,d]=c.useState(!1),x=ae({resolver:ie(sm),defaultValues:{...jt,...a||{}},mode:"onChange"});c.useEffect(()=>{a?x.reset({...jt,...a}):x.reset(jt)},[a,x]);const r=new ta({html:!0}),[i,h]=c.useState();async function T(){Vt().then(({data:w})=>{h(w)})}c.useEffect(()=>{s&&T()},[s]);const C=w=>{if(isNaN(w))return;const _=Object.entries(gt).reduce((v,[N,P])=>{const f=w*P.months*P.discount;return{...v,[N]:f.toFixed(2)}},{});x.setValue("prices",_,{shouldDirty:!0})},m=()=>{t(!1),n(null),x.reset(jt)};return e.jsx(ue,{open:s,onOpenChange:m,children:e.jsxs(ce,{children:[e.jsxs(je,{children:[e.jsx(xe,{children:a?"编辑套餐":"添加套餐"}),e.jsx(Se,{})]}),e.jsxs(oe,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:x.control,name:"name",render:({field:w})=>e.jsxs(j,{children:[e.jsx(p,{children:"套餐名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入套餐名称",...w})}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"group_id",render:({field:w})=>e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center justify-between",children:["权限组",e.jsx(Et,{dialogTrigger:e.jsx(D,{variant:"link",children:"添加权限组"}),refetch:T})]}),e.jsxs(G,{value:w.value||"",onValueChange:w.onChange,children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择权限组"})})}),e.jsx(B,{children:i?.map(_=>e.jsx(O,{value:_.id,children:_.name},_.id))})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"transfer_enable",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"流量"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"请输入流量大小",className:"rounded-r-none",...w})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"GB"})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"speed_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"限速"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"请输入限速",className:"rounded-r-none",...w})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"Mbps"})]}),e.jsx(k,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:"售价设置"}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(S,{type:"number",placeholder:"基础月付价格",className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:w=>{const _=parseFloat(w.target.value);C(_)}})]}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const w=Object.keys(gt).reduce((_,v)=>({..._,[v]:""}),{});x.setValue("prices",w,{shouldDirty:!0})},children:"清空价格"})}),e.jsx(ee,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:"清空所有周期的价格设置"})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([w])=>!["onetime","reset_traffic"].includes(w)).map(([w,_])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(g,{control:x.control,name:`prices.${w}`,render:({field:v})=>e.jsxs(j,{children:[e.jsxs(p,{className:"text-xs font-medium text-muted-foreground",children:[_.label,e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",_.months===1?"每月":`每${_.months}个月`,"结算)"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0.00",min:0,...v,value:v.value??"",onChange:N=>v.onChange(N.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},w))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([w])=>["onetime","reset_traffic"].includes(w)).map(([w,_])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(g,{control:x.control,name:`prices.${w}`,render:({field:v})=>e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(p,{className:"text-xs font-medium",children:_.label}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:w==="onetime"?"一次性流量包,购买后立即生效":"用户可随时购买流量重置包,立即重置流量"})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0.00",min:0,...v,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},w))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(g,{control:x.control,name:"device_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"设备限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...w,value:w.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"台"})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"capacity_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"容量限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...w,value:w.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"人"})]}),e.jsx(k,{})]})})]}),e.jsx(g,{control:x.control,name:"reset_traffic_method",render:({field:w})=>e.jsxs(j,{children:[e.jsx(p,{children:"流量重置方式"}),e.jsxs(G,{value:w.value?.toString()??"0",onValueChange:_=>w.onChange(Number(_)),children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流量重置方式"})})}),e.jsx(B,{children:tm.map(_=>e.jsx(O,{value:_.value.toString(),children:_.label},_.value))})]}),e.jsx(F,{className:"text-xs",children:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"content",render:({field:w})=>{const[_,v]=c.useState(!1);return e.jsxs(j,{className:"space-y-2",children:[e.jsxs(p,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:["套餐描述",e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>v(!_),children:_?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(ee,{side:"top",children:e.jsx("p",{className:"text-xs",children:_?"隐藏预览":"显示预览"})})]})})]}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"sm",onClick:()=>{w.onChange(`## 套餐特点 +`))}})})}),e.jsx(k,{})]})}),e.jsx(g,{control:l.control,name:"action",render:({field:x})=>e.jsxs(j,{children:[e.jsx(p,{children:"动作"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsxs(G,{onValueChange:x.onChange,defaultValue:x.value,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择动作"})}),e.jsxs(B,{children:[e.jsx(O,{value:"block",children:"禁止访问"}),e.jsx(O,{value:"dns",children:"指定DNS服务器进行解析"})]})]})})}),e.jsx(k,{})]})}),l.watch("action")==="dns"&&e.jsx(g,{control:l.control,name:"action_value",render:({field:x})=>e.jsxs(j,{children:[e.jsx(p,{children:"DNS服务器"}),e.jsx("div",{className:"relative",children:e.jsx(b,{children:e.jsx(S,{type:"text",placeholder:"请输入DNS服务器",...x})})})]})}),e.jsxs(Ee,{children:[e.jsx(it,{asChild:!0,children:e.jsx(D,{variant:"outline",children:"取消"})}),e.jsx(D,{type:"submit",onClick:()=>{Hc(l.getValues()).then(({data:x})=>{x&&(d(!1),s&&s(),l.reset())})},children:"提交"})]})]})]})]})}function Yx({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx($r,{refetch:t}),e.jsx(S,{placeholder:"搜索路由...",value:s.getColumn("remarks")?.getFilterValue()??"",onChange:n=>s.getColumn("remarks")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}function Wx({columns:s,data:t,refetch:a}){const[n,l]=c.useState({}),[o,d]=c.useState({}),[x,r]=c.useState([]),[i,h]=c.useState([]),T=Le({data:t,columns:s,state:{sorting:i,columnVisibility:o,rowSelection:n,columnFilters:x},enableRowSelection:!0,onRowSelectionChange:l,onSortingChange:h,onColumnFiltersChange:r,onColumnVisibilityChange:d,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:T,toolbar:C=>e.jsx(Yx,{table:C,refetch:a})})}const Jx=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"组ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:t})=>e.jsx(I,{column:t,title:"备注"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsxs("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:["匹配 ",t.original.match?.length," 条规则"]})}),enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:t})=>e.jsx(I,{column:t,title:"动作"}),cell:({row:t})=>{const a={dns:"指定DNS服务器进行解析",block:"禁止访问"};return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a[t.getValue("action")]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:"操作"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx($r,{defaultValues:t.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]})}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{Kc({id:t.original.id}).then(({data:a})=>{a&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}];function Qx(){const[s,t]=c.useState([]);function a(){jr().then(({data:n})=>{t(n)})}return c.useEffect(()=>{a()},[]),e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"路由管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"管理所有路由组,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Wx,{data:s,columns:Jx(a),refetch:a})})]})]})}const Zx=Object.freeze(Object.defineProperty({__proto__:null,default:Qx},Symbol.toStringTag,{value:"Module"})),Ar=c.createContext(void 0);function Xx({children:s,refreshData:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null);return e.jsx(Ar.Provider,{value:{isOpen:a,setIsOpen:n,editingPlan:l,setEditingPlan:o,refreshData:t},children:s})}function xa(){const s=c.useContext(Ar);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function em({table:s,saveOrder:t,isSortMode:a}){const{setIsOpen:n}=xa();return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(D,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>n(!0),children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加套餐"})]}),e.jsx(S,{placeholder:"搜索套餐...",value:s.getColumn("name")?.getFilterValue()??"",onChange:l=>s.getColumn("name")?.setFilterValue(l.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(D,{variant:a?"default":"outline",onClick:t,size:"sm",children:a?"保存排序":"编辑排序"})})]})}const Ha={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},sm=s=>[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(L,{variant:"outline",children:t.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"显示"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("show"),onCheckedChange:a=>{zt({id:t.original.id,show:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:t})=>e.jsx(I,{column:t,title:"销售"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("sell"),onCheckedChange:a=>{zt({id:t.original.id,sell:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:t})=>e.jsx(I,{column:t,title:"续费",tooltip:"在订阅停止销售时,已购用户是否可以续费"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.getValue("renew"),onCheckedChange:a=>{zt({id:t.original.id,renew:a}).then(({data:n})=>{!n&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"名称"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:t})=>e.jsx(I,{column:t,title:"统计"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(nt,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:t.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:t})=>e.jsx(I,{column:t,title:"权限组"}),cell:({row:t})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:t.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:t})=>e.jsx(I,{column:t,title:"价格"}),cell:({row:t})=>{const a=t.getValue("prices"),n=[{period:"月付",key:"monthly",unit:"元/月"},{period:"季付",key:"quarterly",unit:"元/季"},{period:"半年付",key:"half_yearly",unit:"元/半年"},{period:"年付",key:"yearly",unit:"元/年"},{period:"两年付",key:"two_yearly",unit:"元/两年"},{period:"三年付",key:"three_yearly",unit:"元/三年"},{period:"流量包",key:"onetime",unit:"元"},{period:"重置包",key:"reset_traffic",unit:"元/次"}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n.map(({period:l,key:o,unit:d})=>a[o]!=null&&e.jsxs(L,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Ha[o].color,Ha[o].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[l," ¥",a[o],d]},o))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{setIsOpen:a,setEditingPlan:n}=xa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{n(t.original),a(!0)},children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{od({id:t.original.id}).then(({data:l})=>{l&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}],tm=u.object({id:u.number().nullable(),group_id:u.union([u.number(),u.string()]).nullable().optional(),name:u.string().min(1).max(250),content:u.string().nullable().optional(),transfer_enable:u.union([u.number().min(0),u.string().min(1)]),prices:u.object({monthly:u.union([u.number(),u.string()]).nullable().optional(),quarterly:u.union([u.number(),u.string()]).nullable().optional(),half_yearly:u.union([u.number(),u.string()]).nullable().optional(),yearly:u.union([u.number(),u.string()]).nullable().optional(),two_yearly:u.union([u.number(),u.string()]).nullable().optional(),three_yearly:u.union([u.number(),u.string()]).nullable().optional(),onetime:u.union([u.number(),u.string()]).nullable().optional(),reset_traffic:u.union([u.number(),u.string()]).nullable().optional()}).default({}),speed_limit:u.union([u.number(),u.string()]).nullable().optional(),capacity_limit:u.union([u.number(),u.string()]).nullable().optional(),device_limit:u.union([u.number(),u.string()]).nullable().optional(),force_update:u.boolean().optional(),reset_traffic_method:u.number().nullable(),users_count:u.number().optional()}),Hr=c.forwardRef(({className:s,...t},a)=>e.jsx(An,{ref:a,className:y("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...t,children:e.jsx(go,{className:y("flex items-center justify-center text-current"),children:e.jsx(Cs,{className:"h-4 w-4"})})}));Hr.displayName=An.displayName;const jt={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},am=[{value:0,label:"跟随系统设置"},{value:1,label:"每月1号"},{value:2,label:"按月重置"},{value:3,label:"不重置"},{value:4,label:"每年1月1日"},{value:5,label:"按年重置"}];function nm(){const{isOpen:s,setIsOpen:t,editingPlan:a,setEditingPlan:n,refreshData:l}=xa(),[o,d]=c.useState(!1),x=ae({resolver:ie(tm),defaultValues:{...jt,...a||{}},mode:"onChange"});c.useEffect(()=>{a?x.reset({...jt,...a}):x.reset(jt)},[a,x]);const r=new ta({html:!0}),[i,h]=c.useState();async function T(){Vt().then(({data:w})=>{h(w)})}c.useEffect(()=>{s&&T()},[s]);const C=w=>{if(isNaN(w))return;const _=Object.entries(gt).reduce((v,[N,P])=>{const f=w*P.months*P.discount;return{...v,[N]:f.toFixed(2)}},{});x.setValue("prices",_,{shouldDirty:!0})},m=()=>{t(!1),n(null),x.reset(jt)};return e.jsx(ue,{open:s,onOpenChange:m,children:e.jsxs(ce,{children:[e.jsxs(je,{children:[e.jsx(xe,{children:a?"编辑套餐":"添加套餐"}),e.jsx(Se,{})]}),e.jsxs(oe,{...x,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{control:x.control,name:"name",render:({field:w})=>e.jsxs(j,{children:[e.jsx(p,{children:"套餐名称"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入套餐名称",...w})}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"group_id",render:({field:w})=>e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center justify-between",children:["权限组",e.jsx(Et,{dialogTrigger:e.jsx(D,{variant:"link",children:"添加权限组"}),refetch:T})]}),e.jsxs(G,{value:w.value||"",onValueChange:w.onChange,children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择权限组"})})}),e.jsx(B,{children:i?.map(_=>e.jsx(O,{value:_.id,children:_.name},_.id))})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"transfer_enable",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"流量"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"请输入流量大小",className:"rounded-r-none",...w})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"GB"})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"speed_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"限速"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"请输入限速",className:"rounded-r-none",...w})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"Mbps"})]}),e.jsx(k,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:"售价设置"}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(S,{type:"number",placeholder:"基础月付价格",className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:w=>{const _=parseFloat(w.target.value);C(_)}})]}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const w=Object.keys(gt).reduce((_,v)=>({..._,[v]:""}),{});x.setValue("prices",w,{shouldDirty:!0})},children:"清空价格"})}),e.jsx(ee,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:"清空所有周期的价格设置"})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([w])=>!["onetime","reset_traffic"].includes(w)).map(([w,_])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(g,{control:x.control,name:`prices.${w}`,render:({field:v})=>e.jsxs(j,{children:[e.jsxs(p,{className:"text-xs font-medium text-muted-foreground",children:[_.label,e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",_.months===1?"每月":`每${_.months}个月`,"结算)"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0.00",min:0,...v,value:v.value??"",onChange:N=>v.onChange(N.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},w))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([w])=>["onetime","reset_traffic"].includes(w)).map(([w,_])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(g,{control:x.control,name:`prices.${w}`,render:({field:v})=>e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(p,{className:"text-xs font-medium",children:_.label}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:w==="onetime"?"一次性流量包,购买后立即生效":"用户可随时购买流量重置包,立即重置流量"})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"0.00",min:0,...v,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},w))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(g,{control:x.control,name:"device_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"设备限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...w,value:w.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"台"})]}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"capacity_limit",render:({field:w})=>e.jsxs(j,{className:"flex-1",children:[e.jsx(p,{children:"容量限制"}),e.jsxs("div",{className:"relative flex",children:[e.jsx(b,{children:e.jsx(S,{type:"number",min:0,placeholder:"留空则不限制",className:"rounded-r-none",...w,value:w.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:"人"})]}),e.jsx(k,{})]})})]}),e.jsx(g,{control:x.control,name:"reset_traffic_method",render:({field:w})=>e.jsxs(j,{children:[e.jsx(p,{children:"流量重置方式"}),e.jsxs(G,{value:w.value?.toString()??"0",onValueChange:_=>w.onChange(Number(_)),children:[e.jsx(b,{children:e.jsx(U,{children:e.jsx(Y,{placeholder:"选择流量重置方式"})})}),e.jsx(B,{children:am.map(_=>e.jsx(O,{value:_.value.toString(),children:_.label},_.value))})]}),e.jsx(F,{className:"text-xs",children:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式"}),e.jsx(k,{})]})}),e.jsx(g,{control:x.control,name:"content",render:({field:w})=>{const[_,v]=c.useState(!1);return e.jsxs(j,{className:"space-y-2",children:[e.jsxs(p,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:["套餐描述",e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>v(!_),children:_?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(ee,{side:"top",children:e.jsx("p",{className:"text-xs",children:_?"隐藏预览":"显示预览"})})]})})]}),e.jsx(le,{children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"sm",onClick:()=>{w.onChange(`## 套餐特点 • 高速稳定的全球网络接入 • 支持多设备同时在线 • 无限制的流量重置 @@ -14,8 +14,8 @@ import{r as c,j as e,t as ml,c as hl,I as ba,a as _s,S as Wt,u as ns,b as Jt,d a ## 注意事项 - 禁止滥用 - 遵守当地法律法规 -- 支持随时更换套餐`)},children:"使用模板"})}),e.jsx(ee,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:"点击使用预设的套餐描述模板"})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${_?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(b,{children:e.jsx(aa,{style:{height:"400px"},value:w.value||"",renderHTML:N=>r.render(N),onChange:({text:N})=>w.onChange(N),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:"在这里编写套餐描述...",className:"rounded-md border"})})}),_&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"预览"}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:r.render(w.value||"")}})})]})]}),e.jsx(F,{className:"text-xs",children:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容"}),e.jsx(k,{})]})}})]}),e.jsx(Ee,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(g,{control:x.control,name:"force_update",render:({field:w})=>e.jsxs(j,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(b,{children:e.jsx(Ar,{checked:w.value,onCheckedChange:w.onChange})}),e.jsx("div",{className:"",children:e.jsx(p,{className:"text-sm",children:"强制更新到用户"})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(D,{type:"button",variant:"outline",onClick:m,children:"取消"}),e.jsx(D,{type:"submit",disabled:o,onClick:()=>{x.handleSubmit(async w=>{d(!0),(await ld(w)).data&&(A.success(a?"套餐更新成功":"套餐添加成功"),m(),l()),d(!1)})()},children:o?"提交中...":"提交"})]})]})})]})]})})}function nm(){const[s,t]=c.useState({}),[a,n]=c.useState({"drag-handle":!1}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState(!1),[h,T]=c.useState({pageSize:20,pageIndex:0}),[C,m]=c.useState([]),{refetch:w}=Q({queryKey:["planList"],queryFn:async()=>{const{data:f}=await Ps();return m(f),f}});c.useEffect(()=>{n({"drag-handle":r}),T({pageSize:r?99999:10,pageIndex:0})},[r]);const _=(f,R)=>{r&&(f.dataTransfer.setData("text/plain",R.toString()),f.currentTarget.classList.add("opacity-50"))},v=(f,R)=>{if(!r)return;f.preventDefault(),f.currentTarget.classList.remove("bg-muted");const z=parseInt(f.dataTransfer.getData("text/plain"));if(z===R)return;const $=[...C],[E]=$.splice(z,1);$.splice(R,0,E),m($)},N=async()=>{if(!r){i(!0);return}const f=C?.map(R=>R.id);od(f).then(()=>{A.success("排序保存成功"),i(!1),w()}).finally(()=>{i(!1)})},P=Le({data:C||[],columns:em(w),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:h},enableRowSelection:!0,onPaginationChange:T,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Zx,{refreshData:w,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ge,{table:P,toolbar:f=>e.jsx(Xx,{table:f,refetch:w,saveOrder:N,isSortMode:r}),draggable:r,onDragStart:_,onDragEnd:f=>f.currentTarget.classList.remove("opacity-50"),onDragOver:f=>{f.preventDefault(),f.currentTarget.classList.add("bg-muted")},onDragLeave:f=>f.currentTarget.classList.remove("bg-muted"),onDrop:v,showPagination:!r}),e.jsx(am,{})]})})}function rm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"订阅管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(nm,{})})]})]})}const lm=Object.freeze(Object.defineProperty({__proto__:null,default:rm},Symbol.toStringTag,{value:"Module"})),Hr=[{value:me.PENDING,label:Es[me.PENDING],icon:go,color:Bs[me.PENDING]},{value:me.PROCESSING,label:Es[me.PROCESSING],icon:An,color:Bs[me.PROCESSING]},{value:me.COMPLETED,label:Es[me.COMPLETED],icon:qt,color:Bs[me.COMPLETED]},{value:me.CANCELLED,label:Es[me.CANCELLED],icon:Hn,color:Bs[me.CANCELLED]},{value:me.DISCOUNTED,label:Es[me.DISCOUNTED],icon:qt,color:Bs[me.DISCOUNTED]}],Kr=[{value:fe.PENDING,label:ct[fe.PENDING],icon:fo,color:dt[fe.PENDING]},{value:fe.PROCESSING,label:ct[fe.PROCESSING],icon:An,color:dt[fe.PROCESSING]},{value:fe.VALID,label:ct[fe.VALID],icon:qt,color:dt[fe.VALID]},{value:fe.INVALID,label:ct[fe.INVALID],icon:Hn,color:dt[fe.INVALID]}];function ft({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=s?.getFilterValue(),o=Array.isArray(l)?new Set(l):l!==void 0?new Set([l]):new Set;return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,o?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:o.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:o.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[o.size," selected"]}):a.filter(d=>o.has(d.value)).map(d=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:d.label},d.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(d=>{const x=o.has(d.value);return e.jsxs(be,{onSelect:()=>{const r=new Set(o);x?r.delete(d.value):r.add(d.value);const i=Array.from(r);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",x?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),d.icon&&e.jsx(d.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${d.color}`}),e.jsx("span",{children:d.label}),n?.get(d.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(d.value)})]},d.value)})}),o.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const im=u.object({email:u.string().min(1),plan_id:u.number(),period:u.string(),total_amount:u.number()}),om={email:"",plan_id:0,total_amount:0,period:""};function qr({refetch:s,trigger:t,defaultValues:a}){const[n,l]=c.useState(!1),o=ae({resolver:ie(im),defaultValues:{...om,...a},mode:"onChange"}),[d,x]=c.useState([]);return c.useEffect(()=>{n&&Ps().then(({data:r})=>{x(r)})},[n]),e.jsxs(ue,{open:n,onOpenChange:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:" h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加订单"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"订单分配"}),e.jsx(Se,{})]}),e.jsxs(oe,{...o,children:[e.jsx(g,{control:o.control,name:"email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"用户邮箱"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入用户邮箱",...r})})]})}),e.jsx(g,{control:o.control,name:"plan_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:r.value?r.value?.toString():void 0,onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择订阅计划"})}),e.jsx(B,{children:d.map(i=>e.jsx(O,{value:i.id.toString(),children:i.name},i.id))})]})})]})}),e.jsx(g,{control:o.control,name:"period",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅时长"}),e.jsx(b,{children:e.jsxs(G,{value:r.value,onValueChange:r.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择购买时长"})}),e.jsx(B,{children:Object.keys(st).map(i=>e.jsx(O,{value:i,children:st[i]},i))})]})})]})}),e.jsx(g,{control:o.control,name:"total_amount",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"支付金额"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入需要支付的金额",value:r.value/100,onChange:i=>r.onChange(parseFloat(i.currentTarget.value)*100)})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(D,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(D,{type:"submit",onClick:()=>{o.handleSubmit(r=>{xd(r).then(({data:i})=>{i&&(s&&s(),o.reset(),l(!1),A.success("添加成功"))})})()},children:"确定"})]})]})]})]})}const cm=Object.values(as).filter(s=>typeof s=="number").map(s=>({label:yr[s],value:s,color:s===as.NEW?"green-500":s===as.RENEWAL?"blue-500":s===as.UPGRADE?"purple-500":"orange-500"})),dm=Object.values(ne).map(s=>({label:st[s],value:s,color:s===ne.MONTH_PRICE?"slate-500":s===ne.QUARTER_PRICE?"cyan-500":s===ne.HALF_YEAR_PRICE?"indigo-500":s===ne.YEAR_PRICE?"violet-500":s===ne.TWO_YEAR_PRICE?"fuchsia-500":s===ne.THREE_YEAR_PRICE?"pink-500":s===ne.ONETIME_PRICE?"rose-500":"orange-500"}));function um({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qr,{refetch:t}),e.jsx(S,{placeholder:"搜索订单...",value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:n=>s.getColumn("trade_no")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(ft,{column:s.getColumn("type"),title:"订单类型",options:cm}),s.getColumn("period")&&e.jsx(ft,{column:s.getColumn("period"),title:"订单周期",options:dm}),s.getColumn("status")&&e.jsx(ft,{column:s.getColumn("status"),title:"订单状态",options:Hr}),s.getColumn("commission_status")&&e.jsx(ft,{column:s.getColumn("commission_status"),title:"佣金状态",options:Kr})]}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})}function Ae({label:s,value:t,className:a,valueClassName:n}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",n),children:t||"-"})]})}function xm({status:s}){const t={PENDING:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",PAID:"bg-green-100 text-green-800 hover:bg-green-100",FAILED:"bg-red-100 text-red-800 hover:bg-red-100",REFUNDED:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(L,{variant:"secondary",className:y("font-medium",t[s]),children:Es[s]})}function mm({id:s,trigger:t}){const[a,n]=c.useState(!1),[l,o]=c.useState();return c.useEffect(()=>{(async()=>{if(a){const{data:x}=await cd({id:s});o(x)}})()},[a,s]),e.jsxs(ue,{onOpenChange:n,open:a,children:[e.jsx(Re,{asChild:!0,children:t}),e.jsxs(ce,{className:"max-w-xl",children:[e.jsxs(je,{className:"space-y-2",children:[e.jsx(xe,{className:"text-lg font-medium",children:"订单信息"}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:["订单号:",l?.trade_no]}),l?.status&&e.jsx(xm,{status:l.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"基本信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"用户邮箱",value:l?.user?.email?e.jsxs(Ss,{to:`/user/manage?email=${l.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[l.user.email,e.jsx(Kn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Ae,{label:"订单周期",value:l&&st[l.period]}),e.jsx(Ae,{label:"订阅计划",value:l?.plan?.name,valueClassName:"font-medium"}),e.jsx(Ae,{label:"回调单号",value:l?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"金额信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"支付金额",value:hs(l?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(ge,{className:"my-2"}),e.jsx(Ae,{label:"余额支付",value:hs(l?.balance_amount||0)}),e.jsx(Ae,{label:"优惠金额",value:hs(l?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Ae,{label:"退回金额",value:hs(l?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Ae,{label:"折抵金额",value:hs(l?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"时间信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"创建时间",value:re(l?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Ae,{label:"更新时间",value:re(l?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const hm={[as.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},jm={[ne.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},gm=s=>[{accessorKey:"trade_no",header:({column:t})=>e.jsx(I,{column:t,title:"订单号"}),cell:({row:t})=>{const a=t.original.trade_no,n=a.length>6?`${a.slice(0,3)}...${a.slice(-3)}`:a;return e.jsx("div",{className:"flex items-center",children:e.jsx(mm,{trigger:e.jsxs(W,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:n}),e.jsx(Kn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:t.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type"),n=hm[a]||{color:"text-slate-700",bgColor:"bg-slate-100/80"};return e.jsx(L,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",n.color,n.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:yr[a]})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:t})=>e.jsx(I,{column:t,title:"订阅计划"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:t.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:t})=>e.jsx(I,{column:t,title:"周期"}),cell:({row:t})=>{const a=t.getValue("period"),n=jm[a]||{color:"text-gray-700",bgColor:"bg-gray-50"};return e.jsx(L,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",n.color,n.bgColor,"hover:bg-opacity-80"),children:st[a]})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:t})=>e.jsx(I,{column:t,title:"支付金额"}),cell:({row:t})=>{const a=t.getValue("total_amount"),n=typeof a=="number"?(a/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",n]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:t})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(I,{column:t,title:"订单状态"}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx(Rr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(ee,{side:"top",className:"max-w-[200px] text-sm",children:"标记为[已支付]后将会由系统进行开通后并完成"})]})})]}),cell:({row:t})=>{const a=Hr.find(n=>n.value===t.getValue("status"));return a?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a.icon&&e.jsx(a.icon,{className:`h-4 w-4 text-${a.color}`}),e.jsx("span",{className:"text-sm font-medium",children:a.label})]}),a.value===me.PENDING&&e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(gs,{align:"end",className:"w-[140px]",children:[e.jsx(he,{className:"cursor-pointer",onClick:async()=>{await dd({trade_no:t.original.trade_no}),s()},children:"标记为已支付"}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await ud({trade_no:t.original.trade_no}),s()},children:"取消订单"})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:t})=>e.jsx(I,{column:t,title:"佣金金额"}),cell:({row:t})=>{const a=t.getValue("commission_balance"),n=a?(a/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:a?`¥${n}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:t})=>e.jsx(I,{column:t,title:"佣金状态"}),cell:({row:t})=>{const a=t.original.commission_balance,n=Kr.find(l=>l.value===t.getValue("commission_status"));return a==0||!n?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n.icon&&e.jsx(n.icon,{className:`h-4 w-4 text-${n.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n.label})]}),n.value===fe.PENDING&&e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(gs,{align:"end",className:"w-[120px]",children:[e.jsx(he,{className:"cursor-pointer",onClick:async()=>{await Fa({trade_no:t.original.trade_no,commission_status:fe.PROCESSING}),s()},children:"标记为有效"}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Fa({trade_no:t.original.trade_no,commission_status:fe.INVALID}),s()},children:"标记为无效"})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:t})=>e.jsx(I,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:re(t.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}];function fm(){const[s]=qn(),[t,a]=c.useState({}),[n,l]=c.useState({}),[o,d]=c.useState([]),[x,r]=c.useState([]),[i,h]=c.useState({pageIndex:0,pageSize:20});c.useEffect(()=>{const _=[],v=s.get("order_id");v&&_.push({id:"order_id",value:v});const N=s.get("commission_status");N&&_.push({id:"commission_status",value:parseInt(N)});const P=s.get("status");P&&_.push({id:"status",value:parseInt(P)});const f=s.get("commission_balance");f&&_.push({id:"commission_balance",value:f}),_.length>0&&d(_)},[s]);const{refetch:T,data:C,isLoading:m}=Q({queryKey:["orderList",i,o,x],queryFn:()=>jr({pageSize:i.pageSize,current:i.pageIndex+1,filter:o,sort:x})}),w=Le({data:C?.data??[],columns:gm(T),state:{sorting:x,columnVisibility:n,rowSelection:t,columnFilters:o,pagination:i},rowCount:C?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:r,onColumnFiltersChange:d,onColumnVisibilityChange:l,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:h,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:w,toolbar:e.jsx(um,{table:w,refetch:T}),showPagination:!0})}function pm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 订单管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看用户订单,包括分配、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(fm,{})})]})]})}const vm=Object.freeze(Object.defineProperty({__proto__:null,default:pm},Symbol.toStringTag,{value:"Module"}));function bm({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const ym=u.object({id:u.coerce.number().nullable().optional(),name:u.string().min(1,"请输入优惠券名称"),code:u.string().nullable(),type:u.union([u.string(),u.nativeEnum(Rt)]),value:u.coerce.number(),started_at:u.coerce.number(),ended_at:u.coerce.number(),limit_use:u.union([u.string(),u.number()]).nullable(),limit_use_with_user:u.union([u.string(),u.number()]).nullable(),generate_count:u.coerce.number().nullable().optional(),limit_plan_ids:u.array(u.number()).default([]).nullable(),limit_period:u.array(u.nativeEnum(ne)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Ha={name:"",code:"",type:Rt.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Ur({defaultValues:s,refetch:t,type:a="create",dialogTrigger:n=e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加优惠券"})]}),open:l,onOpenChange:o}){const[d,x]=c.useState(!1),r=l??d,i=o??x,[h,T]=c.useState([]),C=ae({resolver:ie(ym),defaultValues:s||Ha});c.useEffect(()=>{s&&C.reset(s)},[s,C]),c.useEffect(()=>{Ps().then(({data:v})=>T(v))},[]);const m=v=>{if(!v)return;const N=(P,f)=>{const R=new Date(f*1e3);return P.setHours(R.getHours(),R.getMinutes(),R.getSeconds()),Math.floor(P.getTime()/1e3)};v.from&&C.setValue("started_at",N(v.from,C.watch("started_at"))),v.to&&C.setValue("ended_at",N(v.to,C.watch("ended_at")))},w=async v=>{try{await hd(v),i(!1),a==="create"&&C.reset(Ha),t()}catch(N){console.error("保存优惠券失败:",N)}},_=(v,N)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:N}),e.jsx(S,{type:"datetime-local",step:"1",value:re(C.watch(v),"YYYY-MM-DDTHH:mm:ss"),onChange:P=>{const f=new Date(P.target.value);C.setValue(v,Math.floor(f.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ue,{open:r,onOpenChange:i,children:[n&&e.jsx(Re,{asChild:!0,children:n}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:a==="create"?"添加优惠券":"编辑优惠券"})}),e.jsx(oe,{...C,children:e.jsxs("form",{onSubmit:C.handleSubmit(w),className:"space-y-4",children:[e.jsx(g,{control:C.control,name:"name",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"优惠券名称"}),e.jsx(S,{placeholder:"请输入优惠券名称",...v}),e.jsx(k,{})]})}),e.jsxs(j,{children:[e.jsx(p,{children:"优惠券类型和值"}),e.jsxs("div",{className:"flex",children:[e.jsx(g,{control:C.control,name:"type",render:({field:v})=>e.jsxs(G,{value:v.value.toString(),onValueChange:v.onChange,children:[e.jsx(U,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:"优惠券类型"})}),e.jsx(B,{children:Object.entries(la).map(([N,P])=>e.jsx(O,{value:N,children:P},N))})]})}),e.jsx(g,{control:C.control,name:"value",render:({field:v})=>e.jsx(S,{type:"number",placeholder:"请输入值",...v,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:C.watch("type")===Rt.AMOUNT?"¥":"%"})})]})]}),e.jsxs(j,{children:[e.jsx(p,{children:"优惠券有效期"}),e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!C.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4"}),re(C.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ","至"," ",re(C.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Be,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Is,{mode:"range",selected:{from:new Date(C.watch("started_at")*1e3),to:new Date(C.watch("ended_at")*1e3)},onSelect:m,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[_("started_at","开始时间"),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:"至"}),_("ended_at","结束时间")]})})]})]}),e.jsx(k,{})]}),e.jsx(g,{control:C.control,name:"limit_use",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"最大使用次数"}),e.jsx(S,{type:"number",min:0,placeholder:"限制最大使用次数,留空则不限制",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"设置优惠券的总使用次数限制,留空表示不限制使用次数"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_use_with_user",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"每个用户可使用次数"}),e.jsx(S,{type:"number",min:0,placeholder:"限制每个用户可使用次数,留空则不限制",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_period",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"指定周期"}),e.jsx(at,{options:Object.entries(ne).filter(([N])=>isNaN(Number(N))).map(([N,P])=>({label:P,value:N})),onChange:N=>{if(N.length===0){v.onChange([]);return}const P=N.map(f=>ne[f.value]);v.onChange(P)},value:(v.value||[]).map(N=>({label:Object.entries(ne).find(([P,f])=>f===N)?.[1]||"",value:Object.entries(ne).find(([P,f])=>f===N)?.[0]||""})),placeholder:"限制指定周期可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的周期"})}),e.jsx(F,{className:"text-xs",children:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_plan_ids",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"指定订阅"}),e.jsx(at,{options:h?.map(N=>({label:N.name,value:N.id.toString()}))||[],onChange:N=>v.onChange(N.map(P=>Number(P.value))),value:(h||[]).filter(N=>(v.value||[]).includes(N.id)).map(N=>({label:N.name,value:N.id.toString()})),placeholder:"限制指定订阅可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的订阅"})}),e.jsx(k,{})]})}),a==="create"&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:C.control,name:"code",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"自定义优惠码"}),e.jsx(S,{placeholder:"自定义优惠码,留空则自动生成",...v,className:"h-9"}),e.jsx(F,{className:"text-xs",children:"可以自定义优惠码,留空则系统自动生成"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"generate_count",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"批量生成数量"}),e.jsx(S,{type:"number",min:0,placeholder:"批量生成优惠码数量,留空则生成单个",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"批量生成多个优惠码,留空则只生成单个优惠码"}),e.jsx(k,{})]})})]}),e.jsx(Ee,{children:e.jsx(D,{type:"submit",disabled:C.formState.isSubmitting,children:C.formState.isSubmitting?"保存中...":"保存"})})]})})]})]})}function Nm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ur,{refetch:t}),e.jsx(S,{placeholder:"搜索优惠券...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(bm,{column:s.getColumn("type"),title:"类型",options:Object.entries(la).map(([n,l])=>({value:n,label:l}))}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})}const Br=c.createContext(void 0);function wm({children:s,refetch:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null),d=r=>{o(r),n(!0)},x=()=>{n(!1),o(null)};return e.jsxs(Br.Provider,{value:{isOpen:a,currentCoupon:l,openEdit:d,closeEdit:x},children:[s,l&&e.jsx(Ur,{defaultValues:l,refetch:t,type:"edit",open:a,onOpenChange:n})]})}function _m(){const s=c.useContext(Br);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Cm=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(L,{children:t.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"启用"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.original.show,onCheckedChange:a=>{gd({id:t.original.id,show:a}).then(({data:n})=>!n&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"卷名称"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:t.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:la[t.original.type]}),enableSorting:!0},{accessorKey:"code",header:({column:t})=>e.jsx(I,{column:t,title:"卷码"}),cell:({row:t})=>e.jsx(L,{variant:"secondary",children:t.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:t})=>e.jsx(I,{column:t,title:"剩余次数"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.original.limit_use===null?"无限次":t.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:t})=>e.jsx(I,{column:t,title:"可用次数/用户"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.original.limit_use_with_user===null?"无限制":t.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:t})=>e.jsx(I,{column:t,title:"有效期"}),cell:({row:t})=>{const[a,n]=c.useState(!1),l=Date.now(),o=t.original.started_at*1e3,d=t.original.ended_at*1e3,x=l>d,r=le.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{openEdit:a}=_m();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>a(t.original),children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{jd({id:t.original.id}).then(({data:n})=>{n&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}];function Sm(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState({pageIndex:0,pageSize:20}),{refetch:h,data:T}=Q({queryKey:["couponList",r,l,d],queryFn:()=>md({pageSize:r.pageSize,current:r.pageIndex+1,filter:l,sort:d})}),C=Le({data:T?.data??[],columns:Cm(h),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:r},pageCount:Math.ceil((T?.total??0)/r.pageSize),rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,onPaginationChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(wm,{refetch:h,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:C,toolbar:e.jsx(Nm,{table:C,refetch:h})})})})}function km(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"优惠券管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看优惠券,包括增加、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Sm,{})})]})]})}const Dm=Object.freeze(Object.defineProperty({__proto__:null,default:km},Symbol.toStringTag,{value:"Module"})),Tm=u.object({email_prefix:u.string().optional(),email_suffix:u.string().min(1),password:u.string().optional(),expired_at:u.number().optional().nullable(),plan_id:u.number().nullable(),generate_count:u.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Pm={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Im({refetch:s}){const[t,a]=c.useState(!1),n=ae({resolver:ie(Tm),defaultValues:Pm,mode:"onChange"}),[l,o]=c.useState([]);return c.useEffect(()=>{t&&Ps().then(({data:d})=>{d&&o(d)})},[t]),e.jsxs(ue,{open:t,onOpenChange:a,children:[e.jsx(Re,{asChild:!0,children:e.jsxs(W,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"创建用户"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"创建用户"}),e.jsx(Se,{})]}),e.jsxs(oe,{...n,children:[e.jsxs(j,{children:[e.jsx(p,{children:"邮箱"}),e.jsxs("div",{className:"flex",children:[!n.watch("generate_count")&&e.jsx(g,{control:n.control,name:"email_prefix",render:({field:d})=>e.jsx(S,{className:"flex-[5] rounded-r-none",placeholder:"帐号(批量生成请留空)",...d})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${n.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(g,{control:n.control,name:"email_suffix",render:({field:d})=>e.jsx(S,{className:"flex-[4] rounded-l-none",placeholder:"域",...d})})]})]}),e.jsx(g,{control:n.control,name:"password",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"密码"}),e.jsx(S,{placeholder:"留空则密码与邮件相同",...d}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"expired_at",render:({field:d})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(p,{children:"到期时间"}),e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsx(b,{children:e.jsxs(W,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!d.value&&"text-muted-foreground"),children:[d.value?re(d.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(rt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Be,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(vo,{asChild:!0,children:e.jsx(W,{variant:"outline",className:"w-full",onClick:()=>{d.onChange(null)},children:"长期有效"})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Is,{mode:"single",selected:d.value?new Date(d.value*1e3):void 0,onSelect:x=>{x&&d.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(g,{control:n.control,name:"plan_id",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:d.value?d.value.toString():"null",onValueChange:x=>d.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"null",children:"无"}),l.map(x=>e.jsx(O,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!n.watch("email_prefix")&&e.jsx(g,{control:n.control,name:"generate_count",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"生成数量"}),e.jsx(S,{type:"number",placeholder:"如果为批量生产请输入生成数量",value:d.value||"",onChange:x=>d.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(Ee,{children:[e.jsx(W,{variant:"outline",onClick:()=>a(!1),children:"取消"}),e.jsx(W,{onClick:()=>n.handleSubmit(d=>{bd(d).then(({data:x})=>{x&&(A.success("生成成功"),n.reset(),s(),a(!1))})})(),children:"生成"})]})]})]})}const Gr=Ua,Yr=Ba,Vm=Ga,Wr=c.forwardRef(({className:s,...t},a)=>e.jsx(_t,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Wr.displayName=_t.displayName;const Rm=_s("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),ma=c.forwardRef(({side:s="right",className:t,children:a,...n},l)=>e.jsxs(Vm,{children:[e.jsx(Wr,{}),e.jsxs(Ct,{ref:l,className:y(Rm({side:s}),t),...n,children:[e.jsxs(Zt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Me,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));ma.displayName=Ct.displayName;const ha=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...t});ha.displayName="SheetHeader";const Jr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Jr.displayName="SheetFooter";const ja=c.forwardRef(({className:s,...t},a)=>e.jsx(St,{ref:a,className:y("text-lg font-semibold text-foreground",s),...t}));ja.displayName=St.displayName;const ga=c.forwardRef(({className:s,...t},a)=>e.jsx(kt,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));ga.displayName=kt.displayName;const Gs=[{label:"邮箱",value:"email",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"用户ID",value:"id",type:"number",operators:[{label:"等于",value:"eq"}]},{label:"订阅",value:"plan_id",type:"select",operators:[{label:"等于",value:"eq"}],useOptions:!0},{label:"流量",value:"transfer_enable",type:"number",unit:"GB",operators:[{label:"大于",value:"gt"},{label:"小于",value:"lt"},{label:"等于",value:"eq"}]},{label:"已用流量",value:"total_used",type:"number",unit:"GB",operators:[{label:"大于",value:"gt"},{label:"小于",value:"lt"},{label:"等于",value:"eq"}]},{label:"在线设备",value:"online_count",type:"number",operators:[{label:"等于",value:"eq"},{label:"大于",value:"gt"},{label:"小于",value:"lt"}]},{label:"到期时间",value:"expired_at",type:"date",operators:[{label:"早于",value:"lt"},{label:"晚于",value:"gt"},{label:"等于",value:"eq"}]},{label:"UUID",value:"uuid",type:"text",operators:[{label:"等于",value:"eq"}]},{label:"Token",value:"token",type:"text",operators:[{label:"等于",value:"eq"}]},{label:"账号状态",value:"banned",type:"select",operators:[{label:"等于",value:"eq"}],options:[{label:"正常",value:"0"},{label:"禁用",value:"1"}]},{label:"备注",value:"remark",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"邀请人邮箱",value:"inviter_email",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"邀请人ID",value:"invite_user_id",type:"number",operators:[{label:"等于",value:"eq"}]},{label:"管理员",value:"is_admin",type:"boolean",operators:[{label:"等于",value:"eq"}]},{label:"员工",value:"is_staff",type:"boolean",operators:[{label:"等于",value:"eq"}]}];function Em({table:s,refetch:t,permissionGroups:a=[],subscriptionPlans:n=[]}){const l=s.getState().columnFilters.length>0,[o,d]=c.useState([]),[x,r]=c.useState(!1),i=v=>v*1024*1024*1024,h=v=>v/(1024*1024*1024),T=()=>{d([...o,{field:"",operator:"",value:""}])},C=v=>{d(o.filter((N,P)=>P!==v))},m=(v,N,P)=>{const f=[...o];if(f[v]={...f[v],[N]:P},N==="field"){const R=Gs.find(z=>z.value===P);R&&(f[v].operator=R.operators[0].value,f[v].value=R.type==="boolean"?!1:"")}d(f)},w=(v,N)=>{const P=Gs.find(f=>f.value===v.field);if(!P)return null;switch(P.type){case"text":return e.jsx(S,{placeholder:"输入值",value:v.value,onChange:f=>m(N,"value",f.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(S,{type:"number",placeholder:`输入数值${P.unit?`(${P.unit})`:""}`,value:P.unit==="GB"?h(v.value||0):v.value,onChange:f=>{const R=Number(f.target.value);m(N,"value",P.unit==="GB"?i(R):R)}}),P.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:P.unit})]});case"date":return e.jsx(Is,{mode:"single",selected:v.value,onSelect:f=>m(N,"value",f),className:"rounded-md border"});case"select":return e.jsxs(G,{value:v.value,onValueChange:f=>m(N,"value",f),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择选项"})}),e.jsx(B,{children:P.useOptions?n.map(f=>e.jsx(O,{value:f.value.toString(),children:f.label},f.value)):P.options?.map(f=>e.jsx(O,{value:f.value.toString(),children:f.label},f.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(H,{checked:v.value,onCheckedChange:f=>m(N,"value",f)}),e.jsx(yt,{children:v.value?"是":"否"})]});default:return null}},_=()=>{const v=o.filter(N=>N.field&&N.operator&&N.value!=="").map(N=>{const P=Gs.find(R=>R.value===N.field);let f=N.value;return N.operator==="contains"?{id:N.field,value:f}:(P?.type==="date"&&f instanceof Date&&(f=Math.floor(f.getTime()/1e3)),P?.type==="boolean"&&(f=f?1:0),{id:N.field,value:`${N.operator}:${f}`})});s.setColumnFilters(v),r(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Im,{refetch:t}),e.jsx(S,{placeholder:"搜索用户邮箱...",value:s.getColumn("email")?.getFilterValue()??"",onChange:v=>s.getColumn("email")?.setFilterValue(v.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Gr,{open:x,onOpenChange:r,children:[e.jsx(Yr,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(bo,{className:"mr-2 h-4 w-4"}),"高级筛选",o.length>0&&e.jsx(L,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:o.length})]})}),e.jsxs(ma,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ha,{children:[e.jsx(ja,{children:"高级筛选"}),e.jsx(ga,{children:"添加一个或多个筛选条件来精确查找用户"})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:"筛选条件"}),e.jsx(D,{variant:"outline",size:"sm",onClick:T,children:"添加条件"})]}),e.jsx(tt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:o.map((v,N)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(yt,{children:["条件 ",N+1]}),e.jsx(D,{variant:"ghost",size:"sm",onClick:()=>C(N),children:e.jsx(Me,{className:"h-4 w-4"})})]}),e.jsxs(G,{value:v.field,onValueChange:P=>m(N,"field",P),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择字段"})}),e.jsx(B,{children:Gs.map(P=>e.jsx(O,{value:P.value,children:P.label},P.value))})]}),v.field&&e.jsxs(G,{value:v.operator,onValueChange:P=>m(N,"operator",P),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择操作符"})}),e.jsx(B,{children:Gs.find(P=>P.value===v.field)?.operators.map(P=>e.jsx(O,{value:P.value,children:P.label},P.value))})]}),v.field&&v.operator&&w(v,N)]},N))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(D,{variant:"outline",onClick:()=>{d([]),r(!1)},children:"重置"}),e.jsx(D,{onClick:_,children:"应用筛选"})]})]})]})]}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),d([])},className:"h-8 px-2 lg:px-3",children:["重置筛选",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}const Fm=u.object({id:u.number(),email:u.string().email(),invite_user_email:u.string().email().nullable().optional(),password:u.string().optional().nullable(),balance:u.coerce.number(),commission_balance:u.coerce.number(),u:u.number(),d:u.number(),transfer_enable:u.number(),expired_at:u.number().nullable(),plan_id:u.number().nullable(),banned:u.number(),commission_type:u.number(),commission_rate:u.number().nullable(),discount:u.number().nullable(),speed_limit:u.number().nullable(),device_limit:u.number().nullable(),is_admin:u.number(),is_staff:u.number(),remarks:u.string().nullable()}),Qr=c.createContext(void 0);function Mm({children:s,defaultValues:t,open:a,onOpenChange:n}){const[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState([]),h=ae({resolver:ie(Fm),defaultValues:t,mode:"onChange"});c.useEffect(()=>{a!==void 0&&o(a)},[a]);const T=C=>{o(C),n?.(C)};return e.jsx(Qr.Provider,{value:{form:h,formOpen:l,setFormOpen:T,datePickerOpen:d,setDatePickerOpen:x,planList:r,setPlanList:i},children:s})}function zm(){const s=c.useContext(Qr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Om({refetch:s}){const{form:t,formOpen:a,setFormOpen:n,datePickerOpen:l,setDatePickerOpen:o,planList:d,setPlanList:x}=zm();return c.useEffect(()=>{a&&Ps().then(({data:r})=>{x(r)})},[a,x]),e.jsxs(oe,{...t,children:[e.jsx(g,{control:t.control,name:"email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"邮箱"}),e.jsx(b,{children:e.jsx(S,{...r,placeholder:"请输入邮箱"})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"invite_user_email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"邀请人邮箱"}),e.jsx(b,{children:e.jsx(S,{value:r.value||"",onChange:i=>r.onChange(i.target.value?i.target.value:null),placeholder:"请输入邮箱"})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"password",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"密码"}),e.jsx(b,{children:e.jsx(S,{value:r.value||"",onChange:r.onChange,placeholder:"如需修改密码请输入"})}),e.jsx(k,{...r})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(g,{control:t.control,name:"balance",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"余额"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:r.onChange,placeholder:"请输入余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"commission_balance",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"佣金余额"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:r.onChange,placeholder:"请输入佣金余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"u",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"已用上行"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"已用上行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"d",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"已用下行"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"已用下行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{...r})]})})]}),e.jsx(g,{control:t.control,name:"transfer_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"流量"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"请输入流量",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"expired_at",render:({field:r})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(p,{children:"到期时间"}),e.jsxs(Ze,{open:l,onOpenChange:o,children:[e.jsx(Xe,{asChild:!0,children:e.jsx(b,{children:e.jsxs(D,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),onClick:()=>o(!0),children:[r.value?re(r.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(rt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Be,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:i=>{i.preventDefault()},onEscapeKeyDown:i=>{i.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{r.onChange(null),o(!1)},children:"长期有效"}),e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const i=new Date;i.setMonth(i.getMonth()+1),i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3)),o(!1)},children:"一个月"}),e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const i=new Date;i.setMonth(i.getMonth()+3),i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3)),o(!1)},children:"三个月"})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Is,{mode:"single",selected:r.value?new Date(r.value*1e3):void 0,onSelect:i=>{if(i){const h=new Date(r.value?r.value*1e3:Date.now());i.setHours(h.getHours(),h.getMinutes(),h.getSeconds()),r.onChange(Math.floor(i.getTime()/1e3))}},disabled:i=>i{const i=new Date;i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3))},className:"h-6 px-2 text-xs",children:"设为当天结束"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(S,{type:"datetime-local",step:"1",value:re(r.value,"YYYY-MM-DDTHH:mm:ss"),onChange:i=>{const h=new Date(i.target.value);isNaN(h.getTime())||r.onChange(Math.floor(h.getTime()/1e3))},className:"flex-1"}),e.jsx(D,{type:"button",variant:"outline",onClick:()=>o(!1),children:"确定"})]})]})]})})]}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"plan_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:r.value?r.value.toString():"null",onValueChange:i=>r.onChange(i==="null"?null:parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"null",children:"无"}),d.map(i=>e.jsx(O,{value:i.id.toString(),children:i.name},i.id))]})]})})]})}),e.jsx(g,{control:t.control,name:"banned",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"账户状态"}),e.jsx(b,{children:e.jsxs(G,{value:r.value.toString(),onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{})}),e.jsxs(B,{children:[e.jsx(O,{value:"1",children:"封禁"}),e.jsx(O,{value:"0",children:"正常"})]})]})})]})}),e.jsx(g,{control:t.control,name:"commission_type",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"佣金类型"}),e.jsx(b,{children:e.jsxs(G,{value:r.value.toString(),onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"跟随系统设置"}),e.jsx(O,{value:"1",children:"循环返利"}),e.jsx(O,{value:"2",children:"首次返利"})]})]})})]})}),e.jsx(g,{control:t.control,name:"commission_rate",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"推荐返利比例"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"请输入推荐返利比例(为空则跟随站点设置返利比例)",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(g,{control:t.control,name:"discount",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"专享折扣比例"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"请输入专享折扣比例(为空则不享受专享折扣)",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"speed_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限速"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"留空则不限速",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"device_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"设备限制"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"留空则不限制",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"is_admin",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"是否管理员"}),e.jsx("div",{className:"py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value===1,onCheckedChange:i=>r.onChange(i?1:0)})})})]})}),e.jsx(g,{control:t.control,name:"is_staff",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"是否员工"}),e.jsx("div",{className:"py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value===1,onCheckedChange:i=>r.onChange(i?1:0)})})})]})}),e.jsx(g,{control:t.control,name:"remarks",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"备注"}),e.jsx(b,{children:e.jsx(vs,{className:"h-24",value:r.value||"",onChange:i=>r.onChange(i.currentTarget.value??null),placeholder:"请在这里记录"})}),e.jsx(k,{})]})}),e.jsxs(Jr,{children:[e.jsx(D,{variant:"outline",onClick:()=>n(!1),children:"取消"}),e.jsx(D,{type:"submit",onClick:()=>{t.handleSubmit(r=>{pd(r).then(({data:i})=>{i&&(A.success("修改成功"),n(!1),s())})})()},children:"提交"})]})]})}function Zr({refetch:s,defaultValues:t,dialogTrigger:a=e.jsxs(D,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),"编辑用户信息"]})}){const[n,l]=c.useState(!1);return e.jsx(Mm,{defaultValues:t,open:n,onOpenChange:l,children:e.jsxs(Gr,{open:n,onOpenChange:l,children:[e.jsx(Yr,{asChild:!0,children:a}),e.jsxs(ma,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ha,{children:[e.jsx(ja,{children:"用户管理"}),e.jsx(ga,{})]}),e.jsx(Om,{refetch:s})]})]})})}const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Lm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),$m=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),$t=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Zo(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Xr,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:zs(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(el,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:zs(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const t=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(L,{variant:"outline",className:"font-mono",children:[t,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const t=(s.original.u+s.original.d)*s.original.server_rate;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:zs(t)})}}];function sl({user_id:s,dialogTrigger:t}){const[a,n]=c.useState(!1),[l,o]=c.useState({pageIndex:0,pageSize:20}),{data:d,isLoading:x}=Q({queryKey:["userStats",s,l,a],queryFn:()=>a?yd({user_id:s,pageSize:l.pageSize,page:l.pageIndex+1}):null}),r=Le({data:d?.data??[],columns:$t,pageCount:Math.ceil((d?.total??0)/l.pageSize),state:{pagination:l},manualPagination:!0,getCoreRowModel:$e(),onPaginationChange:o});return e.jsxs(ue,{open:a,onOpenChange:n,children:[e.jsx(Re,{asChild:!0,children:t}),e.jsxs(ce,{className:"sm:max-w-[700px]",children:[e.jsx(je,{children:e.jsx(xe,{children:"流量使用记录"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(ia,{children:[e.jsx(oa,{children:r.getHeaderGroups().map(i=>e.jsx(js,{children:i.headers.map(h=>e.jsx(da,{className:y("h-10 px-2 text-xs",h.id==="total"&&"text-right"),children:h.isPlaceholder?null:vt(h.column.columnDef.header,h.getContext())},h.id))},i.id))}),e.jsx(ca,{children:x?Array.from({length:l.pageSize}).map((i,h)=>e.jsx(js,{children:Array.from({length:$t.length}).map((T,C)=>e.jsx(Os,{className:"p-2",children:e.jsx(Fe,{className:"h-6 w-full"})},C))},h)):r.getRowModel().rows?.length?r.getRowModel().rows.map(i=>e.jsx(js,{"data-state":i.getIsSelected()&&"selected",className:"h-10",children:i.getVisibleCells().map(h=>e.jsx(Os,{className:"px-2",children:vt(h.column.columnDef.cell,h.getContext())},h.id))},i.id)):e.jsx(js,{children:e.jsx(Os,{colSpan:$t.length,className:"h-24 text-center",children:"暂无记录"})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(G,{value:`${r.getState().pagination.pageSize}`,onValueChange:i=>{r.setPageSize(Number(i))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:r.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(i=>e.jsx(O,{value:`${i}`,children:i},i))})]}),e.jsx("p",{className:"text-sm font-medium",children:"条记录"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm",children:["第 ",r.getState().pagination.pageIndex+1," /"," ",r.getPageCount()," 页"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>r.previousPage(),disabled:!r.getCanPreviousPage()||x,children:e.jsx(Lm,{className:"h-4 w-4"})}),e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>r.nextPage(),disabled:!r.getCanNextPage()||x,children:e.jsx($m,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Am=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Hm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),Km=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),qm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Um=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Bm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Gm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Ym=(s,t)=>[{accessorKey:"is_admin",header:({column:a})=>e.jsx(I,{column:a,title:"管理员"}),enableSorting:!1,enableHiding:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n)),size:0},{accessorKey:"is_staff",header:({column:a})=>e.jsx(I,{column:a,title:"员工"}),enableSorting:!1,enableHiding:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n)),size:0},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",children:a.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:a})=>e.jsx(I,{column:a,title:"邮箱"}),cell:({row:a})=>{const n=a.original.t||0,l=Date.now()/1e3-n<120,o=Math.floor(Date.now()/1e3-n);let d=l?"当前在线":n===0?"从未在线":`最后在线时间: ${re(n)}`;if(!l&&n!==0){const x=Math.floor(o/60),r=Math.floor(x/60),i=Math.floor(r/24);i>0?d+=` +- 支持随时更换套餐`)},children:"使用模板"})}),e.jsx(ee,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:"点击使用预设的套餐描述模板"})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${_?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(b,{children:e.jsx(aa,{style:{height:"400px"},value:w.value||"",renderHTML:N=>r.render(N),onChange:({text:N})=>w.onChange(N),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:"在这里编写套餐描述...",className:"rounded-md border"})})}),_&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"预览"}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:r.render(w.value||"")}})})]})]}),e.jsx(F,{className:"text-xs",children:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容"}),e.jsx(k,{})]})}})]}),e.jsx(Ee,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(g,{control:x.control,name:"force_update",render:({field:w})=>e.jsxs(j,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(b,{children:e.jsx(Hr,{checked:w.value,onCheckedChange:w.onChange})}),e.jsx("div",{className:"",children:e.jsx(p,{className:"text-sm",children:"强制更新到用户"})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(D,{type:"button",variant:"outline",onClick:m,children:"取消"}),e.jsx(D,{type:"submit",disabled:o,onClick:()=>{x.handleSubmit(async w=>{d(!0),(await id(w)).data&&(A.success(a?"套餐更新成功":"套餐添加成功"),m(),l()),d(!1)})()},children:o?"提交中...":"提交"})]})]})})]})]})})}function rm(){const[s,t]=c.useState({}),[a,n]=c.useState({"drag-handle":!1}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState(!1),[h,T]=c.useState({pageSize:20,pageIndex:0}),[C,m]=c.useState([]),{refetch:w}=Q({queryKey:["planList"],queryFn:async()=>{const{data:f}=await Ps();return m(f),f}});c.useEffect(()=>{n({"drag-handle":r}),T({pageSize:r?99999:10,pageIndex:0})},[r]);const _=(f,R)=>{r&&(f.dataTransfer.setData("text/plain",R.toString()),f.currentTarget.classList.add("opacity-50"))},v=(f,R)=>{if(!r)return;f.preventDefault(),f.currentTarget.classList.remove("bg-muted");const z=parseInt(f.dataTransfer.getData("text/plain"));if(z===R)return;const $=[...C],[E]=$.splice(z,1);$.splice(R,0,E),m($)},N=async()=>{if(!r){i(!0);return}const f=C?.map(R=>R.id);cd(f).then(()=>{A.success("排序保存成功"),i(!1),w()}).finally(()=>{i(!1)})},P=Le({data:C||[],columns:sm(w),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:h},enableRowSelection:!0,onPaginationChange:T,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Xx,{refreshData:w,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ge,{table:P,toolbar:f=>e.jsx(em,{table:f,refetch:w,saveOrder:N,isSortMode:r}),draggable:r,onDragStart:_,onDragEnd:f=>f.currentTarget.classList.remove("opacity-50"),onDragOver:f=>{f.preventDefault(),f.currentTarget.classList.add("bg-muted")},onDragLeave:f=>f.currentTarget.classList.remove("bg-muted"),onDrop:v,showPagination:!r}),e.jsx(nm,{})]})})}function lm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"订阅管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(rm,{})})]})]})}const im=Object.freeze(Object.defineProperty({__proto__:null,default:lm},Symbol.toStringTag,{value:"Module"})),Kr=[{value:me.PENDING,label:Es[me.PENDING],icon:fo,color:Bs[me.PENDING]},{value:me.PROCESSING,label:Es[me.PROCESSING],icon:Hn,color:Bs[me.PROCESSING]},{value:me.COMPLETED,label:Es[me.COMPLETED],icon:qt,color:Bs[me.COMPLETED]},{value:me.CANCELLED,label:Es[me.CANCELLED],icon:Kn,color:Bs[me.CANCELLED]},{value:me.DISCOUNTED,label:Es[me.DISCOUNTED],icon:qt,color:Bs[me.DISCOUNTED]}],qr=[{value:fe.PENDING,label:ct[fe.PENDING],icon:po,color:dt[fe.PENDING]},{value:fe.PROCESSING,label:ct[fe.PROCESSING],icon:Hn,color:dt[fe.PROCESSING]},{value:fe.VALID,label:ct[fe.VALID],icon:qt,color:dt[fe.VALID]},{value:fe.INVALID,label:ct[fe.INVALID],icon:Kn,color:dt[fe.INVALID]}];function ft({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=s?.getFilterValue(),o=Array.isArray(l)?new Set(l):l!==void 0?new Set([l]):new Set;return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,o?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:o.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:o.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[o.size," selected"]}):a.filter(d=>o.has(d.value)).map(d=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:d.label},d.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(d=>{const x=o.has(d.value);return e.jsxs(be,{onSelect:()=>{const r=new Set(o);x?r.delete(d.value):r.add(d.value);const i=Array.from(r);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",x?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),d.icon&&e.jsx(d.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${d.color}`}),e.jsx("span",{children:d.label}),n?.get(d.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(d.value)})]},d.value)})}),o.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const om=u.object({email:u.string().min(1),plan_id:u.number(),period:u.string(),total_amount:u.number()}),cm={email:"",plan_id:0,total_amount:0,period:""};function Ur({refetch:s,trigger:t,defaultValues:a}){const[n,l]=c.useState(!1),o=ae({resolver:ie(om),defaultValues:{...cm,...a},mode:"onChange"}),[d,x]=c.useState([]);return c.useEffect(()=>{n&&Ps().then(({data:r})=>{x(r)})},[n]),e.jsxs(ue,{open:n,onOpenChange:l,children:[e.jsx(Re,{asChild:!0,children:t||e.jsxs(D,{variant:"outline",size:"sm",className:" h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加订单"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"订单分配"}),e.jsx(Se,{})]}),e.jsxs(oe,{...o,children:[e.jsx(g,{control:o.control,name:"email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"用户邮箱"}),e.jsx(b,{children:e.jsx(S,{placeholder:"请输入用户邮箱",...r})})]})}),e.jsx(g,{control:o.control,name:"plan_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:r.value?r.value?.toString():void 0,onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择订阅计划"})}),e.jsx(B,{children:d.map(i=>e.jsx(O,{value:i.id.toString(),children:i.name},i.id))})]})})]})}),e.jsx(g,{control:o.control,name:"period",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅时长"}),e.jsx(b,{children:e.jsxs(G,{value:r.value,onValueChange:r.onChange,children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"请选择购买时长"})}),e.jsx(B,{children:Object.keys(st).map(i=>e.jsx(O,{value:i,children:st[i]},i))})]})})]})}),e.jsx(g,{control:o.control,name:"total_amount",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"支付金额"}),e.jsx(b,{children:e.jsx(S,{type:"number",placeholder:"请输入需要支付的金额",value:r.value/100,onChange:i=>r.onChange(parseFloat(i.currentTarget.value)*100)})}),e.jsx(k,{})]})}),e.jsxs(Ee,{children:[e.jsx(D,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(D,{type:"submit",onClick:()=>{o.handleSubmit(r=>{md(r).then(({data:i})=>{i&&(s&&s(),o.reset(),l(!1),A.success("添加成功"))})})()},children:"确定"})]})]})]})]})}const dm=Object.values(as).filter(s=>typeof s=="number").map(s=>({label:Nr[s],value:s,color:s===as.NEW?"green-500":s===as.RENEWAL?"blue-500":s===as.UPGRADE?"purple-500":"orange-500"})),um=Object.values(ne).map(s=>({label:st[s],value:s,color:s===ne.MONTH_PRICE?"slate-500":s===ne.QUARTER_PRICE?"cyan-500":s===ne.HALF_YEAR_PRICE?"indigo-500":s===ne.YEAR_PRICE?"violet-500":s===ne.TWO_YEAR_PRICE?"fuchsia-500":s===ne.THREE_YEAR_PRICE?"pink-500":s===ne.ONETIME_PRICE?"rose-500":"orange-500"}));function xm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ur,{refetch:t}),e.jsx(S,{placeholder:"搜索订单...",value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:n=>s.getColumn("trade_no")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(ft,{column:s.getColumn("type"),title:"订单类型",options:dm}),s.getColumn("period")&&e.jsx(ft,{column:s.getColumn("period"),title:"订单周期",options:um}),s.getColumn("status")&&e.jsx(ft,{column:s.getColumn("status"),title:"订单状态",options:Kr}),s.getColumn("commission_status")&&e.jsx(ft,{column:s.getColumn("commission_status"),title:"佣金状态",options:qr})]}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})}function Ae({label:s,value:t,className:a,valueClassName:n}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",n),children:t||"-"})]})}function mm({status:s}){const t={PENDING:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",PAID:"bg-green-100 text-green-800 hover:bg-green-100",FAILED:"bg-red-100 text-red-800 hover:bg-red-100",REFUNDED:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(L,{variant:"secondary",className:y("font-medium",t[s]),children:Es[s]})}function hm({id:s,trigger:t}){const[a,n]=c.useState(!1),[l,o]=c.useState();return c.useEffect(()=>{(async()=>{if(a){const{data:x}=await dd({id:s});o(x)}})()},[a,s]),e.jsxs(ue,{onOpenChange:n,open:a,children:[e.jsx(Re,{asChild:!0,children:t}),e.jsxs(ce,{className:"max-w-xl",children:[e.jsxs(je,{className:"space-y-2",children:[e.jsx(xe,{className:"text-lg font-medium",children:"订单信息"}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:["订单号:",l?.trade_no]}),l?.status&&e.jsx(mm,{status:l.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"基本信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"用户邮箱",value:l?.user?.email?e.jsxs(Ss,{to:`/user/manage?email=${l.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[l.user.email,e.jsx(qn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(Ae,{label:"订单周期",value:l&&st[l.period]}),e.jsx(Ae,{label:"订阅计划",value:l?.plan?.name,valueClassName:"font-medium"}),e.jsx(Ae,{label:"回调单号",value:l?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"金额信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"支付金额",value:hs(l?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(ge,{className:"my-2"}),e.jsx(Ae,{label:"余额支付",value:hs(l?.balance_amount||0)}),e.jsx(Ae,{label:"优惠金额",value:hs(l?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(Ae,{label:"退回金额",value:hs(l?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(Ae,{label:"折抵金额",value:hs(l?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"时间信息"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(Ae,{label:"创建时间",value:re(l?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(Ae,{label:"更新时间",value:re(l?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const jm={[as.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[as.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},gm={[ne.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[ne.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},fm=s=>[{accessorKey:"trade_no",header:({column:t})=>e.jsx(I,{column:t,title:"订单号"}),cell:({row:t})=>{const a=t.original.trade_no,n=a.length>6?`${a.slice(0,3)}...${a.slice(-3)}`:a;return e.jsx("div",{className:"flex items-center",children:e.jsx(hm,{trigger:e.jsxs(W,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:n}),e.jsx(qn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:t.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>{const a=t.getValue("type"),n=jm[a]||{color:"text-slate-700",bgColor:"bg-slate-100/80"};return e.jsx(L,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",n.color,n.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:Nr[a]})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:t})=>e.jsx(I,{column:t,title:"订阅计划"}),cell:({row:t})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:t.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:t})=>e.jsx(I,{column:t,title:"周期"}),cell:({row:t})=>{const a=t.getValue("period"),n=gm[a]||{color:"text-gray-700",bgColor:"bg-gray-50"};return e.jsx(L,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",n.color,n.bgColor,"hover:bg-opacity-80"),children:st[a]})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:t})=>e.jsx(I,{column:t,title:"支付金额"}),cell:({row:t})=>{const a=t.getValue("total_amount"),n=typeof a=="number"?(a/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",n]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:t})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(I,{column:t,title:"订单状态"}),e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx(Er,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(ee,{side:"top",className:"max-w-[200px] text-sm",children:"标记为[已支付]后将会由系统进行开通后并完成"})]})})]}),cell:({row:t})=>{const a=Kr.find(n=>n.value===t.getValue("status"));return a?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a.icon&&e.jsx(a.icon,{className:`h-4 w-4 text-${a.color}`}),e.jsx("span",{className:"text-sm font-medium",children:a.label})]}),a.value===me.PENDING&&e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(gs,{align:"end",className:"w-[140px]",children:[e.jsx(he,{className:"cursor-pointer",onClick:async()=>{await ud({trade_no:t.original.trade_no}),s()},children:"标记为已支付"}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await xd({trade_no:t.original.trade_no}),s()},children:"取消订单"})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:t})=>e.jsx(I,{column:t,title:"佣金金额"}),cell:({row:t})=>{const a=t.getValue("commission_balance"),n=a?(a/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:a?`¥${n}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:t})=>e.jsx(I,{column:t,title:"佣金状态"}),cell:({row:t})=>{const a=t.original.commission_balance,n=qr.find(l=>l.value===t.getValue("commission_status"));return a==0||!n?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n.icon&&e.jsx(n.icon,{className:`h-4 w-4 text-${n.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n.label})]}),n.value===fe.PENDING&&e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"打开菜单"})]})}),e.jsxs(gs,{align:"end",className:"w-[120px]",children:[e.jsx(he,{className:"cursor-pointer",onClick:async()=>{await Ma({trade_no:t.original.trade_no,commission_status:fe.PROCESSING}),s()},children:"标记为有效"}),e.jsx(he,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Ma({trade_no:t.original.trade_no,commission_status:fe.INVALID}),s()},children:"标记为无效"})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:t})=>e.jsx(I,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:re(t.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}];function pm(){const[s]=Un(),[t,a]=c.useState({}),[n,l]=c.useState({}),[o,d]=c.useState([]),[x,r]=c.useState([]),[i,h]=c.useState({pageIndex:0,pageSize:20});c.useEffect(()=>{const _=[],v=s.get("order_id");v&&_.push({id:"order_id",value:v});const N=s.get("commission_status");N&&_.push({id:"commission_status",value:parseInt(N)});const P=s.get("status");P&&_.push({id:"status",value:parseInt(P)});const f=s.get("commission_balance");f&&_.push({id:"commission_balance",value:f}),_.length>0&&d(_)},[s]);const{refetch:T,data:C,isLoading:m}=Q({queryKey:["orderList",i,o,x],queryFn:()=>gr({pageSize:i.pageSize,current:i.pageIndex+1,filter:o,sort:x})}),w=Le({data:C?.data??[],columns:fm(T),state:{sorting:x,columnVisibility:n,rowSelection:t,columnFilters:o,pagination:i},rowCount:C?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:r,onColumnFiltersChange:d,onColumnVisibilityChange:l,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:h,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:w,toolbar:e.jsx(xm,{table:w,refetch:T}),showPagination:!0})}function vm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 订单管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看用户订单,包括分配、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(pm,{})})]})]})}const bm=Object.freeze(Object.defineProperty({__proto__:null,default:vm},Symbol.toStringTag,{value:"Module"}));function ym({column:s,title:t,options:a}){const n=s?.getFacetedUniqueValues(),l=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),t,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(o=>l.has(o.value)).map(o=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(o=>{const d=l.has(o.value);return e.jsxs(be,{onSelect:()=>{d?l.delete(o.value):l.add(o.value);const x=Array.from(l);s?.setFilterValue(x.length?x:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",d?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Cs,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),n?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:n.get(o.value)})]},o.value)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Nm=u.object({id:u.coerce.number().nullable().optional(),name:u.string().min(1,"请输入优惠券名称"),code:u.string().nullable(),type:u.union([u.string(),u.nativeEnum(Rt)]),value:u.coerce.number(),started_at:u.coerce.number(),ended_at:u.coerce.number(),limit_use:u.union([u.string(),u.number()]).nullable(),limit_use_with_user:u.union([u.string(),u.number()]).nullable(),generate_count:u.coerce.number().nullable().optional(),limit_plan_ids:u.array(u.number()).default([]).nullable(),limit_period:u.array(u.nativeEnum(ne)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Ka={name:"",code:"",type:Rt.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Br({defaultValues:s,refetch:t,type:a="create",dialogTrigger:n=e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"添加优惠券"})]}),open:l,onOpenChange:o}){const[d,x]=c.useState(!1),r=l??d,i=o??x,[h,T]=c.useState([]),C=ae({resolver:ie(Nm),defaultValues:s||Ka});c.useEffect(()=>{s&&C.reset(s)},[s,C]),c.useEffect(()=>{Ps().then(({data:v})=>T(v))},[]);const m=v=>{if(!v)return;const N=(P,f)=>{const R=new Date(f*1e3);return P.setHours(R.getHours(),R.getMinutes(),R.getSeconds()),Math.floor(P.getTime()/1e3)};v.from&&C.setValue("started_at",N(v.from,C.watch("started_at"))),v.to&&C.setValue("ended_at",N(v.to,C.watch("ended_at")))},w=async v=>{try{await jd(v),i(!1),a==="create"&&C.reset(Ka),t()}catch(N){console.error("保存优惠券失败:",N)}},_=(v,N)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:N}),e.jsx(S,{type:"datetime-local",step:"1",value:re(C.watch(v),"YYYY-MM-DDTHH:mm:ss"),onChange:P=>{const f=new Date(P.target.value);C.setValue(v,Math.floor(f.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ue,{open:r,onOpenChange:i,children:[n&&e.jsx(Re,{asChild:!0,children:n}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsx(je,{children:e.jsx(xe,{children:a==="create"?"添加优惠券":"编辑优惠券"})}),e.jsx(oe,{...C,children:e.jsxs("form",{onSubmit:C.handleSubmit(w),className:"space-y-4",children:[e.jsx(g,{control:C.control,name:"name",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"优惠券名称"}),e.jsx(S,{placeholder:"请输入优惠券名称",...v}),e.jsx(k,{})]})}),e.jsxs(j,{children:[e.jsx(p,{children:"优惠券类型和值"}),e.jsxs("div",{className:"flex",children:[e.jsx(g,{control:C.control,name:"type",render:({field:v})=>e.jsxs(G,{value:v.value.toString(),onValueChange:v.onChange,children:[e.jsx(U,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:"优惠券类型"})}),e.jsx(B,{children:Object.entries(la).map(([N,P])=>e.jsx(O,{value:N,children:P},N))})]})}),e.jsx(g,{control:C.control,name:"value",render:({field:v})=>e.jsx(S,{type:"number",placeholder:"请输入值",...v,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:C.watch("type")===Rt.AMOUNT?"¥":"%"})})]})]}),e.jsxs(j,{children:[e.jsx(p,{children:"优惠券有效期"}),e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!C.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(rt,{className:"mr-2 h-4 w-4"}),re(C.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ","至"," ",re(C.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(Be,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Is,{mode:"range",selected:{from:new Date(C.watch("started_at")*1e3),to:new Date(C.watch("ended_at")*1e3)},onSelect:m,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[_("started_at","开始时间"),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:"至"}),_("ended_at","结束时间")]})})]})]}),e.jsx(k,{})]}),e.jsx(g,{control:C.control,name:"limit_use",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"最大使用次数"}),e.jsx(S,{type:"number",min:0,placeholder:"限制最大使用次数,留空则不限制",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"设置优惠券的总使用次数限制,留空表示不限制使用次数"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_use_with_user",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"每个用户可使用次数"}),e.jsx(S,{type:"number",min:0,placeholder:"限制每个用户可使用次数,留空则不限制",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_period",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"指定周期"}),e.jsx(at,{options:Object.entries(ne).filter(([N])=>isNaN(Number(N))).map(([N,P])=>({label:P,value:N})),onChange:N=>{if(N.length===0){v.onChange([]);return}const P=N.map(f=>ne[f.value]);v.onChange(P)},value:(v.value||[]).map(N=>({label:Object.entries(ne).find(([P,f])=>f===N)?.[1]||"",value:Object.entries(ne).find(([P,f])=>f===N)?.[0]||""})),placeholder:"限制指定周期可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的周期"})}),e.jsx(F,{className:"text-xs",children:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"limit_plan_ids",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"指定订阅"}),e.jsx(at,{options:h?.map(N=>({label:N.name,value:N.id.toString()}))||[],onChange:N=>v.onChange(N.map(P=>Number(P.value))),value:(h||[]).filter(N=>(v.value||[]).includes(N.id)).map(N=>({label:N.name,value:N.id.toString()})),placeholder:"限制指定订阅可以使用优惠,留空则不限制",emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"没有找到匹配的订阅"})}),e.jsx(k,{})]})}),a==="create"&&e.jsxs(e.Fragment,{children:[e.jsx(g,{control:C.control,name:"code",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"自定义优惠码"}),e.jsx(S,{placeholder:"自定义优惠码,留空则自动生成",...v,className:"h-9"}),e.jsx(F,{className:"text-xs",children:"可以自定义优惠码,留空则系统自动生成"}),e.jsx(k,{})]})}),e.jsx(g,{control:C.control,name:"generate_count",render:({field:v})=>e.jsxs(j,{children:[e.jsx(p,{children:"批量生成数量"}),e.jsx(S,{type:"number",min:0,placeholder:"批量生成优惠码数量,留空则生成单个",...v,value:v.value===void 0?"":v.value,onChange:N=>v.onChange(N.target.value===""?"":N.target.value),className:"h-9"}),e.jsx(F,{className:"text-xs",children:"批量生成多个优惠码,留空则只生成单个优惠码"}),e.jsx(k,{})]})})]}),e.jsx(Ee,{children:e.jsx(D,{type:"submit",disabled:C.formState.isSubmitting,children:C.formState.isSubmitting?"保存中...":"保存"})})]})})]})]})}function wm({table:s,refetch:t}){const a=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Br,{refetch:t}),e.jsx(S,{placeholder:"搜索优惠券...",value:s.getColumn("name")?.getFilterValue()??"",onChange:n=>s.getColumn("name")?.setFilterValue(n.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(ym,{column:s.getColumn("type"),title:"类型",options:Object.entries(la).map(([n,l])=>({value:n,label:l}))}),a&&e.jsxs(D,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["重置",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})}const Gr=c.createContext(void 0);function _m({children:s,refetch:t}){const[a,n]=c.useState(!1),[l,o]=c.useState(null),d=r=>{o(r),n(!0)},x=()=>{n(!1),o(null)};return e.jsxs(Gr.Provider,{value:{isOpen:a,currentCoupon:l,openEdit:d,closeEdit:x},children:[s,l&&e.jsx(Br,{defaultValues:l,refetch:t,type:"edit",open:a,onOpenChange:n})]})}function Cm(){const s=c.useContext(Gr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Sm=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"ID"}),cell:({row:t})=>e.jsx(L,{children:t.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:t})=>e.jsx(I,{column:t,title:"启用"}),cell:({row:t})=>e.jsx(H,{defaultChecked:t.original.show,onCheckedChange:a=>{fd({id:t.original.id,show:a}).then(({data:n})=>!n&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:t})=>e.jsx(I,{column:t,title:"卷名称"}),cell:({row:t})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:t.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:t})=>e.jsx(I,{column:t,title:"类型"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:la[t.original.type]}),enableSorting:!0},{accessorKey:"code",header:({column:t})=>e.jsx(I,{column:t,title:"卷码"}),cell:({row:t})=>e.jsx(L,{variant:"secondary",children:t.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:t})=>e.jsx(I,{column:t,title:"剩余次数"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.original.limit_use===null?"无限次":t.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:t})=>e.jsx(I,{column:t,title:"可用次数/用户"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.original.limit_use_with_user===null?"无限制":t.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:t})=>e.jsx(I,{column:t,title:"有效期"}),cell:({row:t})=>{const[a,n]=c.useState(!1),l=Date.now(),o=t.original.started_at*1e3,d=t.original.ended_at*1e3,x=l>d,r=le.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const{openEdit:a}=Cm();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>a(t.original),children:[e.jsx(ks,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:"编辑"})]}),e.jsx(Ye,{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除",variant:"destructive",onConfirm:async()=>{gd({id:t.original.id}).then(({data:n})=>{n&&(A.success("删除成功"),s())})},children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(rs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"删除"})]})})]})}}];function km(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([]),[d,x]=c.useState([]),[r,i]=c.useState({pageIndex:0,pageSize:20}),{refetch:h,data:T}=Q({queryKey:["couponList",r,l,d],queryFn:()=>hd({pageSize:r.pageSize,current:r.pageIndex+1,filter:l,sort:d})}),C=Le({data:T?.data??[],columns:Sm(h),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:r},pageCount:Math.ceil((T?.total??0)/r.pageSize),rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,onPaginationChange:i,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(_m,{refetch:h,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ge,{table:C,toolbar:e.jsx(wm,{table:C,refetch:h})})})})}function Dm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"优惠券管理"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"在这里可以查看优惠券,包括增加、查看、删除等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(km,{})})]})]})}const Tm=Object.freeze(Object.defineProperty({__proto__:null,default:Dm},Symbol.toStringTag,{value:"Module"})),Pm=u.object({email_prefix:u.string().optional(),email_suffix:u.string().min(1),password:u.string().optional(),expired_at:u.number().optional().nullable(),plan_id:u.number().nullable(),generate_count:u.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Im={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function Vm({refetch:s}){const[t,a]=c.useState(!1),n=ae({resolver:ie(Pm),defaultValues:Im,mode:"onChange"}),[l,o]=c.useState([]);return c.useEffect(()=>{t&&Ps().then(({data:d})=>{d&&o(d)})},[t]),e.jsxs(ue,{open:t,onOpenChange:a,children:[e.jsx(Re,{asChild:!0,children:e.jsxs(W,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(ve,{icon:"ion:add"}),e.jsx("div",{children:"创建用户"})]})}),e.jsxs(ce,{className:"sm:max-w-[425px]",children:[e.jsxs(je,{children:[e.jsx(xe,{children:"创建用户"}),e.jsx(Se,{})]}),e.jsxs(oe,{...n,children:[e.jsxs(j,{children:[e.jsx(p,{children:"邮箱"}),e.jsxs("div",{className:"flex",children:[!n.watch("generate_count")&&e.jsx(g,{control:n.control,name:"email_prefix",render:({field:d})=>e.jsx(S,{className:"flex-[5] rounded-r-none",placeholder:"帐号(批量生成请留空)",...d})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${n.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(g,{control:n.control,name:"email_suffix",render:({field:d})=>e.jsx(S,{className:"flex-[4] rounded-l-none",placeholder:"域",...d})})]})]}),e.jsx(g,{control:n.control,name:"password",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"密码"}),e.jsx(S,{placeholder:"留空则密码与邮件相同",...d}),e.jsx(k,{})]})}),e.jsx(g,{control:n.control,name:"expired_at",render:({field:d})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(p,{children:"到期时间"}),e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsx(b,{children:e.jsxs(W,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!d.value&&"text-muted-foreground"),children:[d.value?re(d.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(rt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(Be,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(bo,{asChild:!0,children:e.jsx(W,{variant:"outline",className:"w-full",onClick:()=>{d.onChange(null)},children:"长期有效"})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Is,{mode:"single",selected:d.value?new Date(d.value*1e3):void 0,onSelect:x=>{x&&d.onChange(x?.getTime()/1e3)}})})]})]})]})}),e.jsx(g,{control:n.control,name:"plan_id",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:d.value?d.value.toString():"null",onValueChange:x=>d.onChange(x==="null"?null:parseInt(x)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"null",children:"无"}),l.map(x=>e.jsx(O,{value:x.id.toString(),children:x.name},x.id))]})]})})]})}),!n.watch("email_prefix")&&e.jsx(g,{control:n.control,name:"generate_count",render:({field:d})=>e.jsxs(j,{children:[e.jsx(p,{children:"生成数量"}),e.jsx(S,{type:"number",placeholder:"如果为批量生产请输入生成数量",value:d.value||"",onChange:x=>d.onChange(x.target.value?parseInt(x.target.value):null)})]})})]}),e.jsxs(Ee,{children:[e.jsx(W,{variant:"outline",onClick:()=>a(!1),children:"取消"}),e.jsx(W,{onClick:()=>n.handleSubmit(d=>{yd(d).then(({data:x})=>{x&&(A.success("生成成功"),n.reset(),s(),a(!1))})})(),children:"生成"})]})]})]})}const Yr=Ba,Wr=Ga,Rm=Ya,Jr=c.forwardRef(({className:s,...t},a)=>e.jsx(_t,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...t,ref:a}));Jr.displayName=_t.displayName;const Em=_s("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),ma=c.forwardRef(({side:s="right",className:t,children:a,...n},l)=>e.jsxs(Rm,{children:[e.jsx(Jr,{}),e.jsxs(Ct,{ref:l,className:y(Em({side:s}),t),...n,children:[e.jsxs(Zt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Me,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));ma.displayName=Ct.displayName;const ha=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...t});ha.displayName="SheetHeader";const Qr=({className:s,...t})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...t});Qr.displayName="SheetFooter";const ja=c.forwardRef(({className:s,...t},a)=>e.jsx(St,{ref:a,className:y("text-lg font-semibold text-foreground",s),...t}));ja.displayName=St.displayName;const ga=c.forwardRef(({className:s,...t},a)=>e.jsx(kt,{ref:a,className:y("text-sm text-muted-foreground",s),...t}));ga.displayName=kt.displayName;const Gs=[{label:"邮箱",value:"email",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"用户ID",value:"id",type:"number",operators:[{label:"等于",value:"eq"}]},{label:"订阅",value:"plan_id",type:"select",operators:[{label:"等于",value:"eq"}],useOptions:!0},{label:"流量",value:"transfer_enable",type:"number",unit:"GB",operators:[{label:"大于",value:"gt"},{label:"小于",value:"lt"},{label:"等于",value:"eq"}]},{label:"已用流量",value:"total_used",type:"number",unit:"GB",operators:[{label:"大于",value:"gt"},{label:"小于",value:"lt"},{label:"等于",value:"eq"}]},{label:"在线设备",value:"online_count",type:"number",operators:[{label:"等于",value:"eq"},{label:"大于",value:"gt"},{label:"小于",value:"lt"}]},{label:"到期时间",value:"expired_at",type:"date",operators:[{label:"早于",value:"lt"},{label:"晚于",value:"gt"},{label:"等于",value:"eq"}]},{label:"UUID",value:"uuid",type:"text",operators:[{label:"等于",value:"eq"}]},{label:"Token",value:"token",type:"text",operators:[{label:"等于",value:"eq"}]},{label:"账号状态",value:"banned",type:"select",operators:[{label:"等于",value:"eq"}],options:[{label:"正常",value:"0"},{label:"禁用",value:"1"}]},{label:"备注",value:"remark",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"邀请人邮箱",value:"inviter_email",type:"text",operators:[{label:"包含",value:"contains"},{label:"等于",value:"eq"}]},{label:"邀请人ID",value:"invite_user_id",type:"number",operators:[{label:"等于",value:"eq"}]},{label:"管理员",value:"is_admin",type:"boolean",operators:[{label:"等于",value:"eq"}]},{label:"员工",value:"is_staff",type:"boolean",operators:[{label:"等于",value:"eq"}]}];function Fm({table:s,refetch:t,permissionGroups:a=[],subscriptionPlans:n=[]}){const l=s.getState().columnFilters.length>0,[o,d]=c.useState([]),[x,r]=c.useState(!1),i=v=>v*1024*1024*1024,h=v=>v/(1024*1024*1024),T=()=>{d([...o,{field:"",operator:"",value:""}])},C=v=>{d(o.filter((N,P)=>P!==v))},m=(v,N,P)=>{const f=[...o];if(f[v]={...f[v],[N]:P},N==="field"){const R=Gs.find(z=>z.value===P);R&&(f[v].operator=R.operators[0].value,f[v].value=R.type==="boolean"?!1:"")}d(f)},w=(v,N)=>{const P=Gs.find(f=>f.value===v.field);if(!P)return null;switch(P.type){case"text":return e.jsx(S,{placeholder:"输入值",value:v.value,onChange:f=>m(N,"value",f.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(S,{type:"number",placeholder:`输入数值${P.unit?`(${P.unit})`:""}`,value:P.unit==="GB"?h(v.value||0):v.value,onChange:f=>{const R=Number(f.target.value);m(N,"value",P.unit==="GB"?i(R):R)}}),P.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:P.unit})]});case"date":return e.jsx(Is,{mode:"single",selected:v.value,onSelect:f=>m(N,"value",f),className:"rounded-md border"});case"select":return e.jsxs(G,{value:v.value,onValueChange:f=>m(N,"value",f),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择选项"})}),e.jsx(B,{children:P.useOptions?n.map(f=>e.jsx(O,{value:f.value.toString(),children:f.label},f.value)):P.options?.map(f=>e.jsx(O,{value:f.value.toString(),children:f.label},f.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(H,{checked:v.value,onCheckedChange:f=>m(N,"value",f)}),e.jsx(yt,{children:v.value?"是":"否"})]});default:return null}},_=()=>{const v=o.filter(N=>N.field&&N.operator&&N.value!=="").map(N=>{const P=Gs.find(R=>R.value===N.field);let f=N.value;return N.operator==="contains"?{id:N.field,value:f}:(P?.type==="date"&&f instanceof Date&&(f=Math.floor(f.getTime()/1e3)),P?.type==="boolean"&&(f=f?1:0),{id:N.field,value:`${N.operator}:${f}`})});s.setColumnFilters(v),r(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(Vm,{refetch:t}),e.jsx(S,{placeholder:"搜索用户邮箱...",value:s.getColumn("email")?.getFilterValue()??"",onChange:v=>s.getColumn("email")?.setFilterValue(v.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Yr,{open:x,onOpenChange:r,children:[e.jsx(Wr,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(yo,{className:"mr-2 h-4 w-4"}),"高级筛选",o.length>0&&e.jsx(L,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:o.length})]})}),e.jsxs(ma,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ha,{children:[e.jsx(ja,{children:"高级筛选"}),e.jsx(ga,{children:"添加一个或多个筛选条件来精确查找用户"})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:"筛选条件"}),e.jsx(D,{variant:"outline",size:"sm",onClick:T,children:"添加条件"})]}),e.jsx(tt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:o.map((v,N)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(yt,{children:["条件 ",N+1]}),e.jsx(D,{variant:"ghost",size:"sm",onClick:()=>C(N),children:e.jsx(Me,{className:"h-4 w-4"})})]}),e.jsxs(G,{value:v.field,onValueChange:P=>m(N,"field",P),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择字段"})}),e.jsx(B,{children:Gs.map(P=>e.jsx(O,{value:P.value,children:P.label},P.value))})]}),v.field&&e.jsxs(G,{value:v.operator,onValueChange:P=>m(N,"operator",P),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"选择操作符"})}),e.jsx(B,{children:Gs.find(P=>P.value===v.field)?.operators.map(P=>e.jsx(O,{value:P.value,children:P.label},P.value))})]}),v.field&&v.operator&&w(v,N)]},N))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(D,{variant:"outline",onClick:()=>{d([]),r(!1)},children:"重置"}),e.jsx(D,{onClick:_,children:"应用筛选"})]})]})]})]}),l&&e.jsxs(D,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),d([])},className:"h-8 px-2 lg:px-3",children:["重置筛选",e.jsx(Me,{className:"ml-2 h-4 w-4"})]})]})})}const Mm=u.object({id:u.number(),email:u.string().email(),invite_user_email:u.string().email().nullable().optional(),password:u.string().optional().nullable(),balance:u.coerce.number(),commission_balance:u.coerce.number(),u:u.number(),d:u.number(),transfer_enable:u.number(),expired_at:u.number().nullable(),plan_id:u.number().nullable(),banned:u.number(),commission_type:u.number(),commission_rate:u.number().nullable(),discount:u.number().nullable(),speed_limit:u.number().nullable(),device_limit:u.number().nullable(),is_admin:u.number(),is_staff:u.number(),remarks:u.string().nullable()}),Zr=c.createContext(void 0);function zm({children:s,defaultValues:t,open:a,onOpenChange:n}){const[l,o]=c.useState(!1),[d,x]=c.useState(!1),[r,i]=c.useState([]),h=ae({resolver:ie(Mm),defaultValues:t,mode:"onChange"});c.useEffect(()=>{a!==void 0&&o(a)},[a]);const T=C=>{o(C),n?.(C)};return e.jsx(Zr.Provider,{value:{form:h,formOpen:l,setFormOpen:T,datePickerOpen:d,setDatePickerOpen:x,planList:r,setPlanList:i},children:s})}function Om(){const s=c.useContext(Zr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Lm({refetch:s}){const{form:t,formOpen:a,setFormOpen:n,datePickerOpen:l,setDatePickerOpen:o,planList:d,setPlanList:x}=Om();return c.useEffect(()=>{a&&Ps().then(({data:r})=>{x(r)})},[a,x]),e.jsxs(oe,{...t,children:[e.jsx(g,{control:t.control,name:"email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"邮箱"}),e.jsx(b,{children:e.jsx(S,{...r,placeholder:"请输入邮箱"})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"invite_user_email",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"邀请人邮箱"}),e.jsx(b,{children:e.jsx(S,{value:r.value||"",onChange:i=>r.onChange(i.target.value?i.target.value:null),placeholder:"请输入邮箱"})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"password",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"密码"}),e.jsx(b,{children:e.jsx(S,{value:r.value||"",onChange:r.onChange,placeholder:"如需修改密码请输入"})}),e.jsx(k,{...r})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(g,{control:t.control,name:"balance",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"余额"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:r.onChange,placeholder:"请输入余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"commission_balance",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"佣金余额"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:r.onChange,placeholder:"请输入佣金余额",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"u",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"已用上行"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"已用上行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{...r})]})}),e.jsx(g,{control:t.control,name:"d",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"已用下行"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"已用下行",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{...r})]})})]}),e.jsx(g,{control:t.control,name:"transfer_enable",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"流量"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value/1024/1024/1024||"",onChange:i=>r.onChange(parseInt(i.target.value)*1024*1024*1024),placeholder:"请输入流量",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"expired_at",render:({field:r})=>e.jsxs(j,{className:"flex flex-col",children:[e.jsx(p,{children:"到期时间"}),e.jsxs(Ze,{open:l,onOpenChange:o,children:[e.jsx(Xe,{asChild:!0,children:e.jsx(b,{children:e.jsxs(D,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),onClick:()=>o(!0),children:[r.value?re(r.value):e.jsx("span",{children:"请选择用户到期日期,留空为长期有效"}),e.jsx(rt,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(Be,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:i=>{i.preventDefault()},onEscapeKeyDown:i=>{i.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{r.onChange(null),o(!1)},children:"长期有效"}),e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const i=new Date;i.setMonth(i.getMonth()+1),i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3)),o(!1)},children:"一个月"}),e.jsx(D,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const i=new Date;i.setMonth(i.getMonth()+3),i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3)),o(!1)},children:"三个月"})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Is,{mode:"single",selected:r.value?new Date(r.value*1e3):void 0,onSelect:i=>{if(i){const h=new Date(r.value?r.value*1e3:Date.now());i.setHours(h.getHours(),h.getMinutes(),h.getSeconds()),r.onChange(Math.floor(i.getTime()/1e3))}},disabled:i=>i{const i=new Date;i.setHours(23,59,59,999),r.onChange(Math.floor(i.getTime()/1e3))},className:"h-6 px-2 text-xs",children:"设为当天结束"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(S,{type:"datetime-local",step:"1",value:re(r.value,"YYYY-MM-DDTHH:mm:ss"),onChange:i=>{const h=new Date(i.target.value);isNaN(h.getTime())||r.onChange(Math.floor(h.getTime()/1e3))},className:"flex-1"}),e.jsx(D,{type:"button",variant:"outline",onClick:()=>o(!1),children:"确定"})]})]})]})})]}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"plan_id",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"订阅计划"}),e.jsx(b,{children:e.jsxs(G,{value:r.value?r.value.toString():"null",onValueChange:i=>r.onChange(i==="null"?null:parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"null",children:"无"}),d.map(i=>e.jsx(O,{value:i.id.toString(),children:i.name},i.id))]})]})})]})}),e.jsx(g,{control:t.control,name:"banned",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"账户状态"}),e.jsx(b,{children:e.jsxs(G,{value:r.value.toString(),onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{})}),e.jsxs(B,{children:[e.jsx(O,{value:"1",children:"封禁"}),e.jsx(O,{value:"0",children:"正常"})]})]})})]})}),e.jsx(g,{control:t.control,name:"commission_type",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"佣金类型"}),e.jsx(b,{children:e.jsxs(G,{value:r.value.toString(),onValueChange:i=>r.onChange(parseInt(i)),children:[e.jsx(U,{children:e.jsx(Y,{placeholder:"无"})}),e.jsxs(B,{children:[e.jsx(O,{value:"0",children:"跟随系统设置"}),e.jsx(O,{value:"1",children:"循环返利"}),e.jsx(O,{value:"2",children:"首次返利"})]})]})})]})}),e.jsx(g,{control:t.control,name:"commission_rate",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"推荐返利比例"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"请输入推荐返利比例(为空则跟随站点设置返利比例)",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(g,{control:t.control,name:"discount",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"专享折扣比例"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"请输入专享折扣比例(为空则不享受专享折扣)",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"speed_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"限速"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"留空则不限速",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"device_limit",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"设备限制"}),e.jsx(b,{children:e.jsxs("div",{className:"flex",children:[e.jsx(S,{type:"number",value:r.value||"",onChange:i=>r.onChange(parseInt(i.currentTarget.value)||null),placeholder:"留空则不限制",className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(k,{})]})}),e.jsx(g,{control:t.control,name:"is_admin",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"是否管理员"}),e.jsx("div",{className:"py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value===1,onCheckedChange:i=>r.onChange(i?1:0)})})})]})}),e.jsx(g,{control:t.control,name:"is_staff",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"是否员工"}),e.jsx("div",{className:"py-2",children:e.jsx(b,{children:e.jsx(H,{checked:r.value===1,onCheckedChange:i=>r.onChange(i?1:0)})})})]})}),e.jsx(g,{control:t.control,name:"remarks",render:({field:r})=>e.jsxs(j,{children:[e.jsx(p,{children:"备注"}),e.jsx(b,{children:e.jsx(vs,{className:"h-24",value:r.value||"",onChange:i=>r.onChange(i.currentTarget.value??null),placeholder:"请在这里记录"})}),e.jsx(k,{})]})}),e.jsxs(Qr,{children:[e.jsx(D,{variant:"outline",onClick:()=>n(!1),children:"取消"}),e.jsx(D,{type:"submit",onClick:()=>{t.handleSubmit(r=>{vd(r).then(({data:i})=>{i&&(A.success("修改成功"),n(!1),s())})})()},children:"提交"})]})]})}function Xr({refetch:s,defaultValues:t,dialogTrigger:a=e.jsxs(D,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(lt,{className:"mr-2 h-4 w-4"}),"编辑用户信息"]})}){const[n,l]=c.useState(!1);return e.jsx(zm,{defaultValues:t,open:n,onOpenChange:l,children:e.jsxs(Yr,{open:n,onOpenChange:l,children:[e.jsx(Wr,{asChild:!0,children:a}),e.jsxs(ma,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ha,{children:[e.jsx(ja,{children:"用户管理"}),e.jsx(ga,{})]}),e.jsx(Lm,{refetch:s})]})]})})}const el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),sl=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),$m=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Am=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),$t=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Xo(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(el,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:zs(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(sl,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:zs(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const t=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(L,{variant:"outline",className:"font-mono",children:[t,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const t=(s.original.u+s.original.d)*s.original.server_rate;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:zs(t)})}}];function tl({user_id:s,dialogTrigger:t}){const[a,n]=c.useState(!1),[l,o]=c.useState({pageIndex:0,pageSize:20}),{data:d,isLoading:x}=Q({queryKey:["userStats",s,l,a],queryFn:()=>a?Nd({user_id:s,pageSize:l.pageSize,page:l.pageIndex+1}):null}),r=Le({data:d?.data??[],columns:$t,pageCount:Math.ceil((d?.total??0)/l.pageSize),state:{pagination:l},manualPagination:!0,getCoreRowModel:$e(),onPaginationChange:o});return e.jsxs(ue,{open:a,onOpenChange:n,children:[e.jsx(Re,{asChild:!0,children:t}),e.jsxs(ce,{className:"sm:max-w-[700px]",children:[e.jsx(je,{children:e.jsx(xe,{children:"流量使用记录"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(ia,{children:[e.jsx(oa,{children:r.getHeaderGroups().map(i=>e.jsx(js,{children:i.headers.map(h=>e.jsx(da,{className:y("h-10 px-2 text-xs",h.id==="total"&&"text-right"),children:h.isPlaceholder?null:vt(h.column.columnDef.header,h.getContext())},h.id))},i.id))}),e.jsx(ca,{children:x?Array.from({length:l.pageSize}).map((i,h)=>e.jsx(js,{children:Array.from({length:$t.length}).map((T,C)=>e.jsx(Os,{className:"p-2",children:e.jsx(Fe,{className:"h-6 w-full"})},C))},h)):r.getRowModel().rows?.length?r.getRowModel().rows.map(i=>e.jsx(js,{"data-state":i.getIsSelected()&&"selected",className:"h-10",children:i.getVisibleCells().map(h=>e.jsx(Os,{className:"px-2",children:vt(h.column.columnDef.cell,h.getContext())},h.id))},i.id)):e.jsx(js,{children:e.jsx(Os,{colSpan:$t.length,className:"h-24 text-center",children:"暂无记录"})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(G,{value:`${r.getState().pagination.pageSize}`,onValueChange:i=>{r.setPageSize(Number(i))},children:[e.jsx(U,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:r.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(i=>e.jsx(O,{value:`${i}`,children:i},i))})]}),e.jsx("p",{className:"text-sm font-medium",children:"条记录"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm",children:["第 ",r.getState().pagination.pageIndex+1," /"," ",r.getPageCount()," 页"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>r.previousPage(),disabled:!r.getCanPreviousPage()||x,children:e.jsx($m,{className:"h-4 w-4"})}),e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>r.nextPage(),disabled:!r.getCanNextPage()||x,children:e.jsx(Am,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Hm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Km=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),qm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Um=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Bm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Gm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Ym=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Wm=(s,t)=>[{accessorKey:"is_admin",header:({column:a})=>e.jsx(I,{column:a,title:"管理员"}),enableSorting:!1,enableHiding:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n)),size:0},{accessorKey:"is_staff",header:({column:a})=>e.jsx(I,{column:a,title:"员工"}),enableSorting:!1,enableHiding:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n)),size:0},{accessorKey:"id",header:({column:a})=>e.jsx(I,{column:a,title:"ID"}),cell:({row:a})=>e.jsx(L,{variant:"outline",children:a.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:a})=>e.jsx(I,{column:a,title:"邮箱"}),cell:({row:a})=>{const n=a.original.t||0,l=Date.now()/1e3-n<120,o=Math.floor(Date.now()/1e3-n);let d=l?"当前在线":n===0?"从未在线":`最后在线时间: ${re(n)}`;if(!l&&n!==0){const x=Math.floor(o/60),r=Math.floor(x/60),i=Math.floor(r/24);i>0?d+=` 离线时长: ${i}天`:r>0?d+=` 离线时长: ${r}小时`:x>0?d+=` 离线时长: ${x}分钟`:d+=` -离线时长: ${o}秒`}return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",l?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:a.original.email})]})}),e.jsx(ee,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:d})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:a})=>e.jsx(I,{column:a,title:"在线设备"}),cell:({row:a})=>{const n=a.original.device_limit,l=a.original.online_count||0;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(L,{variant:"outline",className:y("min-w-[4rem] justify-center",n!==null&&l>=n?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[l," / ",n===null?"∞":n]})})}),e.jsx(ee,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:n===null?"无设备数限制":`最多可同时在线 ${n} 台设备`})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:a})=>e.jsx(I,{column:a,title:"状态"}),cell:({row:a})=>{const n=a.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(L,{className:y("min-w-20 justify-center transition-colors",n?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:Fd[n]})})},enableSorting:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n))},{accessorKey:"plan_id",header:({column:a})=>e.jsx(I,{column:a,title:"订阅"}),cell:({row:a})=>e.jsx("div",{className:"min-w-[10em] break-all",children:a.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:a})=>e.jsx(I,{column:a,title:"权限组"}),cell:({row:a})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(L,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:a.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:a})=>e.jsx(I,{column:a,title:"已用流量"}),cell:({row:a})=>{const n=zs(a.original?.total_used),l=zs(a.original?.transfer_enable),o=a.original?.total_used/a.original?.transfer_enable*100||0;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",o>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(o,100)}%`}})})]})}),e.jsx(ee,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:["总流量配额: ",l]})})]})})}},{accessorKey:"transfer_enable",header:({column:a})=>e.jsx(I,{column:a,title:"总流量"}),cell:({row:a})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:zs(a.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:a})=>e.jsx(I,{column:a,title:"到期时间"}),cell:({row:a})=>{const n=a.original.expired_at,l=Date.now()/1e3,o=n!=null&&ne.jsx(I,{column:a,title:"余额"}),cell:({row:a})=>{const n=Fs(a.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(I,{column:a,title:"佣金"}),cell:({row:a})=>{const n=Fs(a.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"created_at",header:({column:a})=>e.jsx(I,{column:a,title:"注册时间"}),cell:({row:a})=>e.jsx("div",{className:"truncate",children:re(a.original?.created_at)}),size:1e3},{id:"actions",header:({column:a})=>e.jsx(I,{column:a,className:"justify-end",title:"操作"}),cell:({row:a,table:n})=>e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(W,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(bt,{className:"size-4"})})})}),e.jsxs(gs,{align:"end",className:"min-w-[40px]",children:[e.jsx(he,{onSelect:l=>{l.preventDefault()},className:"p-0",children:e.jsx(Zr,{defaultValues:{...a.original,invite_user_email:a.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Am,{className:"mr-2"}),"编辑"]})})}),e.jsx(he,{onSelect:l=>l.preventDefault(),className:"p-0",children:e.jsx(qr,{defaultValues:{email:a.original.email},trigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Hm,{className:"mr-2 "}),"分配订单"]})})}),e.jsx(he,{onSelect:()=>{Nt(a.original.subscribe_url)},className:"p-0",children:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Km,{className:"mr-2"}),"复制订阅URL"]})}),e.jsx(he,{onSelect:()=>{vd({id:a.original.id}).then(({data:l})=>{l&&A.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(qm,{className:"mr-2 "}),"重置UUID及订阅URL"]})}),e.jsx(he,{onSelect:()=>{},className:"p-0",children:e.jsxs(Ss,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${a.original?.id}`,children:[e.jsx(Um,{className:"mr-2"}),"TA的订单"]})}),e.jsx(he,{onSelect:()=>{n.setColumnFilters([{id:"invite_user_id",value:a.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Bm,{className:"mr-2 "}),"TA的邀请"]})}),e.jsx(he,{onSelect:l=>l.preventDefault(),className:"p-0",children:e.jsx(sl,{user_id:a.original?.id,dialogTrigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Gm,{className:"mr-2 "}),"TA的流量记录"]})})})]})]})}];function Wm(){const[s]=qn(),[t,a]=c.useState({}),[n,l]=c.useState({is_admin:!1,is_staff:!1}),[o,d]=c.useState([]),[x,r]=c.useState([]),[i,h]=c.useState({pageIndex:0,pageSize:20});c.useEffect(()=>{const z=s.get("email");z&&d($=>$.some(K=>K.id==="email")?$:[...$,{id:"email",value:z}])},[s]);const{refetch:T,data:C,isLoading:m}=Q({queryKey:["userList",i,o,x],queryFn:()=>fd({pageSize:i.pageSize,current:i.pageIndex+1,filter:o,sort:x})}),[w,_]=c.useState([]),[v,N]=c.useState([]);c.useEffect(()=>{Vt().then(({data:z})=>{_(z)}),Ps().then(({data:z})=>{N(z)})},[]);const P=w.map(z=>({label:z.name,value:z.id})),f=v.map(z=>({label:z.name,value:z.id})),R=Le({data:C?.data??[],columns:Ym(T),state:{sorting:x,columnVisibility:n,rowSelection:t,columnFilters:o,pagination:i},rowCount:C?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:r,onColumnFiltersChange:d,onColumnVisibilityChange:l,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:h,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:R,toolbar:e.jsx(Em,{table:R,refetch:T,serverGroupList:w,permissionGroups:P,subscriptionPlans:f})})}function Jm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"用户管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(Wm,{})})})]})]})}const Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Jm},Symbol.toStringTag,{value:"Module"}));function Zm({column:s,title:t,options:a}){const n=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(yo,{className:"mr-2 h-4 w-4"}),t,n?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:n.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:n.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[n.size," selected"]}):a.filter(l=>n.has(l.value)).map(l=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},`selected-${l.value}`))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(l=>{const o=n.has(l.value);return e.jsxs(be,{onSelect:()=>{o?n.delete(l.value):n.add(l.value);const d=Array.from(n);s?.setFilterValue(d.length?d:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(No,{className:y("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:l.label})]},`option-${l.value}`)})}),n.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Xm=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function eh({table:s}){return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(pr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:t=>s.getColumn("status")?.setFilterValue(t),children:e.jsxs(ra,{className:"grid w-full grid-cols-2",children:[e.jsx(et,{value:"0",children:"已开始"}),e.jsx(et,{value:"1",children:"已关闭"})]})}),s.getColumn("level")&&e.jsx(Zm,{column:s.getColumn("level"),title:"优先级",options:[{label:Js[ss.LOW],value:ss.LOW,icon:Xm,color:"gray"},{label:Js[ss.MEDIUM],value:ss.MEDIUM,icon:Xr,color:"yellow"},{label:Js[ss.HIGH],value:ss.HIGH,icon:el,color:"red"}]})]})})}function sh(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const th=_s("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),tl=c.forwardRef(({className:s,variant:t,layout:a,children:n,...l},o)=>e.jsx("div",{className:y(th({variant:t,layout:a,className:s}),"relative group"),ref:o,...l,children:c.Children.map(n,d=>c.isValidElement(d)&&typeof d.type!="string"?c.cloneElement(d,{variant:t,layout:a}):d)}));tl.displayName="ChatBubble";const ah=_s("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),al=c.forwardRef(({className:s,variant:t,layout:a,isLoading:n=!1,children:l,...o},d)=>e.jsx("div",{className:y(ah({variant:t,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:d,...o,children:n?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(sh,{})}):l}));al.displayName="ChatBubbleMessage";const nh=c.forwardRef(({variant:s,className:t,children:a,...n},l)=>e.jsx("div",{ref:l,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",t),...n,children:a}));nh.displayName="ChatBubbleActionWrapper";const nl=c.forwardRef(({className:s,...t},a)=>e.jsx(vs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...t}));nl.displayName="ChatInput";const rl=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),ll=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),rh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),lh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function ih(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Fe,{className:"h-8 w-3/4"}),e.jsx(Fe,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Fe,{className:"h-20 w-2/3"},s))})]})}function oh({ticketId:s,dialogTrigger:t}){const a=ns(),n=c.useRef(null),[l,o]=c.useState(!1),[d,x]=c.useState(""),[r,i]=c.useState(!1),{data:h,refetch:T,isLoading:C}=Q({queryKey:["ticket",s,l],queryFn:()=>l?Nd(s):Promise.resolve(null),refetchInterval:l?5e3:!1,retry:3}),m=h?.data,w=(f="smooth")=>{if(n.current){const{scrollHeight:R,clientHeight:z}=n.current;n.current.scrollTo({top:R-z,behavior:f})}};c.useEffect(()=>{if(!l)return;const f=requestAnimationFrame(()=>{w("instant"),setTimeout(()=>w(),1e3)});return()=>{cancelAnimationFrame(f)}},[l,m?.messages]);const _=async()=>{const f=d.trim();!f||r||(i(!0),wd({id:s,message:f}).then(()=>{x(""),T(),w()}).finally(()=>{i(!1)}))},v=async()=>{fr(s).then(()=>{A.success("工单已关闭"),T()})},N=()=>{m?.user&&a("/finance/order?user_id="+m.user.id)},P=m?.status===Ms.CLOSED;return e.jsxs(ue,{open:l,onOpenChange:o,children:[e.jsx(Re,{asChild:!0,children:t??e.jsx(W,{variant:"outline",children:"查看工单"})}),e.jsxs(ce,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(xe,{}),C?e.jsx(ih,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:m?.subject}),e.jsx(L,{variant:P?"secondary":"default",children:P?"已关闭":"处理中"}),!P&&e.jsx(Ye,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:v,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(rl,{className:"h-4 w-4"}),"关闭工单"]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(nt,{className:"h-4 w-4"}),e.jsx("span",{children:m?.user?.email})]}),e.jsx(ge,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(ll,{className:"h-4 w-4"}),e.jsxs("span",{children:["创建于 ",re(m?.created_at)]})]}),e.jsx(ge,{orientation:"vertical",className:"h-4"}),e.jsx(L,{variant:"outline",children:m?.level!=null&&Js[m.level]})]})]}),m?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Zr,{defaultValues:m.user,refetch:T,dialogTrigger:e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"用户信息",children:e.jsx(nt,{className:"h-4 w-4"})})}),e.jsx(sl,{user_id:m.user.id,dialogTrigger:e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"流量记录",children:e.jsx(rh,{className:"h-4 w-4"})})}),e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"订单记录",onClick:N,children:e.jsx(lh,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:n,className:"h-full space-y-4 overflow-y-auto p-6",children:m?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"暂无消息记录"}):m?.messages?.map(f=>e.jsx(tl,{variant:f.is_me?"sent":"received",className:f.is_me?"ml-auto":"mr-auto",children:e.jsx(al,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:f.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:re(f.created_at)})})]})})},f.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(nl,{disabled:P||r,placeholder:P?"工单已关闭":"请输入回复内容...",className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:d,onChange:f=>x(f.target.value),onKeyDown:f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),_())}}),e.jsx(W,{disabled:P||r||!d.trim(),onClick:_,children:r?"发送中...":"发送"})]})})]})]})]})}const ch=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),dh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),uh=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"工单号"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:t})=>e.jsx(I,{column:t,title:"主题"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ch,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:t})=>e.jsx(I,{column:t,title:"优先级"}),cell:({row:t})=>{const a=t.getValue("level"),n=a===ss.LOW?"default":a===ss.MEDIUM?"secondary":"destructive";return e.jsx(L,{variant:n,className:"whitespace-nowrap",children:Js[a]})},filterFn:(t,a,n)=>n.includes(t.getValue(a))},{accessorKey:"status",header:({column:t})=>e.jsx(I,{column:t,title:"状态"}),cell:({row:t})=>{const a=t.getValue("status"),n=t.original.reply_status,l=a===Ms.CLOSED?Md[Ms.CLOSED]:n===0?"已回复":"待回复",o=a===Ms.CLOSED?"default":n===0?"secondary":"destructive";return e.jsx(L,{variant:o,className:"whitespace-nowrap",children:l})}},{accessorKey:"updated_at",header:({column:t})=>e.jsx(I,{column:t,title:"最后更新"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(ll,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:re(t.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:t})=>e.jsx(I,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:re(t.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const a=t.original.status!==Ms.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(oh,{ticketId:t.original.id,dialogTrigger:e.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"查看详情",children:e.jsx(dh,{className:"h-4 w-4"})})}),a&&e.jsx(Ye,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:async()=>{fr(t.original.id).then(()=>{A.success("工单已关闭"),s()})},children:e.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"关闭工单",children:e.jsx(rl,{className:"h-4 w-4"})})})]})}}];function xh(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([{id:"status",value:"0"}]),[d,x]=c.useState([]),[r,i]=c.useState({pageIndex:0,pageSize:20}),{refetch:h,data:T,isLoading:C}=Q({queryKey:["orderList",r,l,d],queryFn:()=>gr({pageSize:r.pageSize,current:r.pageIndex+1,filter:l,sort:d})}),m=Le({data:T?.data??[],columns:uh(h),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:r},rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:i,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(eh,{table:m,refetch:h}),e.jsx(Ge,{table:m,showPagination:!0})]})}function mh(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 工单管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以查看用户工单,包括查看、回复、关闭等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(xh,{})})]})]})}const hh=Object.freeze(Object.defineProperty({__proto__:null,default:mh},Symbol.toStringTag,{value:"Module"}));export{vh as a,fh as c,ph as g,bh as r}; +离线时长: ${o}秒`}return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",l?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:a.original.email})]})}),e.jsx(ee,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:d})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:a})=>e.jsx(I,{column:a,title:"在线设备"}),cell:({row:a})=>{const n=a.original.device_limit,l=a.original.online_count||0;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(L,{variant:"outline",className:y("min-w-[4rem] justify-center",n!==null&&l>=n?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[l," / ",n===null?"∞":n]})})}),e.jsx(ee,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:n===null?"无设备数限制":`最多可同时在线 ${n} 台设备`})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:a})=>e.jsx(I,{column:a,title:"状态"}),cell:({row:a})=>{const n=a.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(L,{className:y("min-w-20 justify-center transition-colors",n?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:Md[n]})})},enableSorting:!0,filterFn:(a,n,l)=>l.includes(a.getValue(n))},{accessorKey:"plan_id",header:({column:a})=>e.jsx(I,{column:a,title:"订阅"}),cell:({row:a})=>e.jsx("div",{className:"min-w-[10em] break-all",children:a.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:a})=>e.jsx(I,{column:a,title:"权限组"}),cell:({row:a})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(L,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:a.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:a})=>e.jsx(I,{column:a,title:"已用流量"}),cell:({row:a})=>{const n=zs(a.original?.total_used),l=zs(a.original?.transfer_enable),o=a.original?.total_used/a.original?.transfer_enable*100||0;return e.jsx(le,{delayDuration:100,children:e.jsxs(se,{children:[e.jsx(te,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",o>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(o,100)}%`}})})]})}),e.jsx(ee,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:["总流量配额: ",l]})})]})})}},{accessorKey:"transfer_enable",header:({column:a})=>e.jsx(I,{column:a,title:"总流量"}),cell:({row:a})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:zs(a.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:a})=>e.jsx(I,{column:a,title:"到期时间"}),cell:({row:a})=>{const n=a.original.expired_at,l=Date.now()/1e3,o=n!=null&&ne.jsx(I,{column:a,title:"余额"}),cell:({row:a})=>{const n=Fs(a.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(I,{column:a,title:"佣金"}),cell:({row:a})=>{const n=Fs(a.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:n})]})}},{accessorKey:"created_at",header:({column:a})=>e.jsx(I,{column:a,title:"注册时间"}),cell:({row:a})=>e.jsx("div",{className:"truncate",children:re(a.original?.created_at)}),size:1e3},{id:"actions",header:({column:a})=>e.jsx(I,{column:a,className:"justify-end",title:"操作"}),cell:({row:a,table:n})=>e.jsxs(Ns,{modal:!0,children:[e.jsx(ws,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(W,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":"打开操作菜单",children:e.jsx(bt,{className:"size-4"})})})}),e.jsxs(gs,{align:"end",className:"min-w-[40px]",children:[e.jsx(he,{onSelect:l=>{l.preventDefault()},className:"p-0",children:e.jsx(Xr,{defaultValues:{...a.original,invite_user_email:a.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Hm,{className:"mr-2"}),"编辑"]})})}),e.jsx(he,{onSelect:l=>l.preventDefault(),className:"p-0",children:e.jsx(Ur,{defaultValues:{email:a.original.email},trigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Km,{className:"mr-2 "}),"分配订单"]})})}),e.jsx(he,{onSelect:()=>{Nt(a.original.subscribe_url)},className:"p-0",children:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(qm,{className:"mr-2"}),"复制订阅URL"]})}),e.jsx(he,{onSelect:()=>{bd({id:a.original.id}).then(({data:l})=>{l&&A.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Um,{className:"mr-2 "}),"重置UUID及订阅URL"]})}),e.jsx(he,{onSelect:()=>{},className:"p-0",children:e.jsxs(Ss,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${a.original?.id}`,children:[e.jsx(Bm,{className:"mr-2"}),"TA的订单"]})}),e.jsx(he,{onSelect:()=>{n.setColumnFilters([{id:"invite_user_id",value:a.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Gm,{className:"mr-2 "}),"TA的邀请"]})}),e.jsx(he,{onSelect:l=>l.preventDefault(),className:"p-0",children:e.jsx(tl,{user_id:a.original?.id,dialogTrigger:e.jsxs(W,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ym,{className:"mr-2 "}),"TA的流量记录"]})})})]})]})}];function Jm(){const[s]=Un(),[t,a]=c.useState({}),[n,l]=c.useState({is_admin:!1,is_staff:!1}),[o,d]=c.useState([]),[x,r]=c.useState([]),[i,h]=c.useState({pageIndex:0,pageSize:20});c.useEffect(()=>{const z=s.get("email");z&&d($=>$.some(K=>K.id==="email")?$:[...$,{id:"email",value:z}])},[s]);const{refetch:T,data:C,isLoading:m}=Q({queryKey:["userList",i,o,x],queryFn:()=>pd({pageSize:i.pageSize,current:i.pageIndex+1,filter:o,sort:x})}),[w,_]=c.useState([]),[v,N]=c.useState([]);c.useEffect(()=>{Vt().then(({data:z})=>{_(z)}),Ps().then(({data:z})=>{N(z)})},[]);const P=w.map(z=>({label:z.name,value:z.id})),f=v.map(z=>({label:z.name,value:z.id})),R=Le({data:C?.data??[],columns:Wm(T),state:{sorting:x,columnVisibility:n,rowSelection:t,columnFilters:o,pagination:i},rowCount:C?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:r,onColumnFiltersChange:d,onColumnVisibilityChange:l,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:h,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ge,{table:R,toolbar:e.jsx(Fm,{table:R,refetch:T,serverGroupList:w,permissionGroups:P,subscriptionPlans:f})})}function Qm(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"用户管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(Jm,{})})})]})]})}const Zm=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"}));function Xm({column:s,title:t,options:a}){const n=new Set(s?.getFilterValue());return e.jsxs(Ze,{children:[e.jsx(Xe,{asChild:!0,children:e.jsxs(W,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(No,{className:"mr-2 h-4 w-4"}),t,n?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:n.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:n.size>2?e.jsxs(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[n.size," selected"]}):a.filter(l=>n.has(l.value)).map(l=>e.jsx(L,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:l.label},`selected-${l.value}`))})]})]})}),e.jsx(Be,{className:"w-[200px] p-0",align:"start",children:e.jsxs(fs,{children:[e.jsx(Ds,{placeholder:t}),e.jsxs(ps,{children:[e.jsx(Ts,{children:"No results found."}),e.jsx(Ve,{children:a.map(l=>{const o=n.has(l.value);return e.jsxs(be,{onSelect:()=>{o?n.delete(l.value):n.add(l.value);const d=Array.from(n);s?.setFilterValue(d.length?d:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(wo,{className:y("h-4 w-4")})}),l.icon&&e.jsx(l.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:l.label})]},`option-${l.value}`)})}),n.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(As,{}),e.jsx(Ve,{children:e.jsx(be,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const eh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function sh({table:s}){return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(vr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:t=>s.getColumn("status")?.setFilterValue(t),children:e.jsxs(ra,{className:"grid w-full grid-cols-2",children:[e.jsx(et,{value:"0",children:"已开始"}),e.jsx(et,{value:"1",children:"已关闭"})]})}),s.getColumn("level")&&e.jsx(Xm,{column:s.getColumn("level"),title:"优先级",options:[{label:Js[ss.LOW],value:ss.LOW,icon:eh,color:"gray"},{label:Js[ss.MEDIUM],value:ss.MEDIUM,icon:el,color:"yellow"},{label:Js[ss.HIGH],value:ss.HIGH,icon:sl,color:"red"}]})]})})}function th(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const ah=_s("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),al=c.forwardRef(({className:s,variant:t,layout:a,children:n,...l},o)=>e.jsx("div",{className:y(ah({variant:t,layout:a,className:s}),"relative group"),ref:o,...l,children:c.Children.map(n,d=>c.isValidElement(d)&&typeof d.type!="string"?c.cloneElement(d,{variant:t,layout:a}):d)}));al.displayName="ChatBubble";const nh=_s("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),nl=c.forwardRef(({className:s,variant:t,layout:a,isLoading:n=!1,children:l,...o},d)=>e.jsx("div",{className:y(nh({variant:t,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:d,...o,children:n?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(th,{})}):l}));nl.displayName="ChatBubbleMessage";const rh=c.forwardRef(({variant:s,className:t,children:a,...n},l)=>e.jsx("div",{ref:l,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",t),...n,children:a}));rh.displayName="ChatBubbleActionWrapper";const rl=c.forwardRef(({className:s,...t},a)=>e.jsx(vs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...t}));rl.displayName="ChatInput";const ll=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),il=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),lh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),ih=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function oh(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Fe,{className:"h-8 w-3/4"}),e.jsx(Fe,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Fe,{className:"h-20 w-2/3"},s))})]})}function ch({ticketId:s,dialogTrigger:t}){const a=ns(),n=c.useRef(null),[l,o]=c.useState(!1),[d,x]=c.useState(""),[r,i]=c.useState(!1),{data:h,refetch:T,isLoading:C}=Q({queryKey:["ticket",s,l],queryFn:()=>l?wd(s):Promise.resolve(null),refetchInterval:l?5e3:!1,retry:3}),m=h?.data,w=(f="smooth")=>{if(n.current){const{scrollHeight:R,clientHeight:z}=n.current;n.current.scrollTo({top:R-z,behavior:f})}};c.useEffect(()=>{if(!l)return;const f=requestAnimationFrame(()=>{w("instant"),setTimeout(()=>w(),1e3)});return()=>{cancelAnimationFrame(f)}},[l,m?.messages]);const _=async()=>{const f=d.trim();!f||r||(i(!0),_d({id:s,message:f}).then(()=>{x(""),T(),w()}).finally(()=>{i(!1)}))},v=async()=>{pr(s).then(()=>{A.success("工单已关闭"),T()})},N=()=>{m?.user&&a("/finance/order?user_id="+m.user.id)},P=m?.status===Ms.CLOSED;return e.jsxs(ue,{open:l,onOpenChange:o,children:[e.jsx(Re,{asChild:!0,children:t??e.jsx(W,{variant:"outline",children:"查看工单"})}),e.jsxs(ce,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(xe,{}),C?e.jsx(oh,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:m?.subject}),e.jsx(L,{variant:P?"secondary":"default",children:P?"已关闭":"处理中"}),!P&&e.jsx(Ye,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:v,children:e.jsxs(W,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(ll,{className:"h-4 w-4"}),"关闭工单"]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(nt,{className:"h-4 w-4"}),e.jsx("span",{children:m?.user?.email})]}),e.jsx(ge,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(il,{className:"h-4 w-4"}),e.jsxs("span",{children:["创建于 ",re(m?.created_at)]})]}),e.jsx(ge,{orientation:"vertical",className:"h-4"}),e.jsx(L,{variant:"outline",children:m?.level!=null&&Js[m.level]})]})]}),m?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Xr,{defaultValues:m.user,refetch:T,dialogTrigger:e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"用户信息",children:e.jsx(nt,{className:"h-4 w-4"})})}),e.jsx(tl,{user_id:m.user.id,dialogTrigger:e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"流量记录",children:e.jsx(lh,{className:"h-4 w-4"})})}),e.jsx(W,{variant:"outline",size:"icon",className:"h-8 w-8",title:"订单记录",onClick:N,children:e.jsx(ih,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:n,className:"h-full space-y-4 overflow-y-auto p-6",children:m?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"暂无消息记录"}):m?.messages?.map(f=>e.jsx(al,{variant:f.is_me?"sent":"received",className:f.is_me?"ml-auto":"mr-auto",children:e.jsx(nl,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:f.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:re(f.created_at)})})]})})},f.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(rl,{disabled:P||r,placeholder:P?"工单已关闭":"请输入回复内容...",className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:d,onChange:f=>x(f.target.value),onKeyDown:f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),_())}}),e.jsx(W,{disabled:P||r||!d.trim(),onClick:_,children:r?"发送中...":"发送"})]})})]})]})]})}const dh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),uh=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),xh=s=>[{accessorKey:"id",header:({column:t})=>e.jsx(I,{column:t,title:"工单号"}),cell:({row:t})=>e.jsx(L,{variant:"outline",children:t.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:t})=>e.jsx(I,{column:t,title:"主题"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(dh,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:t})=>e.jsx(I,{column:t,title:"优先级"}),cell:({row:t})=>{const a=t.getValue("level"),n=a===ss.LOW?"default":a===ss.MEDIUM?"secondary":"destructive";return e.jsx(L,{variant:n,className:"whitespace-nowrap",children:Js[a]})},filterFn:(t,a,n)=>n.includes(t.getValue(a))},{accessorKey:"status",header:({column:t})=>e.jsx(I,{column:t,title:"状态"}),cell:({row:t})=>{const a=t.getValue("status"),n=t.original.reply_status,l=a===Ms.CLOSED?zd[Ms.CLOSED]:n===0?"已回复":"待回复",o=a===Ms.CLOSED?"default":n===0?"secondary":"destructive";return e.jsx(L,{variant:o,className:"whitespace-nowrap",children:l})}},{accessorKey:"updated_at",header:({column:t})=>e.jsx(I,{column:t,title:"最后更新"}),cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(il,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:re(t.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:t})=>e.jsx(I,{column:t,title:"创建时间"}),cell:({row:t})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:re(t.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:t})=>e.jsx(I,{className:"justify-end",column:t,title:"操作"}),cell:({row:t})=>{const a=t.original.status!==Ms.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(ch,{ticketId:t.original.id,dialogTrigger:e.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"查看详情",children:e.jsx(uh,{className:"h-4 w-4"})})}),a&&e.jsx(Ye,{title:"确认关闭工单",description:"关闭后将无法继续回复,是否确认关闭该工单?",confirmText:"关闭工单",variant:"destructive",onConfirm:async()=>{pr(t.original.id).then(()=>{A.success("工单已关闭"),s()})},children:e.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"关闭工单",children:e.jsx(ll,{className:"h-4 w-4"})})})]})}}];function mh(){const[s,t]=c.useState({}),[a,n]=c.useState({}),[l,o]=c.useState([{id:"status",value:"0"}]),[d,x]=c.useState([]),[r,i]=c.useState({pageIndex:0,pageSize:20}),{refetch:h,data:T,isLoading:C}=Q({queryKey:["orderList",r,l,d],queryFn:()=>fr({pageSize:r.pageSize,current:r.pageIndex+1,filter:l,sort:d})}),m=Le({data:T?.data??[],columns:xh(h),state:{sorting:d,columnVisibility:a,rowSelection:s,columnFilters:l,pagination:r},rowCount:T?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:t,onSortingChange:x,onColumnFiltersChange:o,onColumnVisibilityChange:n,getCoreRowModel:$e(),getFilteredRowModel:Ke(),getPaginationRowModel:qe(),onPaginationChange:i,getSortedRowModel:Ue(),getFacetedRowModel:ls(),getFacetedUniqueValues:is(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(sh,{table:m,refetch:h}),e.jsx(Ge,{table:m,showPagination:!0})]})}function hh(){return e.jsxs(ye,{children:[e.jsxs(Ne,{children:[e.jsx(ke,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Te,{})]})]}),e.jsxs(_e,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:" 工单管理"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"在这里可以查看用户工单,包括查看、回复、关闭等操作。"})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(mh,{})})]})]})}const jh=Object.freeze(Object.defineProperty({__proto__:null,default:hh},Symbol.toStringTag,{value:"Module"}));export{bh as a,ph as c,vh as g,yh as r}; diff --git a/public/assets/admin/assets/vendor.js b/public/assets/admin/assets/vendor.js index 55e6825..09b14c8 100644 --- a/public/assets/admin/assets/vendor.js +++ b/public/assets/admin/assets/vendor.js @@ -1,4 +1,4 @@ -import{g as On,c as ua,a as fne,r as dne}from"./index.js";function OI(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var PI={exports:{}},ax={},kI={exports:{}},rn={};/** +import{g as Pn,c as ua,a as hne,r as pne}from"./index.js";function OI(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var kI={exports:{}},ux={},TI={exports:{}},rn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ import{g as On,c as ua,a as fne,r as dne}from"./index.js";function OI(e,t){for(v * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xv=Symbol.for("react.element"),hne=Symbol.for("react.portal"),pne=Symbol.for("react.fragment"),vne=Symbol.for("react.strict_mode"),gne=Symbol.for("react.profiler"),mne=Symbol.for("react.provider"),yne=Symbol.for("react.context"),bne=Symbol.for("react.forward_ref"),xne=Symbol.for("react.suspense"),wne=Symbol.for("react.memo"),_ne=Symbol.for("react.lazy"),pk=Symbol.iterator;function Sne(e){return e===null||typeof e!="object"?null:(e=pk&&e[pk]||e["@@iterator"],typeof e=="function"?e:null)}var TI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MI=Object.assign,RI={};function wh(e,t,n){this.props=e,this.context=t,this.refs=RI,this.updater=n||TI}wh.prototype.isReactComponent={};wh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DI(){}DI.prototype=wh.prototype;function e4(e,t,n){this.props=e,this.context=t,this.refs=RI,this.updater=n||TI}var t4=e4.prototype=new DI;t4.constructor=e4;MI(t4,wh.prototype);t4.isPureReactComponent=!0;var vk=Array.isArray,$I=Object.prototype.hasOwnProperty,n4={current:null},II={key:!0,ref:!0,__self:!0,__source:!0};function NI(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)$I.call(t,r)&&!II.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,Q=B[ue];if(0>>1;uei(de,Y))Sei(ge,de)?(B[ue]=ge,B[Se]=Y,ue=Se):(B[ue]=de,B[se]=Y,ue=se);else if(Sei(ge,Y))B[ue]=ge,B[Se]=Y,ue=Se;else break e}}return q}function i(B,q){var Y=B.sortIndex-q.sortIndex;return Y!==0?Y:B.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var s=[],l=[],c=1,d=null,h=3,v=!1,g=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(B){for(var q=n(l);q!==null;){if(q.callback===null)r(l);else if(q.startTime<=B)r(l),q.sortIndex=q.expirationTime,t(s,q);else break;q=n(l)}}function A(B){if(m=!1,S(B),!g)if(n(s)!==null)g=!0,K(E);else{var q=n(l);q!==null&&V(A,q.startTime-B)}}function E(B,q){g=!1,m&&(m=!1,w(M),M=-1),v=!0;var Y=h;try{for(S(q),d=n(s);d!==null&&(!(d.expirationTime>q)||B&&!H());){var ue=d.callback;if(typeof ue=="function"){d.callback=null,h=d.priorityLevel;var Q=ue(d.expirationTime<=q);q=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(s)&&r(s),S(q)}else r(s);d=n(s)}if(d!==null)var J=!0;else{var se=n(l);se!==null&&V(A,se.startTime-q),J=!1}return J}finally{d=null,h=Y,v=!1}}var C=!1,T=null,M=-1,F=5,U=-1;function H(){return!(e.unstable_now()-UB||125ue?(B.sortIndex=Y,t(l,B),n(s)===null&&B===n(l)&&(m?(w(M),M=-1):m=!0,V(A,Y-ue))):(B.sortIndex=Q,t(s,B),g||v||(g=!0,K(E))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var q=h;return function(){var Y=h;h=q;try{return B.apply(this,arguments)}finally{h=Y}}}})(zI);BI.exports=zI;var $ne=BI.exports;/** + */(function(e){function t(B,q){var Y=B.length;B.push(q);e:for(;0>>1,Q=B[ue];if(0>>1;uei(de,Y))Sei(ge,de)?(B[ue]=ge,B[Se]=Y,ue=Se):(B[ue]=de,B[se]=Y,ue=se);else if(Sei(ge,Y))B[ue]=ge,B[Se]=Y,ue=Se;else break e}}return q}function i(B,q){var Y=B.sortIndex-q.sortIndex;return Y!==0?Y:B.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var s=[],l=[],c=1,d=null,h=3,v=!1,g=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(B){for(var q=n(l);q!==null;){if(q.callback===null)r(l);else if(q.startTime<=B)r(l),q.sortIndex=q.expirationTime,t(s,q);else break;q=n(l)}}function A(B){if(m=!1,S(B),!g)if(n(s)!==null)g=!0,K(E);else{var q=n(l);q!==null&&V(A,q.startTime-B)}}function E(B,q){g=!1,m&&(m=!1,w(M),M=-1),v=!0;var Y=h;try{for(S(q),d=n(s);d!==null&&(!(d.expirationTime>q)||B&&!H());){var ue=d.callback;if(typeof ue=="function"){d.callback=null,h=d.priorityLevel;var Q=ue(d.expirationTime<=q);q=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(s)&&r(s),S(q)}else r(s);d=n(s)}if(d!==null)var J=!0;else{var se=n(l);se!==null&&V(A,se.startTime-q),J=!1}return J}finally{d=null,h=Y,v=!1}}var C=!1,T=null,M=-1,F=5,U=-1;function H(){return!(e.unstable_now()-UB||125ue?(B.sortIndex=Y,t(l,B),n(s)===null&&B===n(l)&&(m?(w(M),M=-1):m=!0,V(A,Y-ue))):(B.sortIndex=Q,t(s,B),g||v||(g=!0,K(E))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var q=h;return function(){var Y=h;h=q;try{return B.apply(this,arguments)}finally{h=Y}}}})(UI);zI.exports=UI;var Nne=zI.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ import{g as On,c as ua,a as fne,r as dne}from"./index.js";function OI(e,t){for(v * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ine=y,Lo=$ne;function Ve(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y3=Object.prototype.hasOwnProperty,Nne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,yk={},bk={};function Fne(e){return y3.call(bk,e)?!0:y3.call(yk,e)?!1:Nne.test(e)?bk[e]=!0:(yk[e]=!0,!1)}function Lne(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jne(e,t,n,r){if(t===null||typeof t>"u"||Lne(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ki(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var gi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gi[e]=new Ki(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gi[t]=new Ki(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gi[e]=new Ki(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gi[e]=new Ki(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gi[e]=new Ki(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gi[e]=new Ki(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gi[e]=new Ki(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gi[e]=new Ki(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gi[e]=new Ki(e,5,!1,e.toLowerCase(),null,!1,!1)});var o4=/[\-:]([a-z])/g;function a4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!1,!1)});gi.xlinkHref=new Ki("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!0,!0)});function u4(e,t,n,r){var i=gi.hasOwnProperty(t)?gi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y3=Object.prototype.hasOwnProperty,Lne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,bk={},xk={};function jne(e){return y3.call(xk,e)?!0:y3.call(bk,e)?!1:Lne.test(e)?xk[e]=!0:(bk[e]=!0,!1)}function Bne(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zne(e,t,n,r){if(t===null||typeof t>"u"||Bne(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ki(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var gi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gi[e]=new Ki(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gi[t]=new Ki(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gi[e]=new Ki(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gi[e]=new Ki(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gi[e]=new Ki(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gi[e]=new Ki(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gi[e]=new Ki(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gi[e]=new Ki(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gi[e]=new Ki(e,5,!1,e.toLowerCase(),null,!1,!1)});var o4=/[\-:]([a-z])/g;function a4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o4,a4);gi[t]=new Ki(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!1,!1)});gi.xlinkHref=new Ki("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!0,!0)});function u4(e,t,n,r){var i=gi.hasOwnProperty(t)?gi[t]:null;(i!==null?i.type!==0:r||!(2u||i[a]!==o[u]){var s=` -`+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{h_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Up(e):""}function Bne(e){switch(e.tag){case 5:return Up(e.type);case 16:return Up("Lazy");case 13:return Up("Suspense");case 19:return Up("SuspenseList");case 0:case 2:case 15:return e=p_(e.type,!1),e;case 11:return e=p_(e.type.render,!1),e;case 1:return e=p_(e.type,!0),e;default:return""}}function _3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xf:return"Fragment";case Zf:return"Portal";case b3:return"Profiler";case s4:return"StrictMode";case x3:return"Suspense";case w3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VI:return(e.displayName||"Context")+".Consumer";case WI:return(e._context.displayName||"Context")+".Provider";case l4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:_3(e.type)||"Memo";case qs:t=e._payload,e=e._init;try{return _3(e(t))}catch{}}return null}function zne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _3(t);case 8:return t===s4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Une(e){var t=qI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cm(e){e._valueTracker||(e._valueTracker=Une(e))}function KI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GI(e,t){t=t.checked,t!=null&&u4(e,"checked",t,!1)}function C3(e,t){GI(e,t);var n=xl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?E3(e,t.type,n):t.hasOwnProperty("defaultValue")&&E3(e,t.type,xl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _k(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function E3(e,t,n){(t!=="number"||qy(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wp=Array.isArray;function dd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Em.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function w0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wne=["Webkit","ms","Moz","O"];Object.keys(Jp).forEach(function(e){Wne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jp[t]=Jp[e]})});function QI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jp.hasOwnProperty(e)&&Jp[e]?(""+t).trim():t+"px"}function JI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vne=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function P3(e,t){if(t){if(Vne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ve(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ve(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ve(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ve(62))}}function k3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var T3=null;function f4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var M3=null,hd=null,pd=null;function Ek(e){if(e=eg(e)){if(typeof M3!="function")throw Error(Ve(280));var t=e.stateNode;t&&(t=fx(t),M3(e.stateNode,e.type,t))}}function eN(e){hd?pd?pd.push(e):pd=[e]:hd=e}function tN(){if(hd){var e=hd,t=pd;if(pd=hd=null,Ek(e),t)for(e=0;e>>=0,e===0?32:31-(tre(e)/nre|0)|0}var Am=64,Om=4194304;function Vp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zy(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=Vp(u):(o&=a,o!==0&&(r=Vp(o)))}else a=n&~i,a!==0?r=Vp(a):o!==0&&(r=Vp(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-za(t),e[t]=n}function are(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=t0),$k=" ",Ik=!1;function wN(e,t){switch(e){case"keyup":return $re.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _N(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qf=!1;function Nre(e,t){switch(e){case"compositionend":return _N(t);case"keypress":return t.which!==32?null:(Ik=!0,$k);case"textInput":return e=t.data,e===$k&&Ik?null:e;default:return null}}function Fre(e,t){if(Qf)return e==="compositionend"||!b4&&wN(e,t)?(e=bN(),Cy=g4=tl=null,Qf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jk(n)}}function AN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ON(){for(var e=window,t=qy();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qy(e.document)}return t}function x4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qre(e){var t=ON(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&AN(n.ownerDocument.documentElement,n)){if(r!==null&&x4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Bk(n,o);var a=Bk(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jf=null,F3=null,r0=null,L3=!1;function zk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;L3||Jf==null||Jf!==qy(r)||(r=Jf,"selectionStart"in r&&x4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),r0&&O0(r0,r)||(r0=r,r=Jy(F3,"onSelect"),0nd||(e.current=V3[nd],V3[nd]=null,nd--)}function Wn(e,t){nd++,V3[nd]=e.current,e.current=t}var wl={},Di=$l(wl),uo=$l(!1),Mc=wl;function Dd(e,t){var n=e.type.contextTypes;if(!n)return wl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function so(e){return e=e.childContextTypes,e!=null}function t1(){tr(uo),tr(Di)}function Gk(e,t,n){if(Di.current!==wl)throw Error(Ve(168));Wn(Di,t),Wn(uo,n)}function NN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ve(108,zne(e)||"Unknown",i));return hr({},n,r)}function n1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wl,Mc=Di.current,Wn(Di,e),Wn(uo,uo.current),!0}function Yk(e,t,n){var r=e.stateNode;if(!r)throw Error(Ve(169));n?(e=NN(e,t,Mc),r.__reactInternalMemoizedMergedChildContext=e,tr(uo),tr(Di),Wn(Di,e)):tr(uo),Wn(uo,n)}var Xu=null,dx=!1,P_=!1;function FN(e){Xu===null?Xu=[e]:Xu.push(e)}function iie(e){dx=!0,FN(e)}function Il(){if(!P_&&Xu!==null){P_=!0;var e=0,t=Mn;try{var n=Xu;for(Mn=1;e>=a,i-=a,Ju=1<<32-za(t)+i|n<M?(F=T,T=null):F=T.sibling;var U=h(w,T,S[M],A);if(U===null){T===null&&(T=F);break}e&&T&&U.alternate===null&&t(w,T),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U,T=F}if(M===S.length)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;MM?(F=T,T=null):F=T.sibling;var H=h(w,T,U.value,A);if(H===null){T===null&&(T=F);break}e&&T&&H.alternate===null&&t(w,T),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,T=F}if(U.done)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;!U.done;M++,U=S.next())U=d(w,U.value,A),U!==null&&(x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return ir&&rc(w,M),E}for(T=r(w,T);!U.done;M++,U=S.next())U=v(T,w,M,U.value,A),U!==null&&(e&&U.alternate!==null&&T.delete(U.key===null?M:U.key),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return e&&T.forEach(function(W){return t(w,W)}),ir&&rc(w,M),E}function b(w,x,S,A){if(typeof S=="object"&&S!==null&&S.type===Xf&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Sm:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===Xf){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===qs&&Qk(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=mp(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===Xf?(x=Ec(S.props.children,w.mode,A,S.key),x.return=w,w=x):(A=Ry(S.type,S.key,S.props,null,w.mode,A),A.ref=mp(w,x,S),A.return=w,w=A)}return a(w);case Zf:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=N_(S,w.mode,A),x.return=w,w=x}return a(w);case qs:return C=S._init,b(w,x,C(S._payload),A)}if(Wp(S))return g(w,x,S,A);if(dp(S))return m(w,x,S,A);$m(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=I_(S,w.mode,A),x.return=w,w=x),a(w)):n(w,x)}return b}var Id=zN(!0),UN=zN(!1),o1=$l(null),a1=null,od=null,C4=null;function E4(){C4=od=a1=null}function A4(e){var t=o1.current;tr(o1),e._currentValue=t}function K3(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gd(e,t){a1=e,C4=od=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(io=!0),e.firstContext=null)}function ha(e){var t=e._currentValue;if(C4!==e)if(e={context:e,memoizedValue:t,next:null},od===null){if(a1===null)throw Error(Ve(308));od=e,a1.dependencies={lanes:0,firstContext:e}}else od=od.next=e;return t}var pc=null;function O4(e){pc===null?pc=[e]:pc.push(e)}function WN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,O4(t)):(n.next=i.next,i.next=n),t.interleaved=n,ds(e,r)}function ds(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ks=!1;function P4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function is(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,gn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ds(e,n)}return i=r.interleaved,i===null?(t.next=t,O4(r)):(t.next=i.next,i.next=t),r.interleaved=t,ds(e,n)}function Ay(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}function Jk(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function u1(e,t,n,r){var i=e.updateQueue;Ks=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var s=u,l=s.next;s.next=null,a===null?o=l:a.next=l,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==a&&(u===null?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=l=s=null,u=o;do{var h=u.lane,v=u.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,m=u;switch(h=t,v=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(v,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(v,d,h):g,h==null)break e;d=hr({},d,h);break e;case 2:Ks=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[u]:h.push(u))}else v={eventTime:v,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(l=c=v,s=d):c=c.next=v,a|=h;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;h=u,u=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);$c|=a,e.lanes=a,e.memoizedState=d}}function eT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=T_.transition;T_.transition={};try{e(!1),t()}finally{Mn=n,T_.transition=r}}function uF(){return pa().memoizedState}function sie(e,t,n){var r=gl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sF(e))lF(t,n);else if(n=WN(e,t,n,r),n!==null){var i=Vi();Ua(n,e,r,i),cF(n,t,r)}}function lie(e,t,n){var r=gl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sF(e))lF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,qa(u,a)){var s=t.interleaved;s===null?(i.next=i,O4(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=WN(e,t,i,r),n!==null&&(i=Vi(),Ua(n,e,r,i),cF(n,t,r))}}function sF(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function lF(e,t){i0=l1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}var c1={readContext:ha,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},cie={readContext:ha,useCallback:function(e,t){return su().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:nT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Py(4194308,4,nF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Py(4194308,4,e,t)},useInsertionEffect:function(e,t){return Py(4,2,e,t)},useMemo:function(e,t){var n=su();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=su();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=sie.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=su();return e={current:e},t.memoizedState=e},useState:tT,useDebugValue:N4,useDeferredValue:function(e){return su().memoizedState=e},useTransition:function(){var e=tT(!1),t=e[0];return e=uie.bind(null,e[1]),su().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=su();if(ir){if(n===void 0)throw Error(Ve(407));n=n()}else{if(n=t(),ni===null)throw Error(Ve(349));Dc&30||GN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,nT(ZN.bind(null,r,o,e),[e]),r.flags|=2048,I0(9,YN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=su(),t=ni.identifierPrefix;if(ir){var n=es,r=Ju;n=(r&~(1<<32-za(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=D0++,0")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{h_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wp(e):""}function Une(e){switch(e.tag){case 5:return Wp(e.type);case 16:return Wp("Lazy");case 13:return Wp("Suspense");case 19:return Wp("SuspenseList");case 0:case 2:case 15:return e=p_(e.type,!1),e;case 11:return e=p_(e.type.render,!1),e;case 1:return e=p_(e.type,!0),e;default:return""}}function _3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xf:return"Fragment";case Zf:return"Portal";case b3:return"Profiler";case s4:return"StrictMode";case x3:return"Suspense";case w3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HI:return(e.displayName||"Context")+".Consumer";case VI:return(e._context.displayName||"Context")+".Provider";case l4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:_3(e.type)||"Memo";case qs:t=e._payload,e=e._init;try{return _3(e(t))}catch{}}return null}function Wne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _3(t);case 8:return t===s4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vne(e){var t=KI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Em(e){e._valueTracker||(e._valueTracker=Vne(e))}function GI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=KI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ky(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _k(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function YI(e,t){t=t.checked,t!=null&&u4(e,"checked",t,!1)}function C3(e,t){YI(e,t);var n=xl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?E3(e,t.type,n):t.hasOwnProperty("defaultValue")&&E3(e,t.type,xl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function E3(e,t,n){(t!=="number"||Ky(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vp=Array.isArray;function dd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Am.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var e0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hne=["Webkit","ms","Moz","O"];Object.keys(e0).forEach(function(e){Hne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),e0[t]=e0[e]})});function JI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||e0.hasOwnProperty(e)&&e0[e]?(""+t).trim():t+"px"}function eN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=JI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qne=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function O3(e,t){if(t){if(qne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ve(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ve(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ve(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ve(62))}}function k3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var T3=null;function f4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var M3=null,hd=null,pd=null;function Ak(e){if(e=tg(e)){if(typeof M3!="function")throw Error(Ve(280));var t=e.stateNode;t&&(t=dx(t),M3(e.stateNode,e.type,t))}}function tN(e){hd?pd?pd.push(e):pd=[e]:hd=e}function nN(){if(hd){var e=hd,t=pd;if(pd=hd=null,Ak(e),t)for(e=0;e>>=0,e===0?32:31-(rre(e)/ire|0)|0}var Pm=64,Om=4194304;function Hp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xy(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=Hp(u):(o&=a,o!==0&&(r=Hp(o)))}else a=n&~i,a!==0?r=Hp(a):o!==0&&(r=Hp(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Jv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-za(t),e[t]=n}function sre(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=n0),Ik=" ",Nk=!1;function _N(e,t){switch(e){case"keyup":return Nre.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qf=!1;function Lre(e,t){switch(e){case"compositionend":return SN(t);case"keypress":return t.which!==32?null:(Nk=!0,Ik);case"textInput":return e=t.data,e===Ik&&Nk?null:e;default:return null}}function jre(e,t){if(Qf)return e==="compositionend"||!b4&&_N(e,t)?(e=xN(),Ey=g4=tl=null,Qf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Bk(n)}}function PN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ON(){for(var e=window,t=Ky();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ky(e.document)}return t}function x4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Gre(e){var t=ON(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&PN(n.ownerDocument.documentElement,n)){if(r!==null&&x4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=zk(n,o);var a=zk(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jf=null,F3=null,i0=null,L3=!1;function Uk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;L3||Jf==null||Jf!==Ky(r)||(r=Jf,"selectionStart"in r&&x4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),i0&&O0(i0,r)||(i0=r,r=e1(F3,"onSelect"),0nd||(e.current=V3[nd],V3[nd]=null,nd--)}function Wn(e,t){nd++,V3[nd]=e.current,e.current=t}var wl={},Di=$l(wl),uo=$l(!1),Mc=wl;function Dd(e,t){var n=e.type.contextTypes;if(!n)return wl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function so(e){return e=e.childContextTypes,e!=null}function n1(){tr(uo),tr(Di)}function Yk(e,t,n){if(Di.current!==wl)throw Error(Ve(168));Wn(Di,t),Wn(uo,n)}function FN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ve(108,Wne(e)||"Unknown",i));return hr({},n,r)}function r1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wl,Mc=Di.current,Wn(Di,e),Wn(uo,uo.current),!0}function Zk(e,t,n){var r=e.stateNode;if(!r)throw Error(Ve(169));n?(e=FN(e,t,Mc),r.__reactInternalMemoizedMergedChildContext=e,tr(uo),tr(Di),Wn(Di,e)):tr(uo),Wn(uo,n)}var Xu=null,hx=!1,O_=!1;function LN(e){Xu===null?Xu=[e]:Xu.push(e)}function aie(e){hx=!0,LN(e)}function Il(){if(!O_&&Xu!==null){O_=!0;var e=0,t=Mn;try{var n=Xu;for(Mn=1;e>=a,i-=a,Ju=1<<32-za(t)+i|n<M?(F=T,T=null):F=T.sibling;var U=h(w,T,S[M],A);if(U===null){T===null&&(T=F);break}e&&T&&U.alternate===null&&t(w,T),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U,T=F}if(M===S.length)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;MM?(F=T,T=null):F=T.sibling;var H=h(w,T,U.value,A);if(H===null){T===null&&(T=F);break}e&&T&&H.alternate===null&&t(w,T),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,T=F}if(U.done)return n(w,T),ir&&rc(w,M),E;if(T===null){for(;!U.done;M++,U=S.next())U=d(w,U.value,A),U!==null&&(x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return ir&&rc(w,M),E}for(T=r(w,T);!U.done;M++,U=S.next())U=v(T,w,M,U.value,A),U!==null&&(e&&U.alternate!==null&&T.delete(U.key===null?M:U.key),x=o(U,x,M),C===null?E=U:C.sibling=U,C=U);return e&&T.forEach(function(W){return t(w,W)}),ir&&rc(w,M),E}function b(w,x,S,A){if(typeof S=="object"&&S!==null&&S.type===Xf&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Cm:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===Xf){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===qs&&Jk(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=yp(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===Xf?(x=Ec(S.props.children,w.mode,A,S.key),x.return=w,w=x):(A=Dy(S.type,S.key,S.props,null,w.mode,A),A.ref=yp(w,x,S),A.return=w,w=A)}return a(w);case Zf:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=N_(S,w.mode,A),x.return=w,w=x}return a(w);case qs:return C=S._init,b(w,x,C(S._payload),A)}if(Vp(S))return g(w,x,S,A);if(hp(S))return m(w,x,S,A);Im(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=I_(S,w.mode,A),x.return=w,w=x),a(w)):n(w,x)}return b}var Id=UN(!0),WN=UN(!1),a1=$l(null),u1=null,od=null,C4=null;function E4(){C4=od=u1=null}function A4(e){var t=a1.current;tr(a1),e._currentValue=t}function K3(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gd(e,t){u1=e,C4=od=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(io=!0),e.firstContext=null)}function ha(e){var t=e._currentValue;if(C4!==e)if(e={context:e,memoizedValue:t,next:null},od===null){if(u1===null)throw Error(Ve(308));od=e,u1.dependencies={lanes:0,firstContext:e}}else od=od.next=e;return t}var pc=null;function P4(e){pc===null?pc=[e]:pc.push(e)}function VN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,P4(t)):(n.next=i.next,i.next=n),t.interleaved=n,ds(e,r)}function ds(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ks=!1;function O4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function is(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,gn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ds(e,n)}return i=r.interleaved,i===null?(t.next=t,P4(r)):(t.next=i.next,i.next=t),r.interleaved=t,ds(e,n)}function Py(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}function eT(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function s1(e,t,n,r){var i=e.updateQueue;Ks=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var s=u,l=s.next;s.next=null,a===null?o=l:a.next=l,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==a&&(u===null?c.firstBaseUpdate=l:u.next=l,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=l=s=null,u=o;do{var h=u.lane,v=u.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,m=u;switch(h=t,v=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(v,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(v,d,h):g,h==null)break e;d=hr({},d,h);break e;case 2:Ks=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[u]:h.push(u))}else v={eventTime:v,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(l=c=v,s=d):c=c.next=v,a|=h;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;h=u,u=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);$c|=a,e.lanes=a,e.memoizedState=d}}function tT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=T_.transition;T_.transition={};try{e(!1),t()}finally{Mn=n,T_.transition=r}}function sF(){return pa().memoizedState}function cie(e,t,n){var r=gl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lF(e))cF(t,n);else if(n=VN(e,t,n,r),n!==null){var i=Vi();Ua(n,e,r,i),fF(n,t,r)}}function fie(e,t,n){var r=gl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lF(e))cF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,qa(u,a)){var s=t.interleaved;s===null?(i.next=i,P4(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=VN(e,t,i,r),n!==null&&(i=Vi(),Ua(n,e,r,i),fF(n,t,r))}}function lF(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function cF(e,t){o0=c1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}var f1={readContext:ha,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},die={readContext:ha,useCallback:function(e,t){return su().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:rT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ky(4194308,4,rF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ky(4194308,4,e,t)},useInsertionEffect:function(e,t){return ky(4,2,e,t)},useMemo:function(e,t){var n=su();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=su();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=cie.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=su();return e={current:e},t.memoizedState=e},useState:nT,useDebugValue:N4,useDeferredValue:function(e){return su().memoizedState=e},useTransition:function(){var e=nT(!1),t=e[0];return e=lie.bind(null,e[1]),su().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=su();if(ir){if(n===void 0)throw Error(Ve(407));n=n()}else{if(n=t(),ri===null)throw Error(Ve(349));Dc&30||YN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rT(XN.bind(null,r,o,e),[e]),r.flags|=2048,N0(9,ZN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=su(),t=ri.identifierPrefix;if(ir){var n=es,r=Ju;n=(r&~(1<<32-za(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$0++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[lu]=t,e[T0]=r,xF(e,t,!1,!1),t.stateNode=e;e:{switch(a=k3(n,r),n){case"dialog":Qn("cancel",e),Qn("close",e),i=r;break;case"iframe":case"object":case"embed":Qn("load",e),i=r;break;case"video":case"audio":for(i=0;iLd&&(t.flags|=128,r=!0,yp(o,!1),t.lanes=4194304)}else{if(!r)if(e=s1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Ld&&n!==1073741824&&(t.flags|=128,r=!0,yp(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=cr.current,Wn(cr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return U4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oo&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(Ve(156,t.tag))}function yie(e,t){switch(_4(t),t.tag){case 1:return so(t.type)&&t1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nd(),tr(uo),tr(Di),M4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return T4(t),null;case 13:if(tr(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ve(340));$d()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tr(cr),null;case 4:return Nd(),null;case 10:return A4(t.type._context),null;case 22:case 23:return U4(),null;case 24:return null;default:return null}}var Nm=!1,Pi=!1,bie=typeof WeakSet=="function"?WeakSet:Set,at=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vr(e,t,r)}else n.current=null}function nC(e,t,n){try{n()}catch(r){vr(e,t,r)}}var hT=!1;function xie(e,t){if(j3=Xy,e=ON(),x4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,l=0,c=0,d=e,h=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(v=d.firstChild)!==null;)h=d,d=v;for(;;){if(d===e)break t;if(h===n&&++l===i&&(u=a),h===o&&++c===r&&(s=a),(v=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(B3={focusedElem:e,selectionRange:n},Xy=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,b=g.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:ka(t.type,m),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(A){vr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return g=hT,hT=!1,g}function o0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&nC(t,n,o)}i=i.next}while(i!==r)}}function vx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function SF(e){var t=e.alternate;t!==null&&(e.alternate=null,SF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lu],delete t[T0],delete t[W3],delete t[nie],delete t[rie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CF(e){return e.tag===5||e.tag===3||e.tag===4}function pT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function iC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=e1));else if(r!==4&&(e=e.child,e!==null))for(iC(e,t,n),e=e.sibling;e!==null;)iC(e,t,n),e=e.sibling}function oC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oC(e,t,n),e=e.sibling;e!==null;)oC(e,t,n),e=e.sibling}var hi=null,Ta=!1;function js(e,t,n){for(n=n.child;n!==null;)EF(e,t,n),n=n.sibling}function EF(e,t,n){if(bu&&typeof bu.onCommitFiberUnmount=="function")try{bu.onCommitFiberUnmount(ux,n)}catch{}switch(n.tag){case 5:Pi||ad(n,t);case 6:var r=hi,i=Ta;hi=null,js(e,t,n),hi=r,Ta=i,hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?O_(e.parentNode,n):e.nodeType===1&&O_(e,n),E0(e)):O_(hi,n.stateNode));break;case 4:r=hi,i=Ta,hi=n.stateNode.containerInfo,Ta=!0,js(e,t,n),hi=r,Ta=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&nC(n,t,a),i=i.next}while(i!==r)}js(e,t,n);break;case 1:if(!Pi&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){vr(n,t,u)}js(e,t,n);break;case 21:js(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,js(e,t,n),Pi=r):js(e,t,n);break;default:js(e,t,n)}}function vT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bie),t.forEach(function(r){var i=kie.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Aa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_ie(r/1960))-r,10e?16:e,nl===null)var r=!1;else{if(e=nl,nl=null,h1=0,gn&6)throw Error(Ve(331));var i=gn;for(gn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sCr()-B4?Cc(e,0):j4|=n),lo(e,t)}function DF(e,t){t===0&&(e.mode&1?(t=Om,Om<<=1,!(Om&130023424)&&(Om=4194304)):t=1);var n=Vi();e=ds(e,t),e!==null&&(Qv(e,t,n),lo(e,n))}function Pie(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),DF(e,n)}function kie(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ve(314))}r!==null&&r.delete(t),DF(e,n)}var $F;$F=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||uo.current)io=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return io=!1,gie(e,t,n);io=!!(e.flags&131072)}else io=!1,ir&&t.flags&1048576&&LN(t,i1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ky(e,t),e=t.pendingProps;var i=Dd(t,Di.current);gd(t,n),i=D4(null,t,r,e,i,n);var o=$4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,so(r)?(o=!0,n1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,P4(t),i.updater=px,t.stateNode=i,i._reactInternals=t,Y3(t,r,e,n),t=Q3(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&w4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ky(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Mie(r),e=ka(r,e),i){case 0:t=X3(null,t,r,e,n);break e;case 1:t=cT(null,t,r,e,n);break e;case 11:t=sT(null,t,r,e,n);break e;case 14:t=lT(null,t,r,ka(r.type,e),n);break e}throw Error(Ve(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),X3(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),cT(e,t,r,i,n);case 3:e:{if(mF(t),e===null)throw Error(Ve(387));r=t.pendingProps,o=t.memoizedState,i=o.element,VN(e,t),u1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fd(Error(Ve(423)),t),t=fT(e,t,r,n,i);break e}else if(r!==i){i=Fd(Error(Ve(424)),t),t=fT(e,t,r,n,i);break e}else for(Ro=hl(t.stateNode.containerInfo.firstChild),Do=t,ir=!0,$a=null,n=UN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($d(),r===i){t=hs(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return HN(t),e===null&&q3(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,z3(r,i)?a=null:o!==null&&z3(r,o)&&(t.flags|=32),gF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&q3(t),null;case 13:return yF(e,t,n);case 4:return k4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Id(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),sT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(o1,r._currentValue),r._currentValue=a,o!==null)if(qa(o.value,a)){if(o.children===i.children&&!uo.current){t=hs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=is(-1,n&-n),s.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),K3(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ve(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),K3(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gd(t,n),i=ha(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=ka(r,t.pendingProps),i=ka(r.type,i),lT(e,t,r,i,n);case 15:return pF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),ky(e,t),t.tag=1,so(r)?(e=!0,n1(t)):e=!1,gd(t,n),fF(t,r,i),Y3(t,r,i,n),Q3(null,t,r,!0,e,n);case 19:return bF(e,t,n);case 22:return vF(e,t,n)}throw Error(Ve(156,t.tag))};function IF(e,t){return sN(e,t)}function Tie(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sa(e,t,n,r){return new Tie(e,t,n,r)}function V4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mie(e){if(typeof e=="function")return V4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l4)return 11;if(e===c4)return 14}return 2}function ml(e,t){var n=e.alternate;return n===null?(n=sa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ry(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xf:return Ec(n.children,i,o,t);case s4:a=8,i|=8;break;case b3:return e=sa(12,n,t,i|2),e.elementType=b3,e.lanes=o,e;case x3:return e=sa(13,n,t,i),e.elementType=x3,e.lanes=o,e;case w3:return e=sa(19,n,t,i),e.elementType=w3,e.lanes=o,e;case HI:return mx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case WI:a=10;break e;case VI:a=9;break e;case l4:a=11;break e;case c4:a=14;break e;case qs:a=16,r=null;break e}throw Error(Ve(130,e==null?e:typeof e,""))}return t=sa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ec(e,t,n,r){return e=sa(7,e,r,t),e.lanes=n,e}function mx(e,t,n,r){return e=sa(22,e,r,t),e.elementType=HI,e.lanes=n,e.stateNode={isHidden:!1},e}function I_(e,t,n){return e=sa(6,e,null,t),e.lanes=n,e}function N_(e,t,n){return t=sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rie(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=g_(0),this.expirationTimes=g_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H4(e,t,n,r,i,o,a,u,s){return e=new Rie(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=sa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},P4(o),e}function Die(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jF)}catch(e){console.error(e)}}jF(),jI.exports=Wo;var Ss=jI.exports;const _x=On(Ss),Fie=OI({__proto__:null,default:_x},[Ss]);var ST=Ss;mk.createRoot=ST.createRoot,mk.hydrateRoot=ST.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function D_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Z3(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var vie=typeof WeakMap=="function"?WeakMap:Map;function hF(e,t,n){n=is(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){h1||(h1=!0,aC=r),Z3(e,t)},n}function pF(e,t,n){n=is(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Z3(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Z3(e,t),typeof r!="function"&&(vl===null?vl=new Set([this]):vl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function aT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new vie;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kie.bind(null,e,t,n),t.then(e,e))}function uT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sT(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=is(-1,1),t.tag=2,pl(n,t,1))),n.lanes|=1),e)}var gie=_s.ReactCurrentOwner,io=!1;function Bi(e,t,n,r){t.child=e===null?WN(t,null,n,r):Id(t,e.child,n,r)}function lT(e,t,n,r,i){n=n.render;var o=t.ref;return gd(t,i),r=D4(e,t,n,r,o,i),n=$4(),e!==null&&!io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hs(e,t,i)):(ir&&n&&w4(t),t.flags|=1,Bi(e,t,r,i),t.child)}function cT(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!V4(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,vF(e,t,o,r,i)):(e=Dy(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:O0,n(a,r)&&e.ref===t.ref)return hs(e,t,i)}return t.flags|=1,e=ml(o,r),e.ref=t.ref,e.return=t,t.child=e}function vF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(O0(o,r)&&e.ref===t.ref)if(io=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(io=!0);else return t.lanes=e.lanes,hs(e,t,i)}return X3(e,t,n,r,i)}function gF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wn(ud,Po),Po|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Wn(ud,Po),Po|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Wn(ud,Po),Po|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Wn(ud,Po),Po|=r;return Bi(e,t,i,n),t.child}function mF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function X3(e,t,n,r,i){var o=so(n)?Mc:Di.current;return o=Dd(t,o),gd(t,i),n=D4(e,t,n,r,o,i),r=$4(),e!==null&&!io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hs(e,t,i)):(ir&&r&&w4(t),t.flags|=1,Bi(e,t,n,i),t.child)}function fT(e,t,n,r,i){if(so(n)){var o=!0;r1(t)}else o=!1;if(gd(t,i),t.stateNode===null)Ty(e,t),dF(t,n,r),Y3(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=ha(l):(l=so(n)?Mc:Di.current,l=Dd(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==l)&&oT(t,a,r,l),Ks=!1;var h=t.memoizedState;a.state=h,s1(t,r,a,i),s=t.memoizedState,u!==r||h!==s||uo.current||Ks?(typeof c=="function"&&(G3(t,n,c,r),s=t.memoizedState),(u=Ks||iT(t,n,u,r,h,s,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=l,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,HN(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:ka(t.type,u),a.props=l,d=t.pendingProps,h=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=ha(s):(s=so(n)?Mc:Di.current,s=Dd(t,s));var v=n.getDerivedStateFromProps;(c=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==d||h!==s)&&oT(t,a,r,s),Ks=!1,h=t.memoizedState,a.state=h,s1(t,r,a,i);var g=t.memoizedState;u!==d||h!==g||uo.current||Ks?(typeof v=="function"&&(G3(t,n,v,r),g=t.memoizedState),(l=Ks||iT(t,n,l,r,h,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=l):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Q3(e,t,n,r,o,i)}function Q3(e,t,n,r,i,o){mF(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Zk(t,n,!1),hs(e,t,o);r=t.stateNode,gie.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Id(t,e.child,null,o),t.child=Id(t,null,u,o)):Bi(e,t,u,o),t.memoizedState=r.state,i&&Zk(t,n,!0),t.child}function yF(e){var t=e.stateNode;t.pendingContext?Yk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yk(e,t.context,!1),k4(e,t.containerInfo)}function dT(e,t,n,r,i){return $d(),S4(i),t.flags|=256,Bi(e,t,n,r),t.child}var J3={dehydrated:null,treeContext:null,retryLane:0};function eC(e){return{baseLanes:e,cachePool:null,transitions:null}}function bF(e,t,n){var r=t.pendingProps,i=cr.current,o=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Wn(cr,i&1),e===null)return q3(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=yx(a,r,0,null),e=Ec(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=eC(n),t.memoizedState=J3,e):F4(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return mie(e,t,a,r,u,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,u=i.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ml(i,s),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?o=ml(u,o):(o=Ec(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?eC(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=J3,r}return o=e.child,e=o.sibling,r=ml(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function F4(e,t){return t=yx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Nm(e,t,n,r){return r!==null&&S4(r),Id(t,e.child,null,n),e=F4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mie(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=D_(Error(Ve(422))),Nm(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=yx({mode:"visible",children:r.children},i,0,null),o=Ec(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Id(t,e.child,null,a),t.child.memoizedState=eC(a),t.memoizedState=J3,o);if(!(t.mode&1))return Nm(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(Ve(419)),r=D_(o,r,void 0),Nm(e,t,a,r)}if(u=(a&e.childLanes)!==0,io||u){if(r=ri,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ds(e,i),Ua(r,e,i,-1))}return W4(),r=D_(Error(Ve(421))),Nm(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Tie.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ro=hl(i.nextSibling),Do=t,ir=!0,$a=null,e!==null&&(oa[aa++]=Ju,oa[aa++]=es,oa[aa++]=Rc,Ju=e.id,es=e.overflow,Rc=t),t=F4(t,r.children),t.flags|=4096,t)}function hT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),K3(e.return,t,n)}function $_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function xF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Bi(e,t,r.children,n),r=cr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hT(e,n,t);else if(e.tag===19)hT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Wn(cr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&l1(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&l1(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$_(t,!0,n,null,o);break;case"together":$_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ty(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$c|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ve(153));if(t.child!==null){for(e=t.child,n=ml(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ml(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yie(e,t,n){switch(t.tag){case 3:yF(t),$d();break;case 5:qN(t);break;case 1:so(t.type)&&r1(t);break;case 4:k4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Wn(a1,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Wn(cr,cr.current&1),t.flags|=128,null):n&t.child.childLanes?bF(e,t,n):(Wn(cr,cr.current&1),e=hs(e,t,n),e!==null?e.sibling:null);Wn(cr,cr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return xF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Wn(cr,cr.current),r)break;return null;case 22:case 23:return t.lanes=0,gF(e,t,n)}return hs(e,t,n)}var wF,tC,_F,SF;wF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};tC=function(){};_F=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vc(xu.current);var o=null;switch(n){case"input":i=S3(e,i),r=S3(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=A3(e,i),r=A3(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=t1)}O3(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var u=i[l];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(w0.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var s=r[l];if(u=i?.[l],r.hasOwnProperty(l)&&s!==u&&(s!=null||u!=null))if(l==="style")if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(o||(o=[]),o.push(l,n)),n=s;else l==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(o=o||[]).push(l,s)):l==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(l,""+s):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(w0.hasOwnProperty(l)?(s!=null&&l==="onScroll"&&Qn("scroll",e),o||u===s||(o=[])):(o=o||[]).push(l,s))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};SF=function(e,t,n,r){n!==r&&(t.flags|=4)};function bp(e,t){if(!ir)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ci(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bie(e,t,n){var r=t.pendingProps;switch(_4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ci(t),null;case 1:return so(t.type)&&n1(),Ci(t),null;case 3:return r=t.stateNode,Nd(),tr(uo),tr(Di),M4(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($m(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$a!==null&&(lC($a),$a=null))),tC(e,t),Ci(t),null;case 5:T4(t);var i=vc(D0.current);if(n=t.type,e!==null&&t.stateNode!=null)_F(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ve(166));return Ci(t),null}if(e=vc(xu.current),$m(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[lu]=t,r[M0]=o,e=(t.mode&1)!==0,n){case"dialog":Qn("cancel",r),Qn("close",r);break;case"iframe":case"object":case"embed":Qn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[lu]=t,e[M0]=r,wF(e,t,!1,!1),t.stateNode=e;e:{switch(a=k3(n,r),n){case"dialog":Qn("cancel",e),Qn("close",e),i=r;break;case"iframe":case"object":case"embed":Qn("load",e),i=r;break;case"video":case"audio":for(i=0;iLd&&(t.flags|=128,r=!0,bp(o,!1),t.lanes=4194304)}else{if(!r)if(e=l1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Ld&&n!==1073741824&&(t.flags|=128,r=!0,bp(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=cr.current,Wn(cr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return U4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Po&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(Ve(156,t.tag))}function xie(e,t){switch(_4(t),t.tag){case 1:return so(t.type)&&n1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nd(),tr(uo),tr(Di),M4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return T4(t),null;case 13:if(tr(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ve(340));$d()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tr(cr),null;case 4:return Nd(),null;case 10:return A4(t.type._context),null;case 22:case 23:return U4(),null;case 24:return null;default:return null}}var Fm=!1,Oi=!1,wie=typeof WeakSet=="function"?WeakSet:Set,at=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vr(e,t,r)}else n.current=null}function nC(e,t,n){try{n()}catch(r){vr(e,t,r)}}var pT=!1;function _ie(e,t){if(j3=Qy,e=ON(),x4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,l=0,c=0,d=e,h=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(v=d.firstChild)!==null;)h=d,d=v;for(;;){if(d===e)break t;if(h===n&&++l===i&&(u=a),h===o&&++c===r&&(s=a),(v=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(B3={focusedElem:e,selectionRange:n},Qy=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,b=g.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:ka(t.type,m),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ve(163))}}catch(A){vr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return g=pT,pT=!1,g}function a0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&nC(t,n,o)}i=i.next}while(i!==r)}}function gx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function CF(e){var t=e.alternate;t!==null&&(e.alternate=null,CF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lu],delete t[M0],delete t[W3],delete t[iie],delete t[oie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function EF(e){return e.tag===5||e.tag===3||e.tag===4}function vT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||EF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function iC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=t1));else if(r!==4&&(e=e.child,e!==null))for(iC(e,t,n),e=e.sibling;e!==null;)iC(e,t,n),e=e.sibling}function oC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oC(e,t,n),e=e.sibling;e!==null;)oC(e,t,n),e=e.sibling}var hi=null,Ta=!1;function js(e,t,n){for(n=n.child;n!==null;)AF(e,t,n),n=n.sibling}function AF(e,t,n){if(bu&&typeof bu.onCommitFiberUnmount=="function")try{bu.onCommitFiberUnmount(sx,n)}catch{}switch(n.tag){case 5:Oi||ad(n,t);case 6:var r=hi,i=Ta;hi=null,js(e,t,n),hi=r,Ta=i,hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ta?(e=hi,n=n.stateNode,e.nodeType===8?P_(e.parentNode,n):e.nodeType===1&&P_(e,n),A0(e)):P_(hi,n.stateNode));break;case 4:r=hi,i=Ta,hi=n.stateNode.containerInfo,Ta=!0,js(e,t,n),hi=r,Ta=i;break;case 0:case 11:case 14:case 15:if(!Oi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&nC(n,t,a),i=i.next}while(i!==r)}js(e,t,n);break;case 1:if(!Oi&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){vr(n,t,u)}js(e,t,n);break;case 21:js(e,t,n);break;case 22:n.mode&1?(Oi=(r=Oi)||n.memoizedState!==null,js(e,t,n),Oi=r):js(e,t,n);break;default:js(e,t,n)}}function gT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wie),t.forEach(function(r){var i=Mie.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Aa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cie(r/1960))-r,10e?16:e,nl===null)var r=!1;else{if(e=nl,nl=null,p1=0,gn&6)throw Error(Ve(331));var i=gn;for(gn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sCr()-B4?Cc(e,0):j4|=n),lo(e,t)}function $F(e,t){t===0&&(e.mode&1?(t=Om,Om<<=1,!(Om&130023424)&&(Om=4194304)):t=1);var n=Vi();e=ds(e,t),e!==null&&(Jv(e,t,n),lo(e,n))}function Tie(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$F(e,n)}function Mie(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ve(314))}r!==null&&r.delete(t),$F(e,n)}var IF;IF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||uo.current)io=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return io=!1,yie(e,t,n);io=!!(e.flags&131072)}else io=!1,ir&&t.flags&1048576&&jN(t,o1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ty(e,t),e=t.pendingProps;var i=Dd(t,Di.current);gd(t,n),i=D4(null,t,r,e,i,n);var o=$4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,so(r)?(o=!0,r1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,O4(t),i.updater=vx,t.stateNode=i,i._reactInternals=t,Y3(t,r,e,n),t=Q3(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&w4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ty(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Die(r),e=ka(r,e),i){case 0:t=X3(null,t,r,e,n);break e;case 1:t=fT(null,t,r,e,n);break e;case 11:t=lT(null,t,r,e,n);break e;case 14:t=cT(null,t,r,ka(r.type,e),n);break e}throw Error(Ve(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),X3(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),fT(e,t,r,i,n);case 3:e:{if(yF(t),e===null)throw Error(Ve(387));r=t.pendingProps,o=t.memoizedState,i=o.element,HN(e,t),s1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fd(Error(Ve(423)),t),t=dT(e,t,r,n,i);break e}else if(r!==i){i=Fd(Error(Ve(424)),t),t=dT(e,t,r,n,i);break e}else for(Ro=hl(t.stateNode.containerInfo.firstChild),Do=t,ir=!0,$a=null,n=WN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($d(),r===i){t=hs(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return qN(t),e===null&&q3(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,z3(r,i)?a=null:o!==null&&z3(r,o)&&(t.flags|=32),mF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&q3(t),null;case 13:return bF(e,t,n);case 4:return k4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Id(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),lT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(a1,r._currentValue),r._currentValue=a,o!==null)if(qa(o.value,a)){if(o.children===i.children&&!uo.current){t=hs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=is(-1,n&-n),s.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),K3(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ve(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),K3(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gd(t,n),i=ha(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=ka(r,t.pendingProps),i=ka(r.type,i),cT(e,t,r,i,n);case 15:return vF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ka(r,i),Ty(e,t),t.tag=1,so(r)?(e=!0,r1(t)):e=!1,gd(t,n),dF(t,r,i),Y3(t,r,i,n),Q3(null,t,r,!0,e,n);case 19:return xF(e,t,n);case 22:return gF(e,t,n)}throw Error(Ve(156,t.tag))};function NF(e,t){return lN(e,t)}function Rie(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sa(e,t,n,r){return new Rie(e,t,n,r)}function V4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Die(e){if(typeof e=="function")return V4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l4)return 11;if(e===c4)return 14}return 2}function ml(e,t){var n=e.alternate;return n===null?(n=sa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xf:return Ec(n.children,i,o,t);case s4:a=8,i|=8;break;case b3:return e=sa(12,n,t,i|2),e.elementType=b3,e.lanes=o,e;case x3:return e=sa(13,n,t,i),e.elementType=x3,e.lanes=o,e;case w3:return e=sa(19,n,t,i),e.elementType=w3,e.lanes=o,e;case qI:return yx(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VI:a=10;break e;case HI:a=9;break e;case l4:a=11;break e;case c4:a=14;break e;case qs:a=16,r=null;break e}throw Error(Ve(130,e==null?e:typeof e,""))}return t=sa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ec(e,t,n,r){return e=sa(7,e,r,t),e.lanes=n,e}function yx(e,t,n,r){return e=sa(22,e,r,t),e.elementType=qI,e.lanes=n,e.stateNode={isHidden:!1},e}function I_(e,t,n){return e=sa(6,e,null,t),e.lanes=n,e}function N_(e,t,n){return t=sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $ie(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=g_(0),this.expirationTimes=g_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H4(e,t,n,r,i,o,a,u,s){return e=new $ie(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=sa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},O4(o),e}function Iie(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BF)}catch(e){console.error(e)}}BF(),BI.exports=Wo;var Ss=BI.exports;const Sx=Pn(Ss),jie=OI({__proto__:null,default:Sx},[Ss]);var CT=Ss;yk.createRoot=CT.createRoot,yk.hydrateRoot=CT.hydrateRoot;/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function rr(){return rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jie(){return Math.random().toString(36).substr(2,8)}function ET(e,t){return{usr:e.state,key:e.key,idx:t}}function F0(e,t,n,r){return n===void 0&&(n=null),rr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cs(t):t,{state:n,key:t&&t.key||r||jie()})}function Fc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bie(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u=kr.Pop,s=null,l=c();l==null&&(l=0,a.replaceState(rr({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function d(){u=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,s&&s({action:u,location:m.location,delta:w})}function h(b,w){u=kr.Push;let x=F0(m.location,b,w);n(x,b),l=c()+1;let S=ET(x,l),A=m.createHref(x);try{a.pushState(S,"",A)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(A)}o&&s&&s({action:u,location:m.location,delta:1})}function v(b,w){u=kr.Replace;let x=F0(m.location,b,w);n(x,b),l=c();let S=ET(x,l),A=m.createHref(x);a.replaceState(S,"",A),o&&s&&s({action:u,location:m.location,delta:0})}function g(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Fc(b);return x=x.replace(/ $/,"%20"),cn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let m={get action(){return u},get location(){return e(i,a)},listen(b){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(CT,d),s=b,()=>{i.removeEventListener(CT,d),s=null}},createHref(b){return t(i,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:v,go(b){return a.go(b)}};return m}var $n;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($n||($n={}));const zie=new Set(["lazy","caseSensitive","path","id","index","children"]);function Uie(e){return e.index===!0}function g1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],u=typeof i.id=="string"?i.id:a.join("-");if(cn(i.index!==!0||!i.children,"Cannot specify children on an index route"),cn(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Uie(i)){let s=rr({},i,t(i),{id:u});return r[u]=s,s}else{let s=rr({},i,t(i),{id:u,children:void 0});return r[u]=s,i.children&&(s.children=g1(i.children,t,a,r)),s}})}function fc(e,t,n){return n===void 0&&(n="/"),Dy(e,t,n,!1)}function Dy(e,t,n,r){let i=typeof t=="string"?Cs(t):t,o=Ch(i.pathname||"/",n);if(o==null)return null;let a=BF(e);Vie(a);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(cn(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let l=os([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(cn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),BF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Xie(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,a);else for(let s of zF(o.path))i(o,a,s)}),t}function zF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=zF(r.join("/")),u=[];return u.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Vie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qie(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Hie=/^:[\w-]+$/,qie=3,Kie=2,Gie=1,Yie=10,Zie=-2,AT=e=>e==="*";function Xie(e,t){let n=e.split("/"),r=n.length;return n.some(AT)&&(r+=Zie),t&&(r+=Kie),n.filter(i=>!AT(i)).reduce((i,o)=>i+(Hie.test(o)?qie:o===""?Gie:Yie),r)}function Qie(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Jie(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{let{paramName:h,isOptional:v}=c;if(h==="*"){let m=u[d]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const g=u[d];return v&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function eoe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function toe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ch(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function noe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cs(e):e;return{pathname:n?n.startsWith("/")?n:roe(n,t):t,search:ooe(r),hash:aoe(i)}}function roe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function F_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function UF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Y4(e,t){let n=UF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Z4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cs(e):(i=rr({},e),cn(!i.pathname||!i.pathname.includes("?"),F_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),F_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),F_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=noe(i,u),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}const os=e=>e.join("/").replace(/\/\/+/g,"/"),ioe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ooe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aoe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class m1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Sx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const WF=["post","put","patch","delete"],uoe=new Set(WF),soe=["get",...WF],loe=new Set(soe),coe=new Set([301,302,303,307,308]),foe=new Set([307,308]),L_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},doe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hoe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),VF="remix-router-transitions";function poe(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;cn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let oe=e.detectErrorBoundary;i=le=>({hasErrorBoundary:oe(le)})}else i=hoe;let o={},a=g1(e.routes,i,void 0,o),u,s=e.basename||"/",l=e.dataStrategy||yoe,c=e.patchRoutesOnNavigation,d=rr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,v=new Set,g=null,m=null,b=null,w=e.hydrationData!=null,x=fc(a,e.history.location,s),S=null;if(x==null&&!c){let oe=to(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=LT(a);x=le,S={[xe.id]:oe}}x&&!e.hydrationData&&Zr(x,a,e.history.location.pathname).active&&(x=null);let A;if(x)if(x.some(oe=>oe.route.lazy))A=!1;else if(!x.some(oe=>oe.route.loader))A=!0;else if(d.v7_partialHydration){let oe=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(k=>le[k.route.id]!==void 0);A=x.slice(0,xe+1).every(k=>!fC(k.route,oe,le))}else A=x.every(xe=>!fC(xe.route,oe,le))}else A=e.hydrationData!=null;else if(A=!1,x=[],d.v7_partialHydration){let oe=Zr(null,a,e.history.location.pathname);oe.active&&oe.matches&&(x=oe.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:A,navigation:L_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},T=kr.Pop,M=!1,F,U=!1,H=new Map,W=null,ie=!1,Z=!1,G=[],K=new Set,V=new Map,B=0,q=-1,Y=new Map,ue=new Set,Q=new Map,J=new Map,se=new Set,de=new Map,Se=new Map,ge;function Ze(){if(h=e.history.listen(oe=>{let{action:le,location:xe,delta:k}=oe;if(ge){ge(),ge=void 0;return}Nc(Se.size===0||k!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&k!=null){let $=new Promise(O=>{ge=O});e.history.go(k*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(k))},reset(){let O=new Map(C.blockers);O.set(D,xp),$e({blockers:O})}});return}return It(le,xe)}),n){Roe(t,H);let oe=()=>Doe(t,H);t.addEventListener("pagehide",oe),W=()=>t.removeEventListener("pagehide",oe)}return C.initialized||It(kr.Pop,C.location,{initialHydration:!0}),E}function Oe(){h&&h(),W&&W(),v.clear(),F&&F.abort(),C.fetchers.forEach((oe,le)=>br(le)),C.blockers.forEach((oe,le)=>go(le))}function Fe(oe){return v.add(oe),()=>v.delete(oe)}function $e(oe,le){le===void 0&&(le={}),C=rr({},C,oe);let xe=[],k=[];d.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(se.has($)?k.push($):xe.push($))}),[...v].forEach(D=>D(C,{deletedFetchers:k,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),d.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),k.forEach(D=>br(D)))}function be(oe,le,xe){var k,D;let{flushSync:$}=xe===void 0?{}:xe,O=C.actionData!=null&&C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&C.navigation.state==="loading"&&((k=oe.state)==null?void 0:k._isRedirect)!==!0,N;le.actionData?Object.keys(le.actionData).length>0?N=le.actionData:N=null:O?N=C.actionData:N=null;let ee=le.loaderData?NT(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,ne=C.blockers;ne.size>0&&(ne=new Map(ne),ne.forEach((Be,He)=>ne.set(He,xp)));let he=M===!0||C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&((D=oe.state)==null?void 0:D._isRedirect)!==!0;u&&(a=u,u=void 0),ie||T===kr.Pop||(T===kr.Push?e.history.push(oe,oe.state):T===kr.Replace&&e.history.replace(oe,oe.state));let Ce;if(T===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(oe.pathname)?Ce={currentLocation:C.location,nextLocation:oe}:H.has(oe.pathname)&&(Ce={currentLocation:oe,nextLocation:C.location})}else if(U){let Be=H.get(C.location.pathname);Be?Be.add(oe.pathname):(Be=new Set([oe.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:oe}}$e(rr({},le,{actionData:N,loaderData:ee,historyAction:T,location:oe,initialized:!0,navigation:L_,revalidation:"idle",restoreScrollPosition:ur(oe,le.matches||C.matches),preventScrollReset:he,blockers:ne}),{viewTransitionOpts:Ce,flushSync:$===!0}),T=kr.Pop,M=!1,U=!1,ie=!1,Z=!1,G=[]}async function yt(oe,le){if(typeof oe=="number"){e.history.go(oe);return}let xe=cC(C.location,C.matches,s,d.v7_prependBasename,oe,d.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:k,submission:D,error:$}=PT(d.v7_normalizeFormMethod,!1,xe,le),O=C.location,N=F0(C.location,k,le&&le.state);N=rr({},N,e.history.encodeLocation(N));let ee=le&&le.replace!=null?le.replace:void 0,ne=kr.Push;ee===!0?ne=kr.Replace:ee===!1||D!=null&&Ma(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(ne=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:O,nextLocation:N,historyAction:ne});if(Be){xi(Be,{state:"blocked",location:N,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),yt(oe,le)},reset(){let He=new Map(C.blockers);He.set(Be,xp),$e({blockers:He})}});return}return await It(ne,N,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(bn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){It(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}It(T||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function It(oe,le,xe){F&&F.abort(),F=null,T=oe,ie=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,U=(xe&&xe.enableViewTransition)===!0;let k=u||a,D=xe&&xe.overrideNavigation,$=fc(k,le,s),O=(xe&&xe.flushSync)===!0,N=Zr($,k,le.pathname);if(N.active&&N.matches&&($=N.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=wa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:O});return}if(C.initialized&&!Z&&Coe(C.location,le)&&!(xe&&xe.submission&&Ma(xe.submission.formMethod))){be(le,{matches:$},{flushSync:O});return}F=new AbortController;let ee=Df(e.history,le,F.signal,xe&&xe.submission),ne;if(xe&&xe.pendingError)ne=[dc($).route.id,{type:$n.error,error:xe.pendingError}];else if(xe&&xe.submission&&Ma(xe.submission.formMethod)){let ct=await mn(ee,le,xe.submission,$,N.active,{replace:xe.replace,flushSync:O});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(ko(rt)&&Sx(rt.error)&&rt.error.status===404){F=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,ne=ct.pendingActionResult,D=j_(le,xe.submission),O=!1,N.active=!1,ee=Df(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await en(ee,le,$,N.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,O,ne);he||(F=null,be(le,rr({matches:Ce||$},FT(ne),{loaderData:Be,errors:He})))}async function mn(oe,le,xe,k,D,$){$===void 0&&($={}),bn();let O=Toe(le,xe);if($e({navigation:O},{flushSync:$.flushSync===!0}),D){let ne=await mo(k,le.pathname,oe.signal);if(ne.type==="aborted")return{shortCircuited:!0};if(ne.type==="error"){let he=dc(ne.partialMatches).route.id;return{matches:ne.partialMatches,pendingActionResult:[he,{type:$n.error,error:ne.error}]}}else if(ne.matches)k=ne.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=wa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:$n.error,error:Ce}]}}}let N,ee=qp(k,le);if(!ee.route.action&&!ee.route.lazy)N={type:$n.error,error:to(405,{method:oe.method,pathname:le.pathname,routeId:ee.route.id})};else if(N=(await nt("action",C,oe,[ee],k,null))[ee.route.id],oe.signal.aborted)return{shortCircuited:!0};if(gc(N)){let ne;return $&&$.replace!=null?ne=$.replace:ne=DT(N.response.headers.get("Location"),new URL(oe.url),s)===C.location.pathname+C.location.search,await ke(oe,N,!0,{submission:xe,replace:ne}),{shortCircuited:!0}}if(rl(N))throw to(400,{type:"defer-action"});if(ko(N)){let ne=dc(k,ee.route.id);return($&&$.replace)!==!0&&(T=kr.Push),{matches:k,pendingActionResult:[ne.route.id,N]}}return{matches:k,pendingActionResult:[ee.route.id,N]}}async function en(oe,le,xe,k,D,$,O,N,ee,ne,he){let Ce=D||j_(le,$),Be=$||O||BT(Ce),He=!ie&&(!d.v7_partialHydration||!ee);if(k){if(He){let qe=re(he);$e(rr({navigation:Ce},qe!==void 0?{actionData:qe}:{}),{flushSync:ne})}let Le=await mo(xe,le.pathname,oe.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let qe=dc(Le.partialMatches).route.id;return{matches:Le.partialMatches,loaderData:{},errors:{[qe]:Le.error}}}else if(Le.matches)xe=Le.matches;else{let{error:qe,notFoundMatches:Ge,route:me}=wa(le.pathname);return{matches:Ge,loaderData:{},errors:{[me.id]:qe}}}}let ct=u||a,[Ne,rt]=TT(e.history,C,xe,Be,le,d.v7_partialHydration&&ee===!0,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,ct,s,he);if(_t(Le=>!(xe&&xe.some(qe=>qe.route.id===Le))||Ne&&Ne.some(qe=>qe.route.id===Le)),q=++B,Ne.length===0&&rt.length===0){let Le=bi();return be(le,rr({matches:xe,loaderData:{},errors:he&&ko(he[1])?{[he[0]]:he[1].error}:null},FT(he),Le?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ne}),{shortCircuited:!0}}if(He){let Le={};if(!k){Le.navigation=Ce;let qe=re(he);qe!==void 0&&(Le.actionData=qe)}rt.length>0&&(Le.fetchers=pe(rt)),$e(Le,{flushSync:ne})}rt.forEach(Le=>{ar(Le.key),Le.controller&&V.set(Le.key,Le.controller)});let bt=()=>rt.forEach(Le=>ar(Le.key));F&&F.signal.addEventListener("abort",bt);let{loaderResults:At,fetcherResults:vt}=await gt(C,xe,Ne,rt,oe);if(oe.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",bt),rt.forEach(Le=>V.delete(Le.key));let ht=jm(At);if(ht)return await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};if(ht=jm(vt),ht)return ue.add(ht.key),await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=IT(C,xe,At,he,rt,vt,de);de.forEach((Le,qe)=>{Le.subscribe(Ge=>{(Ge||Le.done)&&de.delete(qe)})}),d.v7_partialHydration&&ee&&C.errors&&(wt=rr({},C.errors,wt));let Je=bi(),st=Rr(q),Qe=Je||st||rt.length>0;return rr({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function re(oe){if(oe&&!ko(oe[1]))return{[oe[0]]:oe[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(oe){return oe.forEach(le=>{let xe=C.fetchers.get(le.key),k=wp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,k)}),new Map(C.fetchers)}function ye(oe,le,xe,k){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ar(oe);let D=(k&&k.flushSync)===!0,$=u||a,O=cC(C.location,C.matches,s,d.v7_prependBasename,xe,d.v7_relativeSplatPath,le,k?.relative),N=fc($,O,s),ee=Zr(N,$,O);if(ee.active&&ee.matches&&(N=ee.matches),!N){xn(oe,le,to(404,{pathname:O}),{flushSync:D});return}let{path:ne,submission:he,error:Ce}=PT(d.v7_normalizeFormMethod,!0,O,k);if(Ce){xn(oe,le,Ce,{flushSync:D});return}let Be=qp(N,ne),He=(k&&k.preventScrollReset)===!0;if(he&&Ma(he.formMethod)){Ue(oe,le,ne,Be,N,ee.active,D,He,he);return}Q.set(oe,{routeId:le,path:ne}),je(oe,le,ne,Be,N,ee.active,D,He,he)}async function Ue(oe,le,xe,k,D,$,O,N,ee){bn(),Q.delete(oe);function ne(ve){if(!ve.route.action&&!ve.route.lazy){let De=to(405,{method:ee.formMethod,pathname:xe,routeId:le});return xn(oe,le,De,{flushSync:O}),!0}return!1}if(!$&&ne(k))return;let he=C.fetchers.get(oe);Vt(oe,Moe(ee,he),{flushSync:O});let Ce=new AbortController,Be=Df(e.history,xe,Ce.signal,ee);if($){let ve=await mo(D,xe,Be.signal);if(ve.type==="aborted")return;if(ve.type==="error"){xn(oe,le,ve.error,{flushSync:O});return}else if(ve.matches){if(D=ve.matches,k=qp(D,xe),ne(k))return}else{xn(oe,le,to(404,{pathname:xe}),{flushSync:O});return}}V.set(oe,Ce);let He=B,Ne=(await nt("action",C,Be,[k],D,oe))[k.route.id];if(Be.signal.aborted){V.get(oe)===Ce&&V.delete(oe);return}if(d.v7_fetcherPersist&&se.has(oe)){if(gc(Ne)||ko(Ne)){Vt(oe,Ws(void 0));return}}else{if(gc(Ne))if(V.delete(oe),q>He){Vt(oe,Ws(void 0));return}else return ue.add(oe),Vt(oe,wp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:N});if(ko(Ne)){xn(oe,le,Ne.error);return}}if(rl(Ne))throw to(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Df(e.history,rt,Ce.signal),At=u||a,vt=C.navigation.state!=="idle"?fc(At,C.navigation.location,s):C.matches;cn(vt,"Didn't find any matches after fetcher action");let ht=++B;Y.set(oe,ht);let xt=wp(ee,Ne.data);C.fetchers.set(oe,xt);let[wt,Je]=TT(e.history,C,vt,ee,rt,!1,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,At,s,[k.route.id,Ne]);Je.filter(ve=>ve.key!==oe).forEach(ve=>{let De=ve.key,Pe=C.fetchers.get(De),Te=wp(void 0,Pe?Pe.data:void 0);C.fetchers.set(De,Te),ar(De),ve.controller&&V.set(De,ve.controller)}),$e({fetchers:new Map(C.fetchers)});let st=()=>Je.forEach(ve=>ar(ve.key));Ce.signal.addEventListener("abort",st);let{loaderResults:Qe,fetcherResults:Le}=await gt(C,vt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",st),Y.delete(oe),V.delete(oe),Je.forEach(ve=>V.delete(ve.key));let qe=jm(Qe);if(qe)return ke(bt,qe.result,!1,{preventScrollReset:N});if(qe=jm(Le),qe)return ue.add(qe.key),ke(bt,qe.result,!1,{preventScrollReset:N});let{loaderData:Ge,errors:me}=IT(C,vt,Qe,void 0,Je,Le,de);if(C.fetchers.has(oe)){let ve=Ws(Ne.data);C.fetchers.set(oe,ve)}Rr(ht),C.navigation.state==="loading"&&ht>q?(cn(T,"Expected pending action"),F&&F.abort(),be(C.navigation.location,{matches:vt,loaderData:Ge,errors:me,fetchers:new Map(C.fetchers)})):($e({errors:me,loaderData:NT(C.loaderData,Ge,vt,me),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(oe,le,xe,k,D,$,O,N,ee){let ne=C.fetchers.get(oe);Vt(oe,wp(ee,ne?ne.data:void 0),{flushSync:O});let he=new AbortController,Ce=Df(e.history,xe,he.signal);if($){let Ne=await mo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){xn(oe,le,Ne.error,{flushSync:O});return}else if(Ne.matches)D=Ne.matches,k=qp(D,xe);else{xn(oe,le,to(404,{pathname:xe}),{flushSync:O});return}}V.set(oe,he);let Be=B,ct=(await nt("loader",C,Ce,[k],D,oe))[k.route.id];if(rl(ct)&&(ct=await Q4(ct,Ce.signal,!0)||ct),V.get(oe)===he&&V.delete(oe),!Ce.signal.aborted){if(se.has(oe)){Vt(oe,Ws(void 0));return}if(gc(ct))if(q>Be){Vt(oe,Ws(void 0));return}else{ue.add(oe),await ke(Ce,ct,!1,{preventScrollReset:N});return}if(ko(ct)){xn(oe,le,ct.error);return}cn(!rl(ct),"Unhandled fetcher deferred data"),Vt(oe,Ws(ct.data))}}async function ke(oe,le,xe,k){let{submission:D,fetcherSubmission:$,preventScrollReset:O,replace:N}=k===void 0?{}:k;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");cn(ee,"Expected a Location header on the redirect Response"),ee=DT(ee,new URL(oe.url),s);let ne=F0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(X4.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Ch(rt.pathname,s)==null}if(Ne){N?t.location.replace(ee):t.location.assign(ee);return}}F=null;let he=N===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=BT(C.navigation));let ct=D||$;if(foe.has(le.response.status)&&ct&&Ma(ct.formMethod))await It(he,ne,{submission:rr({},ct,{formAction:ee}),preventScrollReset:O||M,enableViewTransition:xe?U:void 0});else{let Ne=j_(ne,D);await It(he,ne,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:O||M,enableViewTransition:xe?U:void 0})}}async function nt(oe,le,xe,k,D,$){let O,N={};try{O=await boe(l,oe,le,xe,k,D,$,o,i)}catch(ee){return k.forEach(ne=>{N[ne.route.id]={type:$n.error,error:ee}}),N}for(let[ee,ne]of Object.entries(O))if(Eoe(ne)){let he=ne.result;N[ee]={type:$n.redirect,response:_oe(he,xe,ee,D,s,d.v7_relativeSplatPath)}}else N[ee]=await woe(ne);return N}async function gt(oe,le,xe,k,D){let $=oe.matches,O=nt("loader",oe,D,xe,le,null),N=Promise.all(k.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",oe,Df(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:$n.error,error:to(404,{pathname:he.path})}})})),ee=await O,ne=(await N).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Poe(le,ee,D.signal,$,oe.loaderData),koe(le,ne,k)]),{loaderResults:ee,fetcherResults:ne}}function bn(){Z=!0,G.push(..._t()),Q.forEach((oe,le)=>{V.has(le)&&K.add(le),ar(le)})}function Vt(oe,le,xe){xe===void 0&&(xe={}),C.fetchers.set(oe,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function xn(oe,le,xe,k){k===void 0&&(k={});let D=dc(C.matches,le);br(oe),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function Ii(oe){return d.v7_fetcherPersist&&(J.set(oe,(J.get(oe)||0)+1),se.has(oe)&&se.delete(oe)),C.fetchers.get(oe)||doe}function br(oe){let le=C.fetchers.get(oe);V.has(oe)&&!(le&&le.state==="loading"&&Y.has(oe))&&ar(oe),Q.delete(oe),Y.delete(oe),ue.delete(oe),se.delete(oe),K.delete(oe),C.fetchers.delete(oe)}function yi(oe){if(d.v7_fetcherPersist){let le=(J.get(oe)||0)-1;le<=0?(J.delete(oe),se.add(oe)):J.set(oe,le)}else br(oe);$e({fetchers:new Map(C.fetchers)})}function ar(oe){let le=V.get(oe);le&&(le.abort(),V.delete(oe))}function ui(oe){for(let le of oe){let xe=Ii(le),k=Ws(xe.data);C.fetchers.set(le,k)}}function bi(){let oe=[],le=!1;for(let xe of ue){let k=C.fetchers.get(xe);cn(k,"Expected fetcher: "+xe),k.state==="loading"&&(ue.delete(xe),oe.push(xe),le=!0)}return ui(oe),le}function Rr(oe){let le=[];for(let[xe,k]of Y)if(k0}function Yi(oe,le){let xe=C.blockers.get(oe)||xp;return Se.get(oe)!==le&&Se.set(oe,le),xe}function go(oe){C.blockers.delete(oe),Se.delete(oe)}function xi(oe,le){let xe=C.blockers.get(oe)||xp;cn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let k=new Map(C.blockers);k.set(oe,le),$e({blockers:k})}function Dr(oe){let{currentLocation:le,nextLocation:xe,historyAction:k}=oe;if(Se.size===0)return;Se.size>1&&Nc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,O]=D[D.length-1],N=C.blockers.get($);if(!(N&&N.state==="proceeding")&&O({currentLocation:le,nextLocation:xe,historyAction:k}))return $}function wa(oe){let le=to(404,{pathname:oe}),xe=u||a,{matches:k,route:D}=LT(xe);return _t(),{notFoundMatches:k,route:D,error:le}}function _t(oe){let le=[];return de.forEach((xe,k)=>{(!oe||oe(k))&&(xe.cancel(),le.push(k),de.delete(k))}),le}function dn(oe,le,xe){if(g=oe,b=le,m=xe||null,!w&&C.navigation===L_){w=!0;let k=ur(C.location,C.matches);k!=null&&$e({restoreScrollPosition:k})}return()=>{g=null,b=null,m=null}}function wn(oe,le){return m&&m(oe,le.map(k=>Wie(k,C.loaderData)))||oe.key}function qn(oe,le){if(g&&b){let xe=wn(oe,le);g[xe]=b()}}function ur(oe,le){if(g){let xe=wn(oe,le),k=g[xe];if(typeof k=="number")return k}return null}function Zr(oe,le,xe){if(c)if(oe){if(Object.keys(oe[0].params).length>0)return{active:!0,matches:Dy(le,xe,s,!0)}}else return{active:!0,matches:Dy(le,xe,s,!0)||[]};return{active:!1,matches:null}}async function mo(oe,le,xe){if(!c)return{type:"success",matches:oe};let k=oe;for(;;){let D=u==null,$=u||a,O=o;try{await c({path:le,matches:k,patch:(ne,he)=>{xe.aborted||RT(ne,he,$,O,i)}})}catch(ne){return{type:"error",error:ne,partialMatches:k}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let N=fc($,le,s);if(N)return{type:"success",matches:N};let ee=Dy($,le,s,!0);if(!ee||k.length===ee.length&&k.every((ne,he)=>ne.route.id===ee[he].route.id))return{type:"success",matches:null};k=ee}}function ql(oe){o={},u=g1(oe,i,void 0,o)}function yf(oe,le){let xe=u==null;RT(oe,le,u||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return s},get future(){return d},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Fe,enableScrollRestoration:dn,navigate:yt,fetch:ye,revalidate:lt,createHref:oe=>e.history.createHref(oe),encodeLocation:oe=>e.history.encodeLocation(oe),getFetcher:Ii,deleteFetcher:yi,dispose:Oe,getBlocker:Yi,deleteBlocker:go,patchRoutes:yf,_internalFetchControllers:V,_internalActiveDeferreds:de,_internalSetRoutes:ql},E}function voe(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function cC(e,t,n,r,i,o,a,u){let s,l;if(a){s=[];for(let d of t)if(s.push(d),d.route.id===a){l=d;break}}else s=t,l=t[t.length-1];let c=Z4(i||".",Y4(s,o),Ch(e.pathname,n)||e.pathname,u==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let d=J4(c.search);if(l.route.index&&!d)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&d){let h=new URLSearchParams(c.search),v=h.getAll("index");h.delete("index"),v.filter(m=>m).forEach(m=>h.append("index",m));let g=h.toString();c.search=g?"?"+g:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:os([n,c.pathname])),Fc(c)}function PT(e,t,n,r){if(!r||!voe(r))return{path:n};if(r.formMethod&&!Ooe(r.formMethod))return{path:n,error:to(405,{method:r.formMethod})};let i=()=>({path:n,error:to(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),u=KF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ma(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,g)=>{let[m,b]=g;return""+v+m+"="+b+` -`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Ma(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}cn(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=dC(r.formData),l=r.formData;else if(r.body instanceof FormData)s=dC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=$T(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=$T(s)}catch{return i()}let c={formMethod:a,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ma(c.formMethod))return{path:n,submission:c};let d=Cs(n);return t&&d.search&&J4(d.search)&&s.append("index",""),d.search="?"+s,{path:Fc(d),submission:c}}function kT(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function TT(e,t,n,r,i,o,a,u,s,l,c,d,h,v,g,m){let b=m?ko(m[1])?m[1].error:m[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=kT(n,Object.keys(t.errors)[0],!0):m&&ko(m[1])&&(S=kT(n,m[0]));let A=m?m[1].statusCode:void 0,E=a&&A&&A>=400,C=S.filter((M,F)=>{let{route:U}=M;if(U.lazy)return!0;if(U.loader==null)return!1;if(o)return fC(U,t.loaderData,t.errors);if(goe(t.loaderData,t.matches[F],M)||s.some(ie=>ie===M.route.id))return!0;let H=t.matches[F],W=M;return MT(M,rr({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:W.params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||HF(H,W)}))}),T=[];return d.forEach((M,F)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(F))return;let U=fc(v,M.path,g);if(!U){T.push({key:F,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(F),W=qp(U,M.path),ie=!1;h.has(F)?ie=!1:l.has(F)?(l.delete(F),ie=!0):H&&H.state!=="idle"&&H.data===void 0?ie=u:ie=MT(W,rr({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u})),ie&&T.push({key:F,routeId:M.routeId,path:M.path,matches:U,match:W,controller:new AbortController})}),[C,T]}function fC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function goe(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function HF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function MT(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function RT(e,t,n,r,i){var o;let a;if(e){let l=r[e];cn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let u=t.filter(l=>!a.some(c=>qF(l,c))),s=g1(u,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...s)}function qF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>qF(n,o))}):!1}async function moe(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];cn(i,"No route found in manifest");let o={};for(let a in r){let s=i[a]!==void 0&&a!=="hasErrorBoundary";Nc(!s,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!zie.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,rr({},t(i),{lazy:void 0}))}async function yoe(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function boe(e,t,n,r,i,o,a,u,s,l){let c=o.map(v=>v.route.lazy?moe(v.route,s,u):void 0),d=o.map((v,g)=>{let m=c[g],b=i.some(x=>x.route.id===v.route.id);return rr({},v,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(v.route.lazy||v.route.loader)&&(b=!0),b?xoe(t,r,v,m,x,l):Promise.resolve({type:$n.data,result:void 0}))})}),h=await e({matches:d,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function xoe(e,t,n,r,i,o){let a,u,s=l=>{let c,d=new Promise((g,m)=>c=m);u=()=>c(),t.signal.addEventListener("abort",u);let h=g=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...g!==void 0?[g]:[]),v=(async()=>{try{return{type:"data",result:await(i?i(m=>h(m)):h())}}catch(g){return{type:"error",result:g}}})();return Promise.race([v,d])};try{let l=n.route[e];if(r)if(l){let c,[d]=await Promise.all([s(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=d}else if(await r,l=n.route[e],l)a=await s(l);else if(e==="action"){let c=new URL(t.url),d=c.pathname+c.search;throw to(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:$n.data,result:void 0};else if(l)a=await s(l);else{let c=new URL(t.url),d=c.pathname+c.search;throw to(404,{pathname:d})}cn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:$n.error,result:l}}finally{u&&t.signal.removeEventListener("abort",u)}return a}async function woe(e){let{result:t,type:n}=e;if(GF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:$n.error,error:c}}return n===$n.error?{type:$n.error,error:new m1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:$n.data,data:l,statusCode:t.status,headers:t.headers}}if(n===$n.error){if(jT(t)){var r;if(t.data instanceof Error){var i;return{type:$n.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new m1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:$n.error,error:t,statusCode:Sx(t)?t.status:void 0}}if(Aoe(t)){var o,a;return{type:$n.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(jT(t)){var u,s;return{type:$n.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:$n.data,data:t}}function _oe(e,t,n,r,i,o){let a=e.headers.get("Location");if(cn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!X4.test(a)){let u=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=cC(new URL(t.url),u,i,!0,a,o),e.headers.set("Location",a)}return e}function DT(e,t,n){if(X4.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Ch(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Df(e,t,n,r){let i=e.createURL(KF(t)).toString(),o={signal:n};if(r&&Ma(r.formMethod)){let{formMethod:a,formEncType:u}=r;o.method=a.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=dC(r.formData):o.body=r.formData}return new Request(i,o)}function dC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function $T(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Soe(e,t,n,r,i){let o={},a=null,u,s=!1,l={},c=n&&ko(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,v=t[h];if(cn(!gc(v),"Cannot handle redirect results in processLoaderData"),ko(v)){let g=v.error;c!==void 0&&(g=c,c=void 0),a=a||{};{let m=dc(e,h);a[m.route.id]==null&&(a[m.route.id]=g)}o[h]=void 0,s||(s=!0,u=Sx(v.error)?v.error.status:500),v.headers&&(l[h]=v.headers)}else rl(v)?(r.set(h,v.deferredData),o[h]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers)):(o[h]=v.data,v.statusCode&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:u||200,loaderHeaders:l}}function IT(e,t,n,r,i,o,a){let{loaderData:u,errors:s}=Soe(t,n,r,a);return i.forEach(l=>{let{key:c,match:d,controller:h}=l,v=o[c];if(cn(v,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(ko(v)){let g=dc(e.matches,d?.route.id);s&&s[g.route.id]||(s=rr({},s,{[g.route.id]:v.error})),e.fetchers.delete(c)}else if(gc(v))cn(!1,"Unhandled fetcher revalidation redirect");else if(rl(v))cn(!1,"Unhandled fetcher deferred data");else{let g=Ws(v.data);e.fetchers.set(c,g)}}),{loaderData:u,errors:s}}function NT(e,t,n,r){let i=rr({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function FT(e){return e?ko(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function dc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function LT(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function to(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,u="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(u="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(u="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",s='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new m1(e||500,u,new Error(s),!0)}function jm(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(gc(i))return{key:r,result:i}}}function KF(e){let t=typeof e=="string"?Cs(e):e;return Fc(rr({},t,{hash:""}))}function Coe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Eoe(e){return GF(e.result)&&coe.has(e.result.status)}function rl(e){return e.type===$n.deferred}function ko(e){return e.type===$n.error}function gc(e){return(e&&e.type)===$n.redirect}function jT(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Aoe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function GF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ooe(e){return loe.has(e.toLowerCase())}function Ma(e){return uoe.has(e.toLowerCase())}async function Poe(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===u);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),d=c!=null&&!HF(c,l)&&(i&&i[l.route.id])!==void 0;rl(s)&&d&&await Q4(s,n,!1).then(h=>{h&&(t[u]=h)})}}async function koe(e,t,n){for(let r=0;rl?.route.id===o)&&rl(u)&&(cn(a,"Expected an AbortController for revalidating fetcher deferred result"),await Q4(u,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function Q4(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:$n.data,data:e.deferredData.unwrappedData}}catch(i){return{type:$n.error,error:i}}return{type:$n.data,data:e.deferredData.data}}}function J4(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function qp(e,t){let n=typeof t=="string"?Cs(t).search:t.search;if(e[e.length-1].route.index&&J4(n||""))return e[e.length-1];let r=UF(e);return r[r.length-1]}function BT(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function j_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Toe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function wp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Moe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ws(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Roe(e,t){try{let n=e.sessionStorage.getItem(VF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Doe(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(VF,JSON.stringify(n))}catch(r){Nc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function rr(){return rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zie(){return Math.random().toString(36).substr(2,8)}function AT(e,t){return{usr:e.state,key:e.key,idx:t}}function L0(e,t,n,r){return n===void 0&&(n=null),rr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cs(t):t,{state:n,key:t&&t.key||r||zie()})}function Fc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Uie(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u=kr.Pop,s=null,l=c();l==null&&(l=0,a.replaceState(rr({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function d(){u=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,s&&s({action:u,location:m.location,delta:w})}function h(b,w){u=kr.Push;let x=L0(m.location,b,w);n(x,b),l=c()+1;let S=AT(x,l),A=m.createHref(x);try{a.pushState(S,"",A)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(A)}o&&s&&s({action:u,location:m.location,delta:1})}function v(b,w){u=kr.Replace;let x=L0(m.location,b,w);n(x,b),l=c();let S=AT(x,l),A=m.createHref(x);a.replaceState(S,"",A),o&&s&&s({action:u,location:m.location,delta:0})}function g(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Fc(b);return x=x.replace(/ $/,"%20"),cn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let m={get action(){return u},get location(){return e(i,a)},listen(b){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(ET,d),s=b,()=>{i.removeEventListener(ET,d),s=null}},createHref(b){return t(i,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:v,go(b){return a.go(b)}};return m}var $n;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($n||($n={}));const Wie=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vie(e){return e.index===!0}function m1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],u=typeof i.id=="string"?i.id:a.join("-");if(cn(i.index!==!0||!i.children,"Cannot specify children on an index route"),cn(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Vie(i)){let s=rr({},i,t(i),{id:u});return r[u]=s,s}else{let s=rr({},i,t(i),{id:u,children:void 0});return r[u]=s,i.children&&(s.children=m1(i.children,t,a,r)),s}})}function fc(e,t,n){return n===void 0&&(n="/"),$y(e,t,n,!1)}function $y(e,t,n,r){let i=typeof t=="string"?Cs(t):t,o=Ch(i.pathname||"/",n);if(o==null)return null;let a=zF(e);qie(a);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(cn(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let l=os([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(cn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),zF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Jie(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,a);else for(let s of UF(o.path))i(o,a,s)}),t}function UF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=UF(r.join("/")),u=[];return u.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function qie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kie=/^:[\w-]+$/,Gie=3,Yie=2,Zie=1,Xie=10,Qie=-2,PT=e=>e==="*";function Jie(e,t){let n=e.split("/"),r=n.length;return n.some(PT)&&(r+=Qie),t&&(r+=Yie),n.filter(i=>!PT(i)).reduce((i,o)=>i+(Kie.test(o)?Gie:o===""?Zie:Xie),r)}function eoe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function toe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{let{paramName:h,isOptional:v}=c;if(h==="*"){let m=u[d]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const g=u[d];return v&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function noe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function roe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ch(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ioe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cs(e):e;return{pathname:n?n.startsWith("/")?n:ooe(n,t):t,search:uoe(r),hash:soe(i)}}function ooe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function F_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function WF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Y4(e,t){let n=WF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Z4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cs(e):(i=rr({},e),cn(!i.pathname||!i.pathname.includes("?"),F_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),F_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),F_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=ioe(i,u),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}const os=e=>e.join("/").replace(/\/\/+/g,"/"),aoe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uoe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,soe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class y1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Cx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const VF=["post","put","patch","delete"],loe=new Set(VF),coe=["get",...VF],foe=new Set(coe),doe=new Set([301,302,303,307,308]),hoe=new Set([307,308]),L_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},poe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,voe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),HF="remix-router-transitions";function goe(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;cn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let oe=e.detectErrorBoundary;i=le=>({hasErrorBoundary:oe(le)})}else i=voe;let o={},a=m1(e.routes,i,void 0,o),u,s=e.basename||"/",l=e.dataStrategy||xoe,c=e.patchRoutesOnNavigation,d=rr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,v=new Set,g=null,m=null,b=null,w=e.hydrationData!=null,x=fc(a,e.history.location,s),S=null;if(x==null&&!c){let oe=to(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=jT(a);x=le,S={[xe.id]:oe}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let A;if(x)if(x.some(oe=>oe.route.lazy))A=!1;else if(!x.some(oe=>oe.route.loader))A=!0;else if(d.v7_partialHydration){let oe=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(k=>le[k.route.id]!==void 0);A=x.slice(0,xe+1).every(k=>!fC(k.route,oe,le))}else A=x.every(xe=>!fC(xe.route,oe,le))}else A=e.hydrationData!=null;else if(A=!1,x=[],d.v7_partialHydration){let oe=Xr(null,a,e.history.location.pathname);oe.active&&oe.matches&&(x=oe.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:A,navigation:L_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},T=kr.Pop,M=!1,F,U=!1,H=new Map,W=null,ie=!1,Z=!1,G=[],K=new Set,V=new Map,B=0,q=-1,Y=new Map,ue=new Set,Q=new Map,J=new Map,se=new Set,de=new Map,Se=new Map,ge;function Ze(){if(h=e.history.listen(oe=>{let{action:le,location:xe,delta:k}=oe;if(ge){ge(),ge=void 0;return}Nc(Se.size===0||k!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&k!=null){let $=new Promise(P=>{ge=P});e.history.go(k*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(k))},reset(){let P=new Map(C.blockers);P.set(D,wp),$e({blockers:P})}});return}return It(le,xe)}),n){$oe(t,H);let oe=()=>Ioe(t,H);t.addEventListener("pagehide",oe),W=()=>t.removeEventListener("pagehide",oe)}return C.initialized||It(kr.Pop,C.location,{initialHydration:!0}),E}function Pe(){h&&h(),W&&W(),v.clear(),F&&F.abort(),C.fetchers.forEach((oe,le)=>br(le)),C.blockers.forEach((oe,le)=>go(le))}function Fe(oe){return v.add(oe),()=>v.delete(oe)}function $e(oe,le){le===void 0&&(le={}),C=rr({},C,oe);let xe=[],k=[];d.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(se.has($)?k.push($):xe.push($))}),[...v].forEach(D=>D(C,{deletedFetchers:k,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),d.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),k.forEach(D=>br(D)))}function be(oe,le,xe){var k,D;let{flushSync:$}=xe===void 0?{}:xe,P=C.actionData!=null&&C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&C.navigation.state==="loading"&&((k=oe.state)==null?void 0:k._isRedirect)!==!0,N;le.actionData?Object.keys(le.actionData).length>0?N=le.actionData:N=null:P?N=C.actionData:N=null;let ee=le.loaderData?FT(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,ne=C.blockers;ne.size>0&&(ne=new Map(ne),ne.forEach((Be,He)=>ne.set(He,wp)));let he=M===!0||C.navigation.formMethod!=null&&Ma(C.navigation.formMethod)&&((D=oe.state)==null?void 0:D._isRedirect)!==!0;u&&(a=u,u=void 0),ie||T===kr.Pop||(T===kr.Push?e.history.push(oe,oe.state):T===kr.Replace&&e.history.replace(oe,oe.state));let Ce;if(T===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(oe.pathname)?Ce={currentLocation:C.location,nextLocation:oe}:H.has(oe.pathname)&&(Ce={currentLocation:oe,nextLocation:C.location})}else if(U){let Be=H.get(C.location.pathname);Be?Be.add(oe.pathname):(Be=new Set([oe.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:oe}}$e(rr({},le,{actionData:N,loaderData:ee,historyAction:T,location:oe,initialized:!0,navigation:L_,revalidation:"idle",restoreScrollPosition:ur(oe,le.matches||C.matches),preventScrollReset:he,blockers:ne}),{viewTransitionOpts:Ce,flushSync:$===!0}),T=kr.Pop,M=!1,U=!1,ie=!1,Z=!1,G=[]}async function yt(oe,le){if(typeof oe=="number"){e.history.go(oe);return}let xe=cC(C.location,C.matches,s,d.v7_prependBasename,oe,d.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:k,submission:D,error:$}=kT(d.v7_normalizeFormMethod,!1,xe,le),P=C.location,N=L0(C.location,k,le&&le.state);N=rr({},N,e.history.encodeLocation(N));let ee=le&&le.replace!=null?le.replace:void 0,ne=kr.Push;ee===!0?ne=kr.Replace:ee===!1||D!=null&&Ma(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(ne=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:P,nextLocation:N,historyAction:ne});if(Be){xi(Be,{state:"blocked",location:N,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),yt(oe,le)},reset(){let He=new Map(C.blockers);He.set(Be,wp),$e({blockers:He})}});return}return await It(ne,N,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(bn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){It(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}It(T||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function It(oe,le,xe){F&&F.abort(),F=null,T=oe,ie=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,U=(xe&&xe.enableViewTransition)===!0;let k=u||a,D=xe&&xe.overrideNavigation,$=fc(k,le,s),P=(xe&&xe.flushSync)===!0,N=Xr($,k,le.pathname);if(N.active&&N.matches&&($=N.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=wa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:P});return}if(C.initialized&&!Z&&Aoe(C.location,le)&&!(xe&&xe.submission&&Ma(xe.submission.formMethod))){be(le,{matches:$},{flushSync:P});return}F=new AbortController;let ee=Df(e.history,le,F.signal,xe&&xe.submission),ne;if(xe&&xe.pendingError)ne=[dc($).route.id,{type:$n.error,error:xe.pendingError}];else if(xe&&xe.submission&&Ma(xe.submission.formMethod)){let ct=await mn(ee,le,xe.submission,$,N.active,{replace:xe.replace,flushSync:P});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(ko(rt)&&Cx(rt.error)&&rt.error.status===404){F=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,ne=ct.pendingActionResult,D=j_(le,xe.submission),P=!1,N.active=!1,ee=Df(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await en(ee,le,$,N.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,P,ne);he||(F=null,be(le,rr({matches:Ce||$},LT(ne),{loaderData:Be,errors:He})))}async function mn(oe,le,xe,k,D,$){$===void 0&&($={}),bn();let P=Roe(le,xe);if($e({navigation:P},{flushSync:$.flushSync===!0}),D){let ne=await mo(k,le.pathname,oe.signal);if(ne.type==="aborted")return{shortCircuited:!0};if(ne.type==="error"){let he=dc(ne.partialMatches).route.id;return{matches:ne.partialMatches,pendingActionResult:[he,{type:$n.error,error:ne.error}]}}else if(ne.matches)k=ne.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=wa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:$n.error,error:Ce}]}}}let N,ee=Kp(k,le);if(!ee.route.action&&!ee.route.lazy)N={type:$n.error,error:to(405,{method:oe.method,pathname:le.pathname,routeId:ee.route.id})};else if(N=(await nt("action",C,oe,[ee],k,null))[ee.route.id],oe.signal.aborted)return{shortCircuited:!0};if(gc(N)){let ne;return $&&$.replace!=null?ne=$.replace:ne=$T(N.response.headers.get("Location"),new URL(oe.url),s)===C.location.pathname+C.location.search,await ke(oe,N,!0,{submission:xe,replace:ne}),{shortCircuited:!0}}if(rl(N))throw to(400,{type:"defer-action"});if(ko(N)){let ne=dc(k,ee.route.id);return($&&$.replace)!==!0&&(T=kr.Push),{matches:k,pendingActionResult:[ne.route.id,N]}}return{matches:k,pendingActionResult:[ee.route.id,N]}}async function en(oe,le,xe,k,D,$,P,N,ee,ne,he){let Ce=D||j_(le,$),Be=$||P||zT(Ce),He=!ie&&(!d.v7_partialHydration||!ee);if(k){if(He){let qe=re(he);$e(rr({navigation:Ce},qe!==void 0?{actionData:qe}:{}),{flushSync:ne})}let Le=await mo(xe,le.pathname,oe.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let qe=dc(Le.partialMatches).route.id;return{matches:Le.partialMatches,loaderData:{},errors:{[qe]:Le.error}}}else if(Le.matches)xe=Le.matches;else{let{error:qe,notFoundMatches:Ge,route:me}=wa(le.pathname);return{matches:Ge,loaderData:{},errors:{[me.id]:qe}}}}let ct=u||a,[Ne,rt]=MT(e.history,C,xe,Be,le,d.v7_partialHydration&&ee===!0,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,ct,s,he);if(_t(Le=>!(xe&&xe.some(qe=>qe.route.id===Le))||Ne&&Ne.some(qe=>qe.route.id===Le)),q=++B,Ne.length===0&&rt.length===0){let Le=bi();return be(le,rr({matches:xe,loaderData:{},errors:he&&ko(he[1])?{[he[0]]:he[1].error}:null},LT(he),Le?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ne}),{shortCircuited:!0}}if(He){let Le={};if(!k){Le.navigation=Ce;let qe=re(he);qe!==void 0&&(Le.actionData=qe)}rt.length>0&&(Le.fetchers=pe(rt)),$e(Le,{flushSync:ne})}rt.forEach(Le=>{ar(Le.key),Le.controller&&V.set(Le.key,Le.controller)});let bt=()=>rt.forEach(Le=>ar(Le.key));F&&F.signal.addEventListener("abort",bt);let{loaderResults:At,fetcherResults:vt}=await gt(C,xe,Ne,rt,oe);if(oe.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",bt),rt.forEach(Le=>V.delete(Le.key));let ht=Bm(At);if(ht)return await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};if(ht=Bm(vt),ht)return ue.add(ht.key),await ke(oe,ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=NT(C,xe,At,he,rt,vt,de);de.forEach((Le,qe)=>{Le.subscribe(Ge=>{(Ge||Le.done)&&de.delete(qe)})}),d.v7_partialHydration&&ee&&C.errors&&(wt=rr({},C.errors,wt));let Je=bi(),st=Rr(q),Qe=Je||st||rt.length>0;return rr({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function re(oe){if(oe&&!ko(oe[1]))return{[oe[0]]:oe[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(oe){return oe.forEach(le=>{let xe=C.fetchers.get(le.key),k=_p(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,k)}),new Map(C.fetchers)}function ye(oe,le,xe,k){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ar(oe);let D=(k&&k.flushSync)===!0,$=u||a,P=cC(C.location,C.matches,s,d.v7_prependBasename,xe,d.v7_relativeSplatPath,le,k?.relative),N=fc($,P,s),ee=Xr(N,$,P);if(ee.active&&ee.matches&&(N=ee.matches),!N){xn(oe,le,to(404,{pathname:P}),{flushSync:D});return}let{path:ne,submission:he,error:Ce}=kT(d.v7_normalizeFormMethod,!0,P,k);if(Ce){xn(oe,le,Ce,{flushSync:D});return}let Be=Kp(N,ne),He=(k&&k.preventScrollReset)===!0;if(he&&Ma(he.formMethod)){Ue(oe,le,ne,Be,N,ee.active,D,He,he);return}Q.set(oe,{routeId:le,path:ne}),je(oe,le,ne,Be,N,ee.active,D,He,he)}async function Ue(oe,le,xe,k,D,$,P,N,ee){bn(),Q.delete(oe);function ne(ve){if(!ve.route.action&&!ve.route.lazy){let De=to(405,{method:ee.formMethod,pathname:xe,routeId:le});return xn(oe,le,De,{flushSync:P}),!0}return!1}if(!$&&ne(k))return;let he=C.fetchers.get(oe);Vt(oe,Doe(ee,he),{flushSync:P});let Ce=new AbortController,Be=Df(e.history,xe,Ce.signal,ee);if($){let ve=await mo(D,xe,Be.signal);if(ve.type==="aborted")return;if(ve.type==="error"){xn(oe,le,ve.error,{flushSync:P});return}else if(ve.matches){if(D=ve.matches,k=Kp(D,xe),ne(k))return}else{xn(oe,le,to(404,{pathname:xe}),{flushSync:P});return}}V.set(oe,Ce);let He=B,Ne=(await nt("action",C,Be,[k],D,oe))[k.route.id];if(Be.signal.aborted){V.get(oe)===Ce&&V.delete(oe);return}if(d.v7_fetcherPersist&&se.has(oe)){if(gc(Ne)||ko(Ne)){Vt(oe,Ws(void 0));return}}else{if(gc(Ne))if(V.delete(oe),q>He){Vt(oe,Ws(void 0));return}else return ue.add(oe),Vt(oe,_p(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:N});if(ko(Ne)){xn(oe,le,Ne.error);return}}if(rl(Ne))throw to(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Df(e.history,rt,Ce.signal),At=u||a,vt=C.navigation.state!=="idle"?fc(At,C.navigation.location,s):C.matches;cn(vt,"Didn't find any matches after fetcher action");let ht=++B;Y.set(oe,ht);let xt=_p(ee,Ne.data);C.fetchers.set(oe,xt);let[wt,Je]=MT(e.history,C,vt,ee,rt,!1,d.v7_skipActionErrorRevalidation,Z,G,K,se,Q,ue,At,s,[k.route.id,Ne]);Je.filter(ve=>ve.key!==oe).forEach(ve=>{let De=ve.key,Oe=C.fetchers.get(De),Te=_p(void 0,Oe?Oe.data:void 0);C.fetchers.set(De,Te),ar(De),ve.controller&&V.set(De,ve.controller)}),$e({fetchers:new Map(C.fetchers)});let st=()=>Je.forEach(ve=>ar(ve.key));Ce.signal.addEventListener("abort",st);let{loaderResults:Qe,fetcherResults:Le}=await gt(C,vt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",st),Y.delete(oe),V.delete(oe),Je.forEach(ve=>V.delete(ve.key));let qe=Bm(Qe);if(qe)return ke(bt,qe.result,!1,{preventScrollReset:N});if(qe=Bm(Le),qe)return ue.add(qe.key),ke(bt,qe.result,!1,{preventScrollReset:N});let{loaderData:Ge,errors:me}=NT(C,vt,Qe,void 0,Je,Le,de);if(C.fetchers.has(oe)){let ve=Ws(Ne.data);C.fetchers.set(oe,ve)}Rr(ht),C.navigation.state==="loading"&&ht>q?(cn(T,"Expected pending action"),F&&F.abort(),be(C.navigation.location,{matches:vt,loaderData:Ge,errors:me,fetchers:new Map(C.fetchers)})):($e({errors:me,loaderData:FT(C.loaderData,Ge,vt,me),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(oe,le,xe,k,D,$,P,N,ee){let ne=C.fetchers.get(oe);Vt(oe,_p(ee,ne?ne.data:void 0),{flushSync:P});let he=new AbortController,Ce=Df(e.history,xe,he.signal);if($){let Ne=await mo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){xn(oe,le,Ne.error,{flushSync:P});return}else if(Ne.matches)D=Ne.matches,k=Kp(D,xe);else{xn(oe,le,to(404,{pathname:xe}),{flushSync:P});return}}V.set(oe,he);let Be=B,ct=(await nt("loader",C,Ce,[k],D,oe))[k.route.id];if(rl(ct)&&(ct=await Q4(ct,Ce.signal,!0)||ct),V.get(oe)===he&&V.delete(oe),!Ce.signal.aborted){if(se.has(oe)){Vt(oe,Ws(void 0));return}if(gc(ct))if(q>Be){Vt(oe,Ws(void 0));return}else{ue.add(oe),await ke(Ce,ct,!1,{preventScrollReset:N});return}if(ko(ct)){xn(oe,le,ct.error);return}cn(!rl(ct),"Unhandled fetcher deferred data"),Vt(oe,Ws(ct.data))}}async function ke(oe,le,xe,k){let{submission:D,fetcherSubmission:$,preventScrollReset:P,replace:N}=k===void 0?{}:k;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");cn(ee,"Expected a Location header on the redirect Response"),ee=$T(ee,new URL(oe.url),s);let ne=L0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(X4.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Ch(rt.pathname,s)==null}if(Ne){N?t.location.replace(ee):t.location.assign(ee);return}}F=null;let he=N===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=zT(C.navigation));let ct=D||$;if(hoe.has(le.response.status)&&ct&&Ma(ct.formMethod))await It(he,ne,{submission:rr({},ct,{formAction:ee}),preventScrollReset:P||M,enableViewTransition:xe?U:void 0});else{let Ne=j_(ne,D);await It(he,ne,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:P||M,enableViewTransition:xe?U:void 0})}}async function nt(oe,le,xe,k,D,$){let P,N={};try{P=await woe(l,oe,le,xe,k,D,$,o,i)}catch(ee){return k.forEach(ne=>{N[ne.route.id]={type:$n.error,error:ee}}),N}for(let[ee,ne]of Object.entries(P))if(Poe(ne)){let he=ne.result;N[ee]={type:$n.redirect,response:Coe(he,xe,ee,D,s,d.v7_relativeSplatPath)}}else N[ee]=await Soe(ne);return N}async function gt(oe,le,xe,k,D){let $=oe.matches,P=nt("loader",oe,D,xe,le,null),N=Promise.all(k.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",oe,Df(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:$n.error,error:to(404,{pathname:he.path})}})})),ee=await P,ne=(await N).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Toe(le,ee,D.signal,$,oe.loaderData),Moe(le,ne,k)]),{loaderResults:ee,fetcherResults:ne}}function bn(){Z=!0,G.push(..._t()),Q.forEach((oe,le)=>{V.has(le)&&K.add(le),ar(le)})}function Vt(oe,le,xe){xe===void 0&&(xe={}),C.fetchers.set(oe,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function xn(oe,le,xe,k){k===void 0&&(k={});let D=dc(C.matches,le);br(oe),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function Ii(oe){return d.v7_fetcherPersist&&(J.set(oe,(J.get(oe)||0)+1),se.has(oe)&&se.delete(oe)),C.fetchers.get(oe)||poe}function br(oe){let le=C.fetchers.get(oe);V.has(oe)&&!(le&&le.state==="loading"&&Y.has(oe))&&ar(oe),Q.delete(oe),Y.delete(oe),ue.delete(oe),se.delete(oe),K.delete(oe),C.fetchers.delete(oe)}function yi(oe){if(d.v7_fetcherPersist){let le=(J.get(oe)||0)-1;le<=0?(J.delete(oe),se.add(oe)):J.set(oe,le)}else br(oe);$e({fetchers:new Map(C.fetchers)})}function ar(oe){let le=V.get(oe);le&&(le.abort(),V.delete(oe))}function ui(oe){for(let le of oe){let xe=Ii(le),k=Ws(xe.data);C.fetchers.set(le,k)}}function bi(){let oe=[],le=!1;for(let xe of ue){let k=C.fetchers.get(xe);cn(k,"Expected fetcher: "+xe),k.state==="loading"&&(ue.delete(xe),oe.push(xe),le=!0)}return ui(oe),le}function Rr(oe){let le=[];for(let[xe,k]of Y)if(k0}function Yi(oe,le){let xe=C.blockers.get(oe)||wp;return Se.get(oe)!==le&&Se.set(oe,le),xe}function go(oe){C.blockers.delete(oe),Se.delete(oe)}function xi(oe,le){let xe=C.blockers.get(oe)||wp;cn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let k=new Map(C.blockers);k.set(oe,le),$e({blockers:k})}function Dr(oe){let{currentLocation:le,nextLocation:xe,historyAction:k}=oe;if(Se.size===0)return;Se.size>1&&Nc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,P]=D[D.length-1],N=C.blockers.get($);if(!(N&&N.state==="proceeding")&&P({currentLocation:le,nextLocation:xe,historyAction:k}))return $}function wa(oe){let le=to(404,{pathname:oe}),xe=u||a,{matches:k,route:D}=jT(xe);return _t(),{notFoundMatches:k,route:D,error:le}}function _t(oe){let le=[];return de.forEach((xe,k)=>{(!oe||oe(k))&&(xe.cancel(),le.push(k),de.delete(k))}),le}function dn(oe,le,xe){if(g=oe,b=le,m=xe||null,!w&&C.navigation===L_){w=!0;let k=ur(C.location,C.matches);k!=null&&$e({restoreScrollPosition:k})}return()=>{g=null,b=null,m=null}}function wn(oe,le){return m&&m(oe,le.map(k=>Hie(k,C.loaderData)))||oe.key}function qn(oe,le){if(g&&b){let xe=wn(oe,le);g[xe]=b()}}function ur(oe,le){if(g){let xe=wn(oe,le),k=g[xe];if(typeof k=="number")return k}return null}function Xr(oe,le,xe){if(c)if(oe){if(Object.keys(oe[0].params).length>0)return{active:!0,matches:$y(le,xe,s,!0)}}else return{active:!0,matches:$y(le,xe,s,!0)||[]};return{active:!1,matches:null}}async function mo(oe,le,xe){if(!c)return{type:"success",matches:oe};let k=oe;for(;;){let D=u==null,$=u||a,P=o;try{await c({path:le,matches:k,patch:(ne,he)=>{xe.aborted||DT(ne,he,$,P,i)}})}catch(ne){return{type:"error",error:ne,partialMatches:k}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let N=fc($,le,s);if(N)return{type:"success",matches:N};let ee=$y($,le,s,!0);if(!ee||k.length===ee.length&&k.every((ne,he)=>ne.route.id===ee[he].route.id))return{type:"success",matches:null};k=ee}}function ql(oe){o={},u=m1(oe,i,void 0,o)}function yf(oe,le){let xe=u==null;DT(oe,le,u||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return s},get future(){return d},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Fe,enableScrollRestoration:dn,navigate:yt,fetch:ye,revalidate:lt,createHref:oe=>e.history.createHref(oe),encodeLocation:oe=>e.history.encodeLocation(oe),getFetcher:Ii,deleteFetcher:yi,dispose:Pe,getBlocker:Yi,deleteBlocker:go,patchRoutes:yf,_internalFetchControllers:V,_internalActiveDeferreds:de,_internalSetRoutes:ql},E}function moe(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function cC(e,t,n,r,i,o,a,u){let s,l;if(a){s=[];for(let d of t)if(s.push(d),d.route.id===a){l=d;break}}else s=t,l=t[t.length-1];let c=Z4(i||".",Y4(s,o),Ch(e.pathname,n)||e.pathname,u==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let d=J4(c.search);if(l.route.index&&!d)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&d){let h=new URLSearchParams(c.search),v=h.getAll("index");h.delete("index"),v.filter(m=>m).forEach(m=>h.append("index",m));let g=h.toString();c.search=g?"?"+g:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:os([n,c.pathname])),Fc(c)}function kT(e,t,n,r){if(!r||!moe(r))return{path:n};if(r.formMethod&&!koe(r.formMethod))return{path:n,error:to(405,{method:r.formMethod})};let i=()=>({path:n,error:to(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),u=GF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ma(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,g)=>{let[m,b]=g;return""+v+m+"="+b+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Ma(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:u,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}cn(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=dC(r.formData),l=r.formData;else if(r.body instanceof FormData)s=dC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=IT(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=IT(s)}catch{return i()}let c={formMethod:a,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ma(c.formMethod))return{path:n,submission:c};let d=Cs(n);return t&&d.search&&J4(d.search)&&s.append("index",""),d.search="?"+s,{path:Fc(d),submission:c}}function TT(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function MT(e,t,n,r,i,o,a,u,s,l,c,d,h,v,g,m){let b=m?ko(m[1])?m[1].error:m[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=TT(n,Object.keys(t.errors)[0],!0):m&&ko(m[1])&&(S=TT(n,m[0]));let A=m?m[1].statusCode:void 0,E=a&&A&&A>=400,C=S.filter((M,F)=>{let{route:U}=M;if(U.lazy)return!0;if(U.loader==null)return!1;if(o)return fC(U,t.loaderData,t.errors);if(yoe(t.loaderData,t.matches[F],M)||s.some(ie=>ie===M.route.id))return!0;let H=t.matches[F],W=M;return RT(M,rr({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:W.params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||qF(H,W)}))}),T=[];return d.forEach((M,F)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(F))return;let U=fc(v,M.path,g);if(!U){T.push({key:F,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(F),W=Kp(U,M.path),ie=!1;h.has(F)?ie=!1:l.has(F)?(l.delete(F),ie=!0):H&&H.state!=="idle"&&H.data===void 0?ie=u:ie=RT(W,rr({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:A,defaultShouldRevalidate:E?!1:u})),ie&&T.push({key:F,routeId:M.routeId,path:M.path,matches:U,match:W,controller:new AbortController})}),[C,T]}function fC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function yoe(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function qF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function RT(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function DT(e,t,n,r,i){var o;let a;if(e){let l=r[e];cn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let u=t.filter(l=>!a.some(c=>KF(l,c))),s=m1(u,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...s)}function KF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>KF(n,o))}):!1}async function boe(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];cn(i,"No route found in manifest");let o={};for(let a in r){let s=i[a]!==void 0&&a!=="hasErrorBoundary";Nc(!s,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!Wie.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,rr({},t(i),{lazy:void 0}))}async function xoe(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function woe(e,t,n,r,i,o,a,u,s,l){let c=o.map(v=>v.route.lazy?boe(v.route,s,u):void 0),d=o.map((v,g)=>{let m=c[g],b=i.some(x=>x.route.id===v.route.id);return rr({},v,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(v.route.lazy||v.route.loader)&&(b=!0),b?_oe(t,r,v,m,x,l):Promise.resolve({type:$n.data,result:void 0}))})}),h=await e({matches:d,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function _oe(e,t,n,r,i,o){let a,u,s=l=>{let c,d=new Promise((g,m)=>c=m);u=()=>c(),t.signal.addEventListener("abort",u);let h=g=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...g!==void 0?[g]:[]),v=(async()=>{try{return{type:"data",result:await(i?i(m=>h(m)):h())}}catch(g){return{type:"error",result:g}}})();return Promise.race([v,d])};try{let l=n.route[e];if(r)if(l){let c,[d]=await Promise.all([s(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=d}else if(await r,l=n.route[e],l)a=await s(l);else if(e==="action"){let c=new URL(t.url),d=c.pathname+c.search;throw to(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:$n.data,result:void 0};else if(l)a=await s(l);else{let c=new URL(t.url),d=c.pathname+c.search;throw to(404,{pathname:d})}cn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:$n.error,result:l}}finally{u&&t.signal.removeEventListener("abort",u)}return a}async function Soe(e){let{result:t,type:n}=e;if(YF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:$n.error,error:c}}return n===$n.error?{type:$n.error,error:new y1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:$n.data,data:l,statusCode:t.status,headers:t.headers}}if(n===$n.error){if(BT(t)){var r;if(t.data instanceof Error){var i;return{type:$n.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new y1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:$n.error,error:t,statusCode:Cx(t)?t.status:void 0}}if(Ooe(t)){var o,a;return{type:$n.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(BT(t)){var u,s;return{type:$n.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:$n.data,data:t}}function Coe(e,t,n,r,i,o){let a=e.headers.get("Location");if(cn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!X4.test(a)){let u=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=cC(new URL(t.url),u,i,!0,a,o),e.headers.set("Location",a)}return e}function $T(e,t,n){if(X4.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Ch(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Df(e,t,n,r){let i=e.createURL(GF(t)).toString(),o={signal:n};if(r&&Ma(r.formMethod)){let{formMethod:a,formEncType:u}=r;o.method=a.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=dC(r.formData):o.body=r.formData}return new Request(i,o)}function dC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function IT(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Eoe(e,t,n,r,i){let o={},a=null,u,s=!1,l={},c=n&&ko(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,v=t[h];if(cn(!gc(v),"Cannot handle redirect results in processLoaderData"),ko(v)){let g=v.error;c!==void 0&&(g=c,c=void 0),a=a||{};{let m=dc(e,h);a[m.route.id]==null&&(a[m.route.id]=g)}o[h]=void 0,s||(s=!0,u=Cx(v.error)?v.error.status:500),v.headers&&(l[h]=v.headers)}else rl(v)?(r.set(h,v.deferredData),o[h]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers)):(o[h]=v.data,v.statusCode&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[h]=v.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:u||200,loaderHeaders:l}}function NT(e,t,n,r,i,o,a){let{loaderData:u,errors:s}=Eoe(t,n,r,a);return i.forEach(l=>{let{key:c,match:d,controller:h}=l,v=o[c];if(cn(v,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(ko(v)){let g=dc(e.matches,d?.route.id);s&&s[g.route.id]||(s=rr({},s,{[g.route.id]:v.error})),e.fetchers.delete(c)}else if(gc(v))cn(!1,"Unhandled fetcher revalidation redirect");else if(rl(v))cn(!1,"Unhandled fetcher deferred data");else{let g=Ws(v.data);e.fetchers.set(c,g)}}),{loaderData:u,errors:s}}function FT(e,t,n,r){let i=rr({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function LT(e){return e?ko(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function dc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function jT(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function to(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,u="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(u="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(u="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",s='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new y1(e||500,u,new Error(s),!0)}function Bm(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(gc(i))return{key:r,result:i}}}function GF(e){let t=typeof e=="string"?Cs(e):e;return Fc(rr({},t,{hash:""}))}function Aoe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Poe(e){return YF(e.result)&&doe.has(e.result.status)}function rl(e){return e.type===$n.deferred}function ko(e){return e.type===$n.error}function gc(e){return(e&&e.type)===$n.redirect}function BT(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ooe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function YF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function koe(e){return foe.has(e.toLowerCase())}function Ma(e){return loe.has(e.toLowerCase())}async function Toe(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===u);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),d=c!=null&&!qF(c,l)&&(i&&i[l.route.id])!==void 0;rl(s)&&d&&await Q4(s,n,!1).then(h=>{h&&(t[u]=h)})}}async function Moe(e,t,n){for(let r=0;rl?.route.id===o)&&rl(u)&&(cn(a,"Expected an AbortController for revalidating fetcher deferred result"),await Q4(u,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function Q4(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:$n.data,data:e.deferredData.unwrappedData}}catch(i){return{type:$n.error,error:i}}return{type:$n.data,data:e.deferredData.data}}}function J4(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Kp(e,t){let n=typeof t=="string"?Cs(t).search:t.search;if(e[e.length-1].route.index&&J4(n||""))return e[e.length-1];let r=WF(e);return r[r.length-1]}function zT(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function j_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Roe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function _p(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Doe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ws(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function $oe(e,t){try{let n=e.sessionStorage.getItem(HF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Ioe(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(HF,JSON.stringify(n))}catch(r){Nc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.28.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!u.current)return;if(typeof l=="number"){r.go(l);return}let d=Z4(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:os([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}const Noe=y.createContext(null);function Foe(e){let t=y.useContext(Nl).outlet;return t&&y.createElement(Noe.Provider,{value:e},t)}function JF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(uf),{matches:i}=y.useContext(Nl),{pathname:o}=rg(),a=JSON.stringify(Y4(i,r.v7_relativeSplatPath));return y.useMemo(()=>Z4(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Loe(e,t,n,r){ng()||cn(!1);let{navigator:i}=y.useContext(uf),{matches:o}=y.useContext(Nl),a=o[o.length-1],u=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=rg(),c;c=l;let d=c.pathname||"/",h=d;if(s!=="/"){let m=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=fc(e,{pathname:h});return Woe(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},u,m.params),pathname:os([s,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:os([s,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r)}function joe(){let e=Koe(),t=Sx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const Boe=y.createElement(joe,null);class zoe extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Nl.Provider,{value:this.props.routeContext},y.createElement(ZF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Uoe(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Cx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Nl.Provider,{value:t},r)}function Woe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let c=a.findIndex(d=>d.route.id&&u?.[d.route.id]!==void 0);c>=0||cn(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,h)=>{let v,g=!1,m=null,b=null;n&&(v=u&&d.route.id?u[d.route.id]:void 0,m=d.route.errorElement||Boe,s&&(l<0&&h===0?(Yoe("route-fallback"),g=!0,b=null):l===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return v?S=m:g?S=b:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,y.createElement(Uoe,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(zoe,{location:n.location,revalidation:n.revalidation,component:m,error:v,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var eL=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(eL||{}),b1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(b1||{});function Voe(e){let t=y.useContext(Cx);return t||cn(!1),t}function Hoe(e){let t=y.useContext(YF);return t||cn(!1),t}function qoe(e){let t=y.useContext(Nl);return t||cn(!1),t}function tL(e){let t=qoe(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function Koe(){var e;let t=y.useContext(ZF),n=Hoe(b1.UseRouteError),r=tL(b1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Goe(){let{router:e}=Voe(eL.UseNavigateStable),t=tL(b1.UseNavigateStable),n=y.useRef(!1);return XF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,y1({fromRouteId:t},o)))},[e,t])}const zT={};function Yoe(e,t,n){zT[e]||(zT[e]=!0)}const UT={};function Zoe(e,t){UT[t]||(UT[t]=!0,console.warn(t))}const $f=(e,t,n)=>Zoe(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Xoe(e,t){e?.v7_startTransition===void 0&&$f("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&$f("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&$f("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&$f("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&$f("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&$f("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function Uqe(e){return Foe(e.context)}function Qoe(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:u}=e;ng()&&cn(!1);let s=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:s,navigator:o,static:a,future:y1({v7_relativeSplatPath:!1},u)}),[s,u,o,a]);typeof r=="string"&&(r=Cs(r));let{pathname:c="/",search:d="",hash:h="",state:v=null,key:g="default"}=r,m=y.useMemo(()=>{let b=Ch(c,s);return b==null?null:{location:{pathname:b,search:d,hash:h,state:v,key:g},navigationType:i}},[s,c,d,h,v,g,i]);return m==null?null:y.createElement(uf.Provider,{value:l},y.createElement(eA.Provider,{children:n,value:m}))}new Promise(()=>{});function Joe(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!u.current)return;if(typeof l=="number"){r.go(l);return}let d=Z4(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:os([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}const Loe=y.createContext(null);function joe(e){let t=y.useContext(Nl).outlet;return t&&y.createElement(Loe.Provider,{value:e},t)}function eL(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(uf),{matches:i}=y.useContext(Nl),{pathname:o}=ig(),a=JSON.stringify(Y4(i,r.v7_relativeSplatPath));return y.useMemo(()=>Z4(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Boe(e,t,n,r){rg()||cn(!1);let{navigator:i}=y.useContext(uf),{matches:o}=y.useContext(Nl),a=o[o.length-1],u=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=ig(),c;c=l;let d=c.pathname||"/",h=d;if(s!=="/"){let m=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=fc(e,{pathname:h});return Hoe(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},u,m.params),pathname:os([s,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:os([s,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r)}function zoe(){let e=Yoe(),t=Cx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const Uoe=y.createElement(zoe,null);class Woe extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Nl.Provider,{value:this.props.routeContext},y.createElement(XF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Voe(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Ex);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Nl.Provider,{value:t},r)}function Hoe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let c=a.findIndex(d=>d.route.id&&u?.[d.route.id]!==void 0);c>=0||cn(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,h)=>{let v,g=!1,m=null,b=null;n&&(v=u&&d.route.id?u[d.route.id]:void 0,m=d.route.errorElement||Uoe,s&&(l<0&&h===0?(Xoe("route-fallback"),g=!0,b=null):l===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return v?S=m:g?S=b:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,y.createElement(Voe,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(Woe,{location:n.location,revalidation:n.revalidation,component:m,error:v,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var tL=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tL||{}),x1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(x1||{});function qoe(e){let t=y.useContext(Ex);return t||cn(!1),t}function Koe(e){let t=y.useContext(ZF);return t||cn(!1),t}function Goe(e){let t=y.useContext(Nl);return t||cn(!1),t}function nL(e){let t=Goe(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function Yoe(){var e;let t=y.useContext(XF),n=Koe(x1.UseRouteError),r=nL(x1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Zoe(){let{router:e}=qoe(tL.UseNavigateStable),t=nL(x1.UseNavigateStable),n=y.useRef(!1);return QF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,b1({fromRouteId:t},o)))},[e,t])}const UT={};function Xoe(e,t,n){UT[e]||(UT[e]=!0)}const WT={};function Qoe(e,t){WT[t]||(WT[t]=!0,console.warn(t))}const $f=(e,t,n)=>Qoe(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Joe(e,t){e?.v7_startTransition===void 0&&$f("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&$f("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&$f("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&$f("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&$f("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&$f("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function Vqe(e){return joe(e.context)}function eae(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:u}=e;rg()&&cn(!1);let s=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:s,navigator:o,static:a,future:b1({v7_relativeSplatPath:!1},u)}),[s,u,o,a]);typeof r=="string"&&(r=Cs(r));let{pathname:c="/",search:d="",hash:h="",state:v=null,key:g="default"}=r,m=y.useMemo(()=>{let b=Ch(c,s);return b==null?null:{location:{pathname:b,search:d,hash:h,state:v,key:g},navigationType:i}},[s,c,d,h,v,g,i]);return m==null?null:y.createElement(uf.Provider,{value:l},y.createElement(eA.Provider,{children:n,value:m}))}new Promise(()=>{});function tae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.28.1 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function tae(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nae(e,t){return e.button===0&&(!t||t==="_self")&&!tae(e)}function hC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rae(e,t){let n=hC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const iae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oae="6";try{window.__reactRouterVersion=oae}catch{}function Wqe(e,t){return poe({basename:void 0,future:L0({},void 0,{v7_prependBasename:!0}),history:Lie({window:void 0}),hydrationData:aae(),routes:e,mapRouteProperties:Joe,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function aae(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=L0({},t,{errors:uae(t.errors)})),t}function uae(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new m1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const sae=y.createContext({isTransitioning:!1}),lae=y.createContext(new Map),cae="startTransition",WT=i4[cae],fae="flushSync",VT=Fie[fae];function dae(e){WT?WT(e):e()}function _p(e){VT?VT(e):e()}class hae{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Vqe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,u]=y.useState(),[s,l]=y.useState({isTransitioning:!1}),[c,d]=y.useState(),[h,v]=y.useState(),[g,m]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?dae(M):M()},[w]),S=y.useCallback((M,F)=>{let{deletedFetchers:U,flushSync:H,viewTransitionOpts:W}=F;U.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ie=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!W||ie){H?_p(()=>o(M)):x(()=>o(M));return}if(H){_p(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:W.currentLocation,nextLocation:W.nextLocation})});let Z=n.window.document.startViewTransition(()=>{_p(()=>o(M))});Z.finished.finally(()=>{_p(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})})}),_p(()=>v(Z));return}h?(c&&c.resolve(),h.skipTransition(),m({state:M,currentLocation:W.currentLocation,nextLocation:W.nextLocation})):(u(M),l({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new hae)},[s]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,F=c.promise,U=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await F});U.finished.finally(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})}),v(U)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!s.isTransitioning&&g&&(u(g.state),l({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))},[s.isTransitioning,g]),y.useEffect(()=>{},[]);let A=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,F,U)=>n.navigate(M,{state:F,preventScrollReset:U?.preventScrollReset}),replace:(M,F,U)=>n.navigate(M,{replace:!0,state:F,preventScrollReset:U?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:A,static:!1,basename:E}),[n,A,E]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Xoe(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(Cx.Provider,{value:C},y.createElement(YF.Provider,{value:i},y.createElement(lae.Provider,{value:b.current},y.createElement(sae.Provider,{value:s},y.createElement(Qoe,{basename:E,location:i.location,navigationType:i.historyAction,navigator:A,future:T},i.initialized||n.future.v7_partialHydration?y.createElement(pae,{routes:n.routes,future:n.future,state:i}):t))))),null)}const pae=y.memo(vae);function vae(e){let{routes:t,future:n,state:r}=e;return Loe(t,void 0,r,n)}const gae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hqe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:u,target:s,to:l,preventScrollReset:c,viewTransition:d}=t,h=eae(t,iae),{basename:v}=y.useContext(uf),g,m=!1;if(typeof l=="string"&&mae.test(l)&&(g=l,gae))try{let S=new URL(window.location.href),A=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Ch(A.pathname,v);A.origin===S.origin&&E!=null?l=E+A.search+A.hash:m=!0}catch{}let b=$oe(l,{relative:i}),w=yae(l,{replace:a,state:u,target:s,preventScrollReset:c,relative:i,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",L0({},h,{href:g||b,onClick:m||o?r:x,ref:n,target:s}))});var HT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(HT||(HT={}));var qT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qT||(qT={}));function yae(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:u}=t===void 0?{}:t,s=QF(),l=rg(),c=JF(e,{relative:a});return y.useCallback(d=>{if(nae(d,n)){d.preventDefault();let h=r!==void 0?r:Fc(l)===Fc(c);s(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:u})}},[l,s,c,r,i,n,e,o,a,u])}function qqe(e){let t=y.useRef(hC(e)),n=y.useRef(!1),r=rg(),i=y.useMemo(()=>rae(r.search,n.current?null:t.current),[r.search]),o=QF(),a=y.useCallback((u,s)=>{const l=hC(typeof u=="function"?u(i):u);n.current=!0,o("?"+l,s)},[o,i]);return[i,a]}var nL={exports:{}},rL={};/** + */function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function rae(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iae(e,t){return e.button===0&&(!t||t==="_self")&&!rae(e)}function hC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function oae(e,t){let n=hC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const aae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uae="6";try{window.__reactRouterVersion=uae}catch{}function Hqe(e,t){return goe({basename:void 0,future:j0({},void 0,{v7_prependBasename:!0}),history:Bie({window:void 0}),hydrationData:sae(),routes:e,mapRouteProperties:tae,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function sae(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=j0({},t,{errors:lae(t.errors)})),t}function lae(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new y1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const cae=y.createContext({isTransitioning:!1}),fae=y.createContext(new Map),dae="startTransition",VT=i4[dae],hae="flushSync",HT=jie[hae];function pae(e){VT?VT(e):e()}function Sp(e){HT?HT(e):e()}class vae{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function qqe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,u]=y.useState(),[s,l]=y.useState({isTransitioning:!1}),[c,d]=y.useState(),[h,v]=y.useState(),[g,m]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?pae(M):M()},[w]),S=y.useCallback((M,F)=>{let{deletedFetchers:U,flushSync:H,viewTransitionOpts:W}=F;U.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ie=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!W||ie){H?Sp(()=>o(M)):x(()=>o(M));return}if(H){Sp(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:W.currentLocation,nextLocation:W.nextLocation})});let Z=n.window.document.startViewTransition(()=>{Sp(()=>o(M))});Z.finished.finally(()=>{Sp(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})})}),Sp(()=>v(Z));return}h?(c&&c.resolve(),h.skipTransition(),m({state:M,currentLocation:W.currentLocation,nextLocation:W.nextLocation})):(u(M),l({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new vae)},[s]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,F=c.promise,U=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await F});U.finished.finally(()=>{d(void 0),v(void 0),u(void 0),l({isTransitioning:!1})}),v(U)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!s.isTransitioning&&g&&(u(g.state),l({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))},[s.isTransitioning,g]),y.useEffect(()=>{},[]);let A=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,F,U)=>n.navigate(M,{state:F,preventScrollReset:U?.preventScrollReset}),replace:(M,F,U)=>n.navigate(M,{replace:!0,state:F,preventScrollReset:U?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:A,static:!1,basename:E}),[n,A,E]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Joe(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(Ex.Provider,{value:C},y.createElement(ZF.Provider,{value:i},y.createElement(fae.Provider,{value:b.current},y.createElement(cae.Provider,{value:s},y.createElement(eae,{basename:E,location:i.location,navigationType:i.historyAction,navigator:A,future:T},i.initialized||n.future.v7_partialHydration?y.createElement(gae,{routes:n.routes,future:n.future,state:i}):t))))),null)}const gae=y.memo(mae);function mae(e){let{routes:t,future:n,state:r}=e;return Boe(t,void 0,r,n)}const yae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kqe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:u,target:s,to:l,preventScrollReset:c,viewTransition:d}=t,h=nae(t,aae),{basename:v}=y.useContext(uf),g,m=!1;if(typeof l=="string"&&bae.test(l)&&(g=l,yae))try{let S=new URL(window.location.href),A=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Ch(A.pathname,v);A.origin===S.origin&&E!=null?l=E+A.search+A.hash:m=!0}catch{}let b=Noe(l,{relative:i}),w=xae(l,{replace:a,state:u,target:s,preventScrollReset:c,relative:i,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",j0({},h,{href:g||b,onClick:m||o?r:x,ref:n,target:s}))});var qT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qT||(qT={}));var KT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(KT||(KT={}));function xae(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:u}=t===void 0?{}:t,s=JF(),l=ig(),c=eL(e,{relative:a});return y.useCallback(d=>{if(iae(d,n)){d.preventDefault();let h=r!==void 0?r:Fc(l)===Fc(c);s(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:u})}},[l,s,c,r,i,n,e,o,a,u])}function Gqe(e){let t=y.useRef(hC(e)),n=y.useRef(!1),r=ig(),i=y.useMemo(()=>oae(r.search,n.current?null:t.current),[r.search]),o=JF(),a=y.useCallback((u,s)=>{const l=hC(typeof u=="function"?u(i):u);n.current=!0,o("?"+l,s)},[o,i]);return[i,a]}var rL={exports:{}},iL={};/** * @license React * use-sync-external-store-with-selector.production.js * @@ -73,19 +73,19 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ig=y;function bae(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xae=typeof Object.is=="function"?Object.is:bae,wae=ig.useSyncExternalStore,_ae=ig.useRef,Sae=ig.useEffect,Cae=ig.useMemo,Eae=ig.useDebugValue;rL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=_ae(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Cae(function(){function s(v){if(!l){if(l=!0,c=v,v=r(v),i!==void 0&&a.hasValue){var g=a.value;if(i(g,v))return d=g}return d=v}if(g=d,xae(c,v))return g;var m=r(v);return i!==void 0&&i(g,m)?(c=v,g):(c=v,d=m)}var l=!1,c,d,h=n===void 0?null:n;return[function(){return s(t())},h===null?void 0:function(){return s(h())}]},[t,n,r,i]);var u=wae(e,o[0],o[1]);return Sae(function(){a.hasValue=!0,a.value=u},[u]),Eae(u),u};nL.exports=rL;var Aae=nL.exports;function Oae(e){e()}function Pae(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Oae(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var KT={notify(){},get:()=>[]};function kae(e,t){let n,r=KT,i=0,o=!1;function a(m){c();const b=r.subscribe(m);let w=!1;return()=>{w||(w=!0,b(),d())}}function u(){r.notify()}function s(){g.onStateChange&&g.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(s),r=Pae())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=KT)}function h(){o||(o=!0,c())}function v(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:l,trySubscribe:h,tryUnsubscribe:v,getListeners:()=>r};return g}var Tae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mae=Tae(),Rae=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Dae=Rae(),$ae=()=>Mae||Dae?y.useLayoutEffect:y.useEffect,Iae=$ae(),Nae=Symbol.for("react-redux-context"),Fae=typeof globalThis<"u"?globalThis:{};function Lae(){if(!y.createContext)return{};const e=Fae[Nae]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var _l=Lae();function jae(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const s=kae(i);return{store:i,subscription:s,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Iae(()=>{const{subscription:s}=o;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==i.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[o,a]);const u=n||_l;return y.createElement(u.Provider,{value:o},t)}var Kqe=jae;function tA(e=_l){return function(){return y.useContext(e)}}var iL=tA();function oL(e=_l){const t=e===_l?iL:tA(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Bae=oL();function zae(e=_l){const t=e===_l?Bae:oL(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Gqe=zae(),Uae=(e,t)=>e===t;function Wae(e=_l){const t=e===_l?iL:tA(e),n=(r,i={})=>{const{equalityFn:o=Uae}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:u,subscription:s,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),d=Aae.useSyncExternalStoreWithSelector(s.addNestedSub,u.getState,l||u.getState,c,o);return y.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var Yqe=Wae();function GT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ex(...e){return t=>{let n=!1;const r=e.map(i=>{const o=GT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Vae);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return I.jsx(pC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,u):null})}return I.jsx(pC,{...r,ref:t,children:n})});Sl.displayName="Slot";var pC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=qae(n);return y.cloneElement(n,{...Hae(r,n.props),ref:t?Ex(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});pC.displayName="SlotClone";var nA=({children:e})=>I.jsx(I.Fragment,{children:e});function Vae(e){return y.isValidElement(e)&&e.type===nA}function Hae(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function qae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function aL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,ZT=fn,Zqe=(e,t)=>n=>{var r;if(t?.variants==null)return ZT(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],d=o?.[l];if(c===null)return null;const h=YT(c)||YT(d);return i[l][h]}),u=n&&Object.entries(n).reduce((l,c)=>{let[d,h]=c;return h===void 0||(l[d]=h),l},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:h,...v}=c;return Object.entries(v).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...o,...u}[m]):{...o,...u}[m]===b})?[...l,d,h]:l},[]);return ZT(e,a,s,n?.class,n?.className)},rA="-",Kae=e=>{const t=Yae(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(rA);return u[0]===""&&u.length!==1&&u.shift(),uL(u,t)||Gae(a)},getConflictingClassGroupIds:(a,u)=>{const s=n[a]||[];return u&&r[a]?[...s,...r[a]]:s}}},uL=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?uL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(rA);return t.validators.find(({validator:a})=>a(o))?.classGroupId},XT=/^\[(.+)\]$/,Gae=e=>{if(XT.test(e)){const t=XT.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yae=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xae(Object.entries(e.classGroups),n).forEach(([o,a])=>{vC(a,r,o,t)}),r},vC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:QT(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Zae(i)){vC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{vC(a,QT(t,o),n,r)})})},QT=(e,t)=>{let n=e;return t.split(rA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Zae=e=>e.isThemeGetter,Xae=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[t+a,u])):o);return[n,i]}):e,Qae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},sL="!",Jae=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=u=>{const s=[];let l=0,c=0,d;for(let b=0;bc?d-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}};return n?u=>n({className:u,parseClassName:a}):a},eue=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},tue=e=>({cache:Qae(e.cacheSize),parseClassName:Jae(e),...Kae(e)}),nue=/\s+/,rue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(nue);let u="";for(let s=a.length-1;s>=0;s-=1){const l=a[s],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:v}=n(l);let g=!!v,m=r(g?h.substring(0,v):h);if(!m){if(!g){u=l+(u.length>0?" "+u:u);continue}if(m=r(h),!m){u=l+(u.length>0?" "+u:u);continue}g=!1}const b=eue(c).join(":"),w=d?b+sL:b,x=w+m;if(o.includes(x))continue;o.push(x);const S=i(m,g);for(let A=0;A0?" "+u:u)}return u};function iue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=tue(l),r=n.cache.get,i=n.cache.set,o=u,u(s)}function u(s){const l=r(s);if(l)return l;const c=rue(s,n);return i(s,c),c}return function(){return o(iue.apply(null,arguments))}}const Xn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cL=/^\[(?:([a-z-]+):)?(.+)\]$/i,aue=/^\d+\/\d+$/,uue=new Set(["px","full","screen"]),sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,due=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Uu=e=>yd(e)||uue.has(e)||aue.test(e),Bs=e=>Eh(e,"length",xue),yd=e=>!!e&&!Number.isNaN(Number(e)),B_=e=>Eh(e,"number",yd),Sp=e=>!!e&&Number.isInteger(Number(e)),hue=e=>e.endsWith("%")&&yd(e.slice(0,-1)),Zt=e=>cL.test(e),zs=e=>sue.test(e),pue=new Set(["length","size","percentage"]),vue=e=>Eh(e,pue,fL),gue=e=>Eh(e,"position",fL),mue=new Set(["image","url"]),yue=e=>Eh(e,mue,_ue),bue=e=>Eh(e,"",wue),Cp=()=>!0,Eh=(e,t,n)=>{const r=cL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xue=e=>lue.test(e)&&!cue.test(e),fL=()=>!1,wue=e=>fue.test(e),_ue=e=>due.test(e),Sue=()=>{const e=Xn("colors"),t=Xn("spacing"),n=Xn("blur"),r=Xn("brightness"),i=Xn("borderColor"),o=Xn("borderRadius"),a=Xn("borderSpacing"),u=Xn("borderWidth"),s=Xn("contrast"),l=Xn("grayscale"),c=Xn("hueRotate"),d=Xn("invert"),h=Xn("gap"),v=Xn("gradientColorStops"),g=Xn("gradientColorStopPositions"),m=Xn("inset"),b=Xn("margin"),w=Xn("opacity"),x=Xn("padding"),S=Xn("saturate"),A=Xn("scale"),E=Xn("sepia"),C=Xn("skew"),T=Xn("space"),M=Xn("translate"),F=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Zt,t],W=()=>[Zt,t],ie=()=>["",Uu,Bs],Z=()=>["auto",yd,Zt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Zt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[yd,Zt];return{cacheSize:500,separator:":",theme:{colors:[Cp],spacing:[Uu,Bs],blur:["none","",zs,Zt],brightness:ue(),borderColor:[e],borderRadius:["none","","full",zs,Zt],borderSpacing:W(),borderWidth:ie(),contrast:ue(),grayscale:q(),hueRotate:ue(),invert:q(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[hue,Bs],inset:H(),margin:H(),opacity:ue(),padding:W(),saturate:ue(),scale:ue(),sepia:q(),skew:ue(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Zt]}],container:["container"],columns:[{columns:[zs]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Zt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sp,Zt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zt]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Sp,Zt]}],"grid-cols":[{"grid-cols":[Cp]}],"col-start-end":[{col:["auto",{span:["full",Sp,Zt]},Zt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Cp]}],"row-start-end":[{row:["auto",{span:[Sp,Zt]},Zt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zt,t]}],"min-w":[{"min-w":[Zt,t,"min","max","fit"]}],"max-w":[{"max-w":[Zt,t,"none","full","min","max","fit","prose",{screen:[zs]},zs]}],h:[{h:[Zt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zs,Bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",B_]}],"font-family":[{font:[Cp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Zt]}],"line-clamp":[{"line-clamp":["none",yd,B_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Uu,Zt]}],"list-image":[{"list-image":["none",Zt]}],"list-style-type":[{list:["none","disc","decimal",Zt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Uu,Bs]}],"underline-offset":[{"underline-offset":["auto",Uu,Zt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),gue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:K()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Uu,Zt]}],"outline-w":[{outline:[Uu,Bs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Uu,Bs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zs,bue]}],"shadow-color":[{shadow:[Cp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",zs,Zt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zt]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",Zt]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Sp,Zt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Uu,Bs,B_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Xqe=oue(Sue);var dL={exports:{}},Cue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Eue=Cue,Aue=Eue;function hL(){}function pL(){}pL.resetWarningCache=hL;var Oue=function(){function e(r,i,o,a,u,s){if(s!==Aue){var l=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 l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pL,resetWarningCache:hL};return n.PropTypes=n,n};dL.exports=Oue();var Pue=dL.exports;const Mt=On(Pue);var kue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Tue=Object.defineProperty,Mue=Object.defineProperties,Rue=Object.getOwnPropertyDescriptors,x1=Object.getOwnPropertySymbols,vL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,JT=(e,t,n)=>t in e?Tue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eM=(e,t)=>{for(var n in t||(t={}))vL.call(t,n)&&JT(e,n,t[n]);if(x1)for(var n of x1(t))gL.call(t,n)&&JT(e,n,t[n]);return e},Due=(e,t)=>Mue(e,Rue(t)),$ue=(e,t)=>{var n={};for(var r in e)vL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&x1)for(var r of x1(e))t.indexOf(r)<0&&gL.call(e,r)&&(n[r]=e[r]);return n},Cn=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:u="currentColor",size:s=24,stroke:l=2,children:c}=a,d=$ue(a,["color","size","stroke","children"]);return y.createElement("svg",eM(Due(eM({ref:o},kue),{width:s,height:s,stroke:u,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([h,v])=>y.createElement(h,v)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},Qqe=Cn("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),Jqe=Cn("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),eKe=Cn("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),tKe=Cn("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),nKe=Cn("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),rKe=Cn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),iKe=Cn("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),oKe=Cn("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),aKe=Cn("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),uKe=Cn("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),sKe=Cn("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),lKe=Cn("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),cKe=Cn("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),fKe=Cn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),dKe=Cn("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),hKe=Cn("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),pKe=Cn("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),vKe=Cn("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),gKe=Cn("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),mKe=Cn("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),yKe=Cn("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),bKe=Cn("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),xKe=Cn("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),wKe=Cn("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),_Ke=Cn("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),SKe=Cn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),CKe=Cn("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),EKe=Cn("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),AKe=Cn("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),OKe=Cn("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),PKe=Cn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Iue=typeof Symbol=="function"&&Symbol.observable||"@@observable",tM=Iue,z_=()=>Math.random().toString(36).substring(7).split("").join("."),Nue={INIT:`@@redux/INIT${z_()}`,REPLACE:`@@redux/REPLACE${z_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${z_()}`},w1=Nue;function iA(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function mL(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(mL)(e,t)}let r=e,i=t,o=new Map,a=o,u=0,s=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(s)throw new Error(fi(3));return i}function d(b){if(typeof b!="function")throw new Error(fi(4));if(s)throw new Error(fi(5));let w=!0;l();const x=u++;return a.set(x,b),function(){if(w){if(s)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!iA(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(s)throw new Error(fi(9));try{s=!0,i=r(i,b)}finally{s=!1}return(o=a).forEach(x=>{x()}),b}function v(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:w1.REPLACE})}function g(){const b=d;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const A=w;A.next&&A.next(c())}return x(),{unsubscribe:b(x)}},[tM](){return this}}}return h({type:w1.INIT}),{dispatch:h,subscribe:d,getState:c,replaceReducer:v,[tM]:g}}function Fue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:w1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:w1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Lue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(fi(14));l[d]=g,s=s||g!==v}return s=s||r.length!==Object.keys(a).length,s?l:a}}function _1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function jue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(s,...l)=>o(s,...l)},u=e.map(s=>s(a));return o=_1(...u)(i.dispatch),{...i,dispatch:o}}}function Bue(e){return iA(e)&&"type"in e&&typeof e.type=="string"}var yL=Symbol.for("immer-nothing"),nM=Symbol.for("immer-draftable"),jo=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jd=Object.getPrototypeOf;function Lc(e){return!!e&&!!e[jo]}function ps(e){return e?bL(e)||Array.isArray(e)||!!e[nM]||!!e.constructor?.[nM]||Ox(e)||Px(e):!1}var zue=Object.prototype.constructor.toString();function bL(e){if(!e||typeof e!="object")return!1;const t=jd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zue}function S1(e,t){Ax(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ax(e){const t=e[jo];return t?t.type_:Array.isArray(e)?1:Ox(e)?2:Px(e)?3:0}function gC(e,t){return Ax(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function xL(e,t,n){const r=Ax(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Uue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ox(e){return e instanceof Map}function Px(e){return e instanceof Set}function oc(e){return e.copy_||e.base_}function mC(e,t){if(Ox(e))return new Map(e);if(Px(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&bL(e))return jd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[jo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Wue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>oA(r,!0))),e}function Wue(){Na(2)}function kx(e){return Object.isFrozen(e)}var Vue={};function jc(e){const t=Vue[e];return t||Na(0,e),t}var j0;function wL(){return j0}function Hue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rM(e,t){t&&(jc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yC(e){bC(e),e.drafts_.forEach(que),e.drafts_=null}function bC(e){e===j0&&(j0=e.parent_)}function iM(e){return j0=Hue(j0,e)}function que(e){const t=e[jo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jo].modified_&&(yC(t),Na(4)),ps(e)&&(e=C1(t,e),t.parent_||E1(t,e)),t.patches_&&jc("Patches").generateReplacementPatches_(n[jo].base_,e,t.patches_,t.inversePatches_)):e=C1(t,n,[]),yC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yL?e:void 0}function C1(e,t,n){if(kx(t))return t;const r=t[jo];if(!r)return S1(t,(i,o)=>aM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return E1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),S1(o,(u,s)=>aM(e,r,i,u,s,n,a)),E1(e,i,!1),n&&e.patches_&&jc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function aM(e,t,n,r,i,o,a){if(Lc(i)){const u=o&&t&&t.type_!==3&&!gC(t.assigned_,r)?o.concat(r):void 0,s=C1(e,i,u);if(xL(n,r,s),Lc(s))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ps(i)&&!kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;C1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&E1(e,i)}}function E1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oA(t,n)}function Kue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:wL(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=aA;n&&(i=[r],o=B0);const{revoke:a,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=a,u}var aA={get(e,t){if(t===jo)return e;const n=oc(e);if(!gC(n,t))return Gue(e,n,t);const r=n[t];return e.finalized_||!ps(r)?r:r===U_(e.base_,t)?(W_(e),e.copy_[t]=wC(r,e)):r},has(e,t){return t in oc(e)},ownKeys(e){return Reflect.ownKeys(oc(e))},set(e,t,n){const r=_L(oc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=U_(oc(e),t),o=i?.[jo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Uue(n,i)&&(n!==void 0||gC(e.base_,t)))return!0;W_(e),xC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return U_(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,W_(e),xC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=oc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return jd(e.base_)},setPrototypeOf(){Na(12)}},B0={};S1(aA,(e,t)=>{B0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});B0.deleteProperty=function(e,t){return B0.set.call(this,e,t,void 0)};B0.set=function(e,t,n){return aA.set.call(this,e[0],t,n,e[0])};function U_(e,t){const n=e[jo];return(n?oc(n):e)[t]}function Gue(e,t,n){const r=_L(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function _L(e,t){if(!(t in e))return;let n=jd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jd(n)}}function xC(e){e.modified_||(e.modified_=!0,e.parent_&&xC(e.parent_))}function W_(e){e.copy_||(e.copy_=mC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Yue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(s=o,...l){return a.produce(s,c=>n.call(this,c,...l))}}typeof n!="function"&&Na(6),r!==void 0&&typeof r!="function"&&Na(7);let i;if(ps(t)){const o=iM(this),a=wC(t,void 0);let u=!0;try{i=n(a),u=!1}finally{u?yC(o):bC(o)}return rM(o,r),oM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===yL&&(i=void 0),this.autoFreeze_&&oA(i,!0),r){const o=[],a=[];jc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,s=>t(s,...u));let r,i;return[this.produce(t,n,(a,u)=>{r=a,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ps(e)||Na(8),Lc(e)&&(e=Zue(e));const t=iM(this),n=wC(e,void 0);return n[jo].isManual_=!0,bC(t),n}finishDraft(e,t){const n=e&&e[jo];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return rM(r,t),oM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=jc("Patches").applyPatches_;return Lc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function wC(e,t){const n=Ox(e)?jc("MapSet").proxyMap_(e,t):Px(e)?jc("MapSet").proxySet_(e,t):Kue(e,t);return(t?t.scope_:wL()).drafts_.push(n),n}function Zue(e){return Lc(e)||Na(10,e),SL(e)}function SL(e){if(!ps(e)||kx(e))return e;const t=e[jo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=mC(e,!0);return S1(n,(r,i)=>{xL(n,r,SL(i))}),t&&(t.finalized_=!1),n}var Bo=new Yue,CL=Bo.produce;Bo.produceWithPatches.bind(Bo);Bo.setAutoFreeze.bind(Bo);Bo.setUseStrictShallowCopy.bind(Bo);Bo.applyPatches.bind(Bo);Bo.createDraft.bind(Bo);Bo.finishDraft.bind(Bo);function Xue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Que(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Jue(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var uM=e=>Array.isArray(e)?e:[e];function ese(e){const t=Array.isArray(e[0])?e[0]:e;return Jue(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tse(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Bm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ose(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,s={},l=i.pop();typeof l=="object"&&(s=l,l=i.pop()),Xue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...s},{memoize:d,memoizeOptions:h=[],argsMemoize:v=EL,argsMemoizeOptions:g=[],devModeChecks:m={}}=c,b=uM(h),w=uM(g),x=ese(i),S=d(function(){return o++,l.apply(null,arguments)},...b),A=v(function(){a++;const C=tse(x,arguments);return u=S.apply(null,C),u},...w);return Object.assign(A,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var ase=ose(EL),use=Object.assign((e,t=ase)=>{Que(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,s)=>(a[n[s]]=u,a),{}))},{withTypes:()=>use});function AL(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var sse=AL(),lse=AL,cse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_1:_1.apply(null,arguments)},fse=e=>e&&typeof e.match=="function";function s0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(as(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Bue(r)&&r.type===e,n}var OL=class Kp extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kp.prototype)}static get[Symbol.species](){return Kp}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kp(...t[0].concat(this)):new Kp(...t.concat(this))}};function lM(e){return ps(e)?CL(e,()=>{}):e}function cM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function dse(e){return typeof e=="boolean"}var hse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new OL;return n&&(dse(n)?a.push(sse):a.push(lse(n.extraArgument))),a},pse="RTK_autoBatch",fM=e=>t=>{setTimeout(t,e)},vse=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fM(10):e.type==="callback"?e.queueNotification:fM(e.timeout),l=()=>{a=!1,o&&(o=!1,u.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const d=()=>i&&c(),h=r.subscribe(d);return u.add(c),()=>{h(),u.delete(c)}},dispatch(c){try{return i=!c?.meta?.[pse],o=!i,o&&(a||(a=!0,s(l))),r.dispatch(c)}finally{i=!0}}})},gse=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new OL(e);return r&&i.push(vse(typeof r=="object"?r:void 0)),i};function kKe(e){const t=hse(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let u;if(typeof n=="function")u=n;else if(iA(n))u=Lue(n);else throw new Error(as(1));let s;typeof r=="function"?s=r(t):s=t();let l=_1;i&&(l=cse({trace:!1,...typeof i=="object"&&i}));const c=jue(...s),d=gse(c);let h=typeof a=="function"?a(d):d();const v=l(...h);return mL(u,o,v)}function PL(e){const t={},n=[];let r;const i={addCase(o,a){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(as(28));if(u in t)throw new Error(as(29));return t[u]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function mse(e){return typeof e=="function"}function yse(e,t){let[n,r,i]=PL(t),o;if(mse(e))o=()=>lM(e());else{const u=lM(e);o=()=>u}function a(u=o(),s){let l=[n[s.type],...r.filter(({matcher:c})=>c(s)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,d)=>{if(d)if(Lc(c)){const v=d(c,s);return v===void 0?c:v}else{if(ps(c))return CL(c,h=>d(h,s));{const h=d(c,s);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},u)}return a.getInitialState=o,a}var bse=(e,t)=>fse(e)?e.match(t):e(t);function xse(...e){return t=>e.some(n=>bse(n,t))}var wse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_se=(e=21)=>{let t="",n=e;for(;n--;)t+=wse[Math.random()*64|0];return t},Sse=["name","message","stack","code"],V_=class{constructor(e,t){this.payload=e,this.meta=t}_type},dM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Cse=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Sse)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},TKe=(()=>{function e(t,n,r){const i=s0(t+"/fulfilled",(s,l,c,d)=>({payload:s,meta:{...d||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=s0(t+"/pending",(s,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:s,requestStatus:"pending"}})),a=s0(t+"/rejected",(s,l,c,d,h)=>({payload:d,error:(r&&r.serializeError||Cse)(s||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:s?.name==="AbortError",condition:s?.name==="ConditionError"}}));function u(s){return(l,c,d)=>{const h=r?.idGenerator?r.idGenerator(s):_se(),v=new AbortController;let g,m;function b(x){m=x,v.abort()}const w=async function(){let x;try{let A=r?.condition?.(s,{getState:c,extra:d});if(Ase(A)&&(A=await A),A===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,T)=>{g=()=>{T({name:"AbortError",message:m||"Aborted"})},v.signal.addEventListener("abort",g)});l(o(h,s,r?.getPendingMeta?.({requestId:h,arg:s},{getState:c,extra:d}))),x=await Promise.race([E,Promise.resolve(n(s,{dispatch:l,getState:c,extra:d,requestId:h,signal:v.signal,abort:b,rejectWithValue:(C,T)=>new V_(C,T),fulfillWithValue:(C,T)=>new dM(C,T)})).then(C=>{if(C instanceof V_)throw C;return C instanceof dM?i(C.payload,h,s,C.meta):i(C,h,s)})])}catch(A){x=A instanceof V_?a(null,h,s,A.payload,A.meta):a(A,h,s)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:s,unwrap(){return w.then(Ese)}})}}return Object.assign(u,{pending:o,rejected:a,fulfilled:i,settled:xse(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ese(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ase(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ose=Symbol.for("rtk-slice-createasyncthunk");function Pse(e,t){return`${e}/${t}`}function kse({creators:e}={}){const t=e?.asyncThunk?.[Ose];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(as(11));const a=(typeof r.reducers=="function"?r.reducers(Mse()):r.reducers)||{},u=Object.keys(a),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const A=typeof x=="string"?x:x.type;if(!A)throw new Error(as(12));if(A in s.sliceCaseReducersByType)throw new Error(as(13));return s.sliceCaseReducersByType[A]=S,l},addMatcher(x,S){return s.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return s.actionCreators[x]=S,l},exposeCaseReducer(x,S){return s.sliceCaseReducersByName[x]=S,l}};u.forEach(x=>{const S=a[x],A={reducerName:x,type:Pse(i,x),createNotation:typeof r.reducers=="function"};Dse(S)?Ise(A,S,l,t):Rse(A,S,l)});function c(){const[x={},S=[],A=void 0]=typeof r.extraReducers=="function"?PL(r.extraReducers):[r.extraReducers],E={...x,...s.sliceCaseReducersByType};return yse(r.initialState,C=>{for(let T in E)C.addCase(T,E[T]);for(let T of s.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of S)C.addMatcher(T.matcher,T.reducer);A&&C.addDefaultCase(A)})}const d=x=>x,h=new Map;let v;function g(x,S){return v||(v=c()),v(x,S)}function m(){return v||(v=c()),v.getInitialState()}function b(x,S=!1){function A(C){let T=C[x];return typeof T>"u"&&S&&(T=m()),T}function E(C=d){const T=cM(h,S,()=>new WeakMap);return cM(T,C,()=>{const M={};for(const[F,U]of Object.entries(r.selectors??{}))M[F]=Tse(U,C,m,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(A)},selectSlice:A}}const w={name:i,reducer:g,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:m,...b(o),injectInto(x,{reducerPath:S,...A}={}){const E=S??o;return x.inject({reducerPath:E,reducer:g},A),{...w,...b(E,!0)}}};return w}}function Tse(e,t,n,r){function i(o,...a){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...a)}return i.unwrapped=e,i}var MKe=kse();function Mse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Rse({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!$se(r))throw new Error(as(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?s0(e,a):s0(e))}function Dse(e){return e._reducerDefinitionType==="asyncThunk"}function $se(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ise({type:e,reducerName:t},n,r,i){if(!i)throw new Error(as(18));const{payloadCreator:o,fulfilled:a,pending:u,rejected:s,settled:l,options:c}=n,d=i(e,o,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),u&&r.addCase(d.pending,u),s&&r.addCase(d.rejected,s),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||zm,pending:u||zm,rejected:s||zm,settled:l||zm})}function zm(){}function as(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function kL(e,t){return function(){return e.apply(t,arguments)}}const{toString:Nse}=Object.prototype,{getPrototypeOf:uA}=Object,Tx=(e=>t=>{const n=Nse.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ja=e=>(e=e.toLowerCase(),t=>Tx(t)===e),Mx=e=>t=>typeof t===e,{isArray:Ah}=Array,z0=Mx("undefined");function Fse(e){return e!==null&&!z0(e)&&e.constructor!==null&&!z0(e.constructor)&&$o(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const TL=Ja("ArrayBuffer");function Lse(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&TL(e.buffer),t}const jse=Mx("string"),$o=Mx("function"),ML=Mx("number"),Rx=e=>e!==null&&typeof e=="object",Bse=e=>e===!0||e===!1,$y=e=>{if(Tx(e)!=="object")return!1;const t=uA(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zse=Ja("Date"),Use=Ja("File"),Wse=Ja("Blob"),Vse=Ja("FileList"),Hse=e=>Rx(e)&&$o(e.pipe),qse=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||$o(e.append)&&((t=Tx(e))==="formdata"||t==="object"&&$o(e.toString)&&e.toString()==="[object FormData]"))},Kse=Ja("URLSearchParams"),[Gse,Yse,Zse,Xse]=["ReadableStream","Request","Response","Headers"].map(Ja),Qse=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function og(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ah(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const mc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DL=e=>!z0(e)&&e!==mc;function _C(){const{caseless:e}=DL(this)&&this||{},t={},n=(r,i)=>{const o=e&&RL(t,i)||i;$y(t[o])&&$y(r)?t[o]=_C(t[o],r):$y(r)?t[o]=_C({},r):Ah(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(og(t,(i,o)=>{n&&$o(i)?e[o]=kL(i,n):e[o]=i},{allOwnKeys:r}),e),ele=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nle=(e,t,n,r)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=n!==!1&&uA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rle=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ile=e=>{if(!e)return null;if(Ah(e))return e;let t=e.length;if(!ML(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ole=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uA(Uint8Array)),ale=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ule=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sle=Ja("HTMLFormElement"),lle=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),hM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cle=Ja("RegExp"),$L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};og(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},fle=e=>{$L(e,(t,n)=>{if($o(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if($o(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dle=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ah(e)?r(e):r(String(e).split(t)),n},hle=()=>{},ple=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,H_="abcdefghijklmnopqrstuvwxyz",pM="0123456789",IL={DIGIT:pM,ALPHA:H_,ALPHA_DIGIT:H_+H_.toUpperCase()+pM},vle=(e=16,t=IL.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function gle(e){return!!(e&&$o(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mle=e=>{const t=new Array(10),n=(r,i)=>{if(Rx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ah(r)?[]:{};return og(r,(a,u)=>{const s=n(a,i+1);!z0(s)&&(o[u]=s)}),t[i]=void 0,o}}return r};return n(e,0)},yle=Ja("AsyncFunction"),ble=e=>e&&(Rx(e)||$o(e))&&$o(e.then)&&$o(e.catch),NL=((e,t)=>e?setImmediate:t?((n,r)=>(mc.addEventListener("message",({source:i,data:o})=>{i===mc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),mc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",$o(mc.postMessage)),xle=typeof queueMicrotask<"u"?queueMicrotask.bind(mc):typeof process<"u"&&process.nextTick||NL,_e={isArray:Ah,isArrayBuffer:TL,isBuffer:Fse,isFormData:qse,isArrayBufferView:Lse,isString:jse,isNumber:ML,isBoolean:Bse,isObject:Rx,isPlainObject:$y,isReadableStream:Gse,isRequest:Yse,isResponse:Zse,isHeaders:Xse,isUndefined:z0,isDate:zse,isFile:Use,isBlob:Wse,isRegExp:cle,isFunction:$o,isStream:Hse,isURLSearchParams:Kse,isTypedArray:ole,isFileList:Vse,forEach:og,merge:_C,extend:Jse,trim:Qse,stripBOM:ele,inherits:tle,toFlatObject:nle,kindOf:Tx,kindOfTest:Ja,endsWith:rle,toArray:ile,forEachEntry:ale,matchAll:ule,isHTMLForm:sle,hasOwnProperty:hM,hasOwnProp:hM,reduceDescriptors:$L,freezeMethods:fle,toObjectSet:dle,toCamelCase:lle,noop:hle,toFiniteNumber:ple,findKey:RL,global:mc,isContextDefined:DL,ALPHABET:IL,generateString:vle,isSpecCompliantForm:gle,toJSONObject:mle,isAsyncFn:yle,isThenable:ble,setImmediate:NL,asap:xle};function Ht(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_e.inherits(Ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const FL=Ht.prototype,LL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{LL[e]={value:e}});Object.defineProperties(Ht,LL);Object.defineProperty(FL,"isAxiosError",{value:!0});Ht.from=(e,t,n,r,i,o)=>{const a=Object.create(FL);return _e.toFlatObject(e,a,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),Ht.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const wle=null;function SC(e){return _e.isPlainObject(e)||_e.isArray(e)}function jL(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function vM(e,t,n){return e?e.concat(t).map(function(i,o){return i=jL(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function _le(e){return _e.isArray(e)&&!e.some(SC)}const Sle=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Dx(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!_e.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(_e.isDate(g))return g.toISOString();if(!s&&_e.isBlob(g))throw new Ht("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(g)||_e.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,b){let w=g;if(g&&!b&&typeof g=="object"){if(_e.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(_e.isArray(g)&&_le(g)||(_e.isFileList(g)||_e.endsWith(m,"[]"))&&(w=_e.toArray(g)))return m=jL(m),w.forEach(function(S,A){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?vM([m],A,o):a===null?m:m+"[]",l(S))}),!1}return SC(g)?!0:(t.append(vM(b,m,o),l(g)),!1)}const d=[],h=Object.assign(Sle,{defaultVisitor:c,convertValue:l,isVisitable:SC});function v(g,m){if(!_e.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),_e.forEach(g,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,m,h))===!0&&v(w,m?m.concat(x):[x])}),d.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return v(e),t}function gM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function sA(e,t){this._pairs=[],e&&Dx(e,this,t)}const BL=sA.prototype;BL.append=function(t,n){this._pairs.push([t,n])};BL.toString=function(t){const n=t?function(r){return t.call(this,r,gM)}:gM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Cle(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zL(e,t,n){if(!t)return e;const r=n&&n.encode||Cle;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new sA(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class mM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const UL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ele=typeof URLSearchParams<"u"?URLSearchParams:sA,Ale=typeof FormData<"u"?FormData:null,Ole=typeof Blob<"u"?Blob:null,Ple={isBrowser:!0,classes:{URLSearchParams:Ele,FormData:Ale,Blob:Ole},protocols:["http","https","file","blob","url","data"]},lA=typeof window<"u"&&typeof document<"u",CC=typeof navigator=="object"&&navigator||void 0,kle=lA&&(!CC||["ReactNative","NativeScript","NS"].indexOf(CC.product)<0),Tle=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mle=lA&&window.location.href||"http://localhost",Rle=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lA,hasStandardBrowserEnv:kle,hasStandardBrowserWebWorkerEnv:Tle,navigator:CC,origin:Mle},Symbol.toStringTag,{value:"Module"})),Mi={...Rle,...Ple};function Dle(e,t){return Dx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function $le(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ile(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,s?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!u):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=Ile(i[a])),!u)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t($le(r),i,n,0)}),n}return null}function Nle(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ag={transitional:UL,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(WL(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Dle(t,this.formSerializer).toString();if((u=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Dx(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Nle(t)):t}],transformResponse:[function(t){const n=this.transitional||ag.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?Ht.from(u,Ht.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{ag.headers[e]={}});const Fle=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lle=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Fle[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yM=Symbol("internals");function Ep(e){return e&&String(e).trim().toLowerCase()}function Iy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Iy):String(e)}function jle(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ble=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function q_(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function zle(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ule(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class co{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,s,l){const c=Ep(s);if(!c)throw new Error("header name must be a non-empty string");const d=_e.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||s]=Iy(u))}const a=(u,s)=>_e.forEach(u,(l,c)=>o(l,c,s));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!Ble(t))a(Lle(t),n);else if(_e.isHeaders(t))for(const[u,s]of t.entries())o(s,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ep(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return jle(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ep(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||q_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Ep(a),a){const u=_e.findKey(r,a);u&&(!n||q_(r,r[u],u,n))&&(delete r[u],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||q_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Iy(i),delete n[o];return}const u=t?zle(o):String(o).trim();u!==o&&delete n[o],n[u]=Iy(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[yM]=this[yM]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=Ep(a);r[u]||(Ule(i,a),r[u]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}co.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(co.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(co);function K_(e,t){const n=this||ag,r=t||n,i=co.from(r.headers);let o=r.data;return _e.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function VL(e){return!!(e&&e.__CANCEL__)}function Oh(e,t,n){Ht.call(this,e??"canceled",Ht.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits(Oh,Ht,{__CANCEL__:!0});function HL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vle(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(s){const l=Date.now(),c=r[o];a||(a=l),n[i]=s,r[i]=l;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const A1=(e,t,n=3)=>{let r=0;const i=Vle(50,250);return Hle(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,s=a-r,l=i(s),c=a<=u;r=a;const d={loaded:a,total:u,progress:u?a/u:void 0,bytes:s,rate:l||void 0,estimated:l&&u&&c?(u-a)/l:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(d)},n)},bM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xM=e=>(...t)=>_e.asap(()=>e(...t)),qle=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Kle=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yle(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qL(e,t){return e&&!Gle(t)?Yle(e,t):t}const wM=e=>e instanceof co?{...e}:e;function Bc(e,t){t=t||{};const n={};function r(l,c,d,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,d,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,d,h)}else return r(l,c,d,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function u(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(l,c,d)=>i(wM(l),wM(c),d,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||i,h=d(e[c],t[c],c);_e.isUndefined(h)&&d!==u||(n[c]=h)}),n}const KL=e=>{const t=Bc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:u}=t;t.headers=a=co.from(a),t.url=zL(qL(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[l,...c]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&qle(t.url))){const l=i&&o&&Kle.read(o);l&&a.set(i,l)}return t},Zle=typeof XMLHttpRequest<"u",Xle=Zle&&function(e){return new Promise(function(n,r){const i=KL(e);let o=i.data;const a=co.from(i.headers).normalize();let{responseType:u,onUploadProgress:s,onDownloadProgress:l}=i,c,d,h,v,g;function m(){v&&v(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=co.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};HL(function(T){n(T),m()},function(T){r(T),m()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Ht("Request aborted",Ht.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Ht("Network Error",Ht.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||UL;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new Ht(A,E.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(A,E){b.setRequestHeader(E,A)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),u&&u!=="json"&&(b.responseType=i.responseType),l&&([h,g]=A1(l,!0),b.addEventListener("progress",h)),s&&b.upload&&([d,v]=A1(s),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new Oh(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Wle(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Ht("Unsupported protocol "+x+":",Ht.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Qle=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,u();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Ht?c:new Oh(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Ht(`timeout ${t} of ms exceeded`,Ht.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>_e.asap(u),s}},Jle=function*(e,t){let n=e.byteLength;if(n{const i=ece(e,t);let o=0,a,u=s=>{a||(a=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:l,value:c}=await i.next();if(l){u(),s.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}s.enqueue(new Uint8Array(c))}catch(l){throw u(l),l}},cancel(s){return u(s),i.return()}},{highWaterMark:2})},$x=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",GL=$x&&typeof ReadableStream=="function",nce=$x&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),YL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rce=GL&&YL(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),SM=64*1024,EC=GL&&YL(()=>_e.isReadableStream(new Response("").body)),O1={stream:EC&&(e=>e.body)};$x&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!O1[t]&&(O1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ht(`Response type '${t}' is not supported`,Ht.ERR_NOT_SUPPORT,r)})})})(new Response);const ice=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await nce(e)).byteLength},oce=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??ice(t)},ace=$x&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:h}=KL(e);l=l?(l+"").toLowerCase():"text";let v=Qle([i,o&&o.toAbortSignal()],a),g;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(s&&rce&&n!=="get"&&n!=="head"&&(b=await oce(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[T,M]=bM(b,A1(xM(s)));r=_M(E.body,SM,T,M)}}_e.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(g);const S=EC&&(l==="stream"||l==="response");if(EC&&(u||S&&m)){const E={};["status","statusText","headers"].forEach(F=>{E[F]=x[F]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[T,M]=u&&bM(C,A1(xM(u),!0))||[];x=new Response(_M(x.body,SM,T,()=>{M&&M(),m&&m()}),E)}l=l||"text";let A=await O1[_e.findKey(O1,l)||"text"](x,e);return!S&&m&&m(),await new Promise((E,C)=>{HL(E,C,{data:A,headers:co.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ht("Network Error",Ht.ERR_NETWORK,e,g),{cause:w.cause||w}):Ht.from(w,w&&w.code,e,g)}}),AC={http:wle,xhr:Xle,fetch:ace};_e.forEach(AC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const CM=e=>`- ${e}`,uce=e=>_e.isFunction(e)||e===null||e===!1,ZL={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : -`+o.map(CM).join(` -`):" "+CM(o[0]):"as no adapter specified";throw new Ht("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:AC};function G_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oh(null,e)}function EM(e){return G_(e),e.headers=co.from(e.headers),e.data=K_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ZL.getAdapter(e.adapter||ag.adapter)(e).then(function(r){return G_(e),r.data=K_.call(e,e.transformResponse,r),r.headers=co.from(r.headers),r},function(r){return VL(r)||(G_(e),r&&r.response&&(r.response.data=K_.call(e,e.transformResponse,r.response),r.response.headers=co.from(r.response.headers))),Promise.reject(r)})}const XL="1.7.9",Ix={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ix[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const AM={};Ix.transitional=function(t,n,r){function i(o,a){return"[Axios v"+XL+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,u)=>{if(t===!1)throw new Ht(i(a," has been removed"+(n?" in "+n:"")),Ht.ERR_DEPRECATED);return n&&!AM[a]&&(AM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,u):!0}};Ix.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sce(e,t,n){if(typeof e!="object")throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const u=e[o],s=u===void 0||a(u,o,e);if(s!==!0)throw new Ht("option "+o+" must be "+s,Ht.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}}const Ny={assertOptions:sce,validators:Ix},uu=Ny.validators;class Ac{constructor(t){this.defaults=t,this.interceptors={request:new mM,response:new mM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ny.assertOptions(r,{silentJSONParsing:uu.transitional(uu.boolean),forcedJSONParsing:uu.transitional(uu.boolean),clarifyTimeoutError:uu.transitional(uu.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Ny.assertOptions(i,{encode:uu.function,serialize:uu.function},!0)),Ny.assertOptions(n,{baseUrl:uu.spelling("baseURL"),withXsrfToken:uu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=co.concat(a,o);const u=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,u.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,h;if(!s){const g=[EM.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,l),h=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{r.subscribe(u),o=u}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,u){r.reason||(r.reason=new Oh(o,a,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cA(function(i){t=i}),cancel:t}}}function lce(e){return function(n){return e.apply(null,n)}}function cce(e){return _e.isObject(e)&&e.isAxiosError===!0}const OC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(OC).forEach(([e,t])=>{OC[t]=e});function QL(e){const t=new Ac(e),n=kL(Ac.prototype.request,t);return _e.extend(n,Ac.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return QL(Bc(e,i))},n}const Kr=QL(ag);Kr.Axios=Ac;Kr.CanceledError=Oh;Kr.CancelToken=cA;Kr.isCancel=VL;Kr.VERSION=XL;Kr.toFormData=Dx;Kr.AxiosError=Ht;Kr.Cancel=Kr.CanceledError;Kr.all=function(t){return Promise.all(t)};Kr.spread=lce;Kr.isAxiosError=cce;Kr.mergeConfig=Bc;Kr.AxiosHeaders=co;Kr.formToJSON=e=>WL(_e.isHTMLForm(e)?new FormData(e):e);Kr.getAdapter=ZL.getAdapter;Kr.HttpStatusCode=OC;Kr.default=Kr;var fce=e=>{switch(e){case"success":return pce;case"info":return gce;case"warning":return vce;case"error":return mce;default:return null}},dce=Array(12).fill(0),hce=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},dce.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),vce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bce=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},PC=1,xce=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:PC++,o=this.toasts.find(u=>u.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async s=>{if(o=["resolve",s],j.isValidElement(s))i=!1,this.create({id:n,type:"default",message:s});else if(_ce(s)&&!s.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(s):t.success,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async s=>{if(o=["reject",s],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(s):t.error,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var s;i&&(this.dismiss(n),n=void 0),(s=t.finally)==null||s.call(t)}),u=()=>new Promise((s,l)=>a.then(()=>o[0]==="reject"?l(o[1]):s(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=t?.id||PC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ao=new xce,wce=(e,t)=>{let n=t?.id||PC++;return Ao.addToast({title:e,...t,id:n}),n},_ce=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Sce=wce,Cce=()=>Ao.toasts,RKe=Object.assign(Sce,{success:Ao.success,info:Ao.info,warning:Ao.warning,error:Ao.error,custom:Ao.custom,message:Ao.message,promise:Ao.promise,dismiss:Ao.dismiss,loading:Ao.loading},{getHistory:Cce});function Ece(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ece(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function Um(e){return e.label!==void 0}var Ace=3,Oce="32px",OM=4e3,Pce=356,kce=14,Tce=20,Mce=200;function Rce(...e){return e.filter(Boolean).join(" ")}var Dce=e=>{var t,n,r,i,o,a,u,s,l,c,d;let{invert:h,toast:v,unstyled:g,interacting:m,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:A,expanded:E,removeToast:C,defaultRichColors:T,closeButton:M,style:F,cancelButtonStyle:U,actionButtonStyle:H,className:W="",descriptionClassName:ie="",duration:Z,position:G,gap:K,loadingIcon:V,expandByDefault:B,classNames:q,icons:Y,closeButtonAriaLabel:ue="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[se,de]=j.useState(!1),[Se,ge]=j.useState(!1),[Ze,Oe]=j.useState(!1),[Fe,$e]=j.useState(!1),[be,yt]=j.useState(!1),[lt,It]=j.useState(0),[mn,en]=j.useState(0),re=j.useRef(v.duration||Z||OM),pe=j.useRef(null),ye=j.useRef(null),Ue=S===0,je=S+1<=w,ke=v.type,nt=v.dismissible!==!1,gt=v.className||"",bn=v.descriptionClassName||"",Vt=j.useMemo(()=>x.findIndex(_t=>_t.toastId===v.id)||0,[x,v.id]),xn=j.useMemo(()=>{var _t;return(_t=v.closeButton)!=null?_t:M},[v.closeButton,M]);j.useMemo(()=>v.duration||Z||OM,[v.duration,Z]);let Ii=j.useRef(0),br=j.useRef(0),yi=j.useRef(0),ar=j.useRef(null),[ui,bi]=G.split("-"),Rr=j.useMemo(()=>x.reduce((_t,dn,wn)=>wn>=Vt?_t:_t+dn.height,0),[x,Vt]),Yi=bce(),go=v.invert||h,xi=ke==="loading";br.current=j.useMemo(()=>Vt*K+Rr,[Vt,Rr]),j.useEffect(()=>{de(!0)},[]),j.useEffect(()=>{let _t=ye.current;if(_t){let dn=_t.getBoundingClientRect().height;return en(dn),b(wn=>[{toastId:v.id,height:dn,position:v.position},...wn]),()=>b(wn=>wn.filter(qn=>qn.toastId!==v.id))}},[b,v.id]),j.useLayoutEffect(()=>{if(!se)return;let _t=ye.current,dn=_t.style.height;_t.style.height="auto";let wn=_t.getBoundingClientRect().height;_t.style.height=dn,en(wn),b(qn=>qn.find(ur=>ur.toastId===v.id)?qn.map(ur=>ur.toastId===v.id?{...ur,height:wn}:ur):[{toastId:v.id,height:wn,position:v.position},...qn])},[se,v.title,v.description,b,v.id]);let Dr=j.useCallback(()=>{ge(!0),It(br.current),b(_t=>_t.filter(dn=>dn.toastId!==v.id)),setTimeout(()=>{C(v)},Mce)},[v,C,b,br]);j.useEffect(()=>{if(v.promise&&ke==="loading"||v.duration===1/0||v.type==="loading")return;let _t;return E||m||Q&&Yi?(()=>{if(yi.current{var dn;(dn=v.onAutoClose)==null||dn.call(v,v),Dr()},re.current)),()=>clearTimeout(_t)},[E,m,v,ke,Q,Yi,Dr]),j.useEffect(()=>{v.delete&&Dr()},[Dr,v.delete]);function wa(){var _t,dn,wn;return Y!=null&&Y.loading?j.createElement("div",{className:J(q?.loader,(_t=v?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):V?j.createElement("div",{className:J(q?.loader,(dn=v?.classNames)==null?void 0:dn.loader,"sonner-loader"),"data-visible":ke==="loading"},V):j.createElement(hce,{className:J(q?.loader,(wn=v?.classNames)==null?void 0:wn.loader),visible:ke==="loading"})}return j.createElement("li",{tabIndex:0,ref:ye,className:J(W,gt,q?.toast,(t=v?.classNames)==null?void 0:t.toast,q?.default,q?.[ke],(n=v?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=v.richColors)!=null?r:T,"data-styled":!(v.jsx||v.unstyled||g),"data-mounted":se,"data-promise":!!v.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":ui,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":go,"data-swipe-out":Fe,"data-expanded":!!(E||B&&se),style:{"--index":S,"--toasts-before":S,"--z-index":A.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":B?"auto":`${mn}px`,...F,...v.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,It(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Oe(!0),ar.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,dn,wn,qn;if(Fe||!nt)return;ar.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Zr=new Date().getTime()-((dn=pe.current)==null?void 0:dn.getTime()),mo=Math.abs(ur)/Zr;if(Math.abs(ur)>=Tce||mo>.11){It(br.current),(wn=v.onDismiss)==null||wn.call(v,v),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Oe(!1)},onPointerMove:_t=>{var dn,wn;if(!ar.current||!nt)return;let qn=_t.clientY-ar.current.y,ur=((dn=window.getSelection())==null?void 0:dn.toString().length)>0,Zr=ui==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Zr)>0&&yt(!0),!ur&&((wn=ye.current)==null||wn.style.setProperty("--swipe-amount",`${Zr}px`))}},xn&&!v.jsx?j.createElement("button",{"aria-label":ue,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=v.onDismiss)==null||_t.call(v,v)},className:J(q?.closeButton,(i=v?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:yce):null,v.jsx||j.isValidElement(v.title)?v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title:j.createElement(j.Fragment,null,ke||v.icon||v.promise?j.createElement("div",{"data-icon":"",className:J(q?.icon,(a=v?.classNames)==null?void 0:a.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||wa():null,v.type!=="loading"?v.icon||Y?.[ke]||fce(ke):null):null,j.createElement("div",{"data-content":"",className:J(q?.content,(u=v?.classNames)==null?void 0:u.content)},j.createElement("div",{"data-title":"",className:J(q?.title,(s=v?.classNames)==null?void 0:s.title)},typeof v.title=="function"?v.title():v.title),v.description?j.createElement("div",{"data-description":"",className:J(ie,bn,q?.description,(l=v?.classNames)==null?void 0:l.description)},typeof v.description=="function"?v.description():v.description):null),j.isValidElement(v.cancel)?v.cancel:v.cancel&&Um(v.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||U,onClick:_t=>{var dn,wn;Um(v.cancel)&&nt&&((wn=(dn=v.cancel).onClick)==null||wn.call(dn,_t),Dr())},className:J(q?.cancelButton,(c=v?.classNames)==null?void 0:c.cancelButton)},v.cancel.label):null,j.isValidElement(v.action)?v.action:v.action&&Um(v.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||H,onClick:_t=>{var dn,wn;Um(v.action)&&((wn=(dn=v.action).onClick)==null||wn.call(dn,_t),!_t.defaultPrevented&&Dr())},className:J(q?.actionButton,(d=v?.classNames)==null?void 0:d.actionButton)},v.action.label):null))};function PM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var DKe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:u,offset:s,theme:l="light",richColors:c,duration:d,style:h,visibleToasts:v=Ace,toastOptions:g,dir:m=PM(),gap:b=kce,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:A,cn:E=Rce}=e,[C,T]=j.useState([]),M=j.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[F,U]=j.useState([]),[H,W]=j.useState(!1),[ie,Z]=j.useState(!1),[G,K]=j.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=j.useRef(null),B=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=j.useRef(null),Y=j.useRef(!1),ue=j.useCallback(Q=>{T(J=>{var se;return(se=J.find(de=>de.id===Q.id))!=null&&se.delete||Ao.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return j.useEffect(()=>Ao.subscribe(Q=>{if(Q.dismiss){T(J=>J.map(se=>se.id===Q.id?{...se,delete:!0}:se));return}setTimeout(()=>{_x.flushSync(()=>{T(J=>{let se=J.findIndex(de=>de.id===Q.id);return se!==-1?[...J.slice(0,se),{...J[se],...Q},...J.slice(se+1)]:[Q,...J]})})})}),[]),j.useEffect(()=>{if(l!=="system"){K(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{K(J?"dark":"light")})}catch{Q.addListener(({matches:se})=>{try{K(se?"dark":"light")}catch(de){console.error(de)}})}},[l]),j.useEffect(()=>{C.length<=1&&W(!1)},[C]),j.useEffect(()=>{let Q=J=>{var se,de;i.every(Se=>J[Se]||J.code===Se)&&(W(!0),(se=V.current)==null||se.focus()),J.code==="Escape"&&(document.activeElement===V.current||(de=V.current)!=null&&de.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),j.useEffect(()=>{if(V.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,Y.current=!1)}},[V.current]),j.createElement("section",{"aria-label":`${S} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var se;let[de,Se]=Q.split("-");return C.length?j.createElement("ol",{key:Q,dir:m==="auto"?PM():m,tabIndex:-1,ref:V,className:u,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((se=F[0])==null?void 0:se.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||Oce,"--width":`${Pce}px`,"--gap":`${b}px`,...h},onBlur:ge=>{Y.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Y.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,q.current=ge.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{ie||W(!1)},onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(ge=>!ge.position&&J===0||ge.position===Q).map((ge,Ze)=>{var Oe,Fe;return j.createElement(Dce,{key:ge.id,icons:x,index:Ze,toast:ge,defaultRichColors:c,duration:(Oe=g?.duration)!=null?Oe:d,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Fe=g?.closeButton)!=null?Fe:a,interacting:ie,position:Q,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:ue,toasts:C.filter($e=>$e.position==ge.position),heights:F.filter($e=>$e.position==ge.position),setHeights:U,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:A,cn:E})})):null}))}),Ph=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zc=typeof window>"u"||"Deno"in globalThis;function ra(){}function $ce(e,t){return typeof e=="function"?e(t):e}function kC(e){return typeof e=="number"&&e>=0&&e!==1/0}function JL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bd(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){return typeof e=="function"?e(t):e}function kM(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==fA(a,t.options))return!1}else if(!U0(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function TM(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Uc(t.options.mutationKey)!==Uc(o))return!1}else if(!U0(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function fA(e,t){return(t?.queryKeyHashFn||Uc)(e)}function Uc(e){return JSON.stringify(e,(t,n)=>TC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function U0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!U0(e[n],t[n])):!1}function ej(e,t){if(e===t)return e;const n=MM(e)&&MM(t);if(n||TC(e)&&TC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,u=n?[]:{};let s=0;for(let l=0;l{setTimeout(t,e)})}function MC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ej(e,t):t}function Nce(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fce(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dA=Symbol();function tj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Lce=class extends Ph{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},hA=new Lce,jce=class extends Ph{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},k1=new jce;function RC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Bce(e){return Math.min(1e3*2**e,3e4)}function nj(e){return(e??"online")==="online"?k1.isOnline():!0}var rj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Y_(e){return e instanceof rj}function ij(e){let t=!1,n=0,r=!1,i;const o=RC(),a=m=>{r||(h(new rj(m)),e.abort?.())},u=()=>{t=!0},s=()=>{t=!1},l=()=>hA.isFocused()&&(e.networkMode==="always"||k1.isOnline())&&e.canRun(),c=()=>nj(e.networkMode)&&e.canRun(),d=m=>{r||(r=!0,e.onSuccess?.(m),i?.(),o.resolve(m))},h=m=>{r||(r=!0,e.onError?.(m),i?.(),o.reject(m))},v=()=>new Promise(m=>{i=b=>{(r||l())&&m(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),g=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{if(r)return;const x=e.retry??(zc?0:3),S=e.retryDelay??Bce,A=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:v()).then(()=>{t?h(w):g()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:s,canStart:c,start:()=>(c()?g():v().then(g),o)}}function zce(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(s=>{n(s)})})})};return{batch:u=>{let s;t++;try{s=u()}finally{t--,t||a()}return s},batchCalls:u=>(...s)=>{o(()=>{u(...s)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Ur=zce(),oj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Uce=class extends oj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Wce(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=MC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ia(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!JL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(s=>s.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const u=tj(this.options,t),s={queryKey:this.queryKey,meta:this.meta};return r(s),this.#o=!1,this.options.persister?this.options.persister(u,s,this):u(s)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=u=>{Y_(u)&&u.silent||this.#i({type:"error",error:u}),Y_(u)||(this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this)),this.scheduleGc()};return this.#n=ij({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(s){a(s);return}this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,s)=>{this.#i({type:"failed",failureCount:u,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...aj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Y_(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function aj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wce(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vce=class extends Ph{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??fA(r,t);let o=this.get(i);return o||(o=new Uce({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kM(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kM(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Hce=class extends oj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||uj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=ij({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function uj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qce=class extends Ph{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Hce({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Wm(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=Wm(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(Wm(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(Wm(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>TM(t,n))}findAll(e={}){return this.getAll().filter(t=>TM(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(ra))))}};function Wm(e){return e.options.scope?.id??String(e.mutationId)}function DM(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},s=0;const l=async()=>{let c=!1;const d=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=tj(t.options,t.fetchOptions),v=async(g,m,b)=>{if(c)return Promise.reject();if(m==null&&g.pages.length)return Promise.resolve(g);const w={queryKey:t.queryKey,pageParam:m,direction:b?"backward":"forward",meta:t.options.meta};d(w);const x=await h(w),{maxPages:S}=t.options,A=b?Fce:Nce;return{pages:A(g.pages,x,S),pageParams:A(g.pageParams,m,S)}};if(i&&o.length){const g=i==="backward",m=g?Kce:$M,b={pages:o,pageParams:a},w=m(r,b);u=await v(b,w,g)}else{const g=e??o.length;do{const m=s===0?a[0]??r.initialPageParam:$M(r,u);if(s>0&&m==null)break;u=await v(u,m),s++}while(st.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function $M(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Kce(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $Ke=class{#e;#t;#r;#n;#a;#o;#i;#u;constructor(e={}){this.#e=e.queryCache||new Vce,this.#t=e.mutationCache||new qce,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=hA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=k1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(bd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=$ce(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ra)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ra)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(bd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e.behavior=DM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e.behavior=DM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return k1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(Uc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{U0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Uc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{U0(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dA&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Gce=class extends Ph{constructor(e,t){super(),this.options=t,this.#e=e,this.#u=null,this.#i=RC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#u;#v;#d;#h;#l;#c;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),IM(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return DC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return DC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ia(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!P1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&NM(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||bd(this.options.staleTime,this.#t)!==bd(n.staleTime,this.#t))&&this.#g();const o=this.#m();i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||o!==this.#s)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Zce(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ra)),t}#g(){this.#x();const e=bd(this.options.staleTime,this.#t);if(zc||this.#n.isStale||!kC(e))return;const n=JL(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#s=e,!(zc||Ia(this.options.enabled,this.#t)===!1||!kC(this.#s)||this.#s===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||hA.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#m())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,s=e!==n?e.state:this.#r,{state:l}=e;let c={...l},d=!1,h;if(t._optimisticResults){const T=this.hasListeners(),M=!T&&IM(e,t),F=T&&NM(e,n,t,r);(M||F)&&(c={...c,...aj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:m}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#v)h=this.#d;else try{this.#v=t.select,h=t.select(c.data),h=MC(i?.data,h,t),this.#d=h,this.#u=null}catch(T){this.#u=T}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&m==="pending"){let T;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)T=i.data;else if(T=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&T!==void 0)try{T=t.select(T),this.#u=null}catch(M){this.#u=M}T!==void 0&&(m="success",h=MC(i?.data,T,t),d=!0)}this.#u&&(v=this.#u,h=this.#d,g=Date.now(),m="error");const b=c.fetchStatus==="fetching",w=m==="pending",x=m==="error",S=w&&b,A=h!==void 0,C={status:m,fetchStatus:c.fetchStatus,isPending:w,isSuccess:m==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!A,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&A,isStale:pA(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const T=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},M=()=>{const U=this.#i=C.promise=RC();T(U)},F=this.#i;switch(F.status){case"pending":e.queryHash===n.queryHash&&T(F);break;case"fulfilled":(C.status==="error"||C.data!==F.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==F.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),P1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const u=new Set(a??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#n).some(s=>{const l=s;return this.#n[l]!==t[l]&&u.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Yce(e,t){return Ia(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function IM(e,t){return Yce(e,t)||e.state.data!==void 0&&DC(e,t,t.refetchOnMount)}function DC(e,t,n){if(Ia(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pA(e,t)}return!1}function NM(e,t,n,r){return(e!==t||Ia(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pA(e,n)}function pA(e,t){return Ia(t.enabled,e)!==!1&&e.isStaleByTime(bd(t.staleTime,e))}function Zce(e,t){return!P1(e.getCurrentResult(),t)}var Xce=class extends Ph{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),P1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Uc(n.mutationKey)!==Uc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??uj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},sj=y.createContext(void 0),lj=e=>{const t=y.useContext(sj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},NKe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(sj.Provider,{value:e,children:t})),cj=y.createContext(!1),Qce=()=>y.useContext(cj);cj.Provider;function Jce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var efe=y.createContext(Jce()),tfe=()=>y.useContext(efe);function fj(e,t){return typeof e=="function"?e(...t):!!e}function $C(){}var nfe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},rfe=e=>{y.useEffect(()=>{e.clearReset()},[e])},ife=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&fj(n,[e.error,r]),ofe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},afe=(e,t)=>e.isLoading&&e.isFetching&&!t,ufe=(e,t)=>e?.suspense&&t.isPending,FM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sfe(e,t,n){const r=lj(),i=Qce(),o=tfe(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ofe(a),nfe(a,o),rfe(o);const u=!r.getQueryCache().get(a.queryHash),[s]=y.useState(()=>new t(r,a)),l=s.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const d=i?$C:s.subscribe(Ur.batchCalls(c));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),y.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),ufe(a,l))throw FM(a,s,o);if(ife({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!zc&&afe(l,i)&&(u?FM(a,s,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch($C).finally(()=>{s.updateResult()}),a.notifyOnChangeProps?l:s.trackResult(l)}function FKe(e,t){return sfe(e,Gce)}function LKe(e,t){const n=lj(),[r]=y.useState(()=>new Xce(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,u)=>{r.mutate(a,u).catch($C)},[r]);if(i.error&&fj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var ug=e=>e.type==="checkbox",yc=e=>e instanceof Date,zi=e=>e==null;const dj=e=>typeof e=="object";var Ar=e=>!zi(e)&&!Array.isArray(e)&&dj(e)&&!yc(e),hj=e=>Ar(e)&&e.target?ug(e.target)?e.target.checked:e.target.value:e,lfe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,pj=(e,t)=>e.has(lfe(t)),cfe=e=>{const t=e.constructor&&e.constructor.prototype;return Ar(t)&&t.hasOwnProperty("isPrototypeOf")},vA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function eo(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(vA&&(e instanceof Blob||r))&&(n||Ar(e)))if(t=n?[]:{},!n&&!cfe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=eo(e[i]));else return e;return t}var Nx=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Ar(e))return n;const r=Nx(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},ia=e=>typeof e=="boolean",gA=e=>/^\w*$/.test(e),vj=e=>Nx(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=gA(t)?[t]:vj(t),o=i.length,a=o-1;for(;++rj.useContext(gj),jKe=e=>{const{children:t,...n}=e;return j.createElement(gj.Provider,{value:n},t)};var mj=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Fa.all&&(t._proxyFormState[a]=!r||Fa.all),n&&(n[a]=!0),e[a]}});return i},no=e=>Ar(e)&&!Object.keys(e).length,yj=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return no(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||Fa.all))},l0=e=>Array.isArray(e)?e:[e],bj=(e,t,n)=>!e||!t||e===t||l0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function yA(e){const t=j.useRef(e);t.current=e,j.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function ffe(e){const t=mA(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,u]=j.useState(n._formState),s=j.useRef(!0),l=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=j.useRef(i);return c.current=i,yA({disabled:r,next:d=>s.current&&bj(c.current,d.name,o)&&yj(d,l.current,n._updateFormState)&&u({...n._formState,...d}),subject:n._subjects.state}),j.useEffect(()=>(s.current=!0,l.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),j.useMemo(()=>mj(a,n,l.current,!1),[a,n])}var hu=e=>typeof e=="string",xj=(e,t,n,r,i)=>hu(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function dfe(e){const t=mA(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,u=j.useRef(r);u.current=r,yA({disabled:o,subject:n._subjects.values,next:c=>{bj(u.current,c.name,a)&&l(eo(xj(u.current,n._names,c.values||n._formValues,!1,i)))}});const[s,l]=j.useState(n._getWatch(r,i));return j.useEffect(()=>n._removeUnmounted()),s}function hfe(e){const t=mA(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=pj(i._names.array,n),u=dfe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),s=ffe({control:i,name:n,exact:!0}),l=j.useRef(i.register(n,{...e.rules,value:u,...ia(e.disabled)?{disabled:e.disabled}:{}})),c=j.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(s.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(s.errors,n)}}),[s,n]),d=j.useMemo(()=>({name:n,value:u,...ia(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:hj(h),name:n},type:T1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:T1.BLUR}),ref:h=>{const v=Xe(i._fields,n);v&&h&&(v._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,s.disabled,u,i._fields]);return j.useEffect(()=>{const h=i._options.shouldUnregister||o,v=(g,m)=>{const b=Xe(i._fields,g);b&&b._f&&(b._f.mount=m)};if(v(n,!0),h){const g=eo(Xe(i._options.defaultValues,n));An(i._defaultValues,n,g),Sr(Xe(i._formValues,n))&&An(i._formValues,n,g)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):v(n,!1)}},[n,i,a,o]),j.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),j.useMemo(()=>({field:d,formState:s,fieldState:c}),[d,s,c])}const BKe=e=>e.render(hfe(e));var wj=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},LM=e=>({isOnSubmit:!e||e===Fa.onSubmit,isOnBlur:e===Fa.onBlur,isOnChange:e===Fa.onChange,isOnAll:e===Fa.all,isOnTouch:e===Fa.onTouched}),jM=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const c0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...u}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(c0(u,t))break}else if(Ar(u)&&c0(u,t))break}}};var pfe=(e,t,n)=>{const r=l0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},bA=e=>e.type==="file",cu=e=>typeof e=="function",M1=e=>{if(!vA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fy=e=>hu(e),xA=e=>e.type==="radio",R1=e=>e instanceof RegExp;const BM={value:!1,isValid:!1},zM={value:!0,isValid:!0};var _j=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?zM:{value:e[0].value,isValid:!0}:zM:BM}return BM};const UM={isValid:!1,value:null};var Sj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,UM):UM;function WM(e,t,n="validate"){if(Fy(e)||Array.isArray(e)&&e.every(Fy)||ia(e)&&!e)return{type:n,message:Fy(e)?e:"",ref:t}}var If=e=>Ar(e)&&!R1(e)?e:{value:e,message:""},VM=async(e,t,n,r,i,o)=>{const{ref:a,refs:u,required:s,maxLength:l,minLength:c,min:d,max:h,pattern:v,validate:g,name:m,valueAsNumber:b,mount:w}=e._f,x=Xe(n,m);if(!w||t.has(m))return{};const S=u?u[0]:a,A=W=>{i&&S.reportValidity&&(S.setCustomValidity(ia(W)?"":W||""),S.reportValidity())},E={},C=xA(a),T=ug(a),M=C||T,F=(b||bA(a))&&Sr(a.value)&&Sr(x)||M1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,U=wj.bind(null,m,r,E),H=(W,ie,Z,G=Wu.maxLength,K=Wu.minLength)=>{const V=W?ie:Z;E[m]={type:W?G:K,message:V,ref:a,...U(W?G:K,V)}};if(o?!Array.isArray(x)||!x.length:s&&(!M&&(F||zi(x))||ia(x)&&!x||T&&!_j(u).isValid||C&&!Sj(u).isValid)){const{value:W,message:ie}=Fy(s)?{value:!!s,message:s}:If(s);if(W&&(E[m]={type:Wu.required,message:ie,ref:S,...U(Wu.required,ie)},!r))return A(ie),E}if(!F&&(!zi(d)||!zi(h))){let W,ie;const Z=If(h),G=If(d);if(!zi(x)&&!isNaN(x)){const K=a.valueAsNumber||x&&+x;zi(Z.value)||(W=K>Z.value),zi(G.value)||(ie=Knew Date(new Date().toDateString()+" "+Y),B=a.type=="time",q=a.type=="week";hu(Z.value)&&x&&(W=B?V(x)>V(Z.value):q?x>Z.value:K>new Date(Z.value)),hu(G.value)&&x&&(ie=B?V(x)+W.value,G=!zi(ie.value)&&x.length<+ie.value;if((Z||G)&&(H(Z,W.message,ie.message),!r))return A(E[m].message),E}if(v&&!F&&hu(x)){const{value:W,message:ie}=If(v);if(R1(W)&&!x.match(W)&&(E[m]={type:Wu.pattern,message:ie,ref:a,...U(Wu.pattern,ie)},!r))return A(ie),E}if(g){if(cu(g)){const W=await g(x,n),ie=WM(W,S);if(ie&&(E[m]={...ie,...U(Wu.validate,ie.message)},!r))return A(ie.message),E}else if(Ar(g)){let W={};for(const ie in g){if(!no(W)&&!r)break;const Z=WM(await g[ie](x,n),S,ie);Z&&(W={...Z,...U(ie,Z.message)},A(Z.message),r&&(E[m]=W))}if(!no(W)&&(E[m]={ref:S,...W},!r))return E}}return A(!0),E};function vfe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},IC=e=>zi(e)||!dj(e);function Qs(e,t){if(IC(e)||IC(t))return e===t;if(yc(e)&&yc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(yc(o)&&yc(a)||Ar(o)&&Ar(a)||Array.isArray(o)&&Array.isArray(a)?!Qs(o,a):o!==a)return!1}}return!0}var Cj=e=>e.type==="select-multiple",mfe=e=>xA(e)||ug(e),X_=e=>M1(e)&&e.isConnected,Ej=e=>{for(const t in e)if(cu(e[t]))return!0;return!1};function D1(e,t={}){const n=Array.isArray(e);if(Ar(e)||n)for(const r in e)Array.isArray(e[r])||Ar(e[r])&&!Ej(e[r])?(t[r]=Array.isArray(e[r])?[]:{},D1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function Aj(e,t,n){const r=Array.isArray(e);if(Ar(e)||r)for(const i in e)Array.isArray(e[i])||Ar(e[i])&&!Ej(e[i])?Sr(t)||IC(n[i])?n[i]=Array.isArray(e[i])?D1(e[i],[]):{...D1(e[i])}:Aj(e[i],zi(t)?{}:t[i],n[i]):n[i]=!Qs(e[i],t[i]);return n}var Ap=(e,t)=>Aj(e,t,D1(t)),Oj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&hu(e)?new Date(e):r?r(e):e;function Q_(e){const t=e.ref;return bA(t)?t.files:xA(t)?Sj(e.refs).value:Cj(t)?[...t.selectedOptions].map(({value:n})=>n):ug(t)?_j(e.refs).value:Oj(Sr(t.value)?e.ref.value:t.value,e)}var yfe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Op=e=>Sr(e)?e:R1(e)?e.source:Ar(e)?R1(e.value)?e.value.source:e.value:e;const HM="AsyncFunction";var bfe=e=>!!e&&!!e.validate&&!!(cu(e.validate)&&e.validate.constructor.name===HM||Ar(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===HM)),xfe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function qM(e,t,n){const r=Xe(e,n);if(r||gA(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),u=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};i.pop()}return{name:n}}var wfe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,_fe=(e,t)=>!Nx(Xe(e,t)).length&&Br(e,t);const Sfe={mode:Fa.onSubmit,reValidateMode:Fa.onChange,shouldFocusError:!0};function Cfe(e={}){let t={...Sfe,...e},n={submitCount:0,isDirty:!1,isLoading:cu(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Ar(t.defaultValues)||Ar(t.values)?eo(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:eo(i),a={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},s,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Z_(),array:Z_(),state:Z_()},h=LM(t.mode),v=LM(t.reValidateMode),g=t.criteriaMode===Fa.all,m=re=>pe=>{clearTimeout(l),l=setTimeout(re,pe)},b=async re=>{if(!t.disabled&&(c.isValid||re)){const pe=t.resolver?no((await M()).errors):await U(r,!0);pe!==n.isValid&&d.state.next({isValid:pe})}},w=(re,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((re||Array.from(u.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),d.state.next({validatingFields:n.validatingFields,isValidating:!no(n.validatingFields)}))},x=(re,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,re))){const nt=ye(Xe(r,re),Ue.argA,Ue.argB);je&&An(r,re,nt)}if(ke&&Array.isArray(Xe(n.errors,re))){const nt=ye(Xe(n.errors,re),Ue.argA,Ue.argB);je&&An(n.errors,re,nt),_fe(n.errors,re)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,re))){const nt=ye(Xe(n.touchedFields,re),Ue.argA,Ue.argB);je&&An(n.touchedFields,re,nt)}c.dirtyFields&&(n.dirtyFields=Ap(i,o)),d.state.next({name:re,isDirty:W(re,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,re,pe)},S=(re,pe)=>{An(n.errors,re,pe),d.state.next({errors:n.errors})},A=re=>{n.errors=re,d.state.next({errors:n.errors,isValid:!1})},E=(re,pe,ye,Ue)=>{const je=Xe(r,re);if(je){const ke=Xe(o,re,Sr(ye)?Xe(i,re):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,re,pe?ke:Q_(je._f)):G(re,ke),a.mount&&b()}},C=(re,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const gt={name:re};if(!t.disabled){const bn=!!(Xe(r,re)&&Xe(r,re)._f&&Xe(r,re)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=gt.isDirty=W(),ke=nt!==gt.isDirty);const Vt=bn||Qs(Xe(i,re),pe);nt=!!(!bn&&Xe(n.dirtyFields,re)),Vt||bn?Br(n.dirtyFields,re):An(n.dirtyFields,re,!0),gt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Vt}if(ye){const Vt=Xe(n.touchedFields,re);Vt||(An(n.touchedFields,re,ye),gt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Vt!==ye)}ke&&je&&d.state.next(gt)}return ke?gt:{}},T=(re,pe,ye,Ue)=>{const je=Xe(n.errors,re),ke=c.isValid&&ia(pe)&&n.isValid!==pe;if(t.delayError&&ye?(s=m(()=>S(re,ye)),s(t.delayError)):(clearTimeout(l),s=null,ye?An(n.errors,re,ye):Br(n.errors,re)),(ye?!Qs(je,ye):je)||!no(Ue)||ke){const nt={...Ue,...ke&&ia(pe)?{isValid:pe}:{},errors:n.errors,name:re};n={...n,...nt},d.state.next(nt)}},M=async re=>{w(re,!0);const pe=await t.resolver(o,t.context,yfe(re||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(re),pe},F=async re=>{const{errors:pe}=await M(re);if(re)for(const ye of re){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},U=async(re,pe,ye={valid:!0})=>{for(const Ue in re){const je=re[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const gt=u.array.has(ke.name),bn=je._f&&bfe(je._f);bn&&c.validatingFields&&w([Ue],!0);const Vt=await VM(je,u.disabled,o,g,t.shouldUseNativeValidation&&!pe,gt);if(bn&&c.validatingFields&&w([Ue]),Vt[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Vt,ke.name)?gt?pfe(n.errors,Vt,ke.name):An(n.errors,ke.name,Vt[ke.name]):Br(n.errors,ke.name))}!no(nt)&&await U(nt,pe,ye)}}return ye.valid},H=()=>{for(const re of u.unMount){const pe=Xe(r,re);pe&&(pe._f.refs?pe._f.refs.every(ye=>!X_(ye)):!X_(pe._f.ref))&&Se(re)}u.unMount=new Set},W=(re,pe)=>!t.disabled&&(re&&pe&&An(o,re,pe),!Qs(ue(),i)),ie=(re,pe,ye)=>xj(re,u,{...a.mount?o:Sr(pe)?i:hu(re)?{[re]:pe}:pe},ye,pe),Z=re=>Nx(Xe(a.mount?o:i,re,t.shouldUnregister?Xe(i,re,[]):[])),G=(re,pe,ye={})=>{const Ue=Xe(r,re);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,re,Oj(pe,ke)),je=M1(ke.ref)&&zi(pe)?"":pe,Cj(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?ug(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(gt=>gt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):bA(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||d.values.next({name:re,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(re,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(re)},K=(re,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${re}.${Ue}`,nt=Xe(r,ke);(u.array.has(re)||Ar(je)||nt&&!nt._f)&&!yc(je)?K(ke,je,ye):G(ke,je,ye)}},V=(re,pe,ye={})=>{const Ue=Xe(r,re),je=u.array.has(re),ke=eo(pe);An(o,re,ke),je?(d.array.next({name:re,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&d.state.next({name:re,dirtyFields:Ap(i,o),isDirty:W(re,ke)})):Ue&&!Ue._f&&!zi(ke)?K(re,ke,ye):G(re,ke,ye),jM(re,u)&&d.state.next({...n}),d.values.next({name:a.mount?re:void 0,values:{...o}})},B=async re=>{a.mount=!0;const pe=re.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?Q_(je._f):hj(re),nt=gt=>{Ue=Number.isNaN(gt)||yc(gt)&&isNaN(gt.getTime())||Qs(gt,Xe(o,ye,gt))};if(je){let gt,bn;const Vt=ke(),xn=re.type===T1.BLUR||re.type===T1.FOCUS_OUT,Ii=!xfe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||wfe(xn,Xe(n.touchedFields,ye),n.isSubmitted,v,h),br=jM(ye,u,xn);An(o,ye,Vt),xn?(je._f.onBlur&&je._f.onBlur(re),s&&s(0)):je._f.onChange&&je._f.onChange(re);const yi=C(ye,Vt,xn,!1),ar=!no(yi)||br;if(!xn&&d.values.next({name:ye,type:re.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&xn?b():xn||b()),ar&&d.state.next({name:ye,...br?{}:yi});if(!xn&&br&&d.state.next({...n}),t.resolver){const{errors:ui}=await M([ye]);if(nt(Vt),Ue){const bi=qM(n.errors,r,ye),Rr=qM(ui,r,bi.name||ye);gt=Rr.error,ye=Rr.name,bn=no(ui)}}else w([ye],!0),gt=(await VM(je,u.disabled,o,g,t.shouldUseNativeValidation))[ye],w([ye]),nt(Vt),Ue&&(gt?bn=!1:c.isValid&&(bn=await U(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),T(ye,bn,gt,yi))}},q=(re,pe)=>{if(Xe(n.errors,pe)&&re.focus)return re.focus(),1},Y=async(re,pe={})=>{let ye,Ue;const je=l0(re);if(t.resolver){const ke=await F(Sr(re)?re:je);ye=no(ke),Ue=re?!je.some(nt=>Xe(ke,nt)):ye}else re?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await U(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await U(r);return d.state.next({...!hu(re)||c.isValid&&ye!==n.isValid?{}:{name:re},...t.resolver||!re?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&c0(r,q,re?je:u.mount),Ue},ue=re=>{const pe={...a.mount?o:i};return Sr(re)?pe:hu(re)?Xe(pe,re):re.map(ye=>Xe(pe,ye))},Q=(re,pe)=>({invalid:!!Xe((pe||n).errors,re),isDirty:!!Xe((pe||n).dirtyFields,re),error:Xe((pe||n).errors,re),isValidating:!!Xe(n.validatingFields,re),isTouched:!!Xe((pe||n).touchedFields,re)}),J=re=>{re&&l0(re).forEach(pe=>Br(n.errors,pe)),d.state.next({errors:re?n.errors:{}})},se=(re,pe,ye)=>{const Ue=(Xe(r,re,{_f:{}})._f||{}).ref,je=Xe(n.errors,re)||{},{ref:ke,message:nt,type:gt,...bn}=je;An(n.errors,re,{...bn,...pe,ref:Ue}),d.state.next({name:re,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(re,pe)=>cu(re)?d.values.subscribe({next:ye=>re(ie(void 0,pe),ye)}):ie(re,pe,!0),Se=(re,pe={})=>{for(const ye of re?l0(re):u.mount)u.mount.delete(ye),u.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);d.values.next({values:{...o}}),d.state.next({...n,...pe.keepDirty?{isDirty:W()}:{}}),!pe.keepIsValid&&b()},ge=({disabled:re,name:pe,field:ye,fields:Ue})=>{(ia(re)&&a.mount||re||u.disabled.has(pe))&&(re?u.disabled.add(pe):u.disabled.delete(pe),C(pe,Q_(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(re,pe={})=>{let ye=Xe(r,re);const Ue=ia(pe.disabled)||ia(t.disabled);return An(r,re,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:re}},name:re,mount:!0,...pe}}),u.mount.add(re),ye?ge({field:ye,disabled:ia(pe.disabled)?pe.disabled:t.disabled,name:re}):E(re,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Op(pe.min),max:Op(pe.max),minLength:Op(pe.minLength),maxLength:Op(pe.maxLength),pattern:Op(pe.pattern)}:{},name:re,onChange:B,onBlur:B,ref:je=>{if(je){Ze(re,pe),ye=Xe(r,re);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=mfe(ke),gt=ye._f.refs||[];if(nt?gt.find(bn=>bn===ke):ke===ye._f.ref)return;An(r,re,{_f:{...ye._f,...nt?{refs:[...gt.filter(X_),ke,...Array.isArray(Xe(i,re))?[{}]:[]],ref:{type:ke.type,name:re}}:{ref:ke}}}),E(re,!1,void 0,ke)}else ye=Xe(r,re,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(pj(u.array,re)&&a.action)&&u.unMount.add(re)}}},Oe=()=>t.shouldFocusError&&c0(r,q,u.mount),Fe=re=>{ia(re)&&(d.state.next({disabled:re}),c0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||re,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||re}))},0,!1))},$e=(re,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=eo(o);if(u.disabled.size)for(const ke of u.disabled)An(je,ke,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await U(r);if(Br(n.errors,"root"),no(n.errors)){d.state.next({errors:{}});try{await re(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Oe(),setTimeout(Oe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:no(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(re,pe={})=>{Xe(r,re)&&(Sr(pe.defaultValue)?V(re,eo(Xe(i,re))):(V(re,pe.defaultValue),An(i,re,eo(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,re),pe.keepDirty||(Br(n.dirtyFields,re),n.isDirty=pe.defaultValue?W(re,eo(Xe(i,re))):W()),pe.keepError||(Br(n.errors,re),c.isValid&&b()),d.state.next({...n}))},yt=(re,pe={})=>{const ye=re?eo(re):i,Ue=eo(ye),je=no(re),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...u.mount,...Object.keys(Ap(i,o))]);for(const gt of Array.from(nt))Xe(n.dirtyFields,gt)?An(ke,gt,Xe(o,gt)):V(gt,Xe(ke,gt))}else{if(vA&&Sr(re))for(const nt of u.mount){const gt=Xe(r,nt);if(gt&>._f){const bn=Array.isArray(gt._f.refs)?gt._f.refs[0]:gt._f.ref;if(M1(bn)){const Vt=bn.closest("form");if(Vt){Vt.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?eo(i):{}:eo(ke),d.array.next({values:{...ke}}),d.values.next({values:{...ke}})}u={mount:pe.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!Qs(re,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Ap(i,o):n.dirtyFields:pe.keepDefaultValues&&re?Ap(i,re):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(re,pe)=>yt(cu(re)?re(o):re,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:se,_executeSchema:M,_getWatch:ie,_getDirty:W,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:ge,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>cu(t.defaultValues)&&t.defaultValues().then(re=>{lt(re,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:re=>{n={...n,...re}},_disableForm:Fe,_subjects:d,_proxyFormState:c,_setErrors:A,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(re){a=re},get _defaultValues(){return i},get _names(){return u},set _names(re){u=re},get _formState(){return n},set _formState(re){n=re},get _options(){return t},set _options(re){t={...t,...re}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:V,getValues:ue,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:se,setFocus:(re,pe={})=>{const ye=Xe(r,re),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&cu(je.select)&&je.select())}},getFieldState:Q}}function zKe(e={}){const t=j.useRef(void 0),n=j.useRef(void 0),[r,i]=j.useState({isDirty:!1,isValidating:!1,isLoading:cu(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:cu(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Cfe(e),formState:r});const o=t.current.control;return o._options=e,yA({subject:o._subjects.state,next:a=>{yj(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),j.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),j.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),j.useEffect(()=>{e.values&&!Qs(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),j.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),j.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),j.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=mj(r,o),t.current}var pn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(pn||(pn={}));var NC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(NC||(NC={}));const it=pn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},We=pn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Efe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Io extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;sn.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Io.create=e=>new Io(e);const Bd=(e,t)=>{let n;switch(e.code){case We.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case We.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pn.jsonStringifyReplacer)}`;break;case We.unrecognized_keys:n=`Unrecognized key(s) in object: ${pn.joinValues(e.keys,", ")}`;break;case We.invalid_union:n="Invalid input";break;case We.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pn.joinValues(e.options)}`;break;case We.invalid_enum_value:n=`Invalid enum value. Expected ${pn.joinValues(e.options)}, received '${e.received}'`;break;case We.invalid_arguments:n="Invalid function arguments";break;case We.invalid_return_type:n="Invalid function return type";break;case We.invalid_date:n="Invalid date";break;case We.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:pn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case We.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case We.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case We.custom:n="Invalid input";break;case We.invalid_intersection_types:n="Intersection results could not be merged";break;case We.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case We.not_finite:n="Number must be finite";break;default:n=t.defaultError,pn.assertNever(e)}return{message:n}};let Pj=Bd;function Afe(e){Pj=e}function $1(){return Pj}const I1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let u="";const s=r.filter(l=>!!l).slice().reverse();for(const l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:u}},Ofe=[];function tt(e,t){const n=$1(),r=I1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Bd?void 0:Bd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),sd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),FC=e=>e.status==="aborted",LC=e=>e.status==="dirty",Wc=e=>e.status==="valid",W0=e=>typeof Promise<"u"&&e instanceof Promise;function N1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function kj(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var Gp,Yp;class Eu{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const KM=(e,t)=>{if(Wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Io(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>{var s,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:(s=c??r)!==null&&s!==void 0?s:u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:u.defaultError}},description:i}}class Qt{get description(){return this._def.description}_getType(t){return Qu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(W0(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return KM(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Wc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Wc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(W0(i)?i:Promise.resolve(i));return KM(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:We.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ka({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return wu.create(this,this._def)}nullable(){return Ol.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this)}promise(){return Ud.create(this,this._def)}or(t){return K0.create([this,t],this._def)}and(t){return G0.create(this,t,this._def)}transform(t){return new Ka({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new J0({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new wA({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ev({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return sg.create(this,t)}readonly(){return tv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pfe=/^c[^\s-]{8,}$/i,kfe=/^[0-9a-z]+$/,Tfe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Mfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Rfe=/^[a-z0-9_-]{21}$/i,Dfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$fe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ife=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Nfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let J_;const Ffe=/^(?:(?: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])$/,Lfe=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,jfe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Bfe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ufe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Tj="((\\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])))",Wfe=new RegExp(`^${Tj}$`);function Mj(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Vfe(e){return new RegExp(`^${Mj(e)}$`)}function Rj(e){let t=`${Tj}T${Mj(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Hfe(e,t){return!!((t==="v4"||!t)&&Ffe.test(e)||(t==="v6"||!t)&&jfe.test(e))}function qfe(e,t){if(!Dfe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Kfe(e,t){return!!((t==="v4"||!t)&&Lfe.test(e)||(t==="v6"||!t)&&Bfe.test(e))}class ja extends Qt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.lengtht.test(i),{validation:n,code:We.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new ja({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new ja({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new ja({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function Gfe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Cl extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?pn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Gfe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_finite,message:o.message}),i.dirty()):pn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Cl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Cl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&pn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Cl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class El extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):pn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new El({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new El({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new El({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class V0 extends Qt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}V0.create=e=>new V0({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Vc extends Qt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):pn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Vc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class F1 extends Qt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}F1.create=e=>new F1({typeName:Tt.ZodSymbol,...qt(e)});class H0 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}H0.create=e=>new H0({typeName:Tt.ZodUndefined,...qt(e)});class q0 extends Qt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}q0.create=e=>new q0({typeName:Tt.ZodNull,...qt(e)});class zd extends Qt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}zd.create=e=>new zd({typeName:Tt.ZodAny,...qt(e)});class Oc extends Qt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Oc.create=e=>new Oc({typeName:Tt.ZodUnknown,...qt(e)});class vs extends Qt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.never,received:n.parsedType}),Dt}}vs.create=e=>new vs({typeName:Tt.ZodNever,...qt(e)});class L1 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}L1.create=e=>new L1({typeName:Tt.ZodVoid,...qt(e)});class Wa extends Qt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:We.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.lengthi.maxLength.value&&(tt(n,{code:We.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new Eu(n,a,n.path,u)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new Eu(n,a,n.path,u)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Wa({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Wa({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Wa({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wa.create=(e,t)=>new Wa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function Kf(e){if(e instanceof lr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=wu.create(Kf(r))}return new lr({...e._def,shape:()=>t})}else return e instanceof Wa?new Wa({...e._def,type:Kf(e.element)}):e instanceof wu?wu.create(Kf(e.unwrap())):e instanceof Ol?Ol.create(Kf(e.unwrap())):e instanceof Au?Au.create(e.items.map(t=>Kf(t))):e}class lr extends Qt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=pn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:We.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof vs&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||u.push(l);const s=[];for(const l of a){const c=o[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new Eu(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof vs){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of u)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")u.length>0&&(tt(i,{code:We.unrecognized_keys,keys:u}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of u){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new Eu(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key,h=await c.value;l.push({key:d,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new lr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=dt.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new lr({...this._def,unknownKeys:"strip"})}passthrough(){return new lr({...this._def,unknownKeys:"passthrough"})}extend(t){return new lr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new lr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new lr({...this._def,catchall:t})}pick(t){const n={};return pn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}omit(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}deepPartial(){return Kf(this)}partial(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new lr({...this._def,shape:()=>n})}required(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof wu;)o=o._def.innerType;n[r]=o}}),new lr({...this._def,shape:()=>n})}keyof(){return Dj(pn.objectKeys(this.shape))}}lr.create=(e,t)=>new lr({shape:()=>e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.strictCreate=(e,t)=>new lr({shape:()=>e,unknownKeys:"strict",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.lazycreate=(e,t)=>new lr({shape:e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});class K0 extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new Io(u.ctx.common.issues));return tt(n,{code:We.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=s._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new Io(s));return tt(n,{code:We.invalid_union,unionErrors:u}),Dt}}get options(){return this._def.options}}K0.create=(e,t)=>new K0({options:e,typeName:Tt.ZodUnion,...qt(t)});const qu=e=>e instanceof Z0?qu(e.schema):e instanceof Ka?qu(e.innerType()):e instanceof X0?[e.value]:e instanceof Al?e.options:e instanceof Q0?pn.objectValues(e.enum):e instanceof J0?qu(e._def.innerType):e instanceof H0?[void 0]:e instanceof q0?[null]:e instanceof wu?[void 0,...qu(e.unwrap())]:e instanceof Ol?[null,...qu(e.unwrap())]:e instanceof wA||e instanceof tv?qu(e.unwrap()):e instanceof ev?qu(e._def.innerType):[];class Fx extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:We.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:We.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=qu(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new Fx({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function jC(e,t){const n=Qu(e),r=Qu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=pn.objectKeys(t),o=pn.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=jC(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(FC(o)||FC(a))return Dt;const u=jC(o.value,a.value);return u.valid?((LC(o)||LC(a))&&n.dirty(),{status:n.value,value:u.data}):(tt(r,{code:We.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}G0.create=(e,t,n)=>new G0({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Au extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:We.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:We.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new Eu(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Au({...this._def,rest:t})}}Au.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Au({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class Y0 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:We.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new Eu(r,u,r.path,u)),value:a._parse(new Eu(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Qt?new Y0({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new Y0({keyType:ja.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class j1 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:We.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],l)=>({key:i._parse(new Eu(r,u,r.path,[l,"key"])),value:o._parse(new Eu(r,s,r.path,[l,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}}}}j1.create=(e,t,n)=>new j1({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Hc extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:We.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:We.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const u=[...r.data.values()].map((s,l)=>o._parse(new Eu(r,s,r.path,l)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new Hc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Hc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Hc.create=(e,t)=>new Hc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class xd extends Qt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:We.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(u,s){return I1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_arguments,argumentsError:s}})}function i(u,s){return I1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ud){const u=this;return Hi(async function(...s){const l=new Io([]),c=await u._def.args.parseAsync(s,o).catch(v=>{throw l.addIssue(r(s,v)),l}),d=await Reflect.apply(a,this,c);return await u._def.returns._def.type.parseAsync(d,o).catch(v=>{throw l.addIssue(i(d,v)),l})})}else{const u=this;return Hi(function(...s){const l=u._def.args.safeParse(s,o);if(!l.success)throw new Io([r(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=u._def.returns.safeParse(c,o);if(!d.success)throw new Io([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xd({...this._def,args:Au.create(t).rest(Oc.create())})}returns(t){return new xd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xd({args:t||Au.create([]).rest(Oc.create()),returns:n||Oc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class Z0 extends Qt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Z0.create=(e,t)=>new Z0({getter:e,typeName:Tt.ZodLazy,...qt(t)});class X0 extends Qt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:We.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}X0.create=(e,t)=>new X0({value:e,typeName:Tt.ZodLiteral,...qt(t)});function Dj(e,t){return new Al({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Al extends Qt{constructor(){super(...arguments),Gp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:pn.joinValues(r),received:n.parsedType,code:We.invalid_type}),Dt}if(N1(this,Gp)||kj(this,Gp,new Set(this._def.values)),!N1(this,Gp).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:We.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Al.create(t,{...this._def,...n})}exclude(t,n=this._def){return Al.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Gp=new WeakMap;Al.create=Dj;class Q0 extends Qt{constructor(){super(...arguments),Yp.set(this,void 0)}_parse(t){const n=pn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=pn.objectValues(n);return tt(r,{expected:pn.joinValues(i),received:r.parsedType,code:We.invalid_type}),Dt}if(N1(this,Yp)||kj(this,Yp,new Set(pn.getValidEnumValues(this._def.values))),!N1(this,Yp).has(t.data)){const i=pn.objectValues(n);return tt(r,{received:r.data,code:We.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}Yp=new WeakMap;Q0.create=(e,t)=>new Q0({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Ud extends Qt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:We.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ud.create=(e,t)=>new Ud({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ka extends Qt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Dt;const s=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?sd(s.value):s});{if(n.value==="aborted")return Dt;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?sd(u.value):u}}if(i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wc(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wc(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);pn.assertNever(i)}}Ka.create=(e,t,n)=>new Ka({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ka.createWithPreprocess=(e,t,n)=>new Ka({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class wu extends Qt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wu.create=(e,t)=>new wu({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Ol extends Qt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ol.create=(e,t)=>new Ol({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class J0 extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}J0.create=(e,t)=>new J0({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class ev extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W0(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class B1 extends Qt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}B1.create=e=>new B1({typeName:Tt.ZodNaN,...qt(e)});const Yfe=Symbol("zod_brand");class wA extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class sg extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),sd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new sg({in:t,out:n,typeName:Tt.ZodPipeline})}}class tv extends Qt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Wc(i)&&(i.value=Object.freeze(i.value)),i);return W0(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}tv.create=(e,t)=>new tv({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function $j(e,t={},n){return e?zd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...l,fatal:s})}}):zd.create()}const Zfe={object:lr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Xfe=(e,t={message:`Input not instance of ${e.name}`})=>$j(n=>n instanceof e,t),Ij=ja.create,Nj=Cl.create,Qfe=B1.create,Jfe=El.create,Fj=V0.create,ede=Vc.create,tde=F1.create,nde=H0.create,rde=q0.create,ide=zd.create,ode=Oc.create,ade=vs.create,ude=L1.create,sde=Wa.create,lde=lr.create,cde=lr.strictCreate,fde=K0.create,dde=Fx.create,hde=G0.create,pde=Au.create,vde=Y0.create,gde=j1.create,mde=Hc.create,yde=xd.create,bde=Z0.create,xde=X0.create,wde=Al.create,_de=Q0.create,Sde=Ud.create,GM=Ka.create,Cde=wu.create,Ede=Ol.create,Ade=Ka.createWithPreprocess,Ode=sg.create,Pde=()=>Ij().optional(),kde=()=>Nj().optional(),Tde=()=>Fj().optional(),Mde={string:e=>ja.create({...e,coerce:!0}),number:e=>Cl.create({...e,coerce:!0}),boolean:e=>V0.create({...e,coerce:!0}),bigint:e=>El.create({...e,coerce:!0}),date:e=>Vc.create({...e,coerce:!0})},Rde=Dt;var UKe=Object.freeze({__proto__:null,defaultErrorMap:Bd,setErrorMap:Afe,getErrorMap:$1,makeIssue:I1,EMPTY_PATH:Ofe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:sd,OK:Hi,isAborted:FC,isDirty:LC,isValid:Wc,isAsync:W0,get util(){return pn},get objectUtil(){return NC},ZodParsedType:it,getParsedType:Qu,ZodType:Qt,datetimeRegex:Rj,ZodString:ja,ZodNumber:Cl,ZodBigInt:El,ZodBoolean:V0,ZodDate:Vc,ZodSymbol:F1,ZodUndefined:H0,ZodNull:q0,ZodAny:zd,ZodUnknown:Oc,ZodNever:vs,ZodVoid:L1,ZodArray:Wa,ZodObject:lr,ZodUnion:K0,ZodDiscriminatedUnion:Fx,ZodIntersection:G0,ZodTuple:Au,ZodRecord:Y0,ZodMap:j1,ZodSet:Hc,ZodFunction:xd,ZodLazy:Z0,ZodLiteral:X0,ZodEnum:Al,ZodNativeEnum:Q0,ZodPromise:Ud,ZodEffects:Ka,ZodTransformer:Ka,ZodOptional:wu,ZodNullable:Ol,ZodDefault:J0,ZodCatch:ev,ZodNaN:B1,BRAND:Yfe,ZodBranded:wA,ZodPipeline:sg,ZodReadonly:tv,custom:$j,Schema:Qt,ZodSchema:Qt,late:Zfe,get ZodFirstPartyTypeKind(){return Tt},coerce:Mde,any:ide,array:sde,bigint:Jfe,boolean:Fj,date:ede,discriminatedUnion:dde,effect:GM,enum:wde,function:yde,instanceof:Xfe,intersection:hde,lazy:bde,literal:xde,map:gde,nan:Qfe,nativeEnum:_de,never:ade,null:rde,nullable:Ede,number:Nj,object:lde,oboolean:Tde,onumber:kde,optional:Cde,ostring:Pde,pipeline:Ode,preprocess:Ade,promise:Sde,record:vde,set:mde,strictObject:cde,string:Ij,symbol:tde,transformer:GM,tuple:pde,undefined:nde,union:fde,unknown:ode,void:ude,NEVER:Rde,ZodIssueCode:We,quotelessJson:Efe,ZodError:Io});const YM=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Lj=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?YM(r.ref,n,e):r.refs&&r.refs.forEach(i=>YM(i,n,e))}},Dde=(e,t)=>{t.shouldUseNativeValidation&&Lj(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if($de(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},$de=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ide=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var s=n[a].types,l=s&&s[r.code];n[a]=wj(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},WKe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,u){try{var s=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&Lj({},o),{errors:{},values:n.raw?r:l}})}catch(l){return u(l)}return s&&s.then?s.then(void 0,u):s}(0,function(a){if(function(u){return Array.isArray(u?.errors)}(a))return{values:{},errors:Dde(Ide(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},Nde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=Nde.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?Sl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(u,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jj(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}var Fde="Label",Bj=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Bj.displayName=Fde;var VKe=Bj,zj={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ua,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",u="minute",s="hour",l="day",c="week",d="month",h="quarter",v="year",g="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],K=Z%100;return"["+Z+(G[(K-20)%10]||G[K]||G[0])+"]"}},S=function(Z,G,K){var V=String(Z);return!V||V.length>=G?Z:""+Array(G+1-V.length).join(K)+Z},A={s:S,z:function(Z){var G=-Z.utcOffset(),K=Math.abs(G),V=Math.floor(K/60),B=K%60;return(G<=0?"+":"-")+S(V,2,"0")+":"+S(B,2,"0")},m:function Z(G,K){if(G.date()1)return Z(Y[0])}else{var ue=G.name;C[ue]=G,B=ue}return!V&&B&&(E=B),B||!V&&E},U=function(Z,G){if(M(Z))return Z.clone();var K=typeof G=="object"?G:{};return K.date=Z,K.args=arguments,new W(K)},H=A;H.l=F,H.i=M,H.w=function(Z,G){return U(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var W=function(){function Z(K){this.$L=F(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[T]=!0}var G=Z.prototype;return G.parse=function(K){this.$d=function(V){var B=V.date,q=V.utc;if(B===null)return new Date(NaN);if(H.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var ue=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(B)}(K),this.init()},G.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==m},G.isSame=function(K,V){var B=U(K);return this.startOf(V)<=B&&B<=this.endOf(V)},G.isAfter=function(K,V){return U(K){let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var GT={notify(){},get:()=>[]};function Mae(e,t){let n,r=GT,i=0,o=!1;function a(m){c();const b=r.subscribe(m);let w=!1;return()=>{w||(w=!0,b(),d())}}function u(){r.notify()}function s(){g.onStateChange&&g.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(s),r=Tae())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=GT)}function h(){o||(o=!0,c())}function v(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:l,trySubscribe:h,tryUnsubscribe:v,getListeners:()=>r};return g}var Rae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Dae=Rae(),$ae=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Iae=$ae(),Nae=()=>Dae||Iae?y.useLayoutEffect:y.useEffect,Fae=Nae(),Lae=Symbol.for("react-redux-context"),jae=typeof globalThis<"u"?globalThis:{};function Bae(){if(!y.createContext)return{};const e=jae[Lae]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var _l=Bae();function zae(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const s=Mae(i);return{store:i,subscription:s,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);Fae(()=>{const{subscription:s}=o;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==i.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[o,a]);const u=n||_l;return y.createElement(u.Provider,{value:o},t)}var Yqe=zae;function tA(e=_l){return function(){return y.useContext(e)}}var oL=tA();function aL(e=_l){const t=e===_l?oL:tA(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Uae=aL();function Wae(e=_l){const t=e===_l?Uae:aL(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Zqe=Wae(),Vae=(e,t)=>e===t;function Hae(e=_l){const t=e===_l?oL:tA(e),n=(r,i={})=>{const{equalityFn:o=Vae}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:u,subscription:s,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),d=Oae.useSyncExternalStoreWithSelector(s.addNestedSub,u.getState,l||u.getState,c,o);return y.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var Xqe=Hae();function YT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ax(...e){return t=>{let n=!1;const r=e.map(i=>{const o=YT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(qae);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return I.jsx(pC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,u):null})}return I.jsx(pC,{...r,ref:t,children:n})});Sl.displayName="Slot";var pC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Gae(n);return y.cloneElement(n,{...Kae(r,n.props),ref:t?Ax(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});pC.displayName="SlotClone";var nA=({children:e})=>I.jsx(I.Fragment,{children:e});function qae(e){return y.isValidElement(e)&&e.type===nA}function Kae(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Gae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,XT=fn,Qqe=(e,t)=>n=>{var r;if(t?.variants==null)return XT(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],d=o?.[l];if(c===null)return null;const h=ZT(c)||ZT(d);return i[l][h]}),u=n&&Object.entries(n).reduce((l,c)=>{let[d,h]=c;return h===void 0||(l[d]=h),l},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:h,...v}=c;return Object.entries(v).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...o,...u}[m]):{...o,...u}[m]===b})?[...l,d,h]:l},[]);return XT(e,a,s,n?.class,n?.className)},rA="-",Yae=e=>{const t=Xae(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(rA);return u[0]===""&&u.length!==1&&u.shift(),sL(u,t)||Zae(a)},getConflictingClassGroupIds:(a,u)=>{const s=n[a]||[];return u&&r[a]?[...s,...r[a]]:s}}},sL=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?sL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(rA);return t.validators.find(({validator:a})=>a(o))?.classGroupId},QT=/^\[(.+)\]$/,Zae=e=>{if(QT.test(e)){const t=QT.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Xae=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Jae(Object.entries(e.classGroups),n).forEach(([o,a])=>{vC(a,r,o,t)}),r},vC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:JT(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Qae(i)){vC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{vC(a,JT(t,o),n,r)})})},JT=(e,t)=>{let n=e;return t.split(rA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Qae=e=>e.isThemeGetter,Jae=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[t+a,u])):o);return[n,i]}):e,eue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},lL="!",tue=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=u=>{const s=[];let l=0,c=0,d;for(let b=0;bc?d-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}};return n?u=>n({className:u,parseClassName:a}):a},nue=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},rue=e=>({cache:eue(e.cacheSize),parseClassName:tue(e),...Yae(e)}),iue=/\s+/,oue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(iue);let u="";for(let s=a.length-1;s>=0;s-=1){const l=a[s],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:v}=n(l);let g=!!v,m=r(g?h.substring(0,v):h);if(!m){if(!g){u=l+(u.length>0?" "+u:u);continue}if(m=r(h),!m){u=l+(u.length>0?" "+u:u);continue}g=!1}const b=nue(c).join(":"),w=d?b+lL:b,x=w+m;if(o.includes(x))continue;o.push(x);const S=i(m,g);for(let A=0;A0?" "+u:u)}return u};function aue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=rue(l),r=n.cache.get,i=n.cache.set,o=u,u(s)}function u(s){const l=r(s);if(l)return l;const c=oue(s,n);return i(s,c),c}return function(){return o(aue.apply(null,arguments))}}const Xn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fL=/^\[(?:([a-z-]+):)?(.+)\]$/i,sue=/^\d+\/\d+$/,lue=new Set(["px","full","screen"]),cue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,due=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Uu=e=>yd(e)||lue.has(e)||sue.test(e),Bs=e=>Eh(e,"length",_ue),yd=e=>!!e&&!Number.isNaN(Number(e)),B_=e=>Eh(e,"number",yd),Cp=e=>!!e&&Number.isInteger(Number(e)),vue=e=>e.endsWith("%")&&yd(e.slice(0,-1)),Zt=e=>fL.test(e),zs=e=>cue.test(e),gue=new Set(["length","size","percentage"]),mue=e=>Eh(e,gue,dL),yue=e=>Eh(e,"position",dL),bue=new Set(["image","url"]),xue=e=>Eh(e,bue,Cue),wue=e=>Eh(e,"",Sue),Ep=()=>!0,Eh=(e,t,n)=>{const r=fL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_ue=e=>fue.test(e)&&!due.test(e),dL=()=>!1,Sue=e=>hue.test(e),Cue=e=>pue.test(e),Eue=()=>{const e=Xn("colors"),t=Xn("spacing"),n=Xn("blur"),r=Xn("brightness"),i=Xn("borderColor"),o=Xn("borderRadius"),a=Xn("borderSpacing"),u=Xn("borderWidth"),s=Xn("contrast"),l=Xn("grayscale"),c=Xn("hueRotate"),d=Xn("invert"),h=Xn("gap"),v=Xn("gradientColorStops"),g=Xn("gradientColorStopPositions"),m=Xn("inset"),b=Xn("margin"),w=Xn("opacity"),x=Xn("padding"),S=Xn("saturate"),A=Xn("scale"),E=Xn("sepia"),C=Xn("skew"),T=Xn("space"),M=Xn("translate"),F=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Zt,t],W=()=>[Zt,t],ie=()=>["",Uu,Bs],Z=()=>["auto",yd,Zt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Zt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[yd,Zt];return{cacheSize:500,separator:":",theme:{colors:[Ep],spacing:[Uu,Bs],blur:["none","",zs,Zt],brightness:ue(),borderColor:[e],borderRadius:["none","","full",zs,Zt],borderSpacing:W(),borderWidth:ie(),contrast:ue(),grayscale:q(),hueRotate:ue(),invert:q(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[vue,Bs],inset:H(),margin:H(),opacity:ue(),padding:W(),saturate:ue(),scale:ue(),sepia:q(),skew:ue(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Zt]}],container:["container"],columns:[{columns:[zs]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Zt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cp,Zt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zt]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Cp,Zt]}],"grid-cols":[{"grid-cols":[Ep]}],"col-start-end":[{col:["auto",{span:["full",Cp,Zt]},Zt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Ep]}],"row-start-end":[{row:["auto",{span:[Cp,Zt]},Zt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zt,t]}],"min-w":[{"min-w":[Zt,t,"min","max","fit"]}],"max-w":[{"max-w":[Zt,t,"none","full","min","max","fit","prose",{screen:[zs]},zs]}],h:[{h:[Zt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zs,Bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",B_]}],"font-family":[{font:[Ep]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Zt]}],"line-clamp":[{"line-clamp":["none",yd,B_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Uu,Zt]}],"list-image":[{"list-image":["none",Zt]}],"list-style-type":[{list:["none","disc","decimal",Zt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Uu,Bs]}],"underline-offset":[{"underline-offset":["auto",Uu,Zt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),yue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:K()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Uu,Zt]}],"outline-w":[{outline:[Uu,Bs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Uu,Bs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zs,wue]}],"shadow-color":[{shadow:[Ep]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",zs,Zt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zt]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",Zt]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Cp,Zt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Uu,Bs,B_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Jqe=uue(Eue);var hL={exports:{}},Aue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Pue=Aue,Oue=Pue;function pL(){}function vL(){}vL.resetWarningCache=pL;var kue=function(){function e(r,i,o,a,u,s){if(s!==Oue){var l=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 l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vL,resetWarningCache:pL};return n.PropTypes=n,n};hL.exports=kue();var Tue=hL.exports;const Mt=Pn(Tue);var Mue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Rue=Object.defineProperty,Due=Object.defineProperties,$ue=Object.getOwnPropertyDescriptors,w1=Object.getOwnPropertySymbols,gL=Object.prototype.hasOwnProperty,mL=Object.prototype.propertyIsEnumerable,eM=(e,t,n)=>t in e?Rue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tM=(e,t)=>{for(var n in t||(t={}))gL.call(t,n)&&eM(e,n,t[n]);if(w1)for(var n of w1(t))mL.call(t,n)&&eM(e,n,t[n]);return e},Iue=(e,t)=>Due(e,$ue(t)),Nue=(e,t)=>{var n={};for(var r in e)gL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&w1)for(var r of w1(e))t.indexOf(r)<0&&mL.call(e,r)&&(n[r]=e[r]);return n},Cn=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:u="currentColor",size:s=24,stroke:l=2,children:c}=a,d=Nue(a,["color","size","stroke","children"]);return y.createElement("svg",tM(Iue(tM({ref:o},Mue),{width:s,height:s,stroke:u,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...n.map(([h,v])=>y.createElement(h,v)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},eKe=Cn("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),tKe=Cn("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),nKe=Cn("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),rKe=Cn("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),iKe=Cn("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),oKe=Cn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),aKe=Cn("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),uKe=Cn("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),sKe=Cn("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),lKe=Cn("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),cKe=Cn("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),fKe=Cn("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),dKe=Cn("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),hKe=Cn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),pKe=Cn("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),vKe=Cn("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),gKe=Cn("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),mKe=Cn("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),yKe=Cn("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),bKe=Cn("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),xKe=Cn("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),wKe=Cn("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),_Ke=Cn("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),SKe=Cn("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),CKe=Cn("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),EKe=Cn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),AKe=Cn("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),PKe=Cn("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),OKe=Cn("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),kKe=Cn("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),TKe=Cn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Fue=typeof Symbol=="function"&&Symbol.observable||"@@observable",nM=Fue,z_=()=>Math.random().toString(36).substring(7).split("").join("."),Lue={INIT:`@@redux/INIT${z_()}`,REPLACE:`@@redux/REPLACE${z_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${z_()}`},_1=Lue;function iA(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function yL(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(yL)(e,t)}let r=e,i=t,o=new Map,a=o,u=0,s=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(s)throw new Error(fi(3));return i}function d(b){if(typeof b!="function")throw new Error(fi(4));if(s)throw new Error(fi(5));let w=!0;l();const x=u++;return a.set(x,b),function(){if(w){if(s)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!iA(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(s)throw new Error(fi(9));try{s=!0,i=r(i,b)}finally{s=!1}return(o=a).forEach(x=>{x()}),b}function v(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:_1.REPLACE})}function g(){const b=d;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const A=w;A.next&&A.next(c())}return x(),{unsubscribe:b(x)}},[nM](){return this}}}return h({type:_1.INIT}),{dispatch:h,subscribe:d,getState:c,replaceReducer:v,[nM]:g}}function jue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:_1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:_1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Bue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw u&&u.type,new Error(fi(14));l[d]=g,s=s||g!==v}return s=s||r.length!==Object.keys(a).length,s?l:a}}function S1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function zue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(s,...l)=>o(s,...l)},u=e.map(s=>s(a));return o=S1(...u)(i.dispatch),{...i,dispatch:o}}}function Uue(e){return iA(e)&&"type"in e&&typeof e.type=="string"}var bL=Symbol.for("immer-nothing"),rM=Symbol.for("immer-draftable"),jo=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jd=Object.getPrototypeOf;function Lc(e){return!!e&&!!e[jo]}function ps(e){return e?xL(e)||Array.isArray(e)||!!e[rM]||!!e.constructor?.[rM]||Ox(e)||kx(e):!1}var Wue=Object.prototype.constructor.toString();function xL(e){if(!e||typeof e!="object")return!1;const t=jd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Wue}function C1(e,t){Px(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Px(e){const t=e[jo];return t?t.type_:Array.isArray(e)?1:Ox(e)?2:kx(e)?3:0}function gC(e,t){return Px(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wL(e,t,n){const r=Px(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Vue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ox(e){return e instanceof Map}function kx(e){return e instanceof Set}function oc(e){return e.copy_||e.base_}function mC(e,t){if(Ox(e))return new Map(e);if(kx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&xL(e))return jd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[jo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Hue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>oA(r,!0))),e}function Hue(){Na(2)}function Tx(e){return Object.isFrozen(e)}var que={};function jc(e){const t=que[e];return t||Na(0,e),t}var B0;function _L(){return B0}function Kue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function iM(e,t){t&&(jc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yC(e){bC(e),e.drafts_.forEach(Gue),e.drafts_=null}function bC(e){e===B0&&(B0=e.parent_)}function oM(e){return B0=Kue(B0,e)}function Gue(e){const t=e[jo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function aM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jo].modified_&&(yC(t),Na(4)),ps(e)&&(e=E1(t,e),t.parent_||A1(t,e)),t.patches_&&jc("Patches").generateReplacementPatches_(n[jo].base_,e,t.patches_,t.inversePatches_)):e=E1(t,n,[]),yC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==bL?e:void 0}function E1(e,t,n){if(Tx(t))return t;const r=t[jo];if(!r)return C1(t,(i,o)=>uM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return A1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),C1(o,(u,s)=>uM(e,r,i,u,s,n,a)),A1(e,i,!1),n&&e.patches_&&jc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function uM(e,t,n,r,i,o,a){if(Lc(i)){const u=o&&t&&t.type_!==3&&!gC(t.assigned_,r)?o.concat(r):void 0,s=E1(e,i,u);if(wL(n,r,s),Lc(s))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ps(i)&&!Tx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;E1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&A1(e,i)}}function A1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oA(t,n)}function Yue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_L(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=aA;n&&(i=[r],o=z0);const{revoke:a,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=a,u}var aA={get(e,t){if(t===jo)return e;const n=oc(e);if(!gC(n,t))return Zue(e,n,t);const r=n[t];return e.finalized_||!ps(r)?r:r===U_(e.base_,t)?(W_(e),e.copy_[t]=wC(r,e)):r},has(e,t){return t in oc(e)},ownKeys(e){return Reflect.ownKeys(oc(e))},set(e,t,n){const r=SL(oc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=U_(oc(e),t),o=i?.[jo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Vue(n,i)&&(n!==void 0||gC(e.base_,t)))return!0;W_(e),xC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return U_(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,W_(e),xC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=oc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return jd(e.base_)},setPrototypeOf(){Na(12)}},z0={};C1(aA,(e,t)=>{z0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});z0.deleteProperty=function(e,t){return z0.set.call(this,e,t,void 0)};z0.set=function(e,t,n){return aA.set.call(this,e[0],t,n,e[0])};function U_(e,t){const n=e[jo];return(n?oc(n):e)[t]}function Zue(e,t,n){const r=SL(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function SL(e,t){if(!(t in e))return;let n=jd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jd(n)}}function xC(e){e.modified_||(e.modified_=!0,e.parent_&&xC(e.parent_))}function W_(e){e.copy_||(e.copy_=mC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(s=o,...l){return a.produce(s,c=>n.call(this,c,...l))}}typeof n!="function"&&Na(6),r!==void 0&&typeof r!="function"&&Na(7);let i;if(ps(t)){const o=oM(this),a=wC(t,void 0);let u=!0;try{i=n(a),u=!1}finally{u?yC(o):bC(o)}return iM(o,r),aM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===bL&&(i=void 0),this.autoFreeze_&&oA(i,!0),r){const o=[],a=[];jc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,s=>t(s,...u));let r,i;return[this.produce(t,n,(a,u)=>{r=a,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ps(e)||Na(8),Lc(e)&&(e=Que(e));const t=oM(this),n=wC(e,void 0);return n[jo].isManual_=!0,bC(t),n}finishDraft(e,t){const n=e&&e[jo];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return iM(r,t),aM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=jc("Patches").applyPatches_;return Lc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function wC(e,t){const n=Ox(e)?jc("MapSet").proxyMap_(e,t):kx(e)?jc("MapSet").proxySet_(e,t):Yue(e,t);return(t?t.scope_:_L()).drafts_.push(n),n}function Que(e){return Lc(e)||Na(10,e),CL(e)}function CL(e){if(!ps(e)||Tx(e))return e;const t=e[jo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=mC(e,!0);return C1(n,(r,i)=>{wL(n,r,CL(i))}),t&&(t.finalized_=!1),n}var Bo=new Xue,EL=Bo.produce;Bo.produceWithPatches.bind(Bo);Bo.setAutoFreeze.bind(Bo);Bo.setUseStrictShallowCopy.bind(Bo);Bo.applyPatches.bind(Bo);Bo.createDraft.bind(Bo);Bo.finishDraft.bind(Bo);function Jue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ese(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function tse(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var sM=e=>Array.isArray(e)?e:[e];function nse(e){const t=Array.isArray(e[0])?e[0]:e;return tse(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function rse(e,t){const n=[],{length:r}=e;for(let i=0;i{n=zm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function use(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,s={},l=i.pop();typeof l=="object"&&(s=l,l=i.pop()),Jue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...s},{memoize:d,memoizeOptions:h=[],argsMemoize:v=AL,argsMemoizeOptions:g=[],devModeChecks:m={}}=c,b=sM(h),w=sM(g),x=nse(i),S=d(function(){return o++,l.apply(null,arguments)},...b),A=v(function(){a++;const C=rse(x,arguments);return u=S.apply(null,C),u},...w);return Object.assign(A,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var sse=use(AL),lse=Object.assign((e,t=sse)=>{ese(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,s)=>(a[n[s]]=u,a),{}))},{withTypes:()=>lse});function PL(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var cse=PL(),fse=PL,dse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?S1:S1.apply(null,arguments)},hse=e=>e&&typeof e.match=="function";function l0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(as(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Uue(r)&&r.type===e,n}var OL=class Gp extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Gp.prototype)}static get[Symbol.species](){return Gp}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Gp(...t[0].concat(this)):new Gp(...t.concat(this))}};function cM(e){return ps(e)?EL(e,()=>{}):e}function fM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function pse(e){return typeof e=="boolean"}var vse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new OL;return n&&(pse(n)?a.push(cse):a.push(fse(n.extraArgument))),a},gse="RTK_autoBatch",dM=e=>t=>{setTimeout(t,e)},mse=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dM(10):e.type==="callback"?e.queueNotification:dM(e.timeout),l=()=>{a=!1,o&&(o=!1,u.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const d=()=>i&&c(),h=r.subscribe(d);return u.add(c),()=>{h(),u.delete(c)}},dispatch(c){try{return i=!c?.meta?.[gse],o=!i,o&&(a||(a=!0,s(l))),r.dispatch(c)}finally{i=!0}}})},yse=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new OL(e);return r&&i.push(mse(typeof r=="object"?r:void 0)),i};function MKe(e){const t=vse(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let u;if(typeof n=="function")u=n;else if(iA(n))u=Bue(n);else throw new Error(as(1));let s;typeof r=="function"?s=r(t):s=t();let l=S1;i&&(l=dse({trace:!1,...typeof i=="object"&&i}));const c=zue(...s),d=yse(c);let h=typeof a=="function"?a(d):d();const v=l(...h);return yL(u,o,v)}function kL(e){const t={},n=[];let r;const i={addCase(o,a){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(as(28));if(u in t)throw new Error(as(29));return t[u]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function bse(e){return typeof e=="function"}function xse(e,t){let[n,r,i]=kL(t),o;if(bse(e))o=()=>cM(e());else{const u=cM(e);o=()=>u}function a(u=o(),s){let l=[n[s.type],...r.filter(({matcher:c})=>c(s)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,d)=>{if(d)if(Lc(c)){const v=d(c,s);return v===void 0?c:v}else{if(ps(c))return EL(c,h=>d(h,s));{const h=d(c,s);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},u)}return a.getInitialState=o,a}var wse=(e,t)=>hse(e)?e.match(t):e(t);function _se(...e){return t=>e.some(n=>wse(n,t))}var Sse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cse=(e=21)=>{let t="",n=e;for(;n--;)t+=Sse[Math.random()*64|0];return t},Ese=["name","message","stack","code"],V_=class{constructor(e,t){this.payload=e,this.meta=t}_type},hM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Ase=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Ese)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},RKe=(()=>{function e(t,n,r){const i=l0(t+"/fulfilled",(s,l,c,d)=>({payload:s,meta:{...d||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=l0(t+"/pending",(s,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:s,requestStatus:"pending"}})),a=l0(t+"/rejected",(s,l,c,d,h)=>({payload:d,error:(r&&r.serializeError||Ase)(s||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:s?.name==="AbortError",condition:s?.name==="ConditionError"}}));function u(s){return(l,c,d)=>{const h=r?.idGenerator?r.idGenerator(s):Cse(),v=new AbortController;let g,m;function b(x){m=x,v.abort()}const w=async function(){let x;try{let A=r?.condition?.(s,{getState:c,extra:d});if(Ose(A)&&(A=await A),A===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,T)=>{g=()=>{T({name:"AbortError",message:m||"Aborted"})},v.signal.addEventListener("abort",g)});l(o(h,s,r?.getPendingMeta?.({requestId:h,arg:s},{getState:c,extra:d}))),x=await Promise.race([E,Promise.resolve(n(s,{dispatch:l,getState:c,extra:d,requestId:h,signal:v.signal,abort:b,rejectWithValue:(C,T)=>new V_(C,T),fulfillWithValue:(C,T)=>new hM(C,T)})).then(C=>{if(C instanceof V_)throw C;return C instanceof hM?i(C.payload,h,s,C.meta):i(C,h,s)})])}catch(A){x=A instanceof V_?a(null,h,s,A.payload,A.meta):a(A,h,s)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:s,unwrap(){return w.then(Pse)}})}}return Object.assign(u,{pending:o,rejected:a,fulfilled:i,settled:_se(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Pse(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ose(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var kse=Symbol.for("rtk-slice-createasyncthunk");function Tse(e,t){return`${e}/${t}`}function Mse({creators:e}={}){const t=e?.asyncThunk?.[kse];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(as(11));const a=(typeof r.reducers=="function"?r.reducers(Dse()):r.reducers)||{},u=Object.keys(a),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const A=typeof x=="string"?x:x.type;if(!A)throw new Error(as(12));if(A in s.sliceCaseReducersByType)throw new Error(as(13));return s.sliceCaseReducersByType[A]=S,l},addMatcher(x,S){return s.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return s.actionCreators[x]=S,l},exposeCaseReducer(x,S){return s.sliceCaseReducersByName[x]=S,l}};u.forEach(x=>{const S=a[x],A={reducerName:x,type:Tse(i,x),createNotation:typeof r.reducers=="function"};Ise(S)?Fse(A,S,l,t):$se(A,S,l)});function c(){const[x={},S=[],A=void 0]=typeof r.extraReducers=="function"?kL(r.extraReducers):[r.extraReducers],E={...x,...s.sliceCaseReducersByType};return xse(r.initialState,C=>{for(let T in E)C.addCase(T,E[T]);for(let T of s.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of S)C.addMatcher(T.matcher,T.reducer);A&&C.addDefaultCase(A)})}const d=x=>x,h=new Map;let v;function g(x,S){return v||(v=c()),v(x,S)}function m(){return v||(v=c()),v.getInitialState()}function b(x,S=!1){function A(C){let T=C[x];return typeof T>"u"&&S&&(T=m()),T}function E(C=d){const T=fM(h,S,()=>new WeakMap);return fM(T,C,()=>{const M={};for(const[F,U]of Object.entries(r.selectors??{}))M[F]=Rse(U,C,m,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(A)},selectSlice:A}}const w={name:i,reducer:g,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:m,...b(o),injectInto(x,{reducerPath:S,...A}={}){const E=S??o;return x.inject({reducerPath:E,reducer:g},A),{...w,...b(E,!0)}}};return w}}function Rse(e,t,n,r){function i(o,...a){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...a)}return i.unwrapped=e,i}var DKe=Mse();function Dse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function $se({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Nse(r))throw new Error(as(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?l0(e,a):l0(e))}function Ise(e){return e._reducerDefinitionType==="asyncThunk"}function Nse(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Fse({type:e,reducerName:t},n,r,i){if(!i)throw new Error(as(18));const{payloadCreator:o,fulfilled:a,pending:u,rejected:s,settled:l,options:c}=n,d=i(e,o,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),u&&r.addCase(d.pending,u),s&&r.addCase(d.rejected,s),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Um,pending:u||Um,rejected:s||Um,settled:l||Um})}function Um(){}function as(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function TL(e,t){return function(){return e.apply(t,arguments)}}const{toString:Lse}=Object.prototype,{getPrototypeOf:uA}=Object,Mx=(e=>t=>{const n=Lse.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ja=e=>(e=e.toLowerCase(),t=>Mx(t)===e),Rx=e=>t=>typeof t===e,{isArray:Ah}=Array,U0=Rx("undefined");function jse(e){return e!==null&&!U0(e)&&e.constructor!==null&&!U0(e.constructor)&&$o(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ML=Ja("ArrayBuffer");function Bse(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ML(e.buffer),t}const zse=Rx("string"),$o=Rx("function"),RL=Rx("number"),Dx=e=>e!==null&&typeof e=="object",Use=e=>e===!0||e===!1,Iy=e=>{if(Mx(e)!=="object")return!1;const t=uA(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wse=Ja("Date"),Vse=Ja("File"),Hse=Ja("Blob"),qse=Ja("FileList"),Kse=e=>Dx(e)&&$o(e.pipe),Gse=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||$o(e.append)&&((t=Mx(e))==="formdata"||t==="object"&&$o(e.toString)&&e.toString()==="[object FormData]"))},Yse=Ja("URLSearchParams"),[Zse,Xse,Qse,Jse]=["ReadableStream","Request","Response","Headers"].map(Ja),ele=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ag(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ah(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const mc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$L=e=>!U0(e)&&e!==mc;function _C(){const{caseless:e}=$L(this)&&this||{},t={},n=(r,i)=>{const o=e&&DL(t,i)||i;Iy(t[o])&&Iy(r)?t[o]=_C(t[o],r):Iy(r)?t[o]=_C({},r):Ah(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ag(t,(i,o)=>{n&&$o(i)?e[o]=TL(i,n):e[o]=i},{allOwnKeys:r}),e),nle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ile=(e,t,n,r)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=n!==!1&&uA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ole=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ale=e=>{if(!e)return null;if(Ah(e))return e;let t=e.length;if(!RL(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ule=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uA(Uint8Array)),sle=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},lle=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cle=Ja("HTMLFormElement"),fle=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),pM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dle=Ja("RegExp"),IL=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ag(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},hle=e=>{IL(e,(t,n)=>{if($o(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if($o(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ple=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ah(e)?r(e):r(String(e).split(t)),n},vle=()=>{},gle=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,H_="abcdefghijklmnopqrstuvwxyz",vM="0123456789",NL={DIGIT:vM,ALPHA:H_,ALPHA_DIGIT:H_+H_.toUpperCase()+vM},mle=(e=16,t=NL.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function yle(e){return!!(e&&$o(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ble=e=>{const t=new Array(10),n=(r,i)=>{if(Dx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ah(r)?[]:{};return ag(r,(a,u)=>{const s=n(a,i+1);!U0(s)&&(o[u]=s)}),t[i]=void 0,o}}return r};return n(e,0)},xle=Ja("AsyncFunction"),wle=e=>e&&(Dx(e)||$o(e))&&$o(e.then)&&$o(e.catch),FL=((e,t)=>e?setImmediate:t?((n,r)=>(mc.addEventListener("message",({source:i,data:o})=>{i===mc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),mc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",$o(mc.postMessage)),_le=typeof queueMicrotask<"u"?queueMicrotask.bind(mc):typeof process<"u"&&process.nextTick||FL,_e={isArray:Ah,isArrayBuffer:ML,isBuffer:jse,isFormData:Gse,isArrayBufferView:Bse,isString:zse,isNumber:RL,isBoolean:Use,isObject:Dx,isPlainObject:Iy,isReadableStream:Zse,isRequest:Xse,isResponse:Qse,isHeaders:Jse,isUndefined:U0,isDate:Wse,isFile:Vse,isBlob:Hse,isRegExp:dle,isFunction:$o,isStream:Kse,isURLSearchParams:Yse,isTypedArray:ule,isFileList:qse,forEach:ag,merge:_C,extend:tle,trim:ele,stripBOM:nle,inherits:rle,toFlatObject:ile,kindOf:Mx,kindOfTest:Ja,endsWith:ole,toArray:ale,forEachEntry:sle,matchAll:lle,isHTMLForm:cle,hasOwnProperty:pM,hasOwnProp:pM,reduceDescriptors:IL,freezeMethods:hle,toObjectSet:ple,toCamelCase:fle,noop:vle,toFiniteNumber:gle,findKey:DL,global:mc,isContextDefined:$L,ALPHABET:NL,generateString:mle,isSpecCompliantForm:yle,toJSONObject:ble,isAsyncFn:xle,isThenable:wle,setImmediate:FL,asap:_le};function Ht(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_e.inherits(Ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const LL=Ht.prototype,jL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jL[e]={value:e}});Object.defineProperties(Ht,jL);Object.defineProperty(LL,"isAxiosError",{value:!0});Ht.from=(e,t,n,r,i,o)=>{const a=Object.create(LL);return _e.toFlatObject(e,a,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),Ht.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Sle=null;function SC(e){return _e.isPlainObject(e)||_e.isArray(e)}function BL(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function gM(e,t,n){return e?e.concat(t).map(function(i,o){return i=BL(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Cle(e){return _e.isArray(e)&&!e.some(SC)}const Ele=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function $x(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!_e.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(_e.isDate(g))return g.toISOString();if(!s&&_e.isBlob(g))throw new Ht("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(g)||_e.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,b){let w=g;if(g&&!b&&typeof g=="object"){if(_e.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(_e.isArray(g)&&Cle(g)||(_e.isFileList(g)||_e.endsWith(m,"[]"))&&(w=_e.toArray(g)))return m=BL(m),w.forEach(function(S,A){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?gM([m],A,o):a===null?m:m+"[]",l(S))}),!1}return SC(g)?!0:(t.append(gM(b,m,o),l(g)),!1)}const d=[],h=Object.assign(Ele,{defaultVisitor:c,convertValue:l,isVisitable:SC});function v(g,m){if(!_e.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),_e.forEach(g,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,m,h))===!0&&v(w,m?m.concat(x):[x])}),d.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return v(e),t}function mM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function sA(e,t){this._pairs=[],e&&$x(e,this,t)}const zL=sA.prototype;zL.append=function(t,n){this._pairs.push([t,n])};zL.toString=function(t){const n=t?function(r){return t.call(this,r,mM)}:mM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ale(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function UL(e,t,n){if(!t)return e;const r=n&&n.encode||Ale;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new sA(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class yM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const WL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ple=typeof URLSearchParams<"u"?URLSearchParams:sA,Ole=typeof FormData<"u"?FormData:null,kle=typeof Blob<"u"?Blob:null,Tle={isBrowser:!0,classes:{URLSearchParams:Ple,FormData:Ole,Blob:kle},protocols:["http","https","file","blob","url","data"]},lA=typeof window<"u"&&typeof document<"u",CC=typeof navigator=="object"&&navigator||void 0,Mle=lA&&(!CC||["ReactNative","NativeScript","NS"].indexOf(CC.product)<0),Rle=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dle=lA&&window.location.href||"http://localhost",$le=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lA,hasStandardBrowserEnv:Mle,hasStandardBrowserWebWorkerEnv:Rle,navigator:CC,origin:Dle},Symbol.toStringTag,{value:"Module"})),Mi={...$le,...Tle};function Ile(e,t){return $x(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Nle(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fle(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,s?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!u):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=Fle(i[a])),!u)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t(Nle(r),i,n,0)}),n}return null}function Lle(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ug={transitional:WL,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(VL(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ile(t,this.formSerializer).toString();if((u=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return $x(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Lle(t)):t}],transformResponse:[function(t){const n=this.transitional||ug.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?Ht.from(u,Ht.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{ug.headers[e]={}});const jle=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ble=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&jle[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bM=Symbol("internals");function Ap(e){return e&&String(e).trim().toLowerCase()}function Ny(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Ny):String(e)}function zle(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ule=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function q_(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function Wle(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Vle(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class co{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,s,l){const c=Ap(s);if(!c)throw new Error("header name must be a non-empty string");const d=_e.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||s]=Ny(u))}const a=(u,s)=>_e.forEach(u,(l,c)=>o(l,c,s));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!Ule(t))a(Ble(t),n);else if(_e.isHeaders(t))for(const[u,s]of t.entries())o(s,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ap(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return zle(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ap(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||q_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Ap(a),a){const u=_e.findKey(r,a);u&&(!n||q_(r,r[u],u,n))&&(delete r[u],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||q_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Ny(i),delete n[o];return}const u=t?Wle(o):String(o).trim();u!==o&&delete n[o],n[u]=Ny(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[bM]=this[bM]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=Ap(a);r[u]||(Vle(i,a),r[u]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}co.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(co.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(co);function K_(e,t){const n=this||ug,r=t||n,i=co.from(r.headers);let o=r.data;return _e.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function HL(e){return!!(e&&e.__CANCEL__)}function Ph(e,t,n){Ht.call(this,e??"canceled",Ht.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits(Ph,Ht,{__CANCEL__:!0});function qL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qle(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(s){const l=Date.now(),c=r[o];a||(a=l),n[i]=s,r[i]=l;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const P1=(e,t,n=3)=>{let r=0;const i=qle(50,250);return Kle(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,s=a-r,l=i(s),c=a<=u;r=a;const d={loaded:a,total:u,progress:u?a/u:void 0,bytes:s,rate:l||void 0,estimated:l&&u&&c?(u-a)/l:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(d)},n)},xM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wM=e=>(...t)=>_e.asap(()=>e(...t)),Gle=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Yle=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xle(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function KL(e,t){return e&&!Zle(t)?Xle(e,t):t}const _M=e=>e instanceof co?{...e}:e;function Bc(e,t){t=t||{};const n={};function r(l,c,d,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,d,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,d,h)}else return r(l,c,d,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function u(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(l,c,d)=>i(_M(l),_M(c),d,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||i,h=d(e[c],t[c],c);_e.isUndefined(h)&&d!==u||(n[c]=h)}),n}const GL=e=>{const t=Bc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:u}=t;t.headers=a=co.from(a),t.url=UL(KL(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[l,...c]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&Gle(t.url))){const l=i&&o&&Yle.read(o);l&&a.set(i,l)}return t},Qle=typeof XMLHttpRequest<"u",Jle=Qle&&function(e){return new Promise(function(n,r){const i=GL(e);let o=i.data;const a=co.from(i.headers).normalize();let{responseType:u,onUploadProgress:s,onDownloadProgress:l}=i,c,d,h,v,g;function m(){v&&v(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=co.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};qL(function(T){n(T),m()},function(T){r(T),m()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Ht("Request aborted",Ht.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Ht("Network Error",Ht.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||WL;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new Ht(A,E.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(A,E){b.setRequestHeader(E,A)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),u&&u!=="json"&&(b.responseType=i.responseType),l&&([h,g]=P1(l,!0),b.addEventListener("progress",h)),s&&b.upload&&([d,v]=P1(s),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new Ph(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Hle(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Ht("Unsupported protocol "+x+":",Ht.ERR_BAD_REQUEST,e));return}b.send(o||null)})},ece=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,u();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Ht?c:new Ph(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Ht(`timeout ${t} of ms exceeded`,Ht.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>_e.asap(u),s}},tce=function*(e,t){let n=e.byteLength;if(n{const i=nce(e,t);let o=0,a,u=s=>{a||(a=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:l,value:c}=await i.next();if(l){u(),s.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}s.enqueue(new Uint8Array(c))}catch(l){throw u(l),l}},cancel(s){return u(s),i.return()}},{highWaterMark:2})},Ix=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",YL=Ix&&typeof ReadableStream=="function",ice=Ix&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ZL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oce=YL&&ZL(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),CM=64*1024,EC=YL&&ZL(()=>_e.isReadableStream(new Response("").body)),O1={stream:EC&&(e=>e.body)};Ix&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!O1[t]&&(O1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ht(`Response type '${t}' is not supported`,Ht.ERR_NOT_SUPPORT,r)})})})(new Response);const ace=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await ice(e)).byteLength},uce=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??ace(t)},sce=Ix&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:h}=GL(e);l=l?(l+"").toLowerCase():"text";let v=ece([i,o&&o.toAbortSignal()],a),g;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(s&&oce&&n!=="get"&&n!=="head"&&(b=await uce(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[T,M]=xM(b,P1(wM(s)));r=SM(E.body,CM,T,M)}}_e.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(g);const S=EC&&(l==="stream"||l==="response");if(EC&&(u||S&&m)){const E={};["status","statusText","headers"].forEach(F=>{E[F]=x[F]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[T,M]=u&&xM(C,P1(wM(u),!0))||[];x=new Response(SM(x.body,CM,T,()=>{M&&M(),m&&m()}),E)}l=l||"text";let A=await O1[_e.findKey(O1,l)||"text"](x,e);return!S&&m&&m(),await new Promise((E,C)=>{qL(E,C,{data:A,headers:co.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ht("Network Error",Ht.ERR_NETWORK,e,g),{cause:w.cause||w}):Ht.from(w,w&&w.code,e,g)}}),AC={http:Sle,xhr:Jle,fetch:sce};_e.forEach(AC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const EM=e=>`- ${e}`,lce=e=>_e.isFunction(e)||e===null||e===!1,XL={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : +`+o.map(EM).join(` +`):" "+EM(o[0]):"as no adapter specified";throw new Ht("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:AC};function G_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ph(null,e)}function AM(e){return G_(e),e.headers=co.from(e.headers),e.data=K_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),XL.getAdapter(e.adapter||ug.adapter)(e).then(function(r){return G_(e),r.data=K_.call(e,e.transformResponse,r),r.headers=co.from(r.headers),r},function(r){return HL(r)||(G_(e),r&&r.response&&(r.response.data=K_.call(e,e.transformResponse,r.response),r.response.headers=co.from(r.response.headers))),Promise.reject(r)})}const QL="1.7.9",Nx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Nx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const PM={};Nx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+QL+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,u)=>{if(t===!1)throw new Ht(i(a," has been removed"+(n?" in "+n:"")),Ht.ERR_DEPRECATED);return n&&!PM[a]&&(PM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,u):!0}};Nx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function cce(e,t,n){if(typeof e!="object")throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const u=e[o],s=u===void 0||a(u,o,e);if(s!==!0)throw new Ht("option "+o+" must be "+s,Ht.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}}const Fy={assertOptions:cce,validators:Nx},uu=Fy.validators;class Ac{constructor(t){this.defaults=t,this.interceptors={request:new yM,response:new yM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Fy.assertOptions(r,{silentJSONParsing:uu.transitional(uu.boolean),forcedJSONParsing:uu.transitional(uu.boolean),clarifyTimeoutError:uu.transitional(uu.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Fy.assertOptions(i,{encode:uu.function,serialize:uu.function},!0)),Fy.assertOptions(n,{baseUrl:uu.spelling("baseURL"),withXsrfToken:uu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=co.concat(a,o);const u=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,u.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,h;if(!s){const g=[AM.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,l),h=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{r.subscribe(u),o=u}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,u){r.reason||(r.reason=new Ph(o,a,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cA(function(i){t=i}),cancel:t}}}function fce(e){return function(n){return e.apply(null,n)}}function dce(e){return _e.isObject(e)&&e.isAxiosError===!0}const PC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(PC).forEach(([e,t])=>{PC[t]=e});function JL(e){const t=new Ac(e),n=TL(Ac.prototype.request,t);return _e.extend(n,Ac.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return JL(Bc(e,i))},n}const Kr=JL(ug);Kr.Axios=Ac;Kr.CanceledError=Ph;Kr.CancelToken=cA;Kr.isCancel=HL;Kr.VERSION=QL;Kr.toFormData=$x;Kr.AxiosError=Ht;Kr.Cancel=Kr.CanceledError;Kr.all=function(t){return Promise.all(t)};Kr.spread=fce;Kr.isAxiosError=dce;Kr.mergeConfig=Bc;Kr.AxiosHeaders=co;Kr.formToJSON=e=>VL(_e.isHTMLForm(e)?new FormData(e):e);Kr.getAdapter=XL.getAdapter;Kr.HttpStatusCode=PC;Kr.default=Kr;var hce=e=>{switch(e){case"success":return gce;case"info":return yce;case"warning":return mce;case"error":return bce;default:return null}},pce=Array(12).fill(0),vce=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},pce.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),gce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),mce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),yce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),bce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xce=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wce=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},OC=1,_ce=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:OC++,o=this.toasts.find(u=>u.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:n}),{...u,...e,id:i,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async s=>{if(o=["resolve",s],j.isValidElement(s))i=!1,this.create({id:n,type:"default",message:s});else if(Cce(s)&&!s.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(s):t.success,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async s=>{if(o=["reject",s],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(s):t.error,c=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var s;i&&(this.dismiss(n),n=void 0),(s=t.finally)==null||s.call(t)}),u=()=>new Promise((s,l)=>a.then(()=>o[0]==="reject"?l(o[1]):s(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=t?.id||OC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ao=new _ce,Sce=(e,t)=>{let n=t?.id||OC++;return Ao.addToast({title:e,...t,id:n}),n},Cce=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ece=Sce,Ace=()=>Ao.toasts,$Ke=Object.assign(Ece,{success:Ao.success,info:Ao.info,warning:Ao.warning,error:Ao.error,custom:Ao.custom,message:Ao.message,promise:Ao.promise,dismiss:Ao.dismiss,loading:Ao.loading},{getHistory:Ace});function Pce(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Pce(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function Wm(e){return e.label!==void 0}var Oce=3,kce="32px",OM=4e3,Tce=356,Mce=14,Rce=20,Dce=200;function $ce(...e){return e.filter(Boolean).join(" ")}var Ice=e=>{var t,n,r,i,o,a,u,s,l,c,d;let{invert:h,toast:v,unstyled:g,interacting:m,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:A,expanded:E,removeToast:C,defaultRichColors:T,closeButton:M,style:F,cancelButtonStyle:U,actionButtonStyle:H,className:W="",descriptionClassName:ie="",duration:Z,position:G,gap:K,loadingIcon:V,expandByDefault:B,classNames:q,icons:Y,closeButtonAriaLabel:ue="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[se,de]=j.useState(!1),[Se,ge]=j.useState(!1),[Ze,Pe]=j.useState(!1),[Fe,$e]=j.useState(!1),[be,yt]=j.useState(!1),[lt,It]=j.useState(0),[mn,en]=j.useState(0),re=j.useRef(v.duration||Z||OM),pe=j.useRef(null),ye=j.useRef(null),Ue=S===0,je=S+1<=w,ke=v.type,nt=v.dismissible!==!1,gt=v.className||"",bn=v.descriptionClassName||"",Vt=j.useMemo(()=>x.findIndex(_t=>_t.toastId===v.id)||0,[x,v.id]),xn=j.useMemo(()=>{var _t;return(_t=v.closeButton)!=null?_t:M},[v.closeButton,M]);j.useMemo(()=>v.duration||Z||OM,[v.duration,Z]);let Ii=j.useRef(0),br=j.useRef(0),yi=j.useRef(0),ar=j.useRef(null),[ui,bi]=G.split("-"),Rr=j.useMemo(()=>x.reduce((_t,dn,wn)=>wn>=Vt?_t:_t+dn.height,0),[x,Vt]),Yi=wce(),go=v.invert||h,xi=ke==="loading";br.current=j.useMemo(()=>Vt*K+Rr,[Vt,Rr]),j.useEffect(()=>{de(!0)},[]),j.useEffect(()=>{let _t=ye.current;if(_t){let dn=_t.getBoundingClientRect().height;return en(dn),b(wn=>[{toastId:v.id,height:dn,position:v.position},...wn]),()=>b(wn=>wn.filter(qn=>qn.toastId!==v.id))}},[b,v.id]),j.useLayoutEffect(()=>{if(!se)return;let _t=ye.current,dn=_t.style.height;_t.style.height="auto";let wn=_t.getBoundingClientRect().height;_t.style.height=dn,en(wn),b(qn=>qn.find(ur=>ur.toastId===v.id)?qn.map(ur=>ur.toastId===v.id?{...ur,height:wn}:ur):[{toastId:v.id,height:wn,position:v.position},...qn])},[se,v.title,v.description,b,v.id]);let Dr=j.useCallback(()=>{ge(!0),It(br.current),b(_t=>_t.filter(dn=>dn.toastId!==v.id)),setTimeout(()=>{C(v)},Dce)},[v,C,b,br]);j.useEffect(()=>{if(v.promise&&ke==="loading"||v.duration===1/0||v.type==="loading")return;let _t;return E||m||Q&&Yi?(()=>{if(yi.current{var dn;(dn=v.onAutoClose)==null||dn.call(v,v),Dr()},re.current)),()=>clearTimeout(_t)},[E,m,v,ke,Q,Yi,Dr]),j.useEffect(()=>{v.delete&&Dr()},[Dr,v.delete]);function wa(){var _t,dn,wn;return Y!=null&&Y.loading?j.createElement("div",{className:J(q?.loader,(_t=v?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):V?j.createElement("div",{className:J(q?.loader,(dn=v?.classNames)==null?void 0:dn.loader,"sonner-loader"),"data-visible":ke==="loading"},V):j.createElement(vce,{className:J(q?.loader,(wn=v?.classNames)==null?void 0:wn.loader),visible:ke==="loading"})}return j.createElement("li",{tabIndex:0,ref:ye,className:J(W,gt,q?.toast,(t=v?.classNames)==null?void 0:t.toast,q?.default,q?.[ke],(n=v?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=v.richColors)!=null?r:T,"data-styled":!(v.jsx||v.unstyled||g),"data-mounted":se,"data-promise":!!v.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":ui,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":go,"data-swipe-out":Fe,"data-expanded":!!(E||B&&se),style:{"--index":S,"--toasts-before":S,"--z-index":A.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":B?"auto":`${mn}px`,...F,...v.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,It(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Pe(!0),ar.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,dn,wn,qn;if(Fe||!nt)return;ar.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((dn=pe.current)==null?void 0:dn.getTime()),mo=Math.abs(ur)/Xr;if(Math.abs(ur)>=Rce||mo>.11){It(br.current),(wn=v.onDismiss)==null||wn.call(v,v),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Pe(!1)},onPointerMove:_t=>{var dn,wn;if(!ar.current||!nt)return;let qn=_t.clientY-ar.current.y,ur=((dn=window.getSelection())==null?void 0:dn.toString().length)>0,Xr=ui==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((wn=ye.current)==null||wn.style.setProperty("--swipe-amount",`${Xr}px`))}},xn&&!v.jsx?j.createElement("button",{"aria-label":ue,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=v.onDismiss)==null||_t.call(v,v)},className:J(q?.closeButton,(i=v?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:xce):null,v.jsx||j.isValidElement(v.title)?v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title:j.createElement(j.Fragment,null,ke||v.icon||v.promise?j.createElement("div",{"data-icon":"",className:J(q?.icon,(a=v?.classNames)==null?void 0:a.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||wa():null,v.type!=="loading"?v.icon||Y?.[ke]||hce(ke):null):null,j.createElement("div",{"data-content":"",className:J(q?.content,(u=v?.classNames)==null?void 0:u.content)},j.createElement("div",{"data-title":"",className:J(q?.title,(s=v?.classNames)==null?void 0:s.title)},typeof v.title=="function"?v.title():v.title),v.description?j.createElement("div",{"data-description":"",className:J(ie,bn,q?.description,(l=v?.classNames)==null?void 0:l.description)},typeof v.description=="function"?v.description():v.description):null),j.isValidElement(v.cancel)?v.cancel:v.cancel&&Wm(v.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||U,onClick:_t=>{var dn,wn;Wm(v.cancel)&&nt&&((wn=(dn=v.cancel).onClick)==null||wn.call(dn,_t),Dr())},className:J(q?.cancelButton,(c=v?.classNames)==null?void 0:c.cancelButton)},v.cancel.label):null,j.isValidElement(v.action)?v.action:v.action&&Wm(v.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||H,onClick:_t=>{var dn,wn;Wm(v.action)&&((wn=(dn=v.action).onClick)==null||wn.call(dn,_t),!_t.defaultPrevented&&Dr())},className:J(q?.actionButton,(d=v?.classNames)==null?void 0:d.actionButton)},v.action.label):null))};function kM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var IKe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:u,offset:s,theme:l="light",richColors:c,duration:d,style:h,visibleToasts:v=Oce,toastOptions:g,dir:m=kM(),gap:b=Mce,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:A,cn:E=$ce}=e,[C,T]=j.useState([]),M=j.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[F,U]=j.useState([]),[H,W]=j.useState(!1),[ie,Z]=j.useState(!1),[G,K]=j.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=j.useRef(null),B=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=j.useRef(null),Y=j.useRef(!1),ue=j.useCallback(Q=>{T(J=>{var se;return(se=J.find(de=>de.id===Q.id))!=null&&se.delete||Ao.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return j.useEffect(()=>Ao.subscribe(Q=>{if(Q.dismiss){T(J=>J.map(se=>se.id===Q.id?{...se,delete:!0}:se));return}setTimeout(()=>{Sx.flushSync(()=>{T(J=>{let se=J.findIndex(de=>de.id===Q.id);return se!==-1?[...J.slice(0,se),{...J[se],...Q},...J.slice(se+1)]:[Q,...J]})})})}),[]),j.useEffect(()=>{if(l!=="system"){K(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{K(J?"dark":"light")})}catch{Q.addListener(({matches:se})=>{try{K(se?"dark":"light")}catch(de){console.error(de)}})}},[l]),j.useEffect(()=>{C.length<=1&&W(!1)},[C]),j.useEffect(()=>{let Q=J=>{var se,de;i.every(Se=>J[Se]||J.code===Se)&&(W(!0),(se=V.current)==null||se.focus()),J.code==="Escape"&&(document.activeElement===V.current||(de=V.current)!=null&&de.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),j.useEffect(()=>{if(V.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,Y.current=!1)}},[V.current]),j.createElement("section",{"aria-label":`${S} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var se;let[de,Se]=Q.split("-");return C.length?j.createElement("ol",{key:Q,dir:m==="auto"?kM():m,tabIndex:-1,ref:V,className:u,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((se=F[0])==null?void 0:se.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||kce,"--width":`${Tce}px`,"--gap":`${b}px`,...h},onBlur:ge=>{Y.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Y.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,q.current=ge.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{ie||W(!1)},onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(ge=>!ge.position&&J===0||ge.position===Q).map((ge,Ze)=>{var Pe,Fe;return j.createElement(Ice,{key:ge.id,icons:x,index:Ze,toast:ge,defaultRichColors:c,duration:(Pe=g?.duration)!=null?Pe:d,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Fe=g?.closeButton)!=null?Fe:a,interacting:ie,position:Q,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:ue,toasts:C.filter($e=>$e.position==ge.position),heights:F.filter($e=>$e.position==ge.position),setHeights:U,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:A,cn:E})})):null}))}),Oh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zc=typeof window>"u"||"Deno"in globalThis;function ra(){}function Nce(e,t){return typeof e=="function"?e(t):e}function kC(e){return typeof e=="number"&&e>=0&&e!==1/0}function ej(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bd(e,t){return typeof e=="function"?e(t):e}function Ia(e,t){return typeof e=="function"?e(t):e}function TM(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==fA(a,t.options))return!1}else if(!W0(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function MM(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Uc(t.options.mutationKey)!==Uc(o))return!1}else if(!W0(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function fA(e,t){return(t?.queryKeyHashFn||Uc)(e)}function Uc(e){return JSON.stringify(e,(t,n)=>TC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function W0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!W0(e[n],t[n])):!1}function tj(e,t){if(e===t)return e;const n=RM(e)&&RM(t);if(n||TC(e)&&TC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,u=n?[]:{};let s=0;for(let l=0;l{setTimeout(t,e)})}function MC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tj(e,t):t}function Lce(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jce(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dA=Symbol();function nj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Bce=class extends Oh{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},hA=new Bce,zce=class extends Oh{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!zc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},T1=new zce;function RC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Uce(e){return Math.min(1e3*2**e,3e4)}function rj(e){return(e??"online")==="online"?T1.isOnline():!0}var ij=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Y_(e){return e instanceof ij}function oj(e){let t=!1,n=0,r=!1,i;const o=RC(),a=m=>{r||(h(new ij(m)),e.abort?.())},u=()=>{t=!0},s=()=>{t=!1},l=()=>hA.isFocused()&&(e.networkMode==="always"||T1.isOnline())&&e.canRun(),c=()=>rj(e.networkMode)&&e.canRun(),d=m=>{r||(r=!0,e.onSuccess?.(m),i?.(),o.resolve(m))},h=m=>{r||(r=!0,e.onError?.(m),i?.(),o.reject(m))},v=()=>new Promise(m=>{i=b=>{(r||l())&&m(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),g=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{if(r)return;const x=e.retry??(zc?0:3),S=e.retryDelay??Uce,A=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:v()).then(()=>{t?h(w):g()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:s,canStart:c,start:()=>(c()?g():v().then(g),o)}}function Wce(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(s=>{n(s)})})})};return{batch:u=>{let s;t++;try{s=u()}finally{t--,t||a()}return s},batchCalls:u=>(...s)=>{o(()=>{u(...s)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Ur=Wce(),aj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},Vce=class extends aj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Hce(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=MC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ia(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!ej(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(s=>s.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const u=nj(this.options,t),s={queryKey:this.queryKey,meta:this.meta};return r(s),this.#o=!1,this.options.persister?this.options.persister(u,s,this):u(s)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=u=>{Y_(u)&&u.silent||this.#i({type:"error",error:u}),Y_(u)||(this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this)),this.scheduleGc()};return this.#n=oj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(s){a(s);return}this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,s)=>{this.#i({type:"failed",failureCount:u,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Y_(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function uj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hce(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var qce=class extends Oh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??fA(r,t);let o=this.get(i);return o||(o=new Vce({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>TM(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>TM(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kce=class extends aj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||sj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=oj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function sj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gce=class extends Oh{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Kce({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=Vm(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=Vm(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(Vm(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(Vm(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>MM(t,n))}findAll(e={}){return this.getAll().filter(t=>MM(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(ra))))}};function Vm(e){return e.options.scope?.id??String(e.mutationId)}function $M(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},s=0;const l=async()=>{let c=!1;const d=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=nj(t.options,t.fetchOptions),v=async(g,m,b)=>{if(c)return Promise.reject();if(m==null&&g.pages.length)return Promise.resolve(g);const w={queryKey:t.queryKey,pageParam:m,direction:b?"backward":"forward",meta:t.options.meta};d(w);const x=await h(w),{maxPages:S}=t.options,A=b?jce:Lce;return{pages:A(g.pages,x,S),pageParams:A(g.pageParams,m,S)}};if(i&&o.length){const g=i==="backward",m=g?Yce:IM,b={pages:o,pageParams:a},w=m(r,b);u=await v(b,w,g)}else{const g=e??o.length;do{const m=s===0?a[0]??r.initialPageParam:IM(r,u);if(s>0&&m==null)break;u=await v(u,m),s++}while(st.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function IM(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Yce(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var NKe=class{#e;#t;#r;#n;#a;#o;#i;#u;constructor(e={}){this.#e=e.queryCache||new qce,this.#t=e.mutationCache||new Gce,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=hA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=T1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(bd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Nce(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ra)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ra)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(bd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e.behavior=$M(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e.behavior=$M(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return T1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(Uc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{W0(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Uc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{W0(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dA&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Zce=class extends Oh{constructor(e,t){super(),this.options=t,this.#e=e,this.#u=null,this.#i=RC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#u;#v;#d;#h;#l;#c;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),NM(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return DC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return DC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ia(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!k1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&FM(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||bd(this.options.staleTime,this.#t)!==bd(n.staleTime,this.#t))&&this.#g();const o=this.#m();i&&(this.#t!==r||Ia(this.options.enabled,this.#t)!==Ia(n.enabled,this.#t)||o!==this.#s)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Qce(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ra)),t}#g(){this.#x();const e=bd(this.options.staleTime,this.#t);if(zc||this.#n.isStale||!kC(e))return;const n=ej(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#s=e,!(zc||Ia(this.options.enabled,this.#t)===!1||!kC(this.#s)||this.#s===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||hA.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#m())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,s=e!==n?e.state:this.#r,{state:l}=e;let c={...l},d=!1,h;if(t._optimisticResults){const T=this.hasListeners(),M=!T&&NM(e,t),F=T&&FM(e,n,t,r);(M||F)&&(c={...c,...uj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:m}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#v)h=this.#d;else try{this.#v=t.select,h=t.select(c.data),h=MC(i?.data,h,t),this.#d=h,this.#u=null}catch(T){this.#u=T}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&m==="pending"){let T;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)T=i.data;else if(T=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&T!==void 0)try{T=t.select(T),this.#u=null}catch(M){this.#u=M}T!==void 0&&(m="success",h=MC(i?.data,T,t),d=!0)}this.#u&&(v=this.#u,h=this.#d,g=Date.now(),m="error");const b=c.fetchStatus==="fetching",w=m==="pending",x=m==="error",S=w&&b,A=h!==void 0,C={status:m,fetchStatus:c.fetchStatus,isPending:w,isSuccess:m==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!A,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&A,isStale:pA(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const T=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},M=()=>{const U=this.#i=C.promise=RC();T(U)},F=this.#i;switch(F.status){case"pending":e.queryHash===n.queryHash&&T(F);break;case"fulfilled":(C.status==="error"||C.data!==F.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==F.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),k1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const u=new Set(a??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#n).some(s=>{const l=s;return this.#n[l]!==t[l]&&u.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Xce(e,t){return Ia(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function NM(e,t){return Xce(e,t)||e.state.data!==void 0&&DC(e,t,t.refetchOnMount)}function DC(e,t,n){if(Ia(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pA(e,t)}return!1}function FM(e,t,n,r){return(e!==t||Ia(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pA(e,n)}function pA(e,t){return Ia(t.enabled,e)!==!1&&e.isStaleByTime(bd(t.staleTime,e))}function Qce(e,t){return!k1(e.getCurrentResult(),t)}var Jce=class extends Oh{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),k1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Uc(n.mutationKey)!==Uc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??sj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},lj=y.createContext(void 0),cj=e=>{const t=y.useContext(lj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},LKe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(lj.Provider,{value:e,children:t})),fj=y.createContext(!1),efe=()=>y.useContext(fj);fj.Provider;function tfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nfe=y.createContext(tfe()),rfe=()=>y.useContext(nfe);function dj(e,t){return typeof e=="function"?e(...t):!!e}function $C(){}var ife=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ofe=e=>{y.useEffect(()=>{e.clearReset()},[e])},afe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&dj(n,[e.error,r]),ufe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},sfe=(e,t)=>e.isLoading&&e.isFetching&&!t,lfe=(e,t)=>e?.suspense&&t.isPending,LM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cfe(e,t,n){const r=cj(),i=efe(),o=rfe(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ufe(a),ife(a,o),ofe(o);const u=!r.getQueryCache().get(a.queryHash),[s]=y.useState(()=>new t(r,a)),l=s.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const d=i?$C:s.subscribe(Ur.batchCalls(c));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),y.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),lfe(a,l))throw LM(a,s,o);if(afe({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!zc&&sfe(l,i)&&(u?LM(a,s,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch($C).finally(()=>{s.updateResult()}),a.notifyOnChangeProps?l:s.trackResult(l)}function jKe(e,t){return cfe(e,Zce)}function BKe(e,t){const n=cj(),[r]=y.useState(()=>new Jce(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,u)=>{r.mutate(a,u).catch($C)},[r]);if(i.error&&dj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var sg=e=>e.type==="checkbox",yc=e=>e instanceof Date,zi=e=>e==null;const hj=e=>typeof e=="object";var Ar=e=>!zi(e)&&!Array.isArray(e)&&hj(e)&&!yc(e),pj=e=>Ar(e)&&e.target?sg(e.target)?e.target.checked:e.target.value:e,ffe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vj=(e,t)=>e.has(ffe(t)),dfe=e=>{const t=e.constructor&&e.constructor.prototype;return Ar(t)&&t.hasOwnProperty("isPrototypeOf")},vA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function eo(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(vA&&(e instanceof Blob||r))&&(n||Ar(e)))if(t=n?[]:{},!n&&!dfe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=eo(e[i]));else return e;return t}var Fx=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Ar(e))return n;const r=Fx(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},ia=e=>typeof e=="boolean",gA=e=>/^\w*$/.test(e),gj=e=>Fx(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=gA(t)?[t]:gj(t),o=i.length,a=o-1;for(;++rj.useContext(mj),zKe=e=>{const{children:t,...n}=e;return j.createElement(mj.Provider,{value:n},t)};var yj=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==Fa.all&&(t._proxyFormState[a]=!r||Fa.all),n&&(n[a]=!0),e[a]}});return i},no=e=>Ar(e)&&!Object.keys(e).length,bj=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return no(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||Fa.all))},c0=e=>Array.isArray(e)?e:[e],xj=(e,t,n)=>!e||!t||e===t||c0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function yA(e){const t=j.useRef(e);t.current=e,j.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function hfe(e){const t=mA(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,u]=j.useState(n._formState),s=j.useRef(!0),l=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=j.useRef(i);return c.current=i,yA({disabled:r,next:d=>s.current&&xj(c.current,d.name,o)&&bj(d,l.current,n._updateFormState)&&u({...n._formState,...d}),subject:n._subjects.state}),j.useEffect(()=>(s.current=!0,l.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),j.useMemo(()=>yj(a,n,l.current,!1),[a,n])}var hu=e=>typeof e=="string",wj=(e,t,n,r,i)=>hu(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function pfe(e){const t=mA(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,u=j.useRef(r);u.current=r,yA({disabled:o,subject:n._subjects.values,next:c=>{xj(u.current,c.name,a)&&l(eo(wj(u.current,n._names,c.values||n._formValues,!1,i)))}});const[s,l]=j.useState(n._getWatch(r,i));return j.useEffect(()=>n._removeUnmounted()),s}function vfe(e){const t=mA(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=vj(i._names.array,n),u=pfe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),s=hfe({control:i,name:n,exact:!0}),l=j.useRef(i.register(n,{...e.rules,value:u,...ia(e.disabled)?{disabled:e.disabled}:{}})),c=j.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(s.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(s.errors,n)}}),[s,n]),d=j.useMemo(()=>({name:n,value:u,...ia(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:pj(h),name:n},type:M1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:M1.BLUR}),ref:h=>{const v=Xe(i._fields,n);v&&h&&(v._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,s.disabled,u,i._fields]);return j.useEffect(()=>{const h=i._options.shouldUnregister||o,v=(g,m)=>{const b=Xe(i._fields,g);b&&b._f&&(b._f.mount=m)};if(v(n,!0),h){const g=eo(Xe(i._options.defaultValues,n));An(i._defaultValues,n,g),Sr(Xe(i._formValues,n))&&An(i._formValues,n,g)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):v(n,!1)}},[n,i,a,o]),j.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),j.useMemo(()=>({field:d,formState:s,fieldState:c}),[d,s,c])}const UKe=e=>e.render(vfe(e));var _j=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},jM=e=>({isOnSubmit:!e||e===Fa.onSubmit,isOnBlur:e===Fa.onBlur,isOnChange:e===Fa.onChange,isOnAll:e===Fa.all,isOnTouch:e===Fa.onTouched}),BM=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const f0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...u}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(f0(u,t))break}else if(Ar(u)&&f0(u,t))break}}};var gfe=(e,t,n)=>{const r=c0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},bA=e=>e.type==="file",cu=e=>typeof e=="function",R1=e=>{if(!vA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ly=e=>hu(e),xA=e=>e.type==="radio",D1=e=>e instanceof RegExp;const zM={value:!1,isValid:!1},UM={value:!0,isValid:!0};var Sj=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?UM:{value:e[0].value,isValid:!0}:UM:zM}return zM};const WM={isValid:!1,value:null};var Cj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,WM):WM;function VM(e,t,n="validate"){if(Ly(e)||Array.isArray(e)&&e.every(Ly)||ia(e)&&!e)return{type:n,message:Ly(e)?e:"",ref:t}}var If=e=>Ar(e)&&!D1(e)?e:{value:e,message:""},HM=async(e,t,n,r,i,o)=>{const{ref:a,refs:u,required:s,maxLength:l,minLength:c,min:d,max:h,pattern:v,validate:g,name:m,valueAsNumber:b,mount:w}=e._f,x=Xe(n,m);if(!w||t.has(m))return{};const S=u?u[0]:a,A=W=>{i&&S.reportValidity&&(S.setCustomValidity(ia(W)?"":W||""),S.reportValidity())},E={},C=xA(a),T=sg(a),M=C||T,F=(b||bA(a))&&Sr(a.value)&&Sr(x)||R1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,U=_j.bind(null,m,r,E),H=(W,ie,Z,G=Wu.maxLength,K=Wu.minLength)=>{const V=W?ie:Z;E[m]={type:W?G:K,message:V,ref:a,...U(W?G:K,V)}};if(o?!Array.isArray(x)||!x.length:s&&(!M&&(F||zi(x))||ia(x)&&!x||T&&!Sj(u).isValid||C&&!Cj(u).isValid)){const{value:W,message:ie}=Ly(s)?{value:!!s,message:s}:If(s);if(W&&(E[m]={type:Wu.required,message:ie,ref:S,...U(Wu.required,ie)},!r))return A(ie),E}if(!F&&(!zi(d)||!zi(h))){let W,ie;const Z=If(h),G=If(d);if(!zi(x)&&!isNaN(x)){const K=a.valueAsNumber||x&&+x;zi(Z.value)||(W=K>Z.value),zi(G.value)||(ie=Knew Date(new Date().toDateString()+" "+Y),B=a.type=="time",q=a.type=="week";hu(Z.value)&&x&&(W=B?V(x)>V(Z.value):q?x>Z.value:K>new Date(Z.value)),hu(G.value)&&x&&(ie=B?V(x)+W.value,G=!zi(ie.value)&&x.length<+ie.value;if((Z||G)&&(H(Z,W.message,ie.message),!r))return A(E[m].message),E}if(v&&!F&&hu(x)){const{value:W,message:ie}=If(v);if(D1(W)&&!x.match(W)&&(E[m]={type:Wu.pattern,message:ie,ref:a,...U(Wu.pattern,ie)},!r))return A(ie),E}if(g){if(cu(g)){const W=await g(x,n),ie=VM(W,S);if(ie&&(E[m]={...ie,...U(Wu.validate,ie.message)},!r))return A(ie.message),E}else if(Ar(g)){let W={};for(const ie in g){if(!no(W)&&!r)break;const Z=VM(await g[ie](x,n),S,ie);Z&&(W={...Z,...U(ie,Z.message)},A(Z.message),r&&(E[m]=W))}if(!no(W)&&(E[m]={ref:S,...W},!r))return E}}return A(!0),E};function mfe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},IC=e=>zi(e)||!hj(e);function Qs(e,t){if(IC(e)||IC(t))return e===t;if(yc(e)&&yc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(yc(o)&&yc(a)||Ar(o)&&Ar(a)||Array.isArray(o)&&Array.isArray(a)?!Qs(o,a):o!==a)return!1}}return!0}var Ej=e=>e.type==="select-multiple",bfe=e=>xA(e)||sg(e),X_=e=>R1(e)&&e.isConnected,Aj=e=>{for(const t in e)if(cu(e[t]))return!0;return!1};function $1(e,t={}){const n=Array.isArray(e);if(Ar(e)||n)for(const r in e)Array.isArray(e[r])||Ar(e[r])&&!Aj(e[r])?(t[r]=Array.isArray(e[r])?[]:{},$1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function Pj(e,t,n){const r=Array.isArray(e);if(Ar(e)||r)for(const i in e)Array.isArray(e[i])||Ar(e[i])&&!Aj(e[i])?Sr(t)||IC(n[i])?n[i]=Array.isArray(e[i])?$1(e[i],[]):{...$1(e[i])}:Pj(e[i],zi(t)?{}:t[i],n[i]):n[i]=!Qs(e[i],t[i]);return n}var Pp=(e,t)=>Pj(e,t,$1(t)),Oj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&hu(e)?new Date(e):r?r(e):e;function Q_(e){const t=e.ref;return bA(t)?t.files:xA(t)?Cj(e.refs).value:Ej(t)?[...t.selectedOptions].map(({value:n})=>n):sg(t)?Sj(e.refs).value:Oj(Sr(t.value)?e.ref.value:t.value,e)}var xfe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Op=e=>Sr(e)?e:D1(e)?e.source:Ar(e)?D1(e.value)?e.value.source:e.value:e;const qM="AsyncFunction";var wfe=e=>!!e&&!!e.validate&&!!(cu(e.validate)&&e.validate.constructor.name===qM||Ar(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===qM)),_fe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function KM(e,t,n){const r=Xe(e,n);if(r||gA(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),u=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};i.pop()}return{name:n}}var Sfe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Cfe=(e,t)=>!Fx(Xe(e,t)).length&&Br(e,t);const Efe={mode:Fa.onSubmit,reValidateMode:Fa.onChange,shouldFocusError:!0};function Afe(e={}){let t={...Efe,...e},n={submitCount:0,isDirty:!1,isLoading:cu(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Ar(t.defaultValues)||Ar(t.values)?eo(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:eo(i),a={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},s,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Z_(),array:Z_(),state:Z_()},h=jM(t.mode),v=jM(t.reValidateMode),g=t.criteriaMode===Fa.all,m=re=>pe=>{clearTimeout(l),l=setTimeout(re,pe)},b=async re=>{if(!t.disabled&&(c.isValid||re)){const pe=t.resolver?no((await M()).errors):await U(r,!0);pe!==n.isValid&&d.state.next({isValid:pe})}},w=(re,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((re||Array.from(u.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),d.state.next({validatingFields:n.validatingFields,isValidating:!no(n.validatingFields)}))},x=(re,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,re))){const nt=ye(Xe(r,re),Ue.argA,Ue.argB);je&&An(r,re,nt)}if(ke&&Array.isArray(Xe(n.errors,re))){const nt=ye(Xe(n.errors,re),Ue.argA,Ue.argB);je&&An(n.errors,re,nt),Cfe(n.errors,re)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,re))){const nt=ye(Xe(n.touchedFields,re),Ue.argA,Ue.argB);je&&An(n.touchedFields,re,nt)}c.dirtyFields&&(n.dirtyFields=Pp(i,o)),d.state.next({name:re,isDirty:W(re,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,re,pe)},S=(re,pe)=>{An(n.errors,re,pe),d.state.next({errors:n.errors})},A=re=>{n.errors=re,d.state.next({errors:n.errors,isValid:!1})},E=(re,pe,ye,Ue)=>{const je=Xe(r,re);if(je){const ke=Xe(o,re,Sr(ye)?Xe(i,re):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,re,pe?ke:Q_(je._f)):G(re,ke),a.mount&&b()}},C=(re,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const gt={name:re};if(!t.disabled){const bn=!!(Xe(r,re)&&Xe(r,re)._f&&Xe(r,re)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=gt.isDirty=W(),ke=nt!==gt.isDirty);const Vt=bn||Qs(Xe(i,re),pe);nt=!!(!bn&&Xe(n.dirtyFields,re)),Vt||bn?Br(n.dirtyFields,re):An(n.dirtyFields,re,!0),gt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Vt}if(ye){const Vt=Xe(n.touchedFields,re);Vt||(An(n.touchedFields,re,ye),gt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Vt!==ye)}ke&&je&&d.state.next(gt)}return ke?gt:{}},T=(re,pe,ye,Ue)=>{const je=Xe(n.errors,re),ke=c.isValid&&ia(pe)&&n.isValid!==pe;if(t.delayError&&ye?(s=m(()=>S(re,ye)),s(t.delayError)):(clearTimeout(l),s=null,ye?An(n.errors,re,ye):Br(n.errors,re)),(ye?!Qs(je,ye):je)||!no(Ue)||ke){const nt={...Ue,...ke&&ia(pe)?{isValid:pe}:{},errors:n.errors,name:re};n={...n,...nt},d.state.next(nt)}},M=async re=>{w(re,!0);const pe=await t.resolver(o,t.context,xfe(re||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(re),pe},F=async re=>{const{errors:pe}=await M(re);if(re)for(const ye of re){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},U=async(re,pe,ye={valid:!0})=>{for(const Ue in re){const je=re[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const gt=u.array.has(ke.name),bn=je._f&&wfe(je._f);bn&&c.validatingFields&&w([Ue],!0);const Vt=await HM(je,u.disabled,o,g,t.shouldUseNativeValidation&&!pe,gt);if(bn&&c.validatingFields&&w([Ue]),Vt[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Vt,ke.name)?gt?gfe(n.errors,Vt,ke.name):An(n.errors,ke.name,Vt[ke.name]):Br(n.errors,ke.name))}!no(nt)&&await U(nt,pe,ye)}}return ye.valid},H=()=>{for(const re of u.unMount){const pe=Xe(r,re);pe&&(pe._f.refs?pe._f.refs.every(ye=>!X_(ye)):!X_(pe._f.ref))&&Se(re)}u.unMount=new Set},W=(re,pe)=>!t.disabled&&(re&&pe&&An(o,re,pe),!Qs(ue(),i)),ie=(re,pe,ye)=>wj(re,u,{...a.mount?o:Sr(pe)?i:hu(re)?{[re]:pe}:pe},ye,pe),Z=re=>Fx(Xe(a.mount?o:i,re,t.shouldUnregister?Xe(i,re,[]):[])),G=(re,pe,ye={})=>{const Ue=Xe(r,re);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,re,Oj(pe,ke)),je=R1(ke.ref)&&zi(pe)?"":pe,Ej(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?sg(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(gt=>gt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):bA(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||d.values.next({name:re,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(re,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(re)},K=(re,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${re}.${Ue}`,nt=Xe(r,ke);(u.array.has(re)||Ar(je)||nt&&!nt._f)&&!yc(je)?K(ke,je,ye):G(ke,je,ye)}},V=(re,pe,ye={})=>{const Ue=Xe(r,re),je=u.array.has(re),ke=eo(pe);An(o,re,ke),je?(d.array.next({name:re,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&d.state.next({name:re,dirtyFields:Pp(i,o),isDirty:W(re,ke)})):Ue&&!Ue._f&&!zi(ke)?K(re,ke,ye):G(re,ke,ye),BM(re,u)&&d.state.next({...n}),d.values.next({name:a.mount?re:void 0,values:{...o}})},B=async re=>{a.mount=!0;const pe=re.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?Q_(je._f):pj(re),nt=gt=>{Ue=Number.isNaN(gt)||yc(gt)&&isNaN(gt.getTime())||Qs(gt,Xe(o,ye,gt))};if(je){let gt,bn;const Vt=ke(),xn=re.type===M1.BLUR||re.type===M1.FOCUS_OUT,Ii=!_fe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||Sfe(xn,Xe(n.touchedFields,ye),n.isSubmitted,v,h),br=BM(ye,u,xn);An(o,ye,Vt),xn?(je._f.onBlur&&je._f.onBlur(re),s&&s(0)):je._f.onChange&&je._f.onChange(re);const yi=C(ye,Vt,xn,!1),ar=!no(yi)||br;if(!xn&&d.values.next({name:ye,type:re.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&xn?b():xn||b()),ar&&d.state.next({name:ye,...br?{}:yi});if(!xn&&br&&d.state.next({...n}),t.resolver){const{errors:ui}=await M([ye]);if(nt(Vt),Ue){const bi=KM(n.errors,r,ye),Rr=KM(ui,r,bi.name||ye);gt=Rr.error,ye=Rr.name,bn=no(ui)}}else w([ye],!0),gt=(await HM(je,u.disabled,o,g,t.shouldUseNativeValidation))[ye],w([ye]),nt(Vt),Ue&&(gt?bn=!1:c.isValid&&(bn=await U(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),T(ye,bn,gt,yi))}},q=(re,pe)=>{if(Xe(n.errors,pe)&&re.focus)return re.focus(),1},Y=async(re,pe={})=>{let ye,Ue;const je=c0(re);if(t.resolver){const ke=await F(Sr(re)?re:je);ye=no(ke),Ue=re?!je.some(nt=>Xe(ke,nt)):ye}else re?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await U(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await U(r);return d.state.next({...!hu(re)||c.isValid&&ye!==n.isValid?{}:{name:re},...t.resolver||!re?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&f0(r,q,re?je:u.mount),Ue},ue=re=>{const pe={...a.mount?o:i};return Sr(re)?pe:hu(re)?Xe(pe,re):re.map(ye=>Xe(pe,ye))},Q=(re,pe)=>({invalid:!!Xe((pe||n).errors,re),isDirty:!!Xe((pe||n).dirtyFields,re),error:Xe((pe||n).errors,re),isValidating:!!Xe(n.validatingFields,re),isTouched:!!Xe((pe||n).touchedFields,re)}),J=re=>{re&&c0(re).forEach(pe=>Br(n.errors,pe)),d.state.next({errors:re?n.errors:{}})},se=(re,pe,ye)=>{const Ue=(Xe(r,re,{_f:{}})._f||{}).ref,je=Xe(n.errors,re)||{},{ref:ke,message:nt,type:gt,...bn}=je;An(n.errors,re,{...bn,...pe,ref:Ue}),d.state.next({name:re,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(re,pe)=>cu(re)?d.values.subscribe({next:ye=>re(ie(void 0,pe),ye)}):ie(re,pe,!0),Se=(re,pe={})=>{for(const ye of re?c0(re):u.mount)u.mount.delete(ye),u.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);d.values.next({values:{...o}}),d.state.next({...n,...pe.keepDirty?{isDirty:W()}:{}}),!pe.keepIsValid&&b()},ge=({disabled:re,name:pe,field:ye,fields:Ue})=>{(ia(re)&&a.mount||re||u.disabled.has(pe))&&(re?u.disabled.add(pe):u.disabled.delete(pe),C(pe,Q_(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(re,pe={})=>{let ye=Xe(r,re);const Ue=ia(pe.disabled)||ia(t.disabled);return An(r,re,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:re}},name:re,mount:!0,...pe}}),u.mount.add(re),ye?ge({field:ye,disabled:ia(pe.disabled)?pe.disabled:t.disabled,name:re}):E(re,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Op(pe.min),max:Op(pe.max),minLength:Op(pe.minLength),maxLength:Op(pe.maxLength),pattern:Op(pe.pattern)}:{},name:re,onChange:B,onBlur:B,ref:je=>{if(je){Ze(re,pe),ye=Xe(r,re);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=bfe(ke),gt=ye._f.refs||[];if(nt?gt.find(bn=>bn===ke):ke===ye._f.ref)return;An(r,re,{_f:{...ye._f,...nt?{refs:[...gt.filter(X_),ke,...Array.isArray(Xe(i,re))?[{}]:[]],ref:{type:ke.type,name:re}}:{ref:ke}}}),E(re,!1,void 0,ke)}else ye=Xe(r,re,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(vj(u.array,re)&&a.action)&&u.unMount.add(re)}}},Pe=()=>t.shouldFocusError&&f0(r,q,u.mount),Fe=re=>{ia(re)&&(d.state.next({disabled:re}),f0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||re,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||re}))},0,!1))},$e=(re,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=eo(o);if(u.disabled.size)for(const ke of u.disabled)An(je,ke,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await U(r);if(Br(n.errors,"root"),no(n.errors)){d.state.next({errors:{}});try{await re(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Pe(),setTimeout(Pe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:no(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(re,pe={})=>{Xe(r,re)&&(Sr(pe.defaultValue)?V(re,eo(Xe(i,re))):(V(re,pe.defaultValue),An(i,re,eo(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,re),pe.keepDirty||(Br(n.dirtyFields,re),n.isDirty=pe.defaultValue?W(re,eo(Xe(i,re))):W()),pe.keepError||(Br(n.errors,re),c.isValid&&b()),d.state.next({...n}))},yt=(re,pe={})=>{const ye=re?eo(re):i,Ue=eo(ye),je=no(re),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...u.mount,...Object.keys(Pp(i,o))]);for(const gt of Array.from(nt))Xe(n.dirtyFields,gt)?An(ke,gt,Xe(o,gt)):V(gt,Xe(ke,gt))}else{if(vA&&Sr(re))for(const nt of u.mount){const gt=Xe(r,nt);if(gt&>._f){const bn=Array.isArray(gt._f.refs)?gt._f.refs[0]:gt._f.ref;if(R1(bn)){const Vt=bn.closest("form");if(Vt){Vt.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?eo(i):{}:eo(ke),d.array.next({values:{...ke}}),d.values.next({values:{...ke}})}u={mount:pe.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,d.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!Qs(re,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Pp(i,o):n.dirtyFields:pe.keepDefaultValues&&re?Pp(i,re):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(re,pe)=>yt(cu(re)?re(o):re,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:se,_executeSchema:M,_getWatch:ie,_getDirty:W,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:ge,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>cu(t.defaultValues)&&t.defaultValues().then(re=>{lt(re,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:re=>{n={...n,...re}},_disableForm:Fe,_subjects:d,_proxyFormState:c,_setErrors:A,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(re){a=re},get _defaultValues(){return i},get _names(){return u},set _names(re){u=re},get _formState(){return n},set _formState(re){n=re},get _options(){return t},set _options(re){t={...t,...re}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:V,getValues:ue,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:se,setFocus:(re,pe={})=>{const ye=Xe(r,re),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&cu(je.select)&&je.select())}},getFieldState:Q}}function WKe(e={}){const t=j.useRef(void 0),n=j.useRef(void 0),[r,i]=j.useState({isDirty:!1,isValidating:!1,isLoading:cu(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:cu(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Afe(e),formState:r});const o=t.current.control;return o._options=e,yA({subject:o._subjects.state,next:a=>{bj(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),j.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),j.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),j.useEffect(()=>{e.values&&!Qs(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),j.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),j.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),j.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=yj(r,o),t.current}var pn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(pn||(pn={}));var NC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(NC||(NC={}));const it=pn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},We=pn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pfe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Io extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;sn.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Io.create=e=>new Io(e);const Bd=(e,t)=>{let n;switch(e.code){case We.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case We.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pn.jsonStringifyReplacer)}`;break;case We.unrecognized_keys:n=`Unrecognized key(s) in object: ${pn.joinValues(e.keys,", ")}`;break;case We.invalid_union:n="Invalid input";break;case We.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pn.joinValues(e.options)}`;break;case We.invalid_enum_value:n=`Invalid enum value. Expected ${pn.joinValues(e.options)}, received '${e.received}'`;break;case We.invalid_arguments:n="Invalid function arguments";break;case We.invalid_return_type:n="Invalid function return type";break;case We.invalid_date:n="Invalid date";break;case We.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:pn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case We.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case We.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case We.custom:n="Invalid input";break;case We.invalid_intersection_types:n="Intersection results could not be merged";break;case We.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case We.not_finite:n="Number must be finite";break;default:n=t.defaultError,pn.assertNever(e)}return{message:n}};let kj=Bd;function Ofe(e){kj=e}function I1(){return kj}const N1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let u="";const s=r.filter(l=>!!l).slice().reverse();for(const l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:u}},kfe=[];function tt(e,t){const n=I1(),r=N1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Bd?void 0:Bd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),sd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),FC=e=>e.status==="aborted",LC=e=>e.status==="dirty",Wc=e=>e.status==="valid",V0=e=>typeof Promise<"u"&&e instanceof Promise;function F1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Tj(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var Yp,Zp;class Eu{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const GM=(e,t)=>{if(Wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Io(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>{var s,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:(s=c??r)!==null&&s!==void 0?s:u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:u.defaultError}},description:i}}class Qt{get description(){return this._def.description}_getType(t){return Qu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:Qu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(V0(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return GM(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Wc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Wc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(V0(i)?i:Promise.resolve(i));return GM(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:We.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ka({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return wu.create(this,this._def)}nullable(){return Pl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this)}promise(){return Ud.create(this,this._def)}or(t){return G0.create([this,t],this._def)}and(t){return Y0.create(this,t,this._def)}transform(t){return new Ka({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ev({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new wA({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tv({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return lg.create(this,t)}readonly(){return nv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Tfe=/^c[^\s-]{8,}$/i,Mfe=/^[0-9a-z]+$/,Rfe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Dfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$fe=/^[a-z0-9_-]{21}$/i,Ife=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Nfe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ffe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Lfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let J_;const jfe=/^(?:(?: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])$/,Bfe=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,zfe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ufe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vfe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mj="((\\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])))",Hfe=new RegExp(`^${Mj}$`);function Rj(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function qfe(e){return new RegExp(`^${Rj(e)}$`)}function Dj(e){let t=`${Mj}T${Rj(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Kfe(e,t){return!!((t==="v4"||!t)&&jfe.test(e)||(t==="v6"||!t)&&zfe.test(e))}function Gfe(e,t){if(!Ife.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Yfe(e,t){return!!((t==="v4"||!t)&&Bfe.test(e)||(t==="v6"||!t)&&Ufe.test(e))}class ja extends Qt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.lengtht.test(i),{validation:n,code:We.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new ja({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new ja({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ja({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new ja({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function Zfe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Cl extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?pn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Zfe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_finite,message:o.message}),i.dirty()):pn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Cl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Cl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&pn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Cl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class El extends Qt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:We.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):pn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new El({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new El({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new El({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class H0 extends Qt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}H0.create=e=>new H0({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Vc extends Qt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:We.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:We.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):pn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Vc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class L1 extends Qt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}L1.create=e=>new L1({typeName:Tt.ZodSymbol,...qt(e)});class q0 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}q0.create=e=>new q0({typeName:Tt.ZodUndefined,...qt(e)});class K0 extends Qt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}K0.create=e=>new K0({typeName:Tt.ZodNull,...qt(e)});class zd extends Qt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}zd.create=e=>new zd({typeName:Tt.ZodAny,...qt(e)});class Pc extends Qt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Pc.create=e=>new Pc({typeName:Tt.ZodUnknown,...qt(e)});class vs extends Qt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:We.invalid_type,expected:it.never,received:n.parsedType}),Dt}}vs.create=e=>new vs({typeName:Tt.ZodNever,...qt(e)});class j1 extends Qt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}j1.create=e=>new j1({typeName:Tt.ZodVoid,...qt(e)});class Wa extends Qt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:We.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.lengthi.maxLength.value&&(tt(n,{code:We.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new Eu(n,a,n.path,u)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new Eu(n,a,n.path,u)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Wa({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Wa({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Wa({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wa.create=(e,t)=>new Wa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function Kf(e){if(e instanceof lr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=wu.create(Kf(r))}return new lr({...e._def,shape:()=>t})}else return e instanceof Wa?new Wa({...e._def,type:Kf(e.element)}):e instanceof wu?wu.create(Kf(e.unwrap())):e instanceof Pl?Pl.create(Kf(e.unwrap())):e instanceof Au?Au.create(e.items.map(t=>Kf(t))):e}class lr extends Qt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=pn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:We.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof vs&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||u.push(l);const s=[];for(const l of a){const c=o[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new Eu(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof vs){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of u)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")u.length>0&&(tt(i,{code:We.unrecognized_keys,keys:u}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of u){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new Eu(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key,h=await c.value;l.push({key:d,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new lr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=dt.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new lr({...this._def,unknownKeys:"strip"})}passthrough(){return new lr({...this._def,unknownKeys:"passthrough"})}extend(t){return new lr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new lr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new lr({...this._def,catchall:t})}pick(t){const n={};return pn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}omit(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new lr({...this._def,shape:()=>n})}deepPartial(){return Kf(this)}partial(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new lr({...this._def,shape:()=>n})}required(t){const n={};return pn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof wu;)o=o._def.innerType;n[r]=o}}),new lr({...this._def,shape:()=>n})}keyof(){return $j(pn.objectKeys(this.shape))}}lr.create=(e,t)=>new lr({shape:()=>e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.strictCreate=(e,t)=>new lr({shape:()=>e,unknownKeys:"strict",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});lr.lazycreate=(e,t)=>new lr({shape:e,unknownKeys:"strip",catchall:vs.create(),typeName:Tt.ZodObject,...qt(t)});class G0 extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new Io(u.ctx.common.issues));return tt(n,{code:We.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=s._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new Io(s));return tt(n,{code:We.invalid_union,unionErrors:u}),Dt}}get options(){return this._def.options}}G0.create=(e,t)=>new G0({options:e,typeName:Tt.ZodUnion,...qt(t)});const qu=e=>e instanceof X0?qu(e.schema):e instanceof Ka?qu(e.innerType()):e instanceof Q0?[e.value]:e instanceof Al?e.options:e instanceof J0?pn.objectValues(e.enum):e instanceof ev?qu(e._def.innerType):e instanceof q0?[void 0]:e instanceof K0?[null]:e instanceof wu?[void 0,...qu(e.unwrap())]:e instanceof Pl?[null,...qu(e.unwrap())]:e instanceof wA||e instanceof nv?qu(e.unwrap()):e instanceof tv?qu(e._def.innerType):[];class Lx extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:We.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:We.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=qu(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new Lx({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function jC(e,t){const n=Qu(e),r=Qu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=pn.objectKeys(t),o=pn.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=jC(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(FC(o)||FC(a))return Dt;const u=jC(o.value,a.value);return u.valid?((LC(o)||LC(a))&&n.dirty(),{status:n.value,value:u.data}):(tt(r,{code:We.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Y0.create=(e,t,n)=>new Y0({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Au extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:We.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:We.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new Eu(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Au({...this._def,rest:t})}}Au.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Au({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class Z0 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:We.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new Eu(r,u,r.path,u)),value:a._parse(new Eu(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Qt?new Z0({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new Z0({keyType:ja.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class B1 extends Qt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:We.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],l)=>({key:i._parse(new Eu(r,u,r.path,[l,"key"])),value:o._parse(new Eu(r,s,r.path,[l,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),u.set(l.value,c.value)}return{status:n.value,value:u}}}}B1.create=(e,t,n)=>new B1({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Hc extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:We.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:We.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const u=[...r.data.values()].map((s,l)=>o._parse(new Eu(r,s,r.path,l)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new Hc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Hc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Hc.create=(e,t)=>new Hc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class xd extends Qt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:We.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(u,s){return N1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,I1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_arguments,argumentsError:s}})}function i(u,s){return N1({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,I1(),Bd].filter(l=>!!l),issueData:{code:We.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ud){const u=this;return Hi(async function(...s){const l=new Io([]),c=await u._def.args.parseAsync(s,o).catch(v=>{throw l.addIssue(r(s,v)),l}),d=await Reflect.apply(a,this,c);return await u._def.returns._def.type.parseAsync(d,o).catch(v=>{throw l.addIssue(i(d,v)),l})})}else{const u=this;return Hi(function(...s){const l=u._def.args.safeParse(s,o);if(!l.success)throw new Io([r(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=u._def.returns.safeParse(c,o);if(!d.success)throw new Io([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xd({...this._def,args:Au.create(t).rest(Pc.create())})}returns(t){return new xd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xd({args:t||Au.create([]).rest(Pc.create()),returns:n||Pc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class X0 extends Qt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}X0.create=(e,t)=>new X0({getter:e,typeName:Tt.ZodLazy,...qt(t)});class Q0 extends Qt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:We.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Q0.create=(e,t)=>new Q0({value:e,typeName:Tt.ZodLiteral,...qt(t)});function $j(e,t){return new Al({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Al extends Qt{constructor(){super(...arguments),Yp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:pn.joinValues(r),received:n.parsedType,code:We.invalid_type}),Dt}if(F1(this,Yp)||Tj(this,Yp,new Set(this._def.values)),!F1(this,Yp).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:We.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Al.create(t,{...this._def,...n})}exclude(t,n=this._def){return Al.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Yp=new WeakMap;Al.create=$j;class J0 extends Qt{constructor(){super(...arguments),Zp.set(this,void 0)}_parse(t){const n=pn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=pn.objectValues(n);return tt(r,{expected:pn.joinValues(i),received:r.parsedType,code:We.invalid_type}),Dt}if(F1(this,Zp)||Tj(this,Zp,new Set(pn.getValidEnumValues(this._def.values))),!F1(this,Zp).has(t.data)){const i=pn.objectValues(n);return tt(r,{received:r.data,code:We.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}Zp=new WeakMap;J0.create=(e,t)=>new J0({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Ud extends Qt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:We.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ud.create=(e,t)=>new Ud({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ka extends Qt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Dt;const s=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?sd(s.value):s});{if(n.value==="aborted")return Dt;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?sd(u.value):u}}if(i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Dt:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wc(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wc(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);pn.assertNever(i)}}Ka.create=(e,t,n)=>new Ka({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ka.createWithPreprocess=(e,t,n)=>new Ka({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class wu extends Qt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wu.create=(e,t)=>new wu({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Pl extends Qt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class ev extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class tv extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return V0(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Io(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}tv.create=(e,t)=>new tv({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class z1 extends Qt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:We.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}z1.create=e=>new z1({typeName:Tt.ZodNaN,...qt(e)});const Xfe=Symbol("zod_brand");class wA extends Qt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class lg extends Qt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),sd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new lg({in:t,out:n,typeName:Tt.ZodPipeline})}}class nv extends Qt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Wc(i)&&(i.value=Object.freeze(i.value)),i);return V0(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}nv.create=(e,t)=>new nv({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function Ij(e,t={},n){return e?zd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...l,fatal:s})}}):zd.create()}const Qfe={object:lr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Jfe=(e,t={message:`Input not instance of ${e.name}`})=>Ij(n=>n instanceof e,t),Nj=ja.create,Fj=Cl.create,ede=z1.create,tde=El.create,Lj=H0.create,nde=Vc.create,rde=L1.create,ide=q0.create,ode=K0.create,ade=zd.create,ude=Pc.create,sde=vs.create,lde=j1.create,cde=Wa.create,fde=lr.create,dde=lr.strictCreate,hde=G0.create,pde=Lx.create,vde=Y0.create,gde=Au.create,mde=Z0.create,yde=B1.create,bde=Hc.create,xde=xd.create,wde=X0.create,_de=Q0.create,Sde=Al.create,Cde=J0.create,Ede=Ud.create,YM=Ka.create,Ade=wu.create,Pde=Pl.create,Ode=Ka.createWithPreprocess,kde=lg.create,Tde=()=>Nj().optional(),Mde=()=>Fj().optional(),Rde=()=>Lj().optional(),Dde={string:e=>ja.create({...e,coerce:!0}),number:e=>Cl.create({...e,coerce:!0}),boolean:e=>H0.create({...e,coerce:!0}),bigint:e=>El.create({...e,coerce:!0}),date:e=>Vc.create({...e,coerce:!0})},$de=Dt;var VKe=Object.freeze({__proto__:null,defaultErrorMap:Bd,setErrorMap:Ofe,getErrorMap:I1,makeIssue:N1,EMPTY_PATH:kfe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:sd,OK:Hi,isAborted:FC,isDirty:LC,isValid:Wc,isAsync:V0,get util(){return pn},get objectUtil(){return NC},ZodParsedType:it,getParsedType:Qu,ZodType:Qt,datetimeRegex:Dj,ZodString:ja,ZodNumber:Cl,ZodBigInt:El,ZodBoolean:H0,ZodDate:Vc,ZodSymbol:L1,ZodUndefined:q0,ZodNull:K0,ZodAny:zd,ZodUnknown:Pc,ZodNever:vs,ZodVoid:j1,ZodArray:Wa,ZodObject:lr,ZodUnion:G0,ZodDiscriminatedUnion:Lx,ZodIntersection:Y0,ZodTuple:Au,ZodRecord:Z0,ZodMap:B1,ZodSet:Hc,ZodFunction:xd,ZodLazy:X0,ZodLiteral:Q0,ZodEnum:Al,ZodNativeEnum:J0,ZodPromise:Ud,ZodEffects:Ka,ZodTransformer:Ka,ZodOptional:wu,ZodNullable:Pl,ZodDefault:ev,ZodCatch:tv,ZodNaN:z1,BRAND:Xfe,ZodBranded:wA,ZodPipeline:lg,ZodReadonly:nv,custom:Ij,Schema:Qt,ZodSchema:Qt,late:Qfe,get ZodFirstPartyTypeKind(){return Tt},coerce:Dde,any:ade,array:cde,bigint:tde,boolean:Lj,date:nde,discriminatedUnion:pde,effect:YM,enum:Sde,function:xde,instanceof:Jfe,intersection:vde,lazy:wde,literal:_de,map:yde,nan:ede,nativeEnum:Cde,never:sde,null:ode,nullable:Pde,number:Fj,object:fde,oboolean:Rde,onumber:Mde,optional:Ade,ostring:Tde,pipeline:kde,preprocess:Ode,promise:Ede,record:mde,set:bde,strictObject:dde,string:Nj,symbol:rde,transformer:YM,tuple:gde,undefined:ide,union:hde,unknown:ude,void:lde,NEVER:$de,ZodIssueCode:We,quotelessJson:Pfe,ZodError:Io});const ZM=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},jj=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?ZM(r.ref,n,e):r.refs&&r.refs.forEach(i=>ZM(i,n,e))}},Ide=(e,t)=>{t.shouldUseNativeValidation&&jj(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Nde(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Nde=(e,t)=>e.some(n=>n.startsWith(t+"."));var Fde=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var s=n[a].types,l=s&&s[r.code];n[a]=_j(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},HKe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,u){try{var s=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&jj({},o),{errors:{},values:n.raw?r:l}})}catch(l){return u(l)}return s&&s.then?s.then(void 0,u):s}(0,function(a){if(function(u){return Array.isArray(u?.errors)}(a))return{values:{},errors:Ide(Fde(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},Lde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=Lde.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?Sl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(u,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Bj(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}var jde="Label",zj=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));zj.displayName=jde;var qKe=zj,Uj={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ua,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",u="minute",s="hour",l="day",c="week",d="month",h="quarter",v="year",g="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],K=Z%100;return"["+Z+(G[(K-20)%10]||G[K]||G[0])+"]"}},S=function(Z,G,K){var V=String(Z);return!V||V.length>=G?Z:""+Array(G+1-V.length).join(K)+Z},A={s:S,z:function(Z){var G=-Z.utcOffset(),K=Math.abs(G),V=Math.floor(K/60),B=K%60;return(G<=0?"+":"-")+S(V,2,"0")+":"+S(B,2,"0")},m:function Z(G,K){if(G.date()1)return Z(Y[0])}else{var ue=G.name;C[ue]=G,B=ue}return!V&&B&&(E=B),B||!V&&E},U=function(Z,G){if(M(Z))return Z.clone();var K=typeof G=="object"?G:{};return K.date=Z,K.args=arguments,new W(K)},H=A;H.l=F,H.i=M,H.w=function(Z,G){return U(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var W=function(){function Z(K){this.$L=F(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[T]=!0}var G=Z.prototype;return G.parse=function(K){this.$d=function(V){var B=V.date,q=V.utc;if(B===null)return new Date(NaN);if(H.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var ue=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],ue,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(B)}(K),this.init()},G.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==m},G.isSame=function(K,V){var B=U(K);return this.startOf(V)<=B&&B<=this.endOf(V)},G.isAfter=function(K,V){return U(K)1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,se):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,se):(de=v()(J),g("copy")),de},A=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(se){return typeof se}:E=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=J.action,de=se===void 0?"copy":se,Se=J.container,ge=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ge!==void 0)if(ge&&E(ge)==="object"&&ge.nodeType===1){if(de==="copy"&&ge.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(ge.hasAttribute("readonly")||ge.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return A(Ze,{container:Se});if(ge)return de==="cut"?b(ge):A(ge,{container:Se})},T=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(se){return typeof se}:M=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},M(Q)}function F(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function U(Q,J){for(var se=0;se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function B(Q){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},B(Q)}function q(Q,J){var se="data-clipboard-".concat(Q);if(J.hasAttribute(se))return J.getAttribute(se)}var Y=function(Q){W(se,Q);var J=Z(se);function se(de,Se){var ge;return F(this,se),ge=J.call(this),ge.resolveOptions(Se),ge.listenClick(de),ge}return H(se,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var ge=this;this.listener=d()(Se,"click",function(Ze){return ge.onClick(Ze)})}},{key:"onClick",value:function(Se){var ge=Se.delegateTarget||Se.currentTarget,Ze=this.action(ge)||"copy",Oe=T({action:Ze,container:this.container,target:this.target(ge),text:this.text(ge)});this.emit(Oe?"success":"error",{action:Ze,text:Oe,trigger:ge,clearSelection:function(){ge&&ge.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return q("action",Se)}},{key:"defaultTarget",value:function(Se){var ge=q("target",Se);if(ge)return document.querySelector(ge)}},{key:"defaultText",value:function(Se){return q("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return A(Se,ge)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ge=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return ge.forEach(function(Oe){Ze=Ze&&!!document.queryCommandSupported(Oe)}),Ze}}]),se}(l()),ue=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function s(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=s},438:function(o,a,u){var s=u(828);function l(h,v,g,m,b){var w=d.apply(this,arguments);return h.addEventListener(g,w,b),{destroy:function(){h.removeEventListener(g,w,b)}}}function c(h,v,g,m,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof g=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,v,g,m,b)}))}function d(h,v,g,m){return function(b){b.delegateTarget=s(b.target,v),b.delegateTarget&&m.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},a.nodeList=function(u){var s=Object.prototype.toString.call(u);return u!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in u&&(u.length===0||a.node(u[0]))},a.string=function(u){return typeof u=="string"||u instanceof String},a.fn=function(u){var s=Object.prototype.toString.call(u);return s==="[object Function]"}},370:function(o,a,u){var s=u(879),l=u(438);function c(g,m,b){if(!g&&!m&&!b)throw new Error("Missing required arguments");if(!s.string(m))throw new TypeError("Second argument must be a String");if(!s.fn(b))throw new TypeError("Third argument must be a Function");if(s.node(g))return d(g,m,b);if(s.nodeList(g))return h(g,m,b);if(s.string(g))return v(g,m,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function d(g,m,b){return g.addEventListener(m,b),{destroy:function(){g.removeEventListener(m,b)}}}function h(g,m,b){return Array.prototype.forEach.call(g,function(w){w.addEventListener(m,b)}),{destroy:function(){Array.prototype.forEach.call(g,function(w){w.removeEventListener(m,b)})}}}function v(g,m,b){return l(document.body,g,m,b)}o.exports=c},817:function(o){function a(u){var s;if(u.nodeName==="SELECT")u.focus(),s=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var l=u.hasAttribute("readonly");l||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),l||u.removeAttribute("readonly"),s=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var c=window.getSelection(),d=document.createRange();d.selectNodeContents(u),c.removeAllRanges(),c.addRange(d),s=c.toString()}return s}o.exports=a},279:function(o){function a(){}a.prototype={on:function(u,s,l){var c=this.e||(this.e={});return(c[u]||(c[u]=[])).push({fn:s,ctx:l}),this},once:function(u,s,l){var c=this;function d(){c.off(u,d),s.apply(l,arguments)}return d._=s,this.on(u,d,l)},emit:function(u){var s=[].slice.call(arguments,1),l=((this.e||(this.e={}))[u]||[]).slice(),c=0,d=l.length;for(c;c{const{children:a,...u}=o,s=y.useMemo(()=>u,Object.values(u));return I.jsx(n.Provider,{value:s,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function mi(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];const l=d=>{const{scope:h,children:v,...g}=d,m=h?.[e]?.[s]||u,b=y.useMemo(()=>g,Object.values(g));return I.jsx(m.Provider,{value:b,children:v})};l.displayName=o+"Provider";function c(d,h){const v=h?.[e]?.[s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,zde(i,...t)]}function zde(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ude=globalThis?.document?y.useLayoutEffect:()=>{},Wde=i4.useId||(()=>{}),Vde=0;function No(e){const[t,n]=y.useState(Wde());return Ude(()=>{e||n(r=>r??String(Vde++))},[e]),e||(t?`radix-${t}`:"")}function Wr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ga({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Hde({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Wr(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Hde({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Wr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function qde(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Kde(e,t=globalThis?.document){const n=qde(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gde="DismissableLayer",BC="dismissableLayer.update",Yde="dismissableLayer.pointerDownOutside",Zde="dismissableLayer.focusOutside",ZM,Wj=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(Wj),[c,d]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,v]=y.useState({}),g=Kt(t,T=>d(T)),m=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),x=c?m.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,A=x>=w,E=Jde(T=>{const M=T.target,F=[...l.branches].some(U=>U.contains(M));!A||F||(i?.(T),a?.(T),T.defaultPrevented||u?.())},h),C=ehe(T=>{const M=T.target;[...l.branches].some(U=>U.contains(M))||(o?.(T),a?.(T),T.defaultPrevented||u?.())},h);return Kde(T=>{x===l.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ZM=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),XM(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ZM)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),XM())},[c,l]),y.useEffect(()=>{const T=()=>v({});return document.addEventListener(BC,T),()=>document.removeEventListener(BC,T)},[]),I.jsx(pt.div,{...s,ref:g,style:{pointerEvents:S?A?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});kh.displayName=Gde;var Xde="DismissableLayerBranch",Qde=y.forwardRef((e,t)=>{const n=y.useContext(Wj),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Qde.displayName=Xde;function Jde(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let s=function(){Vj(Yde,n,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=s,t.addEventListener("click",i.current,{once:!0})):s()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ehe(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&Vj(Zde,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function XM(){const e=new CustomEvent(BC);document.dispatchEvent(e)}function Vj(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?jj(i,o):i.dispatchEvent(o)}var eS="focusScope.autoFocusOnMount",tS="focusScope.autoFocusOnUnmount",QM={bubbles:!1,cancelable:!0},the="FocusScope",lg=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=Wr(i),c=Wr(o),d=y.useRef(null),h=Kt(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(S){if(v.paused||!u)return;const A=S.target;u.contains(A)?d.current=A:Vs(d.current,{select:!0})},b=function(S){if(v.paused||!u)return;const A=S.relatedTarget;A!==null&&(u.contains(A)||Vs(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Vs(u)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const x=new MutationObserver(w);return u&&x.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),x.disconnect()}}},[r,u,v.paused]),y.useEffect(()=>{if(u){eR.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(eS,QM);u.addEventListener(eS,l),u.dispatchEvent(w),w.defaultPrevented||(nhe(uhe(Hj(u)),{select:!0}),document.activeElement===m&&Vs(u))}return()=>{u.removeEventListener(eS,l),setTimeout(()=>{const w=new CustomEvent(tS,QM);u.addEventListener(tS,c),u.dispatchEvent(w),w.defaultPrevented||Vs(m??document.body,{select:!0}),u.removeEventListener(tS,c),eR.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=rhe(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&Vs(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&Vs(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});lg.displayName=the;function nhe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vs(r,{select:t}),document.activeElement!==n)return}function rhe(e){const t=Hj(e),n=JM(t,e),r=JM(t.reverse(),e);return[n,r]}function Hj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function JM(e,t){for(const n of e)if(!ihe(n,{upTo:t}))return n}function ihe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ohe(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ohe(e)&&t&&e.select()}}var eR=ahe();function ahe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=tR(e,t),e.unshift(t)},remove(t){e=tR(e,t),e[0]?.resume()}}}function tR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uhe(e){return e.filter(t=>t.tagName!=="A")}var ri=globalThis?.document?y.useLayoutEffect:()=>{},she="Portal",cg=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ri(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?_x.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});cg.displayName=she;function lhe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var oi=e=>{const{present:t,children:n}=e,r=che(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Kt(r.ref,fhe(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};oi.displayName="Presence";function che(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=lhe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Vm(r.current);o.current=u==="mounted"?l:"none"},[u]),ri(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Vm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),ri(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=v=>{const m=Vm(r.current).includes(v.animationName);if(v.target===t&&m&&(s("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(o.current=Vm(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vm(e){return e?.animationName||"none"}function fhe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nS=0;function Lx(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nR()),document.body.insertAdjacentElement("beforeend",e[1]??nR()),nS++,()=>{nS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nS--}},[])}function nR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return Ehe;var t=Ahe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Phe=Che(),wd="data-scroll-locked",khe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(dhe,` { + */(function(e,t){(function(r,i){e.exports=i()})(ua,function(){return function(){var n={686:function(o,a,u){u.d(a,{default:function(){return ue}});var s=u(279),l=u.n(s),c=u(370),d=u.n(c),h=u(817),v=u.n(h);function g(Q){try{return document.execCommand(Q)}catch{return!1}}var m=function(J){var se=v()(J);return g("cut"),se},b=m;function w(Q){var J=document.documentElement.getAttribute("dir")==="rtl",se=document.createElement("textarea");se.style.fontSize="12pt",se.style.border="0",se.style.padding="0",se.style.margin="0",se.style.position="absolute",se.style[J?"right":"left"]="-9999px";var de=window.pageYOffset||document.documentElement.scrollTop;return se.style.top="".concat(de,"px"),se.setAttribute("readonly",""),se.value=Q,se}var x=function(J,se){var de=w(J);se.container.appendChild(de);var Se=v()(de);return g("copy"),de.remove(),Se},S=function(J){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,se):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,se):(de=v()(J),g("copy")),de},A=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(se){return typeof se}:E=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=J.action,de=se===void 0?"copy":se,Se=J.container,ge=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ge!==void 0)if(ge&&E(ge)==="object"&&ge.nodeType===1){if(de==="copy"&&ge.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(ge.hasAttribute("readonly")||ge.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return A(Ze,{container:Se});if(ge)return de==="cut"?b(ge):A(ge,{container:Se})},T=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(se){return typeof se}:M=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},M(Q)}function F(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function U(Q,J){for(var se=0;se"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function B(Q){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},B(Q)}function q(Q,J){var se="data-clipboard-".concat(Q);if(J.hasAttribute(se))return J.getAttribute(se)}var Y=function(Q){W(se,Q);var J=Z(se);function se(de,Se){var ge;return F(this,se),ge=J.call(this),ge.resolveOptions(Se),ge.listenClick(de),ge}return H(se,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var ge=this;this.listener=d()(Se,"click",function(Ze){return ge.onClick(Ze)})}},{key:"onClick",value:function(Se){var ge=Se.delegateTarget||Se.currentTarget,Ze=this.action(ge)||"copy",Pe=T({action:Ze,container:this.container,target:this.target(ge),text:this.text(ge)});this.emit(Pe?"success":"error",{action:Ze,text:Pe,trigger:ge,clearSelection:function(){ge&&ge.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return q("action",Se)}},{key:"defaultTarget",value:function(Se){var ge=q("target",Se);if(ge)return document.querySelector(ge)}},{key:"defaultText",value:function(Se){return q("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return A(Se,ge)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ge=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return ge.forEach(function(Pe){Ze=Ze&&!!document.queryCommandSupported(Pe)}),Ze}}]),se}(l()),ue=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function s(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=s},438:function(o,a,u){var s=u(828);function l(h,v,g,m,b){var w=d.apply(this,arguments);return h.addEventListener(g,w,b),{destroy:function(){h.removeEventListener(g,w,b)}}}function c(h,v,g,m,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof g=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,v,g,m,b)}))}function d(h,v,g,m){return function(b){b.delegateTarget=s(b.target,v),b.delegateTarget&&m.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},a.nodeList=function(u){var s=Object.prototype.toString.call(u);return u!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in u&&(u.length===0||a.node(u[0]))},a.string=function(u){return typeof u=="string"||u instanceof String},a.fn=function(u){var s=Object.prototype.toString.call(u);return s==="[object Function]"}},370:function(o,a,u){var s=u(879),l=u(438);function c(g,m,b){if(!g&&!m&&!b)throw new Error("Missing required arguments");if(!s.string(m))throw new TypeError("Second argument must be a String");if(!s.fn(b))throw new TypeError("Third argument must be a Function");if(s.node(g))return d(g,m,b);if(s.nodeList(g))return h(g,m,b);if(s.string(g))return v(g,m,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function d(g,m,b){return g.addEventListener(m,b),{destroy:function(){g.removeEventListener(m,b)}}}function h(g,m,b){return Array.prototype.forEach.call(g,function(w){w.addEventListener(m,b)}),{destroy:function(){Array.prototype.forEach.call(g,function(w){w.removeEventListener(m,b)})}}}function v(g,m,b){return l(document.body,g,m,b)}o.exports=c},817:function(o){function a(u){var s;if(u.nodeName==="SELECT")u.focus(),s=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var l=u.hasAttribute("readonly");l||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),l||u.removeAttribute("readonly"),s=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var c=window.getSelection(),d=document.createRange();d.selectNodeContents(u),c.removeAllRanges(),c.addRange(d),s=c.toString()}return s}o.exports=a},279:function(o){function a(){}a.prototype={on:function(u,s,l){var c=this.e||(this.e={});return(c[u]||(c[u]=[])).push({fn:s,ctx:l}),this},once:function(u,s,l){var c=this;function d(){c.off(u,d),s.apply(l,arguments)}return d._=s,this.on(u,d,l)},emit:function(u){var s=[].slice.call(arguments,1),l=((this.e||(this.e={}))[u]||[]).slice(),c=0,d=l.length;for(c;c{const{children:a,...u}=o,s=y.useMemo(()=>u,Object.values(u));return I.jsx(n.Provider,{value:s,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function mi(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];const l=d=>{const{scope:h,children:v,...g}=d,m=h?.[e]?.[s]||u,b=y.useMemo(()=>g,Object.values(g));return I.jsx(m.Provider,{value:b,children:v})};l.displayName=o+"Provider";function c(d,h){const v=h?.[e]?.[s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,Wde(i,...t)]}function Wde(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Vde=globalThis?.document?y.useLayoutEffect:()=>{},Hde=i4.useId||(()=>{}),qde=0;function No(e){const[t,n]=y.useState(Hde());return Vde(()=>{e||n(r=>r??String(qde++))},[e]),e||(t?`radix-${t}`:"")}function Wr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ga({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Kde({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Wr(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Kde({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Wr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Gde(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Yde(e,t=globalThis?.document){const n=Gde(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Zde="DismissableLayer",BC="dismissableLayer.update",Xde="dismissableLayer.pointerDownOutside",Qde="dismissableLayer.focusOutside",XM,Vj=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(Vj),[c,d]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,v]=y.useState({}),g=Kt(t,T=>d(T)),m=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),x=c?m.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,A=x>=w,E=the(T=>{const M=T.target,F=[...l.branches].some(U=>U.contains(M));!A||F||(i?.(T),a?.(T),T.defaultPrevented||u?.())},h),C=nhe(T=>{const M=T.target;[...l.branches].some(U=>U.contains(M))||(o?.(T),a?.(T),T.defaultPrevented||u?.())},h);return Yde(T=>{x===l.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(XM=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),QM(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=XM)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),QM())},[c,l]),y.useEffect(()=>{const T=()=>v({});return document.addEventListener(BC,T),()=>document.removeEventListener(BC,T)},[]),I.jsx(pt.div,{...s,ref:g,style:{pointerEvents:S?A?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});kh.displayName=Zde;var Jde="DismissableLayerBranch",ehe=y.forwardRef((e,t)=>{const n=y.useContext(Vj),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});ehe.displayName=Jde;function the(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let s=function(){Hj(Xde,n,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=s,t.addEventListener("click",i.current,{once:!0})):s()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nhe(e,t=globalThis?.document){const n=Wr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&Hj(Qde,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function QM(){const e=new CustomEvent(BC);document.dispatchEvent(e)}function Hj(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Bj(i,o):i.dispatchEvent(o)}var eS="focusScope.autoFocusOnMount",tS="focusScope.autoFocusOnUnmount",JM={bubbles:!1,cancelable:!0},rhe="FocusScope",cg=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=Wr(i),c=Wr(o),d=y.useRef(null),h=Kt(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(S){if(v.paused||!u)return;const A=S.target;u.contains(A)?d.current=A:Vs(d.current,{select:!0})},b=function(S){if(v.paused||!u)return;const A=S.relatedTarget;A!==null&&(u.contains(A)||Vs(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Vs(u)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const x=new MutationObserver(w);return u&&x.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),x.disconnect()}}},[r,u,v.paused]),y.useEffect(()=>{if(u){tR.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(eS,JM);u.addEventListener(eS,l),u.dispatchEvent(w),w.defaultPrevented||(ihe(lhe(qj(u)),{select:!0}),document.activeElement===m&&Vs(u))}return()=>{u.removeEventListener(eS,l),setTimeout(()=>{const w=new CustomEvent(tS,JM);u.addEventListener(tS,c),u.dispatchEvent(w),w.defaultPrevented||Vs(m??document.body,{select:!0}),u.removeEventListener(tS,c),tR.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=ohe(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&Vs(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&Vs(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});cg.displayName=rhe;function ihe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vs(r,{select:t}),document.activeElement!==n)return}function ohe(e){const t=qj(e),n=eR(t,e),r=eR(t.reverse(),e);return[n,r]}function qj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eR(e,t){for(const n of e)if(!ahe(n,{upTo:t}))return n}function ahe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function uhe(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uhe(e)&&t&&e.select()}}var tR=she();function she(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=nR(e,t),e.unshift(t)},remove(t){e=nR(e,t),e[0]?.resume()}}}function nR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lhe(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},che="Portal",Th=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?Sx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Th.displayName=che;function fhe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=dhe(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Kt(r.ref,hhe(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function dhe(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=fhe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Hm(r.current);o.current=u==="mounted"?l:"none"},[u]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Hm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=v=>{const m=Hm(r.current).includes(v.animationName);if(v.target===t&&m&&(s("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(o.current=Hm(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Hm(e){return e?.animationName||"none"}function hhe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nS=0;function jx(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rR()),document.body.insertAdjacentElement("beforeend",e[1]??rR()),nS++,()=>{nS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nS--}},[])}function rR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return Phe;var t=Ohe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},The=Ahe(),wd="data-scroll-locked",Mhe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(phe,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; } @@ -102,34 +102,34 @@ Error generating stack: `+o.message+` `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(Ly,` { - right: `).concat(u,"px ").concat(r,`; - } - .`).concat(jy,` { + right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(By,` { margin-right: `).concat(u,"px ").concat(r,`; } - .`).concat(Ly," .").concat(Ly,` { + .`).concat(jy," .").concat(jy,` { right: 0 `).concat(r,`; } - .`).concat(jy," .").concat(jy,` { + .`).concat(By," .").concat(By,` { margin-right: 0 `).concat(r,`; } body[`).concat(wd,`] { - `).concat(hhe,": ").concat(u,`px; + `).concat(vhe,": ").concat(u,`px; } -`)},iR=function(){var e=parseInt(document.body.getAttribute(wd)||"0",10);return isFinite(e)?e:0},The=function(){y.useEffect(function(){return document.body.setAttribute(wd,(iR()+1).toString()),function(){var e=iR()-1;e<=0?document.body.removeAttribute(wd):document.body.setAttribute(wd,e.toString())}},[])},Mhe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;The();var o=y.useMemo(function(){return Ohe(i)},[i]);return y.createElement(Phe,{styles:khe(o,!t,i,n?"":"!important")})};function Rhe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xj();return t&&e.setAttribute("nonce",t),e}function Dhe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $he(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ihe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rhe())&&(Dhe(t,n),$he(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nhe=function(){var e=Ihe();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},SA=function(){var e=Nhe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zC=!1;if(typeof window<"u")try{var Hm=Object.defineProperty({},"passive",{get:function(){return zC=!0,!0}});window.addEventListener("test",Hm,Hm),window.removeEventListener("test",Hm,Hm)}catch{zC=!1}var Nf=zC?{passive:!1}:!1,Fhe=function(e){return e.tagName==="TEXTAREA"},Qj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fhe(e)&&n[t]==="visible")},Lhe=function(e){return Qj(e,"overflowY")},jhe=function(e){return Qj(e,"overflowX")},oR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Jj(e,r);if(i){var o=eB(e,r),a=o[1],u=o[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bhe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zhe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jj=function(e,t){return e==="v"?Lhe(t):jhe(t)},eB=function(e,t){return e==="v"?Bhe(t):zhe(t)},Uhe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Whe=function(e,t,n,r,i){var o=Uhe(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=eB(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&Jj(e,u)&&(d+=w,h+=g),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},qm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aR=function(e){return[e.deltaX,e.deltaY]},uR=function(e){return e&&"current"in e?e.current:e},Vhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hhe=function(e){return` +`)},oR=function(){var e=parseInt(document.body.getAttribute(wd)||"0",10);return isFinite(e)?e:0},Rhe=function(){y.useEffect(function(){return document.body.setAttribute(wd,(oR()+1).toString()),function(){var e=oR()-1;e<=0?document.body.removeAttribute(wd):document.body.setAttribute(wd,e.toString())}},[])},Dhe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Rhe();var o=y.useMemo(function(){return khe(i)},[i]);return y.createElement(The,{styles:Mhe(o,!t,i,n?"":"!important")})};function $he(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qj();return t&&e.setAttribute("nonce",t),e}function Ihe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nhe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fhe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$he())&&(Ihe(t,n),Nhe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lhe=function(){var e=Fhe();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},SA=function(){var e=Lhe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zC=!1;if(typeof window<"u")try{var qm=Object.defineProperty({},"passive",{get:function(){return zC=!0,!0}});window.addEventListener("test",qm,qm),window.removeEventListener("test",qm,qm)}catch{zC=!1}var Nf=zC?{passive:!1}:!1,jhe=function(e){return e.tagName==="TEXTAREA"},Jj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jhe(e)&&n[t]==="visible")},Bhe=function(e){return Jj(e,"overflowY")},zhe=function(e){return Jj(e,"overflowX")},aR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=eB(e,r);if(i){var o=tB(e,r),a=o[1],u=o[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Uhe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Whe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eB=function(e,t){return e==="v"?Bhe(t):zhe(t)},tB=function(e,t){return e==="v"?Uhe(t):Whe(t)},Vhe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hhe=function(e,t,n,r,i){var o=Vhe(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=tB(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&eB(e,u)&&(d+=w,h+=g),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},Km=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uR=function(e){return[e.deltaX,e.deltaY]},sR=function(e){return e&&"current"in e?e.current:e},qhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Khe=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},qhe=0,Ff=[];function Khe(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(qhe++)[0],o=y.useState(SA)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=qj([e.lockRef.current],(e.shards||[]).map(uR),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=qm(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=oR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=oR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return Whe(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Ff.length||Ff[Ff.length-1]!==o)){var w="deltaY"in b?aR(b):qm(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&Vhe(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(uR).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x,shadowParent:Ghe(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=qm(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,aR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,qm(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Ff.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,Nf),document.addEventListener("touchmove",s,Nf),document.addEventListener("touchstart",c,Nf),function(){Ff=Ff.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,Nf),document.removeEventListener("touchmove",s,Nf),document.removeEventListener("touchstart",c,Nf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:Hhe(i)}):null,v?y.createElement(Mhe,{gapMode:e.gapMode}):null)}function Ghe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Yhe=Yj(Zj,Khe);var fg=y.forwardRef(function(e,t){return y.createElement(jx,Ri({},e,{ref:t,sideCar:Yhe}))});fg.classNames=jx.classNames;var Zhe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lf=new WeakMap,Km=new WeakMap,Gm={},aS=0,tB=function(e){return e&&(e.host||tB(e.parentNode))},Xhe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qhe=function(e,t,n,r){var i=Xhe(t,Array.isArray(e)?e:[e]);Gm[n]||(Gm[n]=new WeakMap);var o=Gm[n],a=[],u=new Set,s=new Set(i),l=function(d){!d||u.has(d)||(u.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(u.has(h))c(h);else try{var v=h.getAttribute(r),g=v!==null&&v!=="false",m=(Lf.get(h)||0)+1,b=(o.get(h)||0)+1;Lf.set(h,m),o.set(h,b),a.push(h),m===1&&g&&Km.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),u.clear(),aS++,function(){a.forEach(function(d){var h=Lf.get(d)-1,v=o.get(d)-1;Lf.set(d,h),o.set(d,v),h||(Km.has(d)||d.removeAttribute(r),Km.delete(d)),v||d.removeAttribute(n)}),aS--,aS||(Lf=new WeakMap,Lf=new WeakMap,Km=new WeakMap,Gm={})}},dg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Zhe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Qhe(r,i,n,"aria-hidden")):function(){return null}},CA="Dialog",[nB,rB]=mi(CA),[Jhe,eu]=nB(CA),iB=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(Jhe,{scope:t,triggerRef:u,contentRef:s,contentId:No(),titleId:No(),descriptionId:No(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};iB.displayName=CA;var oB="DialogTrigger",aB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(oB,n),o=Kt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":OA(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});aB.displayName=oB;var EA="DialogPortal",[epe,uB]=nB(EA,{forceMount:void 0}),sB=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=eu(EA,t);return I.jsx(epe,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(oi,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:a})}))})};sB.displayName=EA;var z1="DialogOverlay",lB=y.forwardRef((e,t)=>{const n=uB(z1,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(z1,e.__scopeDialog);return o.modal?I.jsx(oi,{present:r||o.open,children:I.jsx(tpe,{...i,ref:t})}):null});lB.displayName=z1;var tpe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(z1,n);return I.jsx(fg,{as:Sl,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":OA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),qc="DialogContent",cB=y.forwardRef((e,t)=>{const n=uB(qc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(qc,e.__scopeDialog);return I.jsx(oi,{present:r||o.open,children:o.modal?I.jsx(npe,{...i,ref:t}):I.jsx(rpe,{...i,ref:t})})});cB.displayName=qc;var npe=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(null),i=Kt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(fB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),rpe=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(fB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),fB=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=eu(qc,n),s=y.useRef(null),l=Kt(t,s);return Lx(),I.jsxs(I.Fragment,{children:[I.jsx(lg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":OA(u.open),...a,ref:l,onDismiss:()=>u.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(ope,{titleId:u.titleId}),I.jsx(upe,{contentRef:s,descriptionId:u.descriptionId})]})]})}),AA="DialogTitle",dB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(AA,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});dB.displayName=AA;var hB="DialogDescription",pB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(hB,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});pB.displayName=hB;var vB="DialogClose",gB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(vB,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});gB.displayName=vB;function OA(e){return e?"open":"closed"}var mB="DialogTitleWarning",[ipe,yB]=Bde(mB,{contentName:qc,titleName:AA,docsSlug:"dialog"}),ope=({titleId:e})=>{const t=yB(mB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},Ghe=0,Ff=[];function Yhe(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(Ghe++)[0],o=y.useState(SA)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Kj([e.lockRef.current],(e.shards||[]).map(sR),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=Km(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=aR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=aR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return Hhe(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Ff.length||Ff[Ff.length-1]!==o)){var w="deltaY"in b?uR(b):Km(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&qhe(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(sR).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x,shadowParent:Zhe(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=Km(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,uR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,Km(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Ff.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,Nf),document.addEventListener("touchmove",s,Nf),document.addEventListener("touchstart",c,Nf),function(){Ff=Ff.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,Nf),document.removeEventListener("touchmove",s,Nf),document.removeEventListener("touchstart",c,Nf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:Khe(i)}):null,v?y.createElement(Dhe,{gapMode:e.gapMode}):null)}function Zhe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xhe=Zj(Xj,Yhe);var fg=y.forwardRef(function(e,t){return y.createElement(Bx,Ri({},e,{ref:t,sideCar:Xhe}))});fg.classNames=Bx.classNames;var Qhe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lf=new WeakMap,Gm=new WeakMap,Ym={},aS=0,nB=function(e){return e&&(e.host||nB(e.parentNode))},Jhe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},epe=function(e,t,n,r){var i=Jhe(t,Array.isArray(e)?e:[e]);Ym[n]||(Ym[n]=new WeakMap);var o=Ym[n],a=[],u=new Set,s=new Set(i),l=function(d){!d||u.has(d)||(u.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(u.has(h))c(h);else try{var v=h.getAttribute(r),g=v!==null&&v!=="false",m=(Lf.get(h)||0)+1,b=(o.get(h)||0)+1;Lf.set(h,m),o.set(h,b),a.push(h),m===1&&g&&Gm.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),u.clear(),aS++,function(){a.forEach(function(d){var h=Lf.get(d)-1,v=o.get(d)-1;Lf.set(d,h),o.set(d,v),h||(Gm.has(d)||d.removeAttribute(r),Gm.delete(d)),v||d.removeAttribute(n)}),aS--,aS||(Lf=new WeakMap,Lf=new WeakMap,Gm=new WeakMap,Ym={})}},dg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Qhe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),epe(r,i,n,"aria-hidden")):function(){return null}},CA="Dialog",[rB,iB]=mi(CA),[tpe,eu]=rB(CA),oB=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(tpe,{scope:t,triggerRef:u,contentRef:s,contentId:No(),titleId:No(),descriptionId:No(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};oB.displayName=CA;var aB="DialogTrigger",uB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(aB,n),o=Kt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PA(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});uB.displayName=aB;var EA="DialogPortal",[npe,sB]=rB(EA,{forceMount:void 0}),lB=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=eu(EA,t);return I.jsx(npe,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Th,{asChild:!0,container:i,children:a})}))})};lB.displayName=EA;var U1="DialogOverlay",cB=y.forwardRef((e,t)=>{const n=sB(U1,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(U1,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(rpe,{...i,ref:t})}):null});cB.displayName=U1;var rpe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(U1,n);return I.jsx(fg,{as:Sl,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":PA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),qc="DialogContent",fB=y.forwardRef((e,t)=>{const n=sB(qc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eu(qc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(ipe,{...i,ref:t}):I.jsx(ope,{...i,ref:t})})});fB.displayName=qc;var ipe=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(null),i=Kt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(dB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),ope=y.forwardRef((e,t)=>{const n=eu(qc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(dB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),dB=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=eu(qc,n),s=y.useRef(null),l=Kt(t,s);return jx(),I.jsxs(I.Fragment,{children:[I.jsx(cg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":PA(u.open),...a,ref:l,onDismiss:()=>u.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(upe,{titleId:u.titleId}),I.jsx(lpe,{contentRef:s,descriptionId:u.descriptionId})]})]})}),AA="DialogTitle",hB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(AA,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});hB.displayName=AA;var pB="DialogDescription",vB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(pB,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});vB.displayName=pB;var gB="DialogClose",mB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=eu(gB,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});mB.displayName=gB;function PA(e){return e?"open":"closed"}var yB="DialogTitleWarning",[ape,bB]=Ude(yB,{contentName:qc,titleName:AA,docsSlug:"dialog"}),upe=({titleId:e})=>{const t=bB(yB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ape="DialogDescriptionWarning",upe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yB(ape).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},spe=iB,lpe=aB,cpe=sB,fpe=lB,dpe=cB,hpe=dB,ppe=pB,bB=gB;function Gr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vpe=["color"],KKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,vpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gpe=["color"],GKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,gpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mpe=["color"],YKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ype=["color"],ZKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,ype);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bpe=["color"],XKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,bpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xpe=["color"],QKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,xpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wpe=["color"],JKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,wpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_pe=["color"],eGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,_pe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Spe=["color"],tGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Spe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cpe=["color"],nGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Cpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),Epe=["color"],rGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Epe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ape=["color"],iGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Ape);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ope=["color"],oGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Ope);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ppe=["color"],aGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Ppe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kpe=["color"],uGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,kpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Tpe=["color"],sGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Tpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Mpe=["color"],lGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Rpe=["color"],cGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Rpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Dpe=["color"],fGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Gr(e,Dpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),PA="Collapsible",[$pe,dGe]=mi(PA),[Ipe,kA]=$pe(PA),xB=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...u}=e,[s=!1,l]=Ga({prop:r,defaultProp:i,onChange:a});return I.jsx(Ipe,{scope:n,disabled:o,contentId:No(),open:s,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":MA(s),"data-disabled":o?"":void 0,...u,ref:t})})});xB.displayName=PA;var wB="CollapsibleTrigger",Npe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=kA(wB,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":MA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});Npe.displayName=wB;var TA="CollapsibleContent",Fpe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=kA(TA,e.__scopeCollapsible);return I.jsx(oi,{present:n||i.open,children:({present:o})=>I.jsx(Lpe,{...r,ref:t,present:o})})});Fpe.displayName=TA;var Lpe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=kA(TA,n),[u,s]=y.useState(r),l=y.useRef(null),c=Kt(t,l),d=y.useRef(0),h=d.current,v=y.useRef(0),g=v.current,m=a.open||u,b=y.useRef(m),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ri(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();d.current=S.height,v.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),s(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":MA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&i})});function MA(e){return e?"open":"closed"}var hGe=xB;function RA(e){const t=e+"CollectionProvider",[n,r]=mi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:g,children:m}=v,b=j.useRef(null),w=j.useRef(new Map).current;return I.jsx(i,{scope:g,itemMap:w,collectionRef:b,children:m})};a.displayName=t;const u=e+"CollectionSlot",s=j.forwardRef((v,g)=>{const{scope:m,children:b}=v,w=o(u,m),x=Kt(g,w.collectionRef);return I.jsx(Sl,{ref:x,children:b})});s.displayName=u;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=j.forwardRef((v,g)=>{const{scope:m,children:b,...w}=v,x=j.useRef(null),S=Kt(g,x),A=o(l,m);return j.useEffect(()=>(A.itemMap.set(x,{ref:x,...w}),()=>void A.itemMap.delete(x))),I.jsx(Sl,{[c]:"",ref:S,children:b})});d.displayName=l;function h(v){const g=o(e+"CollectionConsumer",v);return j.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((A,E)=>w.indexOf(A.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,r]}var jpe=y.createContext(void 0);function hg(e){const t=y.useContext(jpe);return e||t||"ltr"}const Bpe=["top","right","bottom","left"],Pl=Math.min,To=Math.max,U1=Math.round,Ym=Math.floor,kl=e=>({x:e,y:e}),zpe={left:"right",right:"left",bottom:"top",top:"bottom"},Upe={start:"end",end:"start"};function UC(e,t,n){return To(e,Pl(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ms(e){return e.split("-")[0]}function Th(e){return e.split("-")[1]}function DA(e){return e==="x"?"y":"x"}function $A(e){return e==="y"?"height":"width"}function Mh(e){return["top","bottom"].includes(ms(e))?"y":"x"}function IA(e){return DA(Mh(e))}function Wpe(e,t,n){n===void 0&&(n=!1);const r=Th(e),i=IA(e),o=$A(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=W1(a)),[a,W1(a)]}function Vpe(e){const t=W1(e);return[WC(e),t,WC(t)]}function WC(e){return e.replace(/start|end/g,t=>Upe[t])}function Hpe(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function qpe(e,t,n,r){const i=Th(e);let o=Hpe(ms(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(WC)))),o}function W1(e){return e.replace(/left|right|bottom|top/g,t=>zpe[t])}function Kpe(e){return{top:0,right:0,bottom:0,left:0,...e}}function _B(e){return typeof e!="number"?Kpe(e):{top:e,right:e,bottom:e,left:e}}function V1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function sR(e,t,n){let{reference:r,floating:i}=e;const o=Mh(t),a=IA(t),u=$A(a),s=ms(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let v;switch(s){case"top":v={x:c,y:r.y-i.height};break;case"bottom":v={x:c,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Th(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Gpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=sR(l,r,s),h=r,v={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:s}=t,{element:l,padding:c=0}=gs(e,t)||{};if(l==null)return{};const d=_B(c),h={x:n,y:r},v=IA(i),g=$A(v),m=await a.getDimensions(l),b=v==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[v]-h[v]-o.floating[g],E=h[v]-o.reference[v],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let T=C?C[S]:0;(!T||!await(a.isElement==null?void 0:a.isElement(C)))&&(T=u.floating[S]||o.floating[g]);const M=A/2-E/2,F=T/2-m[g]/2-1,U=Pl(d[w],F),H=Pl(d[x],F),W=U,ie=T-m[g]-H,Z=T/2-m[g]/2+M,G=UC(W,Z,ie),K=!s.arrow&&Th(i)!=null&&Z!==G&&o.reference[g]/2-(ZW<=0)){var F,U;const W=(((F=o.flip)==null?void 0:F.index)||0)+1,ie=E[W];if(ie)return{data:{index:W,overflows:M},reset:{placement:ie}};let Z=(U=M.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(v){case"bestFit":{var H;const G=(H=M.map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,B)=>V+B,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=u;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function lR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cR(e){return Bpe.some(t=>e[t]>=0)}const Xpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=gs(e,t);switch(r){case"referenceHidden":{const o=await nv(t,{...i,elementContext:"reference"}),a=lR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:cR(a)}}}case"escaped":{const o=await nv(t,{...i,altBoundary:!0}),a=lR(o,n.floating);return{data:{escapedOffsets:a,escaped:cR(a)}}}default:return{}}}}};async function Qpe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ms(n),u=Th(n),s=Mh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d=gs(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&typeof g=="number"&&(v=u==="end"?g*-1:g),s?{x:v*c,y:h*l}:{x:h*l,y:v*c}}const Jpe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,s=await Qpe(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},e0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...s}=gs(e,t),l={x:n,y:r},c=await nv(t,s),d=Mh(ms(i)),h=DA(d);let v=l[h],g=l[d];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=v+c[b],S=v-c[w];v=UC(x,v,S)}if(a){const b=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=g+c[b],S=g-c[w];g=UC(x,g,S)}const m=u.fn({...t,[h]:v,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},t0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=gs(e,t),c={x:n,y:r},d=Mh(i),h=DA(d);let v=c[h],g=c[d];const m=gs(u,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const S=h==="y"?"height":"width",A=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;vE&&(v=E)}if(l){var w,x;const S=h==="y"?"width":"height",A=["top","left"].includes(ms(i)),E=o.reference[d]-o.floating[S]+(A&&((w=a.offset)==null?void 0:w[d])||0)+(A?0:b.crossAxis),C=o.reference[d]+o.reference[S]+(A?0:((x=a.offset)==null?void 0:x[d])||0)-(A?b.crossAxis:0);gC&&(g=C)}return{[h]:v,[d]:g}}}},n0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...u}=gs(e,t),s=await nv(t,u),l=ms(n),c=Th(n),d=Mh(n)==="y",{width:h,height:v}=r.floating;let g,m;l==="top"||l==="bottom"?(g=l,m=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=l,g=c==="end"?"top":"bottom");const b=v-s[g],w=h-s[m],x=!t.middlewareData.shift;let S=b,A=w;if(d){const C=h-s.left-s.right;A=c||x?Pl(w,C):C}else{const C=v-s.top-s.bottom;S=c||x?Pl(b,C):C}if(x&&!c){const C=To(s.left,0),T=To(s.right,0),M=To(s.top,0),F=To(s.bottom,0);d?A=h-2*(C!==0||T!==0?C+T:To(s.left,s.right)):S=v-2*(M!==0||F!==0?M+F:To(s.top,s.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function Tl(e){return SB(e)?(e.nodeName||"").toLowerCase():"#document"}function Fo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Es(e){var t;return(t=(SB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SB(e){return e instanceof Node||e instanceof Fo(e).Node}function ys(e){return e instanceof Element||e instanceof Fo(e).Element}function Ou(e){return e instanceof HTMLElement||e instanceof Fo(e).HTMLElement}function fR(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fo(e).ShadowRoot}function pg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function r0e(e){return["table","td","th"].includes(Tl(e))}function NA(e){const t=FA(),n=va(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function i0e(e){let t=Wd(e);for(;Ou(t)&&!Bx(t);){if(NA(t))return t;t=Wd(t)}return null}function FA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bx(e){return["html","body","#document"].includes(Tl(e))}function va(e){return Fo(e).getComputedStyle(e)}function zx(e){return ys(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Wd(e){if(Tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fR(e)&&e.host||Es(e);return fR(t)?t.host:t}function CB(e){const t=Wd(e);return Bx(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ou(t)&&pg(t)?t:CB(t)}function rv(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=CB(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Fo(i);return o?t.concat(a,a.visualViewport||[],pg(i)?i:[],a.frameElement&&n?rv(a.frameElement):[]):t.concat(i,rv(i,[],n))}function EB(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ou(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=U1(n)!==o||U1(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function LA(e){return ys(e)?e:e.contextElement}function _d(e){const t=LA(e);if(!Ou(t))return kl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=EB(t);let a=(o?U1(n.width):n.width)/r,u=(o?U1(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const o0e=kl(0);function AB(e){const t=Fo(e);return!FA()||!t.visualViewport?o0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fo(e)?!1:t}function Kc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=LA(e);let a=kl(1);t&&(r?ys(r)&&(a=_d(r)):a=_d(e));const u=a0e(o,n,r)?AB(o):kl(0);let s=(i.left+u.x)/a.x,l=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const h=Fo(o),v=r&&ys(r)?Fo(r):r;let g=h,m=g.frameElement;for(;m&&r&&v!==g;){const b=_d(m),w=m.getBoundingClientRect(),x=va(m),S=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,A=w.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;s*=b.x,l*=b.y,c*=b.x,d*=b.y,s+=S,l+=A,g=Fo(m),m=g.frameElement}}return V1({width:c,height:d,x:s,y:l})}const u0e=[":popover-open",":modal"];function OB(e){return u0e.some(t=>{try{return e.matches(t)}catch{return!1}})}function s0e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Es(r),u=t?OB(t.floating):!1;if(r===a||u&&o)return n;let s={scrollLeft:0,scrollTop:0},l=kl(1);const c=kl(0),d=Ou(r);if((d||!d&&!o)&&((Tl(r)!=="body"||pg(a))&&(s=zx(r)),Ou(r))){const h=Kc(r);l=_d(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function l0e(e){return Array.from(e.getClientRects())}function PB(e){return Kc(Es(e)).left+zx(e).scrollLeft}function c0e(e){const t=Es(e),n=zx(e),r=e.ownerDocument.body,i=To(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=To(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+PB(e);const u=-n.scrollTop;return va(r).direction==="rtl"&&(a+=To(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function f0e(e,t){const n=Fo(e),r=Es(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;const l=FA();(!l||l&&t==="fixed")&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}function d0e(e,t){const n=Kc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ou(e)?_d(e):kl(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,s=i*o.x,l=r*o.y;return{width:a,height:u,x:s,y:l}}function dR(e,t,n){let r;if(t==="viewport")r=f0e(e,n);else if(t==="document")r=c0e(Es(e));else if(ys(t))r=d0e(t,n);else{const i=AB(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return V1(r)}function kB(e,t){const n=Wd(e);return n===t||!ys(n)||Bx(n)?!1:va(n).position==="fixed"||kB(n,t)}function h0e(e,t){const n=t.get(e);if(n)return n;let r=rv(e,[],!1).filter(u=>ys(u)&&Tl(u)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Wd(e):e;for(;ys(a)&&!Bx(a);){const u=va(a),s=NA(a);!s&&u.position==="fixed"&&(i=null),(o?!s&&!i:!s&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pg(a)&&!s&&kB(e,a))?r=r.filter(c=>c!==a):i=u,a=Wd(a)}return t.set(e,r),r}function p0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?h0e(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((l,c)=>{const d=dR(t,c,i);return l.top=To(d.top,l.top),l.right=Pl(d.right,l.right),l.bottom=Pl(d.bottom,l.bottom),l.left=To(d.left,l.left),l},dR(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function v0e(e){const{width:t,height:n}=EB(e);return{width:t,height:n}}function g0e(e,t,n){const r=Ou(t),i=Es(t),o=n==="fixed",a=Kc(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const s=kl(0);if(r||!r&&!o)if((Tl(t)!=="body"||pg(i))&&(u=zx(t)),r){const d=Kc(t,!0,o,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}else i&&(s.x=PB(i));const l=a.left+u.scrollLeft-s.x,c=a.top+u.scrollTop-s.y;return{x:l,y:c,width:a.width,height:a.height}}function hR(e,t){return!Ou(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function TB(e,t){const n=Fo(e);if(!Ou(e)||OB(e))return n;let r=hR(e,t);for(;r&&r0e(r)&&va(r).position==="static";)r=hR(r,t);return r&&(Tl(r)==="html"||Tl(r)==="body"&&va(r).position==="static"&&!NA(r))?n:r||i0e(e)||n}const m0e=async function(e){const t=this.getOffsetParent||TB,n=this.getDimensions;return{reference:g0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function y0e(e){return va(e).direction==="rtl"}const b0e={convertOffsetParentRelativeRectToViewportRelativeRect:s0e,getDocumentElement:Es,getClippingRect:p0e,getOffsetParent:TB,getElementRects:m0e,getClientRects:l0e,getDimensions:v0e,getScale:_d,isElement:ys,isRTL:y0e};function x0e(e,t){let n=null,r;const i=Es(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,s){u===void 0&&(u=!1),s===void 0&&(s=1),o();const{left:l,top:c,width:d,height:h}=e.getBoundingClientRect();if(u||t(),!d||!h)return;const v=Ym(c),g=Ym(i.clientWidth-(l+d)),m=Ym(i.clientHeight-(c+h)),b=Ym(l),x={rootMargin:-v+"px "+-g+"px "+-m+"px "+-b+"px",threshold:To(0,Pl(1,s))||1};let S=!0;function A(E){const C=E[0].intersectionRatio;if(C!==s){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(e)}return a(!0),o}function w0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,l=LA(e),c=i||o?[...l?rv(l):[],...rv(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const d=l&&u?x0e(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),l&&!s&&v.observe(l),v.observe(t));let g,m=s?Kc(e):null;s&&b();function b(){const w=Kc(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,s&&cancelAnimationFrame(g)}}const _0e=e0e,S0e=Zpe,C0e=n0e,E0e=Xpe,pR=Ype,A0e=t0e,O0e=(e,t,n)=>{const r=new Map,i={platform:b0e,...n},o={...i.platform,_c:r};return Gpe(e,t,{...i,platform:o})},P0e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?pR({element:r.current,padding:i}).fn(n):{}:r?pR({element:r,padding:i}).fn(n):{}}}};var By=typeof document<"u"?y.useLayoutEffect:y.useEffect;function H1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!H1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!H1(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function MB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vR(e,t){const n=MB(e);return Math.round(t*n)/n}function gR(e){const t=y.useRef(e);return By(()=>{t.current=e}),t}function k0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:s,open:l}=e,[c,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=y.useState(r);H1(h,r)||v(r);const[g,m]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(V=>{V!==C.current&&(C.current=V,m(V))},[]),S=y.useCallback(V=>{V!==T.current&&(T.current=V,w(V))},[]),A=o||g,E=a||b,C=y.useRef(null),T=y.useRef(null),M=y.useRef(c),F=s!=null,U=gR(s),H=gR(i),W=y.useCallback(()=>{if(!C.current||!T.current)return;const V={placement:t,strategy:n,middleware:h};H.current&&(V.platform=H.current),O0e(C.current,T.current,V).then(B=>{const q={...B,isPositioned:!0};ie.current&&!H1(M.current,q)&&(M.current=q,Ss.flushSync(()=>{d(q)}))})},[h,t,n,H]);By(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[l]);const ie=y.useRef(!1);By(()=>(ie.current=!0,()=>{ie.current=!1}),[]),By(()=>{if(A&&(C.current=A),E&&(T.current=E),A&&E){if(U.current)return U.current(A,E,W);W()}},[A,E,W,U,F]);const Z=y.useMemo(()=>({reference:C,floating:T,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:A,floating:E}),[A,E]),K=y.useMemo(()=>{const V={position:n,left:0,top:0};if(!G.floating)return V;const B=vR(G.floating,c.x),q=vR(G.floating,c.y);return u?{...V,transform:"translate("+B+"px, "+q+"px)",...MB(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:q}},[n,u,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:W,refs:Z,elements:G,floatingStyles:K}),[c,W,Z,G,K])}var T0e="Arrow",RB=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});RB.displayName=T0e;var M0e=RB;function jA(e){const[t,n]=y.useState(void 0);return ri(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const s=o.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,u=l.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var BA="Popper",[DB,Fl]=mi(BA),[R0e,$B]=DB(BA),IB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(R0e,{scope:t,anchor:r,onAnchorChange:i,children:n})};IB.displayName=BA;var NB="PopperAnchor",FB=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=$B(NB,n),a=y.useRef(null),u=Kt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:u})});FB.displayName=NB;var zA="PopperContent",[D0e,$0e]=DB(zA),LB=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:s=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=$B(zA,n),[w,x]=y.useState(null),S=Kt(t,ge=>x(ge)),[A,E]=y.useState(null),C=jA(A),T=C?.width??0,M=C?.height??0,F=r+(o!=="center"?"-"+o:""),U=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],W=H.length>0,ie={padding:U,boundary:H.filter(N0e),altBoundary:W},{refs:Z,floatingStyles:G,placement:K,isPositioned:V,middlewareData:B}=k0e({strategy:"fixed",placement:F,whileElementsMounted:(...ge)=>w0e(...ge,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Jpe({mainAxis:i+M,alignmentAxis:a}),s&&_0e({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?A0e():void 0,...ie}),s&&S0e({...ie}),C0e({...ie,apply:({elements:ge,rects:Ze,availableWidth:Oe,availableHeight:Fe})=>{const{width:$e,height:be}=Ze.reference,yt=ge.floating.style;yt.setProperty("--radix-popper-available-width",`${Oe}px`),yt.setProperty("--radix-popper-available-height",`${Fe}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),A&&P0e({element:A,padding:u}),F0e({arrowWidth:T,arrowHeight:M}),h&&E0e({strategy:"referenceHidden",...ie})]}),[q,Y]=zB(K),ue=Wr(g);ri(()=>{V&&ue?.()},[V,ue]);const Q=B.arrow?.x,J=B.arrow?.y,se=B.arrow?.centerOffset!==0,[de,Se]=y.useState();return ri(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:V?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(D0e,{scope:n,placedSide:q,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:se,children:I.jsx(pt.div,{"data-side":q,"data-align":Y,...m,ref:S,style:{...m.style,animation:V?void 0:"none"}})})})});LB.displayName=zA;var jB="PopperArrow",I0e={top:"bottom",right:"left",bottom:"top",left:"right"},BB=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=$0e(jB,r),a=I0e[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(M0e,{...i,ref:n,style:{...i.style,display:"block"}})})});BB.displayName=jB;function N0e(e){return e!==null}var F0e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,u=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=zB(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+u/2,v=(i.arrow?.y??0)+s/2;let g="",m="";return l==="bottom"?(g=a?d:`${h}px`,m=`${-s}px`):l==="top"?(g=a?d:`${h}px`,m=`${r.floating.height+s}px`):l==="right"?(g=`${-s}px`,m=a?d:`${v}px`):l==="left"&&(g=`${r.floating.width+s}px`,m=a?d:`${v}px`),{data:{x:g,y:m}}}});function zB(e){const[t,n="center"]=e.split("-");return[t,n]}var Ux=IB,vg=FB,Wx=LB,Vx=BB,uS="rovingFocusGroup.onEntryFocus",L0e={bubbles:!1,cancelable:!0},Hx="RovingFocusGroup",[VC,UB,j0e]=RA(Hx),[B0e,qx]=mi(Hx,[j0e]),[z0e,U0e]=B0e(Hx),WB=y.forwardRef((e,t)=>I.jsx(VC.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(VC.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(W0e,{...e,ref:t})})}));WB.displayName=Hx;var W0e=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:s,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,h=y.useRef(null),v=Kt(t,h),g=hg(o),[m=null,b]=Ga({prop:a,defaultProp:u,onChange:s}),[w,x]=y.useState(!1),S=Wr(l),A=UB(n),E=y.useRef(!1),[C,T]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(uS,S),()=>M.removeEventListener(uS,S)},[S]),I.jsx(z0e,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:m,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>T(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const F=!E.current;if(M.target===M.currentTarget&&F&&!w){const U=new CustomEvent(uS,L0e);if(M.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=A().filter(K=>K.focusable),W=H.find(K=>K.active),ie=H.find(K=>K.id===m),G=[W,ie,...H].filter(Boolean).map(K=>K.ref.current);qB(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),VB="RovingFocusGroupItem",HB=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,u=No(),s=o||u,l=U0e(VB,n),c=l.currentTabStopId===s,d=UB(n),{onFocusableItemAdd:h,onFocusableItemRemove:v}=l;return y.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),I.jsx(VC.ItemSlot,{scope:n,id:s,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,g=>{r?l.onItemFocus(s):g.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(s)),onKeyDown:Ye(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=q0e(g,l.orientation,l.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=d().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const x=w.indexOf(g.currentTarget);w=l.loop?K0e(w,x+1):w.slice(x+1)}setTimeout(()=>qB(w))}})})})});HB.displayName=VB;var V0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H0e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function q0e(e,t,n){const r=H0e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return V0e[r]}function qB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function K0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var KB=WB,GB=HB,HC=["Enter"," "],G0e=["ArrowDown","PageUp","Home"],YB=["ArrowUp","PageDown","End"],Y0e=[...G0e,...YB],Z0e={ltr:[...HC,"ArrowRight"],rtl:[...HC,"ArrowLeft"]},X0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gg="Menu",[iv,Q0e,J0e]=RA(gg),[sf,ZB]=mi(gg,[J0e,Fl,qx]),Kx=Fl(),XB=qx(),[eve,lf]=sf(gg),[tve,mg]=sf(gg),QB=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,u=Kx(t),[s,l]=y.useState(null),c=y.useRef(!1),d=Wr(o),h=hg(i);return y.useEffect(()=>{const v=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),I.jsx(Ux,{...u,children:I.jsx(eve,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:l,children:I.jsx(tve,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};QB.displayName=gg;var nve="MenuAnchor",UA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kx(n);return I.jsx(vg,{...i,...r,ref:t})});UA.displayName=nve;var WA="MenuPortal",[rve,JB]=sf(WA,{forceMount:void 0}),ez=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=lf(WA,t);return I.jsx(rve,{scope:t,forceMount:n,children:I.jsx(oi,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:r})})})};ez.displayName=WA;var fa="MenuContent",[ive,VA]=sf(fa),tz=y.forwardRef((e,t)=>{const n=JB(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu);return I.jsx(iv.Provider,{scope:e.__scopeMenu,children:I.jsx(oi,{present:r||o.open,children:I.jsx(iv.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(ove,{...i,ref:t}):I.jsx(ave,{...i,ref:t})})})})}),ove=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(HA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ave=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu);return I.jsx(HA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,b=lf(fa,n),w=mg(fa,n),x=Kx(n),S=XB(n),A=Q0e(n),[E,C]=y.useState(null),T=y.useRef(null),M=Kt(t,T,b.onContentChange),F=y.useRef(0),U=y.useRef(""),H=y.useRef(0),W=y.useRef(null),ie=y.useRef("right"),Z=y.useRef(0),G=g?fg:y.Fragment,K=g?{as:Sl,allowPinchZoom:!0}:void 0,V=q=>{const Y=U.current+q,ue=A().filter(ge=>!ge.disabled),Q=document.activeElement,J=ue.find(ge=>ge.ref.current===Q)?.textValue,se=ue.map(ge=>ge.textValue),de=yve(se,Y,J),Se=ue.find(ge=>ge.textValue===de)?.ref.current;(function ge(Ze){U.current=Ze,window.clearTimeout(F.current),Ze!==""&&(F.current=window.setTimeout(()=>ge(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(F.current),[]),Lx();const B=y.useCallback(q=>ie.current===W.current?.side&&xve(q,W.current?.area),[]);return I.jsx(ive,{scope:n,searchRef:U,onItemEnter:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),onItemLeave:y.useCallback(q=>{B(q)||(T.current?.focus(),C(null))},[B]),onTriggerLeave:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(q=>{W.current=q},[]),children:I.jsx(G,{...K,children:I.jsx(lg,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,q=>{q.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:I.jsx(KB,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(s,q=>{w.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(Wx,{role:"menu","aria-orientation":"vertical","data-state":mz(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:Ye(m.onKeyDown,q=>{const ue=q.target.closest("[data-radix-menu-content]")===q.currentTarget,Q=q.ctrlKey||q.altKey||q.metaKey,J=q.key.length===1;ue&&(q.key==="Tab"&&q.preventDefault(),!Q&&J&&V(q.key));const se=T.current;if(q.target!==se||!Y0e.includes(q.key))return;q.preventDefault();const Se=A().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);YB.includes(q.key)&&Se.reverse(),gve(Se)}),onBlur:Ye(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(F.current),U.current="")}),onPointerMove:Ye(e.onPointerMove,ov(q=>{const Y=q.target,ue=Z.current!==q.clientX;if(q.currentTarget.contains(Y)&&ue){const Q=q.clientX>Z.current?"right":"left";ie.current=Q,Z.current=q.clientX}}))})})})})})})});tz.displayName=fa;var uve="MenuGroup",qA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});qA.displayName=uve;var sve="MenuLabel",nz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});nz.displayName=sve;var q1="MenuItem",mR="menu.itemSelect",Gx=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=mg(q1,e.__scopeMenu),u=VA(q1,e.__scopeMenu),s=Kt(t,o),l=y.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const h=new CustomEvent(mR,{bubbles:!0,cancelable:!0});d.addEventListener(mR,v=>r?.(v),{once:!0}),jj(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(rz,{...i,ref:s,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),l.current=!0},onPointerUp:Ye(e.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,d=>{const h=u.searchRef.current!=="";n||h&&d.key===" "||HC.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Gx.displayName=q1;var rz=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=VA(q1,n),u=XB(n),s=y.useRef(null),l=Kt(t,s),[c,d]=y.useState(!1),[h,v]=y.useState("");return y.useEffect(()=>{const g=s.current;g&&v((g.textContent??"").trim())},[o.children]),I.jsx(iv.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(GB,{asChild:!0,...u,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,ov(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,ov(g=>a.onItemLeave(g))),onFocus:Ye(e.onFocus,()=>d(!0)),onBlur:Ye(e.onBlur,()=>d(!1))})})})}),lve="MenuCheckboxItem",iz=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(lz,{scope:e.__scopeMenu,checked:n,children:I.jsx(Gx,{role:"menuitemcheckbox","aria-checked":K1(n)?"mixed":n,...i,ref:t,"data-state":GA(n),onSelect:Ye(i.onSelect,()=>r?.(K1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});iz.displayName=lve;var oz="MenuRadioGroup",[cve,fve]=sf(oz,{value:void 0,onValueChange:()=>{}}),az=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Wr(r);return I.jsx(cve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(qA,{...i,ref:t})})});az.displayName=oz;var uz="MenuRadioItem",sz=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=fve(uz,e.__scopeMenu),o=n===i.value;return I.jsx(lz,{scope:e.__scopeMenu,checked:o,children:I.jsx(Gx,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":GA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});sz.displayName=uz;var KA="MenuItemIndicator",[lz,dve]=sf(KA,{checked:!1}),cz=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=dve(KA,n);return I.jsx(oi,{present:r||K1(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":GA(o.checked)})})});cz.displayName=KA;var hve="MenuSeparator",fz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});fz.displayName=hve;var pve="MenuArrow",dz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Kx(n);return I.jsx(Vx,{...i,...r,ref:t})});dz.displayName=pve;var vve="MenuSub",[pGe,hz]=sf(vve),Zp="MenuSubTrigger",pz=y.forwardRef((e,t)=>{const n=lf(Zp,e.__scopeMenu),r=mg(Zp,e.__scopeMenu),i=hz(Zp,e.__scopeMenu),o=VA(Zp,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:s}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),s(null)}},[u,s]),I.jsx(UA,{asChild:!0,...l,children:I.jsx(rz,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":mz(n.open),...e,ref:Ex(t,i.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,ov(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,ov(d=>{c();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",m=g?-5:5,b=h[g?"left":"right"],w=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:v}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,d=>{const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||Z0e[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});pz.displayName=Zp;var vz="MenuSubContent",gz=y.forwardRef((e,t)=>{const n=JB(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu),u=hz(vz,e.__scopeMenu),s=y.useRef(null),l=Kt(t,s);return I.jsx(iv.Provider,{scope:e.__scopeMenu,children:I.jsx(oi,{present:r||o.open,children:I.jsx(iv.Slot,{scope:e.__scopeMenu,children:I.jsx(HA,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&s.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const d=c.currentTarget.contains(c.target),h=X0e[a.dir].includes(c.key);d&&h&&(o.onOpenChange(!1),u.trigger?.focus(),c.preventDefault())})})})})})});gz.displayName=vz;function mz(e){return e?"open":"closed"}function K1(e){return e==="indeterminate"}function GA(e){return K1(e)?"indeterminate":e?"checked":"unchecked"}function gve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=mve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function bve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function xve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bve(n,t)}function ov(e){return t=>t.pointerType==="mouse"?e(t):void 0}var wve=QB,_ve=UA,Sve=ez,Cve=tz,Eve=qA,Ave=nz,Ove=Gx,Pve=iz,kve=az,Tve=sz,Mve=cz,Rve=fz,Dve=dz,$ve=pz,Ive=gz,YA="DropdownMenu",[Nve,vGe]=mi(YA,[ZB]),Gi=ZB(),[Fve,yz]=Nve(YA),bz=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,s=Gi(t),l=y.useRef(null),[c=!1,d]=Ga({prop:i,defaultProp:o,onChange:a});return I.jsx(Fve,{scope:t,triggerId:No(),triggerRef:l,contentId:No(),open:c,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),modal:u,children:I.jsx(wve,{...s,open:c,onOpenChange:d,dir:r,modal:u,children:n})})};bz.displayName=YA;var xz="DropdownMenuTrigger",wz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=yz(xz,n),a=Gi(n);return I.jsx(_ve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ex(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Ye(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});wz.displayName=xz;var Lve="DropdownMenuPortal",_z=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Gi(t);return I.jsx(Sve,{...r,...n})};_z.displayName=Lve;var Sz="DropdownMenuContent",Cz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yz(Sz,n),o=Gi(n),a=y.useRef(!1);return I.jsx(Cve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,u=>{a.current||i.triggerRef.current?.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,u=>{const s=u.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cz.displayName=Sz;var jve="DropdownMenuGroup",Ez=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Eve,{...i,...r,ref:t})});Ez.displayName=jve;var Bve="DropdownMenuLabel",Az=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ave,{...i,...r,ref:t})});Az.displayName=Bve;var zve="DropdownMenuItem",Oz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ove,{...i,...r,ref:t})});Oz.displayName=zve;var Uve="DropdownMenuCheckboxItem",Pz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Pve,{...i,...r,ref:t})});Pz.displayName=Uve;var Wve="DropdownMenuRadioGroup",Vve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(kve,{...i,...r,ref:t})});Vve.displayName=Wve;var Hve="DropdownMenuRadioItem",kz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Tve,{...i,...r,ref:t})});kz.displayName=Hve;var qve="DropdownMenuItemIndicator",Tz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Mve,{...i,...r,ref:t})});Tz.displayName=qve;var Kve="DropdownMenuSeparator",Mz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Rve,{...i,...r,ref:t})});Mz.displayName=Kve;var Gve="DropdownMenuArrow",Yve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Dve,{...i,...r,ref:t})});Yve.displayName=Gve;var Zve="DropdownMenuSubTrigger",Rz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx($ve,{...i,...r,ref:t})});Rz.displayName=Zve;var Xve="DropdownMenuSubContent",Dz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ive,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dz.displayName=Xve;var gGe=bz,mGe=wz,yGe=_z,bGe=Cz,xGe=Ez,wGe=Az,_Ge=Oz,SGe=Pz,CGe=kz,EGe=Tz,AGe=Mz,OGe=Rz,PGe=Dz,Qve="VisuallyHidden",ZA=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ZA.displayName=Qve;var Jve=ZA,[Yx,kGe]=mi("Tooltip",[Fl]),Zx=Fl(),$z="TooltipProvider",ege=700,qC="tooltip.open",[tge,XA]=Yx($z),Iz=e=>{const{__scopeTooltip:t,delayDuration:n=ege,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,u]=y.useState(!0),s=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(tge,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),u(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})};Iz.displayName=$z;var Xx="Tooltip",[nge,Qx]=Yx(Xx),Nz=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:u}=e,s=XA(Xx,e.__scopeTooltip),l=Zx(t),[c,d]=y.useState(null),h=No(),v=y.useRef(0),g=a??s.disableHoverableContent,m=u??s.delayDuration,b=y.useRef(!1),[w=!1,x]=Ga({prop:r,defaultProp:i,onChange:T=>{T?(s.onOpen(),document.dispatchEvent(new CustomEvent(qC))):s.onClose(),o?.(T)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),A=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,x(!0),v.current=0},m)},[m,x]);return y.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),I.jsx(Ux,{...l,children:I.jsx(nge,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{s.isOpenDelayed?C():A()},[s.isOpenDelayed,C,A]),onTriggerLeave:y.useCallback(()=>{g?E():(window.clearTimeout(v.current),v.current=0)},[E,g]),onOpen:A,onClose:E,disableHoverableContent:g,children:n})})};Nz.displayName=Xx;var KC="TooltipTrigger",Fz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Qx(KC,n),o=XA(KC,n),a=Zx(n),u=y.useRef(null),s=Kt(t,u,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),I.jsx(vg,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});Fz.displayName=KC;var rge="TooltipPortal",[TGe,ige]=Yx(rge,{forceMount:void 0}),Vd="TooltipContent",Lz=y.forwardRef((e,t)=>{const n=ige(Vd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Qx(Vd,e.__scopeTooltip);return I.jsx(oi,{present:r||a.open,children:a.disableHoverableContent?I.jsx(jz,{side:i,...o,ref:t}):I.jsx(oge,{side:i,...o,ref:t})})}),oge=y.forwardRef((e,t)=>{const n=Qx(Vd,e.__scopeTooltip),r=XA(Vd,e.__scopeTooltip),i=y.useRef(null),o=Kt(t,i),[a,u]=y.useState(null),{trigger:s,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,h=y.useCallback(()=>{u(null),d(!1)},[d]),v=y.useCallback((g,m)=>{const b=g.currentTarget,w={x:g.clientX,y:g.clientY},x=lge(w,b.getBoundingClientRect()),S=cge(w,x),A=fge(m.getBoundingClientRect()),E=hge([...S,...A]);u(E),d(!0)},[d]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(s&&c){const g=b=>v(b,c),m=b=>v(b,s);return s.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[s,c,v,h]),y.useEffect(()=>{if(a){const g=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},x=s?.contains(b)||c?.contains(b),S=!dge(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[s,c,a,l,h]),I.jsx(jz,{...e,ref:o})}),[age,uge]=Yx(Xx,{isInside:!1}),jz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...u}=e,s=Qx(Vd,n),l=Zx(n),{onClose:c}=s;return y.useEffect(()=>(document.addEventListener(qC,c),()=>document.removeEventListener(qC,c)),[c]),y.useEffect(()=>{if(s.trigger){const d=h=>{h.target?.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:I.jsxs(Wx,{"data-state":s.stateAttribute,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(nA,{children:r}),I.jsx(age,{scope:n,isInside:!0,children:I.jsx(Jve,{id:s.contentId,role:"tooltip",children:i||r})})]})})});Lz.displayName=Vd;var Bz="TooltipArrow",sge=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Zx(n);return uge(Bz,n).isInside?null:I.jsx(Vx,{...i,...r,ref:t})});sge.displayName=Bz;function lge(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function cge(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fge(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function dge(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function hge(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),pge(t)}function pge(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var MGe=Iz,RGe=Nz,DGe=Fz,$Ge=Lz,yR=1,vge=.9,gge=.8,mge=.17,sS=.1,lS=.999,yge=.9999,bge=.99,xge=/[\\\/_+.#"@\[\(\{&]/,wge=/[\\\/_+.#"@\[\(\{&]/g,_ge=/[\s-]/,zz=/[\s-]/g;function GC(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?yR:bge;var u=`${i},${o}`;if(a[u]!==void 0)return a[u];for(var s=r.charAt(o),l=n.indexOf(s,i),c=0,d,h,v,g;l>=0;)d=GC(e,t,n,r,l+1,o+1,a),d>c&&(l===i?d*=yR:xge.test(e.charAt(l-1))?(d*=gge,v=e.slice(i,l-1).match(wge),v&&i>0&&(d*=Math.pow(lS,v.length))):_ge.test(e.charAt(l-1))?(d*=vge,g=e.slice(i,l-1).match(zz),g&&i>0&&(d*=Math.pow(lS,g.length))):(d*=mge,i>0&&(d*=Math.pow(lS,l-i))),e.charAt(l)!==t.charAt(o)&&(d*=yge)),(dd&&(d=h*sS)),d>c&&(c=d),l=n.indexOf(s,l+1);return a[u]=c,c}function bR(e){return e.toLowerCase().replace(zz," ")}function Sge(e,t){return GC(e,t,bR(e),bR(t),0,0,{})}function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Cge(n,t))}function yg(...e){return y.useCallback(Uz(...e),e)}function Ege(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];function l(d){const{scope:h,children:v,...g}=d,m=h?.[e][s]||u,b=y.useMemo(()=>g,Object.values(g));return y.createElement(m.Provider,{value:b},v)}function c(d,h){const v=h?.[e][s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,Age(i,...t)]}function Age(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const Oge=globalThis?.document?y.useLayoutEffect:()=>{},Pge=i4.useId||(()=>{});let kge=0;function cS(e){const[t,n]=y.useState(Pge());return Oge(()=>{e||n(r=>r??String(kge++))},[e]),e||(t?`radix-${t}`:"")}function Wz(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tge({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Mge({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Wz(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Mge({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Wz(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const QA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Dge);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return y.createElement(YC,fr({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,u):null)}return y.createElement(YC,fr({},r,{ref:t}),n)});QA.displayName="Slot";const YC=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...$ge(r,n.props),ref:Uz(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});YC.displayName="SlotClone";const Rge=({children:e})=>y.createElement(y.Fragment,null,e);function Dge(e){return y.isValidElement(e)&&e.type===Rge}function $ge(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...u)=>{o?.(...u),i?.(...u)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Ige=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],Jx=Ige.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?QA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(u,fr({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Nge(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function JA(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Fge(e){const t=JA(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const ZC="dismissableLayer.update",Lge="dismissableLayer.pointerDownOutside",jge="dismissableLayer.focusOutside";let xR;const Bge=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zge=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(Bge),[c,d]=y.useState(null),[,h]=y.useState({}),v=yg(t,C=>d(C)),g=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(m),w=c?g.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,A=Uge(C=>{const T=C.target,M=[...l.branches].some(F=>F.contains(T));!S||M||(i?.(C),a?.(C),C.defaultPrevented||u?.())}),E=Wge(C=>{const T=C.target;[...l.branches].some(F=>F.contains(T))||(o?.(C),a?.(C),C.defaultPrevented||u?.())});return Fge(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&u&&(C.preventDefault(),u()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(xR=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),wR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=xR)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),wR())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(ZC,C),()=>document.removeEventListener(ZC,C)},[]),y.createElement(Jx.div,fr({},s,{ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Sd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Sd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Sd(e.onPointerDownCapture,A.onPointerDownCapture)}))});function Uge(e){const t=JA(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let s=function(){Vz(Lge,t,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=s,document.addEventListener("click",r.current,{once:!0})):s()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Wge(e){const t=JA(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&Vz(jge,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function wR(){const e=new CustomEvent(ZC);document.dispatchEvent(e)}function Vz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Nge(i,o):i.dispatchEvent(o)}function _R(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const fS="focusScope.autoFocusOnMount",dS="focusScope.autoFocusOnUnmount",SR={bubbles:!1,cancelable:!0},Vge=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=_R(i),c=_R(o),d=y.useRef(null),h=yg(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(w){if(v.paused||!u)return;const x=w.target;u.contains(x)?d.current=x:ac(d.current,{select:!0})},b=function(w){v.paused||!u||u.contains(w.relatedTarget)||ac(d.current,{select:!0})};return document.addEventListener("focusin",m),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b)}}},[r,u,v.paused]),y.useEffect(()=>{if(u){ER.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(fS,SR);u.addEventListener(fS,l),u.dispatchEvent(w),w.defaultPrevented||(Hge(Zge(Hz(u)),{select:!0}),document.activeElement===m&&ac(u))}return()=>{u.removeEventListener(fS,l),setTimeout(()=>{const w=new CustomEvent(dS,SR);u.addEventListener(dS,c),u.dispatchEvent(w),w.defaultPrevented||ac(m??document.body,{select:!0}),u.removeEventListener(dS,c),ER.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=qge(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&ac(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&ac(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return y.createElement(Jx.div,fr({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function Hge(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ac(r,{select:t}),document.activeElement!==n)return}function qge(e){const t=Hz(e),n=CR(t,e),r=CR(t.reverse(),e);return[n,r]}function Hz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function CR(e,t){for(const n of e)if(!Kge(n,{upTo:t}))return n}function Kge(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Gge(e){return e instanceof HTMLInputElement&&"select"in e}function ac(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gge(e)&&t&&e.select()}}const ER=Yge();function Yge(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=AR(e,t),e.unshift(t)},remove(t){var n;e=AR(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function AR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Zge(e){return e.filter(t=>t.tagName!=="A")}const Xge=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?_x.createPortal(y.createElement(Jx.div,fr({},i,{ref:t})),r):null}),OR=globalThis?.document?y.useLayoutEffect:()=>{};function Qge(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const ew=e=>{const{present:t,children:n}=e,r=Jge(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=yg(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};ew.displayName="Presence";function Jge(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=Qge(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Zm(r.current);o.current=u==="mounted"?l:"none"},[u]),OR(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Zm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),OR(()=>{if(t){const l=d=>{const v=Zm(r.current).includes(d.animationName);d.target===t&&v&&Ss.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=Zm(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Zm(e){return e?.animationName||"none"}let hS=0;function eme(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:PR()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:PR()),hS++,()=>{hS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),hS--}},[])}function PR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var zy="right-scroll-bar-position",Uy="width-before-scroll-bar",tme="with-scroll-bars-hidden",nme="--removed-body-scroll-bar-size";function pS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rme(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var ime=typeof window<"u"?y.useLayoutEffect:y.useEffect,kR=new WeakMap;function ome(e,t){var n=rme(null,function(r){return e.forEach(function(i){return pS(i,r)})});return ime(function(){var r=kR.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(u){o.has(u)||pS(u,null)}),o.forEach(function(u){i.has(u)||pS(u,a)})}kR.set(n,e)},[e]),n}var qz=Kj(),vS=function(){},tw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:vS,onWheelCapture:vS,onTouchMoveCapture:vS}),i=r[0],o=r[1],a=e.forwardProps,u=e.children,s=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=_A(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,A=ome([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:qz,removeScrollBar:l,shards:d,noIsolation:v,inert:g,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),a?y.cloneElement(y.Children.only(u),Ri(Ri({},E),{ref:A})):y.createElement(w,Ri({},E,{className:s,ref:A}),u))});tw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tw.classNames={fullWidth:Uy,zeroRight:zy};var ame={left:0,top:0,right:0,gap:0},gS=function(e){return parseInt(e||"",10)||0},ume=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gS(n),gS(r),gS(i)]},sme=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ame;var t=ume(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lme=SA(),Cd="data-scroll-locked",cme=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` - .`.concat(tme,` { +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},spe="DialogDescriptionWarning",lpe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bB(spe).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},cpe=oB,fpe=uB,dpe=lB,hpe=cB,ppe=fB,vpe=hB,gpe=vB,xB=mB;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mpe=["color"],YKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ype=["color"],ZKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,ype);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bpe=["color"],XKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xpe=["color"],QKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wpe=["color"],JKe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_pe=["color"],eGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_pe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Spe=["color"],tGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Spe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cpe=["color"],nGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Epe=["color"],rGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Epe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ape=["color"],iGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ape);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),Ppe=["color"],oGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ppe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ope=["color"],aGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ope);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kpe=["color"],uGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,kpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Tpe=["color"],sGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Tpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Mpe=["color"],lGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Mpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Rpe=["color"],cGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Rpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Dpe=["color"],fGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Dpe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),$pe=["color"],dGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,$pe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ipe=["color"],hGe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ipe);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),OA="Collapsible",[Npe,pGe]=mi(OA),[Fpe,kA]=Npe(OA),wB=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...u}=e,[s=!1,l]=Ga({prop:r,defaultProp:i,onChange:a});return I.jsx(Fpe,{scope:n,disabled:o,contentId:No(),open:s,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":MA(s),"data-disabled":o?"":void 0,...u,ref:t})})});wB.displayName=OA;var _B="CollapsibleTrigger",Lpe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=kA(_B,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":MA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});Lpe.displayName=_B;var TA="CollapsibleContent",jpe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=kA(TA,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Bpe,{...r,ref:t,present:o})})});jpe.displayName=TA;var Bpe=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=kA(TA,n),[u,s]=y.useState(r),l=y.useRef(null),c=Kt(t,l),d=y.useRef(0),h=d.current,v=y.useRef(0),g=v.current,m=a.open||u,b=y.useRef(m),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();d.current=S.height,v.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),s(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":MA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&i})});function MA(e){return e?"open":"closed"}var vGe=wB;function RA(e){const t=e+"CollectionProvider",[n,r]=mi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:g,children:m}=v,b=j.useRef(null),w=j.useRef(new Map).current;return I.jsx(i,{scope:g,itemMap:w,collectionRef:b,children:m})};a.displayName=t;const u=e+"CollectionSlot",s=j.forwardRef((v,g)=>{const{scope:m,children:b}=v,w=o(u,m),x=Kt(g,w.collectionRef);return I.jsx(Sl,{ref:x,children:b})});s.displayName=u;const l=e+"CollectionItemSlot",c="data-radix-collection-item",d=j.forwardRef((v,g)=>{const{scope:m,children:b,...w}=v,x=j.useRef(null),S=Kt(g,x),A=o(l,m);return j.useEffect(()=>(A.itemMap.set(x,{ref:x,...w}),()=>void A.itemMap.delete(x))),I.jsx(Sl,{[c]:"",ref:S,children:b})});d.displayName=l;function h(v){const g=o(e+"CollectionConsumer",v);return j.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((A,E)=>w.indexOf(A.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,r]}var zpe=y.createContext(void 0);function hg(e){const t=y.useContext(zpe);return e||t||"ltr"}const Upe=["top","right","bottom","left"],Ol=Math.min,To=Math.max,W1=Math.round,Zm=Math.floor,kl=e=>({x:e,y:e}),Wpe={left:"right",right:"left",bottom:"top",top:"bottom"},Vpe={start:"end",end:"start"};function UC(e,t,n){return To(e,Ol(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ms(e){return e.split("-")[0]}function Mh(e){return e.split("-")[1]}function DA(e){return e==="x"?"y":"x"}function $A(e){return e==="y"?"height":"width"}function Rh(e){return["top","bottom"].includes(ms(e))?"y":"x"}function IA(e){return DA(Rh(e))}function Hpe(e,t,n){n===void 0&&(n=!1);const r=Mh(e),i=IA(e),o=$A(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=V1(a)),[a,V1(a)]}function qpe(e){const t=V1(e);return[WC(e),t,WC(t)]}function WC(e){return e.replace(/start|end/g,t=>Vpe[t])}function Kpe(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function Gpe(e,t,n,r){const i=Mh(e);let o=Kpe(ms(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(WC)))),o}function V1(e){return e.replace(/left|right|bottom|top/g,t=>Wpe[t])}function Ype(e){return{top:0,right:0,bottom:0,left:0,...e}}function SB(e){return typeof e!="number"?Ype(e):{top:e,right:e,bottom:e,left:e}}function H1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function lR(e,t,n){let{reference:r,floating:i}=e;const o=Rh(t),a=IA(t),u=$A(a),s=ms(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let v;switch(s){case"top":v={x:c,y:r.y-i.height};break;case"bottom":v={x:c,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Mh(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Zpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=lR(l,r,s),h=r,v={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:s}=t,{element:l,padding:c=0}=gs(e,t)||{};if(l==null)return{};const d=SB(c),h={x:n,y:r},v=IA(i),g=$A(v),m=await a.getDimensions(l),b=v==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",A=o.reference[g]+o.reference[v]-h[v]-o.floating[g],E=h[v]-o.reference[v],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let T=C?C[S]:0;(!T||!await(a.isElement==null?void 0:a.isElement(C)))&&(T=u.floating[S]||o.floating[g]);const M=A/2-E/2,F=T/2-m[g]/2-1,U=Ol(d[w],F),H=Ol(d[x],F),W=U,ie=T-m[g]-H,Z=T/2-m[g]/2+M,G=UC(W,Z,ie),K=!s.arrow&&Mh(i)!=null&&Z!==G&&o.reference[g]/2-(ZW<=0)){var F,U;const W=(((F=o.flip)==null?void 0:F.index)||0)+1,ie=E[W];if(ie)return{data:{index:W,overflows:M},reset:{placement:ie}};let Z=(U=M.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(v){case"bestFit":{var H;const G=(H=M.map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,B)=>V+B,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=u;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function cR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fR(e){return Upe.some(t=>e[t]>=0)}const Jpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=gs(e,t);switch(r){case"referenceHidden":{const o=await rv(t,{...i,elementContext:"reference"}),a=cR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fR(a)}}}case"escaped":{const o=await rv(t,{...i,altBoundary:!0}),a=cR(o,n.floating);return{data:{escapedOffsets:a,escaped:fR(a)}}}default:return{}}}}};async function e0e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ms(n),u=Mh(n),s=Rh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d=gs(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&typeof g=="number"&&(v=u==="end"?g*-1:g),s?{x:v*c,y:h*l}:{x:h*l,y:v*c}}const t0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,s=await e0e(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},n0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...s}=gs(e,t),l={x:n,y:r},c=await rv(t,s),d=Rh(ms(i)),h=DA(d);let v=l[h],g=l[d];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=v+c[b],S=v-c[w];v=UC(x,v,S)}if(a){const b=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=g+c[b],S=g-c[w];g=UC(x,g,S)}const m=u.fn({...t,[h]:v,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},r0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=gs(e,t),c={x:n,y:r},d=Rh(i),h=DA(d);let v=c[h],g=c[d];const m=gs(u,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const S=h==="y"?"height":"width",A=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;vE&&(v=E)}if(l){var w,x;const S=h==="y"?"width":"height",A=["top","left"].includes(ms(i)),E=o.reference[d]-o.floating[S]+(A&&((w=a.offset)==null?void 0:w[d])||0)+(A?0:b.crossAxis),C=o.reference[d]+o.reference[S]+(A?0:((x=a.offset)==null?void 0:x[d])||0)-(A?b.crossAxis:0);gC&&(g=C)}return{[h]:v,[d]:g}}}},i0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...u}=gs(e,t),s=await rv(t,u),l=ms(n),c=Mh(n),d=Rh(n)==="y",{width:h,height:v}=r.floating;let g,m;l==="top"||l==="bottom"?(g=l,m=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=l,g=c==="end"?"top":"bottom");const b=v-s[g],w=h-s[m],x=!t.middlewareData.shift;let S=b,A=w;if(d){const C=h-s.left-s.right;A=c||x?Ol(w,C):C}else{const C=v-s.top-s.bottom;S=c||x?Ol(b,C):C}if(x&&!c){const C=To(s.left,0),T=To(s.right,0),M=To(s.top,0),F=To(s.bottom,0);d?A=h-2*(C!==0||T!==0?C+T:To(s.left,s.right)):S=v-2*(M!==0||F!==0?M+F:To(s.top,s.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function Tl(e){return CB(e)?(e.nodeName||"").toLowerCase():"#document"}function Fo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Es(e){var t;return(t=(CB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CB(e){return e instanceof Node||e instanceof Fo(e).Node}function ys(e){return e instanceof Element||e instanceof Fo(e).Element}function Pu(e){return e instanceof HTMLElement||e instanceof Fo(e).HTMLElement}function dR(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fo(e).ShadowRoot}function pg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function o0e(e){return["table","td","th"].includes(Tl(e))}function NA(e){const t=FA(),n=va(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function a0e(e){let t=Wd(e);for(;Pu(t)&&!zx(t);){if(NA(t))return t;t=Wd(t)}return null}function FA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zx(e){return["html","body","#document"].includes(Tl(e))}function va(e){return Fo(e).getComputedStyle(e)}function Ux(e){return ys(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Wd(e){if(Tl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dR(e)&&e.host||Es(e);return dR(t)?t.host:t}function EB(e){const t=Wd(e);return zx(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pu(t)&&pg(t)?t:EB(t)}function iv(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=EB(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Fo(i);return o?t.concat(a,a.visualViewport||[],pg(i)?i:[],a.frameElement&&n?iv(a.frameElement):[]):t.concat(i,iv(i,[],n))}function AB(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Pu(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=W1(n)!==o||W1(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function LA(e){return ys(e)?e:e.contextElement}function _d(e){const t=LA(e);if(!Pu(t))return kl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=AB(t);let a=(o?W1(n.width):n.width)/r,u=(o?W1(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const u0e=kl(0);function PB(e){const t=Fo(e);return!FA()||!t.visualViewport?u0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function s0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fo(e)?!1:t}function Kc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=LA(e);let a=kl(1);t&&(r?ys(r)&&(a=_d(r)):a=_d(e));const u=s0e(o,n,r)?PB(o):kl(0);let s=(i.left+u.x)/a.x,l=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const h=Fo(o),v=r&&ys(r)?Fo(r):r;let g=h,m=g.frameElement;for(;m&&r&&v!==g;){const b=_d(m),w=m.getBoundingClientRect(),x=va(m),S=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,A=w.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;s*=b.x,l*=b.y,c*=b.x,d*=b.y,s+=S,l+=A,g=Fo(m),m=g.frameElement}}return H1({width:c,height:d,x:s,y:l})}const l0e=[":popover-open",":modal"];function OB(e){return l0e.some(t=>{try{return e.matches(t)}catch{return!1}})}function c0e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Es(r),u=t?OB(t.floating):!1;if(r===a||u&&o)return n;let s={scrollLeft:0,scrollTop:0},l=kl(1);const c=kl(0),d=Pu(r);if((d||!d&&!o)&&((Tl(r)!=="body"||pg(a))&&(s=Ux(r)),Pu(r))){const h=Kc(r);l=_d(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function f0e(e){return Array.from(e.getClientRects())}function kB(e){return Kc(Es(e)).left+Ux(e).scrollLeft}function d0e(e){const t=Es(e),n=Ux(e),r=e.ownerDocument.body,i=To(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=To(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+kB(e);const u=-n.scrollTop;return va(r).direction==="rtl"&&(a+=To(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function h0e(e,t){const n=Fo(e),r=Es(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;const l=FA();(!l||l&&t==="fixed")&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}function p0e(e,t){const n=Kc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pu(e)?_d(e):kl(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,s=i*o.x,l=r*o.y;return{width:a,height:u,x:s,y:l}}function hR(e,t,n){let r;if(t==="viewport")r=h0e(e,n);else if(t==="document")r=d0e(Es(e));else if(ys(t))r=p0e(t,n);else{const i=PB(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return H1(r)}function TB(e,t){const n=Wd(e);return n===t||!ys(n)||zx(n)?!1:va(n).position==="fixed"||TB(n,t)}function v0e(e,t){const n=t.get(e);if(n)return n;let r=iv(e,[],!1).filter(u=>ys(u)&&Tl(u)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Wd(e):e;for(;ys(a)&&!zx(a);){const u=va(a),s=NA(a);!s&&u.position==="fixed"&&(i=null),(o?!s&&!i:!s&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pg(a)&&!s&&TB(e,a))?r=r.filter(c=>c!==a):i=u,a=Wd(a)}return t.set(e,r),r}function g0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?v0e(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((l,c)=>{const d=hR(t,c,i);return l.top=To(d.top,l.top),l.right=Ol(d.right,l.right),l.bottom=Ol(d.bottom,l.bottom),l.left=To(d.left,l.left),l},hR(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function m0e(e){const{width:t,height:n}=AB(e);return{width:t,height:n}}function y0e(e,t,n){const r=Pu(t),i=Es(t),o=n==="fixed",a=Kc(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const s=kl(0);if(r||!r&&!o)if((Tl(t)!=="body"||pg(i))&&(u=Ux(t)),r){const d=Kc(t,!0,o,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}else i&&(s.x=kB(i));const l=a.left+u.scrollLeft-s.x,c=a.top+u.scrollTop-s.y;return{x:l,y:c,width:a.width,height:a.height}}function pR(e,t){return!Pu(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function MB(e,t){const n=Fo(e);if(!Pu(e)||OB(e))return n;let r=pR(e,t);for(;r&&o0e(r)&&va(r).position==="static";)r=pR(r,t);return r&&(Tl(r)==="html"||Tl(r)==="body"&&va(r).position==="static"&&!NA(r))?n:r||a0e(e)||n}const b0e=async function(e){const t=this.getOffsetParent||MB,n=this.getDimensions;return{reference:y0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function x0e(e){return va(e).direction==="rtl"}const w0e={convertOffsetParentRelativeRectToViewportRelativeRect:c0e,getDocumentElement:Es,getClippingRect:g0e,getOffsetParent:MB,getElementRects:b0e,getClientRects:f0e,getDimensions:m0e,getScale:_d,isElement:ys,isRTL:x0e};function _0e(e,t){let n=null,r;const i=Es(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,s){u===void 0&&(u=!1),s===void 0&&(s=1),o();const{left:l,top:c,width:d,height:h}=e.getBoundingClientRect();if(u||t(),!d||!h)return;const v=Zm(c),g=Zm(i.clientWidth-(l+d)),m=Zm(i.clientHeight-(c+h)),b=Zm(l),x={rootMargin:-v+"px "+-g+"px "+-m+"px "+-b+"px",threshold:To(0,Ol(1,s))||1};let S=!0;function A(E){const C=E[0].intersectionRatio;if(C!==s){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(e)}return a(!0),o}function S0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,l=LA(e),c=i||o?[...l?iv(l):[],...iv(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const d=l&&u?_0e(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),l&&!s&&v.observe(l),v.observe(t));let g,m=s?Kc(e):null;s&&b();function b(){const w=Kc(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,s&&cancelAnimationFrame(g)}}const C0e=n0e,E0e=Qpe,A0e=i0e,P0e=Jpe,vR=Xpe,O0e=r0e,k0e=(e,t,n)=>{const r=new Map,i={platform:w0e,...n},o={...i.platform,_c:r};return Zpe(e,t,{...i,platform:o})},T0e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vR({element:r.current,padding:i}).fn(n):{}:r?vR({element:r,padding:i}).fn(n):{}}}};var zy=typeof document<"u"?y.useLayoutEffect:y.useEffect;function q1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!q1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!q1(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gR(e,t){const n=RB(e);return Math.round(t*n)/n}function mR(e){const t=y.useRef(e);return zy(()=>{t.current=e}),t}function M0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:s,open:l}=e,[c,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=y.useState(r);q1(h,r)||v(r);const[g,m]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(V=>{V!==C.current&&(C.current=V,m(V))},[]),S=y.useCallback(V=>{V!==T.current&&(T.current=V,w(V))},[]),A=o||g,E=a||b,C=y.useRef(null),T=y.useRef(null),M=y.useRef(c),F=s!=null,U=mR(s),H=mR(i),W=y.useCallback(()=>{if(!C.current||!T.current)return;const V={placement:t,strategy:n,middleware:h};H.current&&(V.platform=H.current),k0e(C.current,T.current,V).then(B=>{const q={...B,isPositioned:!0};ie.current&&!q1(M.current,q)&&(M.current=q,Ss.flushSync(()=>{d(q)}))})},[h,t,n,H]);zy(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[l]);const ie=y.useRef(!1);zy(()=>(ie.current=!0,()=>{ie.current=!1}),[]),zy(()=>{if(A&&(C.current=A),E&&(T.current=E),A&&E){if(U.current)return U.current(A,E,W);W()}},[A,E,W,U,F]);const Z=y.useMemo(()=>({reference:C,floating:T,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:A,floating:E}),[A,E]),K=y.useMemo(()=>{const V={position:n,left:0,top:0};if(!G.floating)return V;const B=gR(G.floating,c.x),q=gR(G.floating,c.y);return u?{...V,transform:"translate("+B+"px, "+q+"px)",...RB(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:q}},[n,u,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:W,refs:Z,elements:G,floatingStyles:K}),[c,W,Z,G,K])}var R0e="Arrow",DB=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});DB.displayName=R0e;var D0e=DB;function jA(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const s=o.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,u=l.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var BA="Popper",[$B,Fl]=mi(BA),[$0e,IB]=$B(BA),NB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx($0e,{scope:t,anchor:r,onAnchorChange:i,children:n})};NB.displayName=BA;var FB="PopperAnchor",LB=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IB(FB,n),a=y.useRef(null),u=Kt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:u})});LB.displayName=FB;var zA="PopperContent",[I0e,N0e]=$B(zA),jB=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:s=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=IB(zA,n),[w,x]=y.useState(null),S=Kt(t,ge=>x(ge)),[A,E]=y.useState(null),C=jA(A),T=C?.width??0,M=C?.height??0,F=r+(o!=="center"?"-"+o:""),U=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],W=H.length>0,ie={padding:U,boundary:H.filter(L0e),altBoundary:W},{refs:Z,floatingStyles:G,placement:K,isPositioned:V,middlewareData:B}=M0e({strategy:"fixed",placement:F,whileElementsMounted:(...ge)=>S0e(...ge,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[t0e({mainAxis:i+M,alignmentAxis:a}),s&&C0e({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?O0e():void 0,...ie}),s&&E0e({...ie}),A0e({...ie,apply:({elements:ge,rects:Ze,availableWidth:Pe,availableHeight:Fe})=>{const{width:$e,height:be}=Ze.reference,yt=ge.floating.style;yt.setProperty("--radix-popper-available-width",`${Pe}px`),yt.setProperty("--radix-popper-available-height",`${Fe}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),A&&T0e({element:A,padding:u}),j0e({arrowWidth:T,arrowHeight:M}),h&&P0e({strategy:"referenceHidden",...ie})]}),[q,Y]=UB(K),ue=Wr(g);ii(()=>{V&&ue?.()},[V,ue]);const Q=B.arrow?.x,J=B.arrow?.y,se=B.arrow?.centerOffset!==0,[de,Se]=y.useState();return ii(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:V?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(I0e,{scope:n,placedSide:q,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:se,children:I.jsx(pt.div,{"data-side":q,"data-align":Y,...m,ref:S,style:{...m.style,animation:V?void 0:"none"}})})})});jB.displayName=zA;var BB="PopperArrow",F0e={top:"bottom",right:"left",bottom:"top",left:"right"},zB=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=N0e(BB,r),a=F0e[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(D0e,{...i,ref:n,style:{...i.style,display:"block"}})})});zB.displayName=BB;function L0e(e){return e!==null}var j0e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,u=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=UB(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+u/2,v=(i.arrow?.y??0)+s/2;let g="",m="";return l==="bottom"?(g=a?d:`${h}px`,m=`${-s}px`):l==="top"?(g=a?d:`${h}px`,m=`${r.floating.height+s}px`):l==="right"?(g=`${-s}px`,m=a?d:`${v}px`):l==="left"&&(g=`${r.floating.width+s}px`,m=a?d:`${v}px`),{data:{x:g,y:m}}}});function UB(e){const[t,n="center"]=e.split("-");return[t,n]}var Wx=NB,vg=LB,Vx=jB,Hx=zB,uS="rovingFocusGroup.onEntryFocus",B0e={bubbles:!1,cancelable:!0},qx="RovingFocusGroup",[VC,WB,z0e]=RA(qx),[U0e,Kx]=mi(qx,[z0e]),[W0e,V0e]=U0e(qx),VB=y.forwardRef((e,t)=>I.jsx(VC.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(VC.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(H0e,{...e,ref:t})})}));VB.displayName=qx;var H0e=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:s,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,h=y.useRef(null),v=Kt(t,h),g=hg(o),[m=null,b]=Ga({prop:a,defaultProp:u,onChange:s}),[w,x]=y.useState(!1),S=Wr(l),A=WB(n),E=y.useRef(!1),[C,T]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(uS,S),()=>M.removeEventListener(uS,S)},[S]),I.jsx(W0e,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:m,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>T(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const F=!E.current;if(M.target===M.currentTarget&&F&&!w){const U=new CustomEvent(uS,B0e);if(M.currentTarget.dispatchEvent(U),!U.defaultPrevented){const H=A().filter(K=>K.focusable),W=H.find(K=>K.active),ie=H.find(K=>K.id===m),G=[W,ie,...H].filter(Boolean).map(K=>K.ref.current);KB(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),HB="RovingFocusGroupItem",qB=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,u=No(),s=o||u,l=V0e(HB,n),c=l.currentTabStopId===s,d=WB(n),{onFocusableItemAdd:h,onFocusableItemRemove:v}=l;return y.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),I.jsx(VC.ItemSlot,{scope:n,id:s,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,g=>{r?l.onItemFocus(s):g.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(s)),onKeyDown:Ye(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=G0e(g,l.orientation,l.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=d().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const x=w.indexOf(g.currentTarget);w=l.loop?Y0e(w,x+1):w.slice(x+1)}setTimeout(()=>KB(w))}})})})});qB.displayName=HB;var q0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K0e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function G0e(e,t,n){const r=K0e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return q0e[r]}function KB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Y0e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var GB=VB,YB=qB,HC=["Enter"," "],Z0e=["ArrowDown","PageUp","Home"],ZB=["ArrowUp","PageDown","End"],X0e=[...Z0e,...ZB],Q0e={ltr:[...HC,"ArrowRight"],rtl:[...HC,"ArrowLeft"]},J0e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gg="Menu",[ov,eve,tve]=RA(gg),[sf,XB]=mi(gg,[tve,Fl,Kx]),Gx=Fl(),QB=Kx(),[nve,lf]=sf(gg),[rve,mg]=sf(gg),JB=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,u=Gx(t),[s,l]=y.useState(null),c=y.useRef(!1),d=Wr(o),h=hg(i);return y.useEffect(()=>{const v=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),I.jsx(Wx,{...u,children:I.jsx(nve,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:l,children:I.jsx(rve,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};JB.displayName=gg;var ive="MenuAnchor",UA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Gx(n);return I.jsx(vg,{...i,...r,ref:t})});UA.displayName=ive;var WA="MenuPortal",[ove,ez]=sf(WA,{forceMount:void 0}),tz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=lf(WA,t);return I.jsx(ove,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Th,{asChild:!0,container:i,children:r})})})};tz.displayName=WA;var fa="MenuContent",[ave,VA]=sf(fa),nz=y.forwardRef((e,t)=>{const n=ez(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu);return I.jsx(ov.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(ov.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(uve,{...i,ref:t}):I.jsx(sve,{...i,ref:t})})})})}),uve=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu),r=y.useRef(null),i=Kt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),I.jsx(HA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),sve=y.forwardRef((e,t)=>{const n=lf(fa,e.__scopeMenu);return I.jsx(HA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,b=lf(fa,n),w=mg(fa,n),x=Gx(n),S=QB(n),A=eve(n),[E,C]=y.useState(null),T=y.useRef(null),M=Kt(t,T,b.onContentChange),F=y.useRef(0),U=y.useRef(""),H=y.useRef(0),W=y.useRef(null),ie=y.useRef("right"),Z=y.useRef(0),G=g?fg:y.Fragment,K=g?{as:Sl,allowPinchZoom:!0}:void 0,V=q=>{const Y=U.current+q,ue=A().filter(ge=>!ge.disabled),Q=document.activeElement,J=ue.find(ge=>ge.ref.current===Q)?.textValue,se=ue.map(ge=>ge.textValue),de=xve(se,Y,J),Se=ue.find(ge=>ge.textValue===de)?.ref.current;(function ge(Ze){U.current=Ze,window.clearTimeout(F.current),Ze!==""&&(F.current=window.setTimeout(()=>ge(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(F.current),[]),jx();const B=y.useCallback(q=>ie.current===W.current?.side&&_ve(q,W.current?.area),[]);return I.jsx(ave,{scope:n,searchRef:U,onItemEnter:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),onItemLeave:y.useCallback(q=>{B(q)||(T.current?.focus(),C(null))},[B]),onTriggerLeave:y.useCallback(q=>{B(q)&&q.preventDefault()},[B]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(q=>{W.current=q},[]),children:I.jsx(G,{...K,children:I.jsx(cg,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,q=>{q.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:I.jsx(GB,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(s,q=>{w.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(Vx,{role:"menu","aria-orientation":"vertical","data-state":yz(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:Ye(m.onKeyDown,q=>{const ue=q.target.closest("[data-radix-menu-content]")===q.currentTarget,Q=q.ctrlKey||q.altKey||q.metaKey,J=q.key.length===1;ue&&(q.key==="Tab"&&q.preventDefault(),!Q&&J&&V(q.key));const se=T.current;if(q.target!==se||!X0e.includes(q.key))return;q.preventDefault();const Se=A().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);ZB.includes(q.key)&&Se.reverse(),yve(Se)}),onBlur:Ye(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(F.current),U.current="")}),onPointerMove:Ye(e.onPointerMove,av(q=>{const Y=q.target,ue=Z.current!==q.clientX;if(q.currentTarget.contains(Y)&&ue){const Q=q.clientX>Z.current?"right":"left";ie.current=Q,Z.current=q.clientX}}))})})})})})})});nz.displayName=fa;var lve="MenuGroup",qA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});qA.displayName=lve;var cve="MenuLabel",rz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});rz.displayName=cve;var K1="MenuItem",yR="menu.itemSelect",Yx=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=mg(K1,e.__scopeMenu),u=VA(K1,e.__scopeMenu),s=Kt(t,o),l=y.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const h=new CustomEvent(yR,{bubbles:!0,cancelable:!0});d.addEventListener(yR,v=>r?.(v),{once:!0}),Bj(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(iz,{...i,ref:s,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),l.current=!0},onPointerUp:Ye(e.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,d=>{const h=u.searchRef.current!=="";n||h&&d.key===" "||HC.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Yx.displayName=K1;var iz=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=VA(K1,n),u=QB(n),s=y.useRef(null),l=Kt(t,s),[c,d]=y.useState(!1),[h,v]=y.useState("");return y.useEffect(()=>{const g=s.current;g&&v((g.textContent??"").trim())},[o.children]),I.jsx(ov.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(YB,{asChild:!0,...u,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,av(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,av(g=>a.onItemLeave(g))),onFocus:Ye(e.onFocus,()=>d(!0)),onBlur:Ye(e.onBlur,()=>d(!1))})})})}),fve="MenuCheckboxItem",oz=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(cz,{scope:e.__scopeMenu,checked:n,children:I.jsx(Yx,{role:"menuitemcheckbox","aria-checked":G1(n)?"mixed":n,...i,ref:t,"data-state":GA(n),onSelect:Ye(i.onSelect,()=>r?.(G1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});oz.displayName=fve;var az="MenuRadioGroup",[dve,hve]=sf(az,{value:void 0,onValueChange:()=>{}}),uz=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Wr(r);return I.jsx(dve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(qA,{...i,ref:t})})});uz.displayName=az;var sz="MenuRadioItem",lz=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=hve(sz,e.__scopeMenu),o=n===i.value;return I.jsx(cz,{scope:e.__scopeMenu,checked:o,children:I.jsx(Yx,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":GA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});lz.displayName=sz;var KA="MenuItemIndicator",[cz,pve]=sf(KA,{checked:!1}),fz=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=pve(KA,n);return I.jsx(Gr,{present:r||G1(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":GA(o.checked)})})});fz.displayName=KA;var vve="MenuSeparator",dz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dz.displayName=vve;var gve="MenuArrow",hz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Gx(n);return I.jsx(Hx,{...i,...r,ref:t})});hz.displayName=gve;var mve="MenuSub",[gGe,pz]=sf(mve),Xp="MenuSubTrigger",vz=y.forwardRef((e,t)=>{const n=lf(Xp,e.__scopeMenu),r=mg(Xp,e.__scopeMenu),i=pz(Xp,e.__scopeMenu),o=VA(Xp,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:s}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),s(null)}},[u,s]),I.jsx(UA,{asChild:!0,...l,children:I.jsx(iz,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yz(n.open),...e,ref:Ax(t,i.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,av(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,av(d=>{c();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",m=g?-5:5,b=h[g?"left":"right"],w=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:v}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,d=>{const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||Q0e[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});vz.displayName=Xp;var gz="MenuSubContent",mz=y.forwardRef((e,t)=>{const n=ez(fa,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lf(fa,e.__scopeMenu),a=mg(fa,e.__scopeMenu),u=pz(gz,e.__scopeMenu),s=y.useRef(null),l=Kt(t,s);return I.jsx(ov.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(ov.Slot,{scope:e.__scopeMenu,children:I.jsx(HA,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&s.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const d=c.currentTarget.contains(c.target),h=J0e[a.dir].includes(c.key);d&&h&&(o.onOpenChange(!1),u.trigger?.focus(),c.preventDefault())})})})})})});mz.displayName=gz;function yz(e){return e?"open":"closed"}function G1(e){return e==="indeterminate"}function GA(e){return G1(e)?"indeterminate":e?"checked":"unchecked"}function yve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function bve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=bve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function wve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function _ve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wve(n,t)}function av(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Sve=JB,Cve=UA,Eve=tz,Ave=nz,Pve=qA,Ove=rz,kve=Yx,Tve=oz,Mve=uz,Rve=lz,Dve=fz,$ve=dz,Ive=hz,Nve=vz,Fve=mz,YA="DropdownMenu",[Lve,mGe]=mi(YA,[XB]),Gi=XB(),[jve,bz]=Lve(YA),xz=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,s=Gi(t),l=y.useRef(null),[c=!1,d]=Ga({prop:i,defaultProp:o,onChange:a});return I.jsx(jve,{scope:t,triggerId:No(),triggerRef:l,contentId:No(),open:c,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),modal:u,children:I.jsx(Sve,{...s,open:c,onOpenChange:d,dir:r,modal:u,children:n})})};xz.displayName=YA;var wz="DropdownMenuTrigger",_z=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=bz(wz,n),a=Gi(n);return I.jsx(Cve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ax(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Ye(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});_z.displayName=wz;var Bve="DropdownMenuPortal",Sz=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Gi(t);return I.jsx(Eve,{...r,...n})};Sz.displayName=Bve;var Cz="DropdownMenuContent",Ez=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=bz(Cz,n),o=Gi(n),a=y.useRef(!1);return I.jsx(Ave,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,u=>{a.current||i.triggerRef.current?.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,u=>{const s=u.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ez.displayName=Cz;var zve="DropdownMenuGroup",Az=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Pve,{...i,...r,ref:t})});Az.displayName=zve;var Uve="DropdownMenuLabel",Pz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ove,{...i,...r,ref:t})});Pz.displayName=Uve;var Wve="DropdownMenuItem",Oz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(kve,{...i,...r,ref:t})});Oz.displayName=Wve;var Vve="DropdownMenuCheckboxItem",kz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Tve,{...i,...r,ref:t})});kz.displayName=Vve;var Hve="DropdownMenuRadioGroup",qve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Mve,{...i,...r,ref:t})});qve.displayName=Hve;var Kve="DropdownMenuRadioItem",Tz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Rve,{...i,...r,ref:t})});Tz.displayName=Kve;var Gve="DropdownMenuItemIndicator",Mz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Dve,{...i,...r,ref:t})});Mz.displayName=Gve;var Yve="DropdownMenuSeparator",Rz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx($ve,{...i,...r,ref:t})});Rz.displayName=Yve;var Zve="DropdownMenuArrow",Xve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Ive,{...i,...r,ref:t})});Xve.displayName=Zve;var Qve="DropdownMenuSubTrigger",Dz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Nve,{...i,...r,ref:t})});Dz.displayName=Qve;var Jve="DropdownMenuSubContent",$z=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Gi(n);return I.jsx(Fve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$z.displayName=Jve;var yGe=xz,bGe=_z,xGe=Sz,wGe=Ez,_Ge=Az,SGe=Pz,CGe=Oz,EGe=kz,AGe=Tz,PGe=Mz,OGe=Rz,kGe=Dz,TGe=$z,ege="VisuallyHidden",ZA=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ZA.displayName=ege;var tge=ZA,[Zx,MGe]=mi("Tooltip",[Fl]),Xx=Fl(),Iz="TooltipProvider",nge=700,qC="tooltip.open",[rge,XA]=Zx(Iz),Nz=e=>{const{__scopeTooltip:t,delayDuration:n=nge,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,u]=y.useState(!0),s=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(rge,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),u(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})};Nz.displayName=Iz;var Qx="Tooltip",[ige,yg]=Zx(Qx),Fz=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:u}=e,s=XA(Qx,e.__scopeTooltip),l=Xx(t),[c,d]=y.useState(null),h=No(),v=y.useRef(0),g=a??s.disableHoverableContent,m=u??s.delayDuration,b=y.useRef(!1),[w=!1,x]=Ga({prop:r,defaultProp:i,onChange:T=>{T?(s.onOpen(),document.dispatchEvent(new CustomEvent(qC))):s.onClose(),o?.(T)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),A=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,x(!0),v.current=0},m)},[m,x]);return y.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),I.jsx(Wx,{...l,children:I.jsx(ige,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{s.isOpenDelayed?C():A()},[s.isOpenDelayed,C,A]),onTriggerLeave:y.useCallback(()=>{g?E():(window.clearTimeout(v.current),v.current=0)},[E,g]),onOpen:A,onClose:E,disableHoverableContent:g,children:n})})};Fz.displayName=Qx;var KC="TooltipTrigger",Lz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yg(KC,n),o=XA(KC,n),a=Xx(n),u=y.useRef(null),s=Kt(t,u,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),I.jsx(vg,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});Lz.displayName=KC;var QA="TooltipPortal",[oge,age]=Zx(QA,{forceMount:void 0}),jz=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=yg(QA,t);return I.jsx(oge,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Th,{asChild:!0,container:i,children:r})})})};jz.displayName=QA;var Vd="TooltipContent",Bz=y.forwardRef((e,t)=>{const n=age(Vd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=yg(Vd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(zz,{side:i,...o,ref:t}):I.jsx(uge,{side:i,...o,ref:t})})}),uge=y.forwardRef((e,t)=>{const n=yg(Vd,e.__scopeTooltip),r=XA(Vd,e.__scopeTooltip),i=y.useRef(null),o=Kt(t,i),[a,u]=y.useState(null),{trigger:s,onClose:l}=n,c=i.current,{onPointerInTransitChange:d}=r,h=y.useCallback(()=>{u(null),d(!1)},[d]),v=y.useCallback((g,m)=>{const b=g.currentTarget,w={x:g.clientX,y:g.clientY},x=fge(w,b.getBoundingClientRect()),S=dge(w,x),A=hge(m.getBoundingClientRect()),E=vge([...S,...A]);u(E),d(!0)},[d]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(s&&c){const g=b=>v(b,c),m=b=>v(b,s);return s.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[s,c,v,h]),y.useEffect(()=>{if(a){const g=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},x=s?.contains(b)||c?.contains(b),S=!pge(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[s,c,a,l,h]),I.jsx(zz,{...e,ref:o})}),[sge,lge]=Zx(Qx,{isInside:!1}),zz=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...u}=e,s=yg(Vd,n),l=Xx(n),{onClose:c}=s;return y.useEffect(()=>(document.addEventListener(qC,c),()=>document.removeEventListener(qC,c)),[c]),y.useEffect(()=>{if(s.trigger){const d=h=>{h.target?.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:I.jsxs(Vx,{"data-state":s.stateAttribute,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(nA,{children:r}),I.jsx(sge,{scope:n,isInside:!0,children:I.jsx(tge,{id:s.contentId,role:"tooltip",children:i||r})})]})})});Bz.displayName=Vd;var Uz="TooltipArrow",cge=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Xx(n);return lge(Uz,n).isInside?null:I.jsx(Hx,{...i,...r,ref:t})});cge.displayName=Uz;function fge(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dge(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function hge(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function pge(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-u)*(r-s)/(c-s)+u&&(i=!i)}return i}function vge(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),gge(t)}function gge(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var RGe=Nz,DGe=Fz,$Ge=Lz,IGe=jz,NGe=Bz,bR=1,mge=.9,yge=.8,bge=.17,sS=.1,lS=.999,xge=.9999,wge=.99,_ge=/[\\\/_+.#"@\[\(\{&]/,Sge=/[\\\/_+.#"@\[\(\{&]/g,Cge=/[\s-]/,Wz=/[\s-]/g;function GC(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?bR:wge;var u=`${i},${o}`;if(a[u]!==void 0)return a[u];for(var s=r.charAt(o),l=n.indexOf(s,i),c=0,d,h,v,g;l>=0;)d=GC(e,t,n,r,l+1,o+1,a),d>c&&(l===i?d*=bR:_ge.test(e.charAt(l-1))?(d*=yge,v=e.slice(i,l-1).match(Sge),v&&i>0&&(d*=Math.pow(lS,v.length))):Cge.test(e.charAt(l-1))?(d*=mge,g=e.slice(i,l-1).match(Wz),g&&i>0&&(d*=Math.pow(lS,g.length))):(d*=bge,i>0&&(d*=Math.pow(lS,l-i))),e.charAt(l)!==t.charAt(o)&&(d*=xge)),(dd&&(d=h*sS)),d>c&&(c=d),l=n.indexOf(s,l+1);return a[u]=c,c}function xR(e){return e.toLowerCase().replace(Wz," ")}function Ege(e,t){return GC(e,t,xR(e),xR(t),0,0,{})}function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Age(n,t))}function bg(...e){return y.useCallback(Vz(...e),e)}function Pge(e,t=[]){let n=[];function r(o,a){const u=y.createContext(a),s=n.length;n=[...n,a];function l(d){const{scope:h,children:v,...g}=d,m=h?.[e][s]||u,b=y.useMemo(()=>g,Object.values(g));return y.createElement(m.Provider,{value:b},v)}function c(d,h){const v=h?.[e][s]||u,g=y.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(u){const s=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:s}}),[u,s])}};return i.scopeName=e,[r,Oge(i,...t)]}function Oge(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:s,scopeName:l})=>{const d=s(o)[`__scope${l}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const kge=globalThis?.document?y.useLayoutEffect:()=>{},Tge=i4.useId||(()=>{});let Mge=0;function cS(e){const[t,n]=y.useState(Tge());return kge(()=>{e||n(r=>r??String(Mge++))},[e]),e||(t?`radix-${t}`:"")}function Hz(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Rge({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Dge({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Hz(n),s=y.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&u(d)}else i(l)},[o,e,i,u]);return[a,s]}function Dge({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Hz(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const JA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Ige);if(o){const a=o.props.children,u=i.map(s=>s===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:s);return y.createElement(YC,fr({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,u):null)}return y.createElement(YC,fr({},r,{ref:t}),n)});JA.displayName="Slot";const YC=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...Nge(r,n.props),ref:Vz(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});YC.displayName="SlotClone";const $ge=({children:e})=>y.createElement(y.Fragment,null,e);function Ige(e){return y.isValidElement(e)&&e.type===$ge}function Nge(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...u)=>{o?.(...u),i?.(...u)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Fge=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],Jx=Fge.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?JA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(u,fr({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Lge(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function e5(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function jge(e){const t=e5(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const ZC="dismissableLayer.update",Bge="dismissableLayer.pointerDownOutside",zge="dismissableLayer.focusOutside";let wR;const Uge=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wge=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...s}=e,l=y.useContext(Uge),[c,d]=y.useState(null),[,h]=y.useState({}),v=bg(t,C=>d(C)),g=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(m),w=c?g.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,A=Vge(C=>{const T=C.target,M=[...l.branches].some(F=>F.contains(T));!S||M||(i?.(C),a?.(C),C.defaultPrevented||u?.())}),E=Hge(C=>{const T=C.target;[...l.branches].some(F=>F.contains(T))||(o?.(C),a?.(C),C.defaultPrevented||u?.())});return jge(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&u&&(C.preventDefault(),u()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(wR=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),_R(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=wR)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),_R())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(ZC,C),()=>document.removeEventListener(ZC,C)},[]),y.createElement(Jx.div,fr({},s,{ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Sd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Sd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Sd(e.onPointerDownCapture,A.onPointerDownCapture)}))});function Vge(e){const t=e5(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let s=function(){qz(Bge,t,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=s,document.addEventListener("click",r.current,{once:!0})):s()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Hge(e){const t=e5(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&qz(zge,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function _R(){const e=new CustomEvent(ZC);document.dispatchEvent(e)}function qz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lge(i,o):i.dispatchEvent(o)}function SR(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const fS="focusScope.autoFocusOnMount",dS="focusScope.autoFocusOnUnmount",CR={bubbles:!1,cancelable:!0},qge=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,s]=y.useState(null),l=SR(i),c=SR(o),d=y.useRef(null),h=bg(t,m=>s(m)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(w){if(v.paused||!u)return;const x=w.target;u.contains(x)?d.current=x:ac(d.current,{select:!0})},b=function(w){v.paused||!u||u.contains(w.relatedTarget)||ac(d.current,{select:!0})};return document.addEventListener("focusin",m),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b)}}},[r,u,v.paused]),y.useEffect(()=>{if(u){AR.add(v);const m=document.activeElement;if(!u.contains(m)){const w=new CustomEvent(fS,CR);u.addEventListener(fS,l),u.dispatchEvent(w),w.defaultPrevented||(Kge(Qge(Kz(u)),{select:!0}),document.activeElement===m&&ac(u))}return()=>{u.removeEventListener(fS,l),setTimeout(()=>{const w=new CustomEvent(dS,CR);u.addEventListener(dS,c),u.dispatchEvent(w),w.defaultPrevented||ac(m??document.body,{select:!0}),u.removeEventListener(dS,c),AR.remove(v)},0)}}},[u,l,c,v]);const g=y.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const x=m.currentTarget,[S,A]=Gge(x);S&&A?!m.shiftKey&&w===A?(m.preventDefault(),n&&ac(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&ac(A,{select:!0})):w===x&&m.preventDefault()}},[n,r,v.paused]);return y.createElement(Jx.div,fr({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function Kge(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ac(r,{select:t}),document.activeElement!==n)return}function Gge(e){const t=Kz(e),n=ER(t,e),r=ER(t.reverse(),e);return[n,r]}function Kz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ER(e,t){for(const n of e)if(!Yge(n,{upTo:t}))return n}function Yge(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zge(e){return e instanceof HTMLInputElement&&"select"in e}function ac(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zge(e)&&t&&e.select()}}const AR=Xge();function Xge(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=PR(e,t),e.unshift(t)},remove(t){var n;e=PR(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function PR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qge(e){return e.filter(t=>t.tagName!=="A")}const Jge=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Sx.createPortal(y.createElement(Jx.div,fr({},i,{ref:t})),r):null}),OR=globalThis?.document?y.useLayoutEffect:()=>{};function eme(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const ew=e=>{const{present:t,children:n}=e,r=tme(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=bg(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};ew.displayName="Presence";function tme(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[u,s]=eme(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Xm(r.current);o.current=u==="mounted"?l:"none"},[u]),OR(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,v=Xm(l);e?s("MOUNT"):v==="none"||l?.display==="none"?s("UNMOUNT"):s(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,s]),OR(()=>{if(t){const l=d=>{const v=Xm(r.current).includes(d.animationName);d.target===t&&v&&Ss.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=Xm(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Xm(e){return e?.animationName||"none"}let hS=0;function nme(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:kR()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:kR()),hS++,()=>{hS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),hS--}},[])}function kR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Uy="right-scroll-bar-position",Wy="width-before-scroll-bar",rme="with-scroll-bars-hidden",ime="--removed-body-scroll-bar-size";function pS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ome(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var ame=typeof window<"u"?y.useLayoutEffect:y.useEffect,TR=new WeakMap;function ume(e,t){var n=ome(null,function(r){return e.forEach(function(i){return pS(i,r)})});return ame(function(){var r=TR.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(u){o.has(u)||pS(u,null)}),o.forEach(function(u){i.has(u)||pS(u,a)})}TR.set(n,e)},[e]),n}var Gz=Gj(),vS=function(){},tw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:vS,onWheelCapture:vS,onTouchMoveCapture:vS}),i=r[0],o=r[1],a=e.forwardProps,u=e.children,s=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=_A(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,A=ume([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:Gz,removeScrollBar:l,shards:d,noIsolation:v,inert:g,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),a?y.cloneElement(y.Children.only(u),Ri(Ri({},E),{ref:A})):y.createElement(w,Ri({},E,{className:s,ref:A}),u))});tw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tw.classNames={fullWidth:Wy,zeroRight:Uy};var sme={left:0,top:0,right:0,gap:0},gS=function(e){return parseInt(e||"",10)||0},lme=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gS(n),gS(r),gS(i)]},cme=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sme;var t=lme(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fme=SA(),Cd="data-scroll-locked",dme=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(rme,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; } @@ -146,234 +146,234 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(zy,` { + .`).concat(Uy,` { right: `).concat(u,"px ").concat(r,`; } - .`).concat(Uy,` { + .`).concat(Wy,` { margin-right: `).concat(u,"px ").concat(r,`; } - .`).concat(zy," .").concat(zy,` { + .`).concat(Uy," .").concat(Uy,` { right: 0 `).concat(r,`; } - .`).concat(Uy," .").concat(Uy,` { + .`).concat(Wy," .").concat(Wy,` { margin-right: 0 `).concat(r,`; } body[`).concat(Cd,`] { - `).concat(nme,": ").concat(u,`px; + `).concat(ime,": ").concat(u,`px; } -`)},TR=function(){var e=parseInt(document.body.getAttribute(Cd)||"0",10);return isFinite(e)?e:0},fme=function(){y.useEffect(function(){return document.body.setAttribute(Cd,(TR()+1).toString()),function(){var e=TR()-1;e<=0?document.body.removeAttribute(Cd):document.body.setAttribute(Cd,e.toString())}},[])},dme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;fme();var o=y.useMemo(function(){return sme(i)},[i]);return y.createElement(lme,{styles:cme(o,!t,i,n?"":"!important")})},XC=!1;if(typeof window<"u")try{var Xm=Object.defineProperty({},"passive",{get:function(){return XC=!0,!0}});window.addEventListener("test",Xm,Xm),window.removeEventListener("test",Xm,Xm)}catch{XC=!1}var jf=XC?{passive:!1}:!1,hme=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},pme=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},MR=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Kz(e,n);if(r){var i=Gz(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},vme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kz=function(e,t){return e==="v"?hme(t):pme(t)},Gz=function(e,t){return e==="v"?vme(t):gme(t)},mme=function(e,t){return e==="h"&&t==="rtl"?-1:1},yme=function(e,t,n,r,i){var o=mme(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=Gz(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&Kz(e,u)&&(d+=w,h+=g),u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(d===0||!i)||!c&&(h===0||!i))&&(l=!0),l},Qm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RR=function(e){return[e.deltaX,e.deltaY]},DR=function(e){return e&&"current"in e?e.current:e},bme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xme=function(e){return` +`)},MR=function(){var e=parseInt(document.body.getAttribute(Cd)||"0",10);return isFinite(e)?e:0},hme=function(){y.useEffect(function(){return document.body.setAttribute(Cd,(MR()+1).toString()),function(){var e=MR()-1;e<=0?document.body.removeAttribute(Cd):document.body.setAttribute(Cd,e.toString())}},[])},pme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;hme();var o=y.useMemo(function(){return cme(i)},[i]);return y.createElement(fme,{styles:dme(o,!t,i,n?"":"!important")})},XC=!1;if(typeof window<"u")try{var Qm=Object.defineProperty({},"passive",{get:function(){return XC=!0,!0}});window.addEventListener("test",Qm,Qm),window.removeEventListener("test",Qm,Qm)}catch{XC=!1}var jf=XC?{passive:!1}:!1,vme=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},gme=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},RR=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Yz(e,n);if(r){var i=Zz(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},mme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Yz=function(e,t){return e==="v"?vme(t):gme(t)},Zz=function(e,t){return e==="v"?mme(t):yme(t)},bme=function(e,t){return e==="h"&&t==="rtl"?-1:1},xme=function(e,t,n,r,i){var o=bme(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,s=t.contains(u),l=!1,c=a>0,d=0,h=0;do{var v=Zz(e,u),g=v[0],m=v[1],b=v[2],w=m-b-o*g;(g||w)&&Yz(e,u)&&(d+=w,h+=g),u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return(c&&(d===0||!i)||!c&&(h===0||!i))&&(l=!0),l},Jm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DR=function(e){return[e.deltaX,e.deltaY]},$R=function(e){return e&&"current"in e?e.current:e},wme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_me=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},wme=0,Bf=[];function _me(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(wme++)[0],o=y.useState(function(){return SA()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=qj([e.lockRef.current],(e.shards||[]).map(DR),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var w=Qm(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=MR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=MR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return yme(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Bf.length||Bf[Bf.length-1]!==o)){var w="deltaY"in b?RR(b):Qm(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&bme(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(DR).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=Qm(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,RR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,Qm(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Bf.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,jf),document.addEventListener("touchmove",s,jf),document.addEventListener("touchstart",c,jf),function(){Bf=Bf.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,jf),document.removeEventListener("touchmove",s,jf),document.removeEventListener("touchstart",c,jf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:xme(i)}):null,v?y.createElement(dme,{gapMode:"margin"}):null)}const Sme=Yj(qz,_me);var Yz=y.forwardRef(function(e,t){return y.createElement(tw,Ri({},e,{ref:t,sideCar:Sme}))});Yz.classNames=tw.classNames;const Zz="Dialog",[Xz,IGe]=Ege(Zz),[Cme,cf]=Xz(Zz),Eme=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=Tge({prop:r,defaultProp:i,onChange:o});return y.createElement(Cme,{scope:t,triggerRef:u,contentRef:s,contentId:cS(),titleId:cS(),descriptionId:cS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a},n)},Qz="DialogPortal",[Ame,Jz]=Xz(Qz,{forceMount:void 0}),Ome=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=cf(Qz,t);return y.createElement(Ame,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(ew,{present:n||o.open},y.createElement(Xge,{asChild:!0,container:i},a))))},QC="DialogOverlay",Pme=y.forwardRef((e,t)=>{const n=Jz(QC,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(QC,e.__scopeDialog);return o.modal?y.createElement(ew,{present:r||o.open},y.createElement(kme,fr({},i,{ref:t}))):null}),kme=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cf(QC,n);return y.createElement(Yz,{as:QA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(Jx.div,fr({"data-state":tU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),av="DialogContent",Tme=y.forwardRef((e,t)=>{const n=Jz(av,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(av,e.__scopeDialog);return y.createElement(ew,{present:r||o.open},o.modal?y.createElement(Mme,fr({},i,{ref:t})):y.createElement(Rme,fr({},i,{ref:t})))}),Mme=y.forwardRef((e,t)=>{const n=cf(av,e.__scopeDialog),r=y.useRef(null),i=yg(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),y.createElement(eU,fr({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sd(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Sd(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Sd(e.onFocusOutside,o=>o.preventDefault())}))}),Rme=y.forwardRef((e,t)=>{const n=cf(av,e.__scopeDialog),r=y.useRef(!1);return y.createElement(eU,fr({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const u=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(u))&&i.preventDefault()}}))}),eU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=cf(av,n),s=y.useRef(null),l=yg(t,s);return eme(),y.createElement(y.Fragment,null,y.createElement(Vge,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(zge,fr({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tU(u.open)},a,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)});function tU(e){return e?"open":"closed"}const Dme=Eme,$me=Ome,Ime=Pme,Nme=Tme;var Fme='[cmdk-list-sizer=""]',Pp='[cmdk-group=""]',mS='[cmdk-group-items=""]',Lme='[cmdk-group-heading=""]',e5='[cmdk-item=""]',$R=`${e5}:not([aria-disabled="true"])`,JC="cmdk-item-select",Gu="data-value",jme=(e,t)=>Sge(e,t),nU=y.createContext(void 0),bg=()=>y.useContext(nU),rU=y.createContext(void 0),t5=()=>y.useContext(rU),iU=y.createContext(void 0),oU=y.forwardRef((e,t)=>{let n=y.useRef(null),r=Gf(()=>{var Y,ue,Q;return{search:"",value:(Q=(ue=e.value)!=null?ue:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=Gf(()=>new Set),o=Gf(()=>new Map),a=Gf(()=>new Map),u=Gf(()=>new Set),s=aU(e),{label:l,children:c,value:d,onValueChange:h,filter:v,shouldFilter:g,vimBindings:m=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),A=Zme();Rh(()=>{if(d!==void 0){let Y=d.trim().toLowerCase();r.current.value=Y,A(6,H),E.emit()}},[d]);let E=y.useMemo(()=>({subscribe:Y=>(u.current.add(Y),()=>u.current.delete(Y)),snapshot:()=>r.current,setState:(Y,ue,Q)=>{var J,se,de;if(!Object.is(r.current[Y],ue)){if(r.current[Y]=ue,Y==="search")U(),M(),A(1,F);else if(Y==="value")if(((J=s.current)==null?void 0:J.value)!==void 0){let Se=ue??"";(de=(se=s.current).onValueChange)==null||de.call(se,Se);return}else Q||A(5,H);E.emit()}},emit:()=>{u.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,ue)=>{ue!==a.current.get(Y)&&(a.current.set(Y,ue),r.current.filtered.items.set(Y,T(ue)),A(2,()=>{M(),E.emit()}))},item:(Y,ue)=>(i.current.add(Y),ue&&(o.current.has(ue)?o.current.get(ue).add(Y):o.current.set(ue,new Set([Y]))),A(3,()=>{U(),M(),r.current.value||F(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=W();A(4,()=>{U(),Q?.getAttribute("id")===Y&&F(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function T(Y){var ue,Q;let J=(Q=(ue=s.current)==null?void 0:ue.filter)!=null?Q:jme;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||s.current.shouldFilter===!1)return;let Y=r.current.filtered.items,ue=[];r.current.filtered.groups.forEach(J=>{let se=o.current.get(J),de=0;se.forEach(Se=>{let ge=Y.get(Se);de=Math.max(ge,de)}),ue.push([J,de])});let Q=n.current.querySelector(Fme);ie().sort((J,se)=>{var de,Se;let ge=J.getAttribute(Gu),Ze=se.getAttribute(Gu);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(ge))!=null?Se:0)}).forEach(J=>{let se=J.closest(mS);se?se.appendChild(J.parentElement===se?J:J.closest(`${mS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${mS} > *`))}),ue.sort((J,se)=>se[1]-J[1]).forEach(J=>{let se=n.current.querySelector(`${Pp}[${Gu}="${J[0]}"]`);se?.parentElement.appendChild(se)})}function F(){let Y=ie().find(Q=>!Q.ariaDisabled),ue=Y?.getAttribute(Gu);E.setState("value",ue||void 0)}function U(){if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let ue of i.current){let Q=a.current.get(ue),J=T(Q);r.current.filtered.items.set(ue,J),J>0&&Y++}for(let[ue,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(ue);break}r.current.filtered.count=Y}function H(){var Y,ue,Q;let J=W();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(ue=J.closest(Pp))==null?void 0:ue.querySelector(Lme))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function W(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${e5}[aria-selected="true"]`)}function ie(){return Array.from(n.current.querySelectorAll($R))}function Z(Y){let ue=ie()[Y];ue&&E.setState("value",ue.getAttribute(Gu))}function G(Y){var ue;let Q=W(),J=ie(),se=J.findIndex(Se=>Se===Q),de=J[se+Y];(ue=s.current)!=null&&ue.loop&&(de=se+Y<0?J[J.length-1]:se+Y===J.length?J[0]:J[se+Y]),de&&E.setState("value",de.getAttribute(Gu))}function K(Y){let ue=W(),Q=ue?.closest(Pp),J;for(;Q&&!J;)Q=Y>0?Gme(Q,Pp):Yme(Q,Pp),J=Q?.querySelector($R);J?E.setState("value",J.getAttribute(Gu)):G(Y)}let V=()=>Z(ie().length-1),B=Y=>{Y.preventDefault(),Y.metaKey?V():Y.altKey?K(1):G(1)},q=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?K(-1):G(-1)};return y.createElement("div",{ref:xg([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var ue;if((ue=b.onKeyDown)==null||ue.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{m&&Y.ctrlKey&&B(Y);break}case"ArrowDown":{B(Y);break}case"p":case"k":{m&&Y.ctrlKey&&q(Y);break}case"ArrowUp":{q(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),V();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=W();if(Q){let J=new Event(JC);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Xme},l),y.createElement(rU.Provider,{value:E},y.createElement(nU.Provider,{value:C},c)))}),Bme=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(iU),u=bg(),s=aU(e),l=(r=(n=s.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Rh(()=>u.item(i,a?.id),[]);let c=uU(i,o,[e.value,e.children,o]),d=t5(),h=Gc(E=>E.value&&E.value===c.current),v=Gc(E=>l||u.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(JC,g),()=>E.removeEventListener(JC,g)},[v,e.onSelect,e.disabled]);function g(){var E,C;m(),(C=(E=s.current).onSelect)==null||C.call(E,c.current)}function m(){d.setState("value",c.current,!0)}if(!v)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...A}=e;return y.createElement("div",{ref:xg([o,t]),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:m,onClick:b?void 0:g},e.children)}),zme=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),u=y.useRef(null),s=y.useRef(null),l=y.useId(),c=bg(),d=Gc(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Rh(()=>c.group(a),[]),uU(a,u,[e.value,e.heading,s]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),v=y.createElement(iU.Provider,{value:h},r);return y.createElement("div",{ref:xg([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v))}),Ume=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Gc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:xg([i,t]),...r,"cmdk-separator":"",role:"separator"})}),Wme=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=t5(),a=Gc(c=>c.search),u=Gc(c=>c.value),s=bg(),l=y.useMemo(()=>{var c;let d=(c=s.commandRef.current)==null?void 0:c.querySelector(`${e5}[${Gu}="${u}"]`);return d?.getAttribute("id")},[u,s.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),Vme=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=bg();return y.useEffect(()=>{if(o.current&&i.current){let u=o.current,s=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let d=u.offsetHeight;s.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(u),()=>{cancelAnimationFrame(l),c.unobserve(u)}}},[]),y.createElement("div",{ref:xg([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),Hme=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...u}=e;return y.createElement(Dme,{open:n,onOpenChange:r},y.createElement($me,{container:a},y.createElement(Ime,{"cmdk-overlay":"",className:i}),y.createElement(Nme,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(oU,{ref:t,...u}))))}),qme=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Gc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Kme=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),NGe=Object.assign(oU,{List:Vme,Item:Bme,Input:Wme,Group:zme,Separator:Ume,Dialog:Hme,Empty:qme,Loading:Kme});function Gme(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Yme(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function aU(e){let t=y.useRef(e);return Rh(()=>{t.current=e}),t}var Rh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Gf(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function xg(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Gc(e){let t=t5(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function uU(e,t,n){let r=y.useRef(),i=bg();return Rh(()=>{var o;let a=(()=>{var u;for(let s of n){if(typeof s=="string")return s.trim().toLowerCase();if(typeof s=="object"&&"current"in s)return s.current?(u=s.current.textContent)==null?void 0:u.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Gu,a),r.current=a}),r}var Zme=()=>{let[e,t]=y.useState(),n=Gf(()=>new Map);return Rh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Xme={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** +`)},Sme=0,Bf=[];function Cme(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(Sme++)[0],o=y.useState(function(){return SA()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Kj([e.lockRef.current],(e.shards||[]).map($R),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var w=Jm(m),x=n.current,S="deltaX"in m?m.deltaX:x[0]-w[0],A="deltaY"in m?m.deltaY:x[1]-w[1],E,C=m.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in m&&T==="h"&&C.type==="range")return!1;var M=RR(T,C);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=RR(T,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return xme(F,b,m,F==="h"?S:A,!0)},[]),s=y.useCallback(function(m){var b=m;if(!(!Bf.length||Bf[Bf.length-1]!==o)){var w="deltaY"in b?DR(b):Jm(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&wme(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map($R).filter(Boolean).filter(function(E){return E.contains(b.target)}),A=S.length>0?u(b,S[0]):!a.current.noIsolation;A&&b.preventDefault()}}},[]),l=y.useCallback(function(m,b,w,x){var S={name:m,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),c=y.useCallback(function(m){n.current=Jm(m),r.current=void 0},[]),d=y.useCallback(function(m){l(m.type,DR(m),m.target,u(m,e.lockRef.current))},[]),h=y.useCallback(function(m){l(m.type,Jm(m),m.target,u(m,e.lockRef.current))},[]);y.useEffect(function(){return Bf.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,jf),document.addEventListener("touchmove",s,jf),document.addEventListener("touchstart",c,jf),function(){Bf=Bf.filter(function(m){return m!==o}),document.removeEventListener("wheel",s,jf),document.removeEventListener("touchmove",s,jf),document.removeEventListener("touchstart",c,jf)}},[]);var v=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(o,{styles:_me(i)}):null,v?y.createElement(pme,{gapMode:"margin"}):null)}const Eme=Zj(Gz,Cme);var Xz=y.forwardRef(function(e,t){return y.createElement(tw,Ri({},e,{ref:t,sideCar:Eme}))});Xz.classNames=tw.classNames;const Qz="Dialog",[Jz,FGe]=Pge(Qz),[Ame,cf]=Jz(Qz),Pme=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,u=y.useRef(null),s=y.useRef(null),[l=!1,c]=Rge({prop:r,defaultProp:i,onChange:o});return y.createElement(Ame,{scope:t,triggerRef:u,contentRef:s,contentId:cS(),titleId:cS(),descriptionId:cS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:a},n)},eU="DialogPortal",[Ome,tU]=Jz(eU,{forceMount:void 0}),kme=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=cf(eU,t);return y.createElement(Ome,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(ew,{present:n||o.open},y.createElement(Jge,{asChild:!0,container:i},a))))},QC="DialogOverlay",Tme=y.forwardRef((e,t)=>{const n=tU(QC,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(QC,e.__scopeDialog);return o.modal?y.createElement(ew,{present:r||o.open},y.createElement(Mme,fr({},i,{ref:t}))):null}),Mme=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cf(QC,n);return y.createElement(Xz,{as:JA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(Jx.div,fr({"data-state":rU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),uv="DialogContent",Rme=y.forwardRef((e,t)=>{const n=tU(uv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=cf(uv,e.__scopeDialog);return y.createElement(ew,{present:r||o.open},o.modal?y.createElement(Dme,fr({},i,{ref:t})):y.createElement($me,fr({},i,{ref:t})))}),Dme=y.forwardRef((e,t)=>{const n=cf(uv,e.__scopeDialog),r=y.useRef(null),i=bg(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return dg(o)},[]),y.createElement(nU,fr({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sd(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Sd(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&o.preventDefault()}),onFocusOutside:Sd(e.onFocusOutside,o=>o.preventDefault())}))}),$me=y.forwardRef((e,t)=>{const n=cf(uv,e.__scopeDialog),r=y.useRef(!1);return y.createElement(nU,fr({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const u=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(u))&&i.preventDefault()}}))}),nU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,u=cf(uv,n),s=y.useRef(null),l=bg(t,s);return nme(),y.createElement(y.Fragment,null,y.createElement(qge,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement(Wge,fr({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":rU(u.open)},a,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)});function rU(e){return e?"open":"closed"}const Ime=Pme,Nme=kme,Fme=Tme,Lme=Rme;var jme='[cmdk-list-sizer=""]',kp='[cmdk-group=""]',mS='[cmdk-group-items=""]',Bme='[cmdk-group-heading=""]',t5='[cmdk-item=""]',IR=`${t5}:not([aria-disabled="true"])`,JC="cmdk-item-select",Gu="data-value",zme=(e,t)=>Ege(e,t),iU=y.createContext(void 0),xg=()=>y.useContext(iU),oU=y.createContext(void 0),n5=()=>y.useContext(oU),aU=y.createContext(void 0),uU=y.forwardRef((e,t)=>{let n=y.useRef(null),r=Gf(()=>{var Y,ue,Q;return{search:"",value:(Q=(ue=e.value)!=null?ue:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=Gf(()=>new Set),o=Gf(()=>new Map),a=Gf(()=>new Map),u=Gf(()=>new Set),s=sU(e),{label:l,children:c,value:d,onValueChange:h,filter:v,shouldFilter:g,vimBindings:m=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),A=Qme();Dh(()=>{if(d!==void 0){let Y=d.trim().toLowerCase();r.current.value=Y,A(6,H),E.emit()}},[d]);let E=y.useMemo(()=>({subscribe:Y=>(u.current.add(Y),()=>u.current.delete(Y)),snapshot:()=>r.current,setState:(Y,ue,Q)=>{var J,se,de;if(!Object.is(r.current[Y],ue)){if(r.current[Y]=ue,Y==="search")U(),M(),A(1,F);else if(Y==="value")if(((J=s.current)==null?void 0:J.value)!==void 0){let Se=ue??"";(de=(se=s.current).onValueChange)==null||de.call(se,Se);return}else Q||A(5,H);E.emit()}},emit:()=>{u.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,ue)=>{ue!==a.current.get(Y)&&(a.current.set(Y,ue),r.current.filtered.items.set(Y,T(ue)),A(2,()=>{M(),E.emit()}))},item:(Y,ue)=>(i.current.add(Y),ue&&(o.current.has(ue)?o.current.get(ue).add(Y):o.current.set(ue,new Set([Y]))),A(3,()=>{U(),M(),r.current.value||F(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=W();A(4,()=>{U(),Q?.getAttribute("id")===Y&&F(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function T(Y){var ue,Q;let J=(Q=(ue=s.current)==null?void 0:ue.filter)!=null?Q:zme;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||s.current.shouldFilter===!1)return;let Y=r.current.filtered.items,ue=[];r.current.filtered.groups.forEach(J=>{let se=o.current.get(J),de=0;se.forEach(Se=>{let ge=Y.get(Se);de=Math.max(ge,de)}),ue.push([J,de])});let Q=n.current.querySelector(jme);ie().sort((J,se)=>{var de,Se;let ge=J.getAttribute(Gu),Ze=se.getAttribute(Gu);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(ge))!=null?Se:0)}).forEach(J=>{let se=J.closest(mS);se?se.appendChild(J.parentElement===se?J:J.closest(`${mS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${mS} > *`))}),ue.sort((J,se)=>se[1]-J[1]).forEach(J=>{let se=n.current.querySelector(`${kp}[${Gu}="${J[0]}"]`);se?.parentElement.appendChild(se)})}function F(){let Y=ie().find(Q=>!Q.ariaDisabled),ue=Y?.getAttribute(Gu);E.setState("value",ue||void 0)}function U(){if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let ue of i.current){let Q=a.current.get(ue),J=T(Q);r.current.filtered.items.set(ue,J),J>0&&Y++}for(let[ue,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(ue);break}r.current.filtered.count=Y}function H(){var Y,ue,Q;let J=W();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(ue=J.closest(kp))==null?void 0:ue.querySelector(Bme))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function W(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${t5}[aria-selected="true"]`)}function ie(){return Array.from(n.current.querySelectorAll(IR))}function Z(Y){let ue=ie()[Y];ue&&E.setState("value",ue.getAttribute(Gu))}function G(Y){var ue;let Q=W(),J=ie(),se=J.findIndex(Se=>Se===Q),de=J[se+Y];(ue=s.current)!=null&&ue.loop&&(de=se+Y<0?J[J.length-1]:se+Y===J.length?J[0]:J[se+Y]),de&&E.setState("value",de.getAttribute(Gu))}function K(Y){let ue=W(),Q=ue?.closest(kp),J;for(;Q&&!J;)Q=Y>0?Zme(Q,kp):Xme(Q,kp),J=Q?.querySelector(IR);J?E.setState("value",J.getAttribute(Gu)):G(Y)}let V=()=>Z(ie().length-1),B=Y=>{Y.preventDefault(),Y.metaKey?V():Y.altKey?K(1):G(1)},q=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?K(-1):G(-1)};return y.createElement("div",{ref:wg([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var ue;if((ue=b.onKeyDown)==null||ue.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{m&&Y.ctrlKey&&B(Y);break}case"ArrowDown":{B(Y);break}case"p":case"k":{m&&Y.ctrlKey&&q(Y);break}case"ArrowUp":{q(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),V();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=W();if(Q){let J=new Event(JC);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:Jme},l),y.createElement(oU.Provider,{value:E},y.createElement(iU.Provider,{value:C},c)))}),Ume=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(aU),u=xg(),s=sU(e),l=(r=(n=s.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Dh(()=>u.item(i,a?.id),[]);let c=lU(i,o,[e.value,e.children,o]),d=n5(),h=Gc(E=>E.value&&E.value===c.current),v=Gc(E=>l||u.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(JC,g),()=>E.removeEventListener(JC,g)},[v,e.onSelect,e.disabled]);function g(){var E,C;m(),(C=(E=s.current).onSelect)==null||C.call(E,c.current)}function m(){d.setState("value",c.current,!0)}if(!v)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...A}=e;return y.createElement("div",{ref:wg([o,t]),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:m,onClick:b?void 0:g},e.children)}),Wme=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),u=y.useRef(null),s=y.useRef(null),l=y.useId(),c=xg(),d=Gc(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Dh(()=>c.group(a),[]),lU(a,u,[e.value,e.heading,s]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),v=y.createElement(aU.Provider,{value:h},r);return y.createElement("div",{ref:wg([u,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v))}),Vme=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Gc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:wg([i,t]),...r,"cmdk-separator":"",role:"separator"})}),Hme=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=n5(),a=Gc(c=>c.search),u=Gc(c=>c.value),s=xg(),l=y.useMemo(()=>{var c;let d=(c=s.commandRef.current)==null?void 0:c.querySelector(`${t5}[${Gu}="${u}"]`);return d?.getAttribute("id")},[u,s.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),qme=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=xg();return y.useEffect(()=>{if(o.current&&i.current){let u=o.current,s=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let d=u.offsetHeight;s.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(u),()=>{cancelAnimationFrame(l),c.unobserve(u)}}},[]),y.createElement("div",{ref:wg([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),Kme=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...u}=e;return y.createElement(Ime,{open:n,onOpenChange:r},y.createElement(Nme,{container:a},y.createElement(Fme,{"cmdk-overlay":"",className:i}),y.createElement(Lme,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(uU,{ref:t,...u}))))}),Gme=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Gc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Yme=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),LGe=Object.assign(uU,{List:qme,Item:Ume,Input:Hme,Group:Wme,Separator:Vme,Dialog:Kme,Empty:Gme,Loading:Yme});function Zme(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Xme(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sU(e){let t=y.useRef(e);return Dh(()=>{t.current=e}),t}var Dh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Gf(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function wg(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Gc(e){let t=n5(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function lU(e,t,n){let r=y.useRef(),i=xg();return Dh(()=>{var o;let a=(()=>{var u;for(let s of n){if(typeof s=="string")return s.trim().toLowerCase();if(typeof s=="object"&&"current"in s)return s.current?(u=s.current.textContent)==null?void 0:u.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Gu,a),r.current=a}),r}var Qme=()=>{let[e,t]=y.useState(),n=Gf(()=>new Map);return Dh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},Jme={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Qme=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sU=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + */const eye=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cU=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Jme={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var tye={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eye=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},s)=>y.createElement("svg",{ref:s,...Jme,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sU("lucide",i),...u},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** + */const nye=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},s)=>y.createElement("svg",{ref:s,...tye,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cU("lucide",i),...u},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const on=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(eye,{ref:o,iconNode:t,className:sU(`lucide-${Qme(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + */const on=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(nye,{ref:o,iconNode:t,className:cU(`lucide-${eye(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FGe=on("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const jGe=on("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LGe=on("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** + */const BGe=on("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jGe=on("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const zGe=on("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BGe=on("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** + */const UGe=on("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zGe=on("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + */const WGe=on("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UGe=on("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const VGe=on("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WGe=on("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + */const HGe=on("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VGe=on("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const qGe=on("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HGe=on("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const KGe=on("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qGe=on("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const GGe=on("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KGe=on("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const YGe=on("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GGe=on("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const ZGe=on("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YGe=on("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const XGe=on("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZGe=on("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + */const QGe=on("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XGe=on("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const JGe=on("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QGe=on("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const eYe=on("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JGe=on("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const tYe=on("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eYe=on("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + */const nYe=on("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tYe=on("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const rYe=on("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nYe=on("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + */const iYe=on("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rYe=on("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const oYe=on("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iYe=on("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const aYe=on("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oYe=on("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const uYe=on("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aYe=on("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const sYe=on("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uYe=on("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const lYe=on("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sYe=on("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const cYe=on("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lYe=on("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const fYe=on("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cYe=on("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + */const dYe=on("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fYe=on("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** + */const hYe=on("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dYe=on("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const pYe=on("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hYe=on("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + */const vYe=on("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pYe=on("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** + */const gYe=on("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vYe=on("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const mYe=on("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gYe=on("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + */const yYe=on("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mYe=on("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + */const bYe=on("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yYe=on("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + */const xYe=on("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bYe=on("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var n5="Avatar",[tye,xYe]=mi(n5),[nye,lU]=tye(n5),cU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(nye,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});cU.displayName=n5;var fU="AvatarImage",dU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=lU(fU,n),u=rye(r,o.referrerPolicy),s=Wr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ri(()=>{u!=="idle"&&s(u)},[u,s]),u==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});dU.displayName=fU;var hU="AvatarFallback",pU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=lU(hU,n),[a,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(s)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});pU.displayName=hU;function rye(e,t){const[n,r]=y.useState("idle");return ri(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=u=>()=>{i&&r(u)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var wYe=cU,_Ye=dU,SYe=pU,iye=Array.isArray,vo=iye,oye=typeof ua=="object"&&ua&&ua.Object===Object&&ua,vU=oye,aye=vU,uye=typeof self=="object"&&self&&self.Object===Object&&self,sye=aye||uye||Function("return this")(),ku=sye,lye=ku,cye=lye.Symbol,wg=cye,IR=wg,gU=Object.prototype,fye=gU.hasOwnProperty,dye=gU.toString,kp=IR?IR.toStringTag:void 0;function hye(e){var t=fye.call(e,kp),n=e[kp];try{e[kp]=void 0;var r=!0}catch{}var i=dye.call(e);return r&&(t?e[kp]=n:delete e[kp]),i}var pye=hye,vye=Object.prototype,gye=vye.toString;function mye(e){return gye.call(e)}var yye=mye,NR=wg,bye=pye,xye=yye,wye="[object Null]",_ye="[object Undefined]",FR=NR?NR.toStringTag:void 0;function Sye(e){return e==null?e===void 0?_ye:wye:FR&&FR in Object(e)?bye(e):xye(e)}var As=Sye;function Cye(e){return e!=null&&typeof e=="object"}var Os=Cye,Eye=As,Aye=Os,Oye="[object Symbol]";function Pye(e){return typeof e=="symbol"||Aye(e)&&Eye(e)==Oye}var Dh=Pye,kye=vo,Tye=Dh,Mye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rye=/^\w*$/;function Dye(e,t){if(kye(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Tye(e)?!0:Rye.test(e)||!Mye.test(e)||t!=null&&e in Object(t)}var r5=Dye;function $ye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ll=$ye;const $h=On(Ll);var Iye=As,Nye=Ll,Fye="[object AsyncFunction]",Lye="[object Function]",jye="[object GeneratorFunction]",Bye="[object Proxy]";function zye(e){if(!Nye(e))return!1;var t=Iye(e);return t==Lye||t==jye||t==Fye||t==Bye}var i5=zye;const Wt=On(i5);var Uye=ku,Wye=Uye["__core-js_shared__"],Vye=Wye,yS=Vye,LR=function(){var e=/[^.]+$/.exec(yS&&yS.keys&&yS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Hye(e){return!!LR&&LR in e}var qye=Hye,Kye=Function.prototype,Gye=Kye.toString;function Yye(e){if(e!=null){try{return Gye.call(e)}catch{}try{return e+""}catch{}}return""}var mU=Yye,Zye=i5,Xye=qye,Qye=Ll,Jye=mU,e1e=/[\\^$.*+?()[\]{}|]/g,t1e=/^\[object .+?Constructor\]$/,n1e=Function.prototype,r1e=Object.prototype,i1e=n1e.toString,o1e=r1e.hasOwnProperty,a1e=RegExp("^"+i1e.call(o1e).replace(e1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u1e(e){if(!Qye(e)||Xye(e))return!1;var t=Zye(e)?a1e:t1e;return t.test(Jye(e))}var s1e=u1e;function l1e(e,t){return e?.[t]}var c1e=l1e,f1e=s1e,d1e=c1e;function h1e(e,t){var n=d1e(e,t);return f1e(n)?n:void 0}var ff=h1e,p1e=ff,v1e=p1e(Object,"create"),nw=v1e,jR=nw;function g1e(){this.__data__=jR?jR(null):{},this.size=0}var m1e=g1e;function y1e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var b1e=y1e,x1e=nw,w1e="__lodash_hash_undefined__",_1e=Object.prototype,S1e=_1e.hasOwnProperty;function C1e(e){var t=this.__data__;if(x1e){var n=t[e];return n===w1e?void 0:n}return S1e.call(t,e)?t[e]:void 0}var E1e=C1e,A1e=nw,O1e=Object.prototype,P1e=O1e.hasOwnProperty;function k1e(e){var t=this.__data__;return A1e?t[e]!==void 0:P1e.call(t,e)}var T1e=k1e,M1e=nw,R1e="__lodash_hash_undefined__";function D1e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=M1e&&t===void 0?R1e:t,this}var $1e=D1e,I1e=m1e,N1e=b1e,F1e=E1e,L1e=T1e,j1e=$1e;function Ih(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var nbe=tbe,rbe=rw;function ibe(e,t){var n=this.__data__,r=rbe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var obe=ibe,abe=U1e,ube=Z1e,sbe=J1e,lbe=nbe,cbe=obe;function Nh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(iye,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});dU.displayName=r5;var hU="AvatarImage",pU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=fU(hU,n),u=oye(r,o.referrerPolicy),s=Wr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{u!=="idle"&&s(u)},[u,s]),u==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});pU.displayName=hU;var vU="AvatarFallback",gU=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=fU(vU,n),[a,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(s)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});gU.displayName=vU;function oye(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=u=>()=>{i&&r(u)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var SYe=dU,CYe=pU,EYe=gU,aye=Array.isArray,vo=aye,uye=typeof ua=="object"&&ua&&ua.Object===Object&&ua,mU=uye,sye=mU,lye=typeof self=="object"&&self&&self.Object===Object&&self,cye=sye||lye||Function("return this")(),ku=cye,fye=ku,dye=fye.Symbol,_g=dye,NR=_g,yU=Object.prototype,hye=yU.hasOwnProperty,pye=yU.toString,Tp=NR?NR.toStringTag:void 0;function vye(e){var t=hye.call(e,Tp),n=e[Tp];try{e[Tp]=void 0;var r=!0}catch{}var i=pye.call(e);return r&&(t?e[Tp]=n:delete e[Tp]),i}var gye=vye,mye=Object.prototype,yye=mye.toString;function bye(e){return yye.call(e)}var xye=bye,FR=_g,wye=gye,_ye=xye,Sye="[object Null]",Cye="[object Undefined]",LR=FR?FR.toStringTag:void 0;function Eye(e){return e==null?e===void 0?Cye:Sye:LR&&LR in Object(e)?wye(e):_ye(e)}var As=Eye;function Aye(e){return e!=null&&typeof e=="object"}var Ps=Aye,Pye=As,Oye=Ps,kye="[object Symbol]";function Tye(e){return typeof e=="symbol"||Oye(e)&&Pye(e)==kye}var $h=Tye,Mye=vo,Rye=$h,Dye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$ye=/^\w*$/;function Iye(e,t){if(Mye(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Rye(e)?!0:$ye.test(e)||!Dye.test(e)||t!=null&&e in Object(t)}var i5=Iye;function Nye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ll=Nye;const Ih=Pn(Ll);var Fye=As,Lye=Ll,jye="[object AsyncFunction]",Bye="[object Function]",zye="[object GeneratorFunction]",Uye="[object Proxy]";function Wye(e){if(!Lye(e))return!1;var t=Fye(e);return t==Bye||t==zye||t==jye||t==Uye}var o5=Wye;const Wt=Pn(o5);var Vye=ku,Hye=Vye["__core-js_shared__"],qye=Hye,yS=qye,jR=function(){var e=/[^.]+$/.exec(yS&&yS.keys&&yS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Kye(e){return!!jR&&jR in e}var Gye=Kye,Yye=Function.prototype,Zye=Yye.toString;function Xye(e){if(e!=null){try{return Zye.call(e)}catch{}try{return e+""}catch{}}return""}var bU=Xye,Qye=o5,Jye=Gye,e1e=Ll,t1e=bU,n1e=/[\\^$.*+?()[\]{}|]/g,r1e=/^\[object .+?Constructor\]$/,i1e=Function.prototype,o1e=Object.prototype,a1e=i1e.toString,u1e=o1e.hasOwnProperty,s1e=RegExp("^"+a1e.call(u1e).replace(n1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l1e(e){if(!e1e(e)||Jye(e))return!1;var t=Qye(e)?s1e:r1e;return t.test(t1e(e))}var c1e=l1e;function f1e(e,t){return e?.[t]}var d1e=f1e,h1e=c1e,p1e=d1e;function v1e(e,t){var n=p1e(e,t);return h1e(n)?n:void 0}var ff=v1e,g1e=ff,m1e=g1e(Object,"create"),nw=m1e,BR=nw;function y1e(){this.__data__=BR?BR(null):{},this.size=0}var b1e=y1e;function x1e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var w1e=x1e,_1e=nw,S1e="__lodash_hash_undefined__",C1e=Object.prototype,E1e=C1e.hasOwnProperty;function A1e(e){var t=this.__data__;if(_1e){var n=t[e];return n===S1e?void 0:n}return E1e.call(t,e)?t[e]:void 0}var P1e=A1e,O1e=nw,k1e=Object.prototype,T1e=k1e.hasOwnProperty;function M1e(e){var t=this.__data__;return O1e?t[e]!==void 0:T1e.call(t,e)}var R1e=M1e,D1e=nw,$1e="__lodash_hash_undefined__";function I1e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=D1e&&t===void 0?$1e:t,this}var N1e=I1e,F1e=b1e,L1e=w1e,j1e=P1e,B1e=R1e,z1e=N1e;function Nh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var ibe=rbe,obe=rw;function abe(e,t){var n=this.__data__,r=obe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ube=abe,sbe=V1e,lbe=Q1e,cbe=tbe,fbe=ibe,dbe=ube;function Fh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},bc=function(t){return _g(t)&&t.indexOf("%")===t.length-1},Ke=function(t){return Rxe(t)&&!Lh(t)},Hr=function(t){return Ke(t)||_g(t)},Nxe=0,df=function(t){var n=++Nxe;return"".concat(t||"").concat(n)},Yc=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&!_g(t))return r;var o;if(bc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Lh(o)&&(o=r),i&&o>n&&(o=n),o},Js=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Fxe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tE(e){"@babel/helpers - typeof";return tE=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},tE(e)}var qR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},us=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},KR=null,xS=null,p5=function e(t){if(t===KR&&Array.isArray(xS))return xS;var n=[];return y.Children.forEach(t,function(r){zt(r)||(Oxe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),xS=n,KR=t,n};function fo(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return us(i)}):r=[us(t)],p5(e).forEach(function(i){var o=da(i,"type.displayName")||da(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Po(e,t){var n=fo(e,t);return n[0]}var GR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ke(r)||r<=0||!Ke(i)||i<=0)},Hxe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],qxe=function(t){return t&&t.type&&_g(t.type)&&Hxe.indexOf(t.type)>=0},OU=function(t){return t&&tE(t)==="object"&&"clipDot"in t},Kxe=function(t,n,r,i){var o,a=(o=bS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||Bxe.includes(n))||r&&h5.includes(n)},Bt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!$h(i))return null;var o={};return Object.keys(i).forEach(function(a){var u;Kxe((u=i)===null||u===void 0?void 0:u[a],a,n,r)&&(o[a]=i[a])}),o},nE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return YR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,u=e.title,s=e.desc,l=Xxe(e,Zxe),c=i||{width:n,height:r,x:0,y:0},d=fn("recharts-surface",o);return j.createElement("svg",rE({},Bt(l,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),j.createElement("title",null,u),j.createElement("desc",null,s),t)}var Jxe=["children","className"];function oE(){return oE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function twe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Sn=j.forwardRef(function(e,t){var n=e.children,r=e.className,i=ewe(e,Jxe),o=fn("recharts-layer",r);return j.createElement("g",oE({className:o},Bt(i,!0),{ref:t}),n)}),ss=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:iwe(e,t,n)}var awe=owe,uwe="\\ud800-\\udfff",swe="\\u0300-\\u036f",lwe="\\ufe20-\\ufe2f",cwe="\\u20d0-\\u20ff",fwe=swe+lwe+cwe,dwe="\\ufe0e\\ufe0f",hwe="\\u200d",pwe=RegExp("["+hwe+uwe+fwe+dwe+"]");function vwe(e){return pwe.test(e)}var PU=vwe;function gwe(e){return e.split("")}var mwe=gwe,kU="\\ud800-\\udfff",ywe="\\u0300-\\u036f",bwe="\\ufe20-\\ufe2f",xwe="\\u20d0-\\u20ff",wwe=ywe+bwe+xwe,_we="\\ufe0e\\ufe0f",Swe="["+kU+"]",aE="["+wwe+"]",uE="\\ud83c[\\udffb-\\udfff]",Cwe="(?:"+aE+"|"+uE+")",TU="[^"+kU+"]",MU="(?:\\ud83c[\\udde6-\\uddff]){2}",RU="[\\ud800-\\udbff][\\udc00-\\udfff]",Ewe="\\u200d",DU=Cwe+"?",$U="["+_we+"]?",Awe="(?:"+Ewe+"(?:"+[TU,MU,RU].join("|")+")"+$U+DU+")*",Owe=$U+DU+Awe,Pwe="(?:"+[TU+aE+"?",aE,MU,RU,Swe].join("|")+")",kwe=RegExp(uE+"(?="+uE+")|"+Pwe+Owe,"g");function Twe(e){return e.match(kwe)||[]}var Mwe=Twe,Rwe=mwe,Dwe=PU,$we=Mwe;function Iwe(e){return Dwe(e)?$we(e):Rwe(e)}var Nwe=Iwe,Fwe=awe,Lwe=PU,jwe=Nwe,Bwe=wU;function zwe(e){return function(t){t=Bwe(t);var n=Lwe(t)?jwe(t):void 0,r=n?n[0]:t.charAt(0),i=n?Fwe(n,1).join(""):t.slice(1);return r[e]()+i}}var Uwe=zwe,Wwe=Uwe,Vwe=Wwe("toUpperCase"),Hwe=Vwe;const mw=On(Hwe);function Un(e){return function(){return e}}const IU=Math.cos,Z1=Math.sin,tu=Math.sqrt,X1=Math.PI,yw=2*X1,sE=Math.PI,lE=2*sE,uc=1e-6,qwe=lE-uc;function NU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NU;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iuc)if(!(Math.abs(d*s-l*c)>uc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-u,m=s*s+l*l,b=v*v+g*g,w=Math.sqrt(m),x=Math.sqrt(h),S=o*Math.tan((sE-Math.acos((m+h-b)/(2*w*x)))/2),A=S/x,E=S/w;Math.abs(A-1)>uc&&this._append`L${t+A*c},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*v>c*g)},${this._x1=t+E*s},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),s=r*Math.sin(i),l=t+u,c=n+s,d=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>uc||Math.abs(this._y1-c)>uc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%lE+lE),h>qwe?this._append`A${r},${r},0,1,${d},${t-u},${n-s}A${r},${r},0,1,${d},${this._x1=l},${this._y1=c}`:h>uc&&this._append`A${r},${r},0,${+(h>=sE)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function v5(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 Gwe(t)}function g5(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FU(e){this._context=e}FU.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 bw(e){return new FU(e)}function LU(e){return e[0]}function jU(e){return e[1]}function BU(e,t){var n=Un(!0),r=null,i=bw,o=null,a=v5(u);e=typeof e=="function"?e:e===void 0?LU:Un(e),t=typeof t=="function"?t:t===void 0?jU:Un(t);function u(s){var l,c=(s=g5(s)).length,d,h=!1,v;for(r==null&&(o=i(v=a())),l=0;l<=c;++l)!(l=v;--g)u.point(S[g],A[g]);u.lineEnd(),u.areaEnd()}w&&(S[h]=+e(b,h,d),A[h]=+t(b,h,d),u.point(r?+r(b,h,d):S[h],n?+n(b,h,d):A[h]))}if(x)return u=null,x+""||null}function c(){return BU().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Un(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Un(+d),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Un(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(u=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=u=null:u=a(o=d),l):o},l}class zU{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Ywe(e){return new zU(e,!0)}function Zwe(e){return new zU(e,!1)}const m5={draw(e,t){const n=tu(t/X1);e.moveTo(n,0),e.arc(0,0,n,0,yw)}},Xwe={draw(e,t){const n=tu(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},UU=tu(1/3),Qwe=UU*2,Jwe={draw(e,t){const n=tu(t/Qwe),r=n*UU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},e2e={draw(e,t){const n=tu(t),r=-n/2;e.rect(r,r,n,n)}},t2e=.8908130915292852,WU=Z1(X1/10)/Z1(7*X1/10),n2e=Z1(yw/10)*WU,r2e=-IU(yw/10)*WU,i2e={draw(e,t){const n=tu(t*t2e),r=n2e*n,i=r2e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=yw*o/5,u=IU(a),s=Z1(a);e.lineTo(s*n,-u*n),e.lineTo(u*r-s*i,s*r+u*i)}e.closePath()}},wS=tu(3),o2e={draw(e,t){const n=-tu(t/(wS*3));e.moveTo(0,n*2),e.lineTo(-wS*n,-n),e.lineTo(wS*n,-n),e.closePath()}},Jo=-.5,ea=tu(3)/2,cE=1/tu(12),a2e=(cE/2+1)*3,u2e={draw(e,t){const n=tu(t/a2e),r=n/2,i=n*cE,o=r,a=n*cE+n,u=-o,s=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,s),e.lineTo(Jo*r-ea*i,ea*r+Jo*i),e.lineTo(Jo*o-ea*a,ea*o+Jo*a),e.lineTo(Jo*u-ea*s,ea*u+Jo*s),e.lineTo(Jo*r+ea*i,Jo*i-ea*r),e.lineTo(Jo*o+ea*a,Jo*a-ea*o),e.lineTo(Jo*u+ea*s,Jo*s-ea*u),e.closePath()}};function s2e(e,t){let n=null,r=v5(i);e=typeof e=="function"?e:Un(e||m5),t=typeof t=="function"?t:Un(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Un(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Un(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Q1(){}function J1(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function VU(e){this._context=e}VU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:J1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function l2e(e){return new VU(e)}function HU(e){this._context=e}HU.prototype={areaStart:Q1,areaEnd:Q1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function c2e(e){return new HU(e)}function qU(e){this._context=e}qU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:J1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function f2e(e){return new qU(e)}function KU(e){this._context=e}KU.prototype={areaStart:Q1,areaEnd:Q1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function d2e(e){return new KU(e)}function XR(e){return e<0?-1:1}function QR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(XR(o)+XR(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function JR(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,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function eb(e){this._context=e}eb.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,JR(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,JR(this,n=QR(this,e,t)),n);break;default:_S(this,this._t0,n=QR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function GU(e){this._context=new YU(e)}(GU.prototype=Object.create(eb.prototype)).point=function(e,t){eb.prototype.point.call(this,t,e)};function YU(e){this._context=e}YU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function h2e(e){return new eb(e)}function p2e(e){return new GU(e)}function ZU(e){this._context=e}ZU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=e9(e),i=e9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,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:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function g2e(e){return new xw(e,.5)}function m2e(e){return new xw(e,0)}function y2e(e){return new xw(e,1)}function Hd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,u=o.length;n=0;)n[t]=t;return n}function b2e(e,t){return e[t]}function x2e(e){const t=[];return t.key=e,t}function w2e(){var e=Un([]),t=fE,n=Hd,r=b2e;function i(o){var a=Array.from(e.apply(this,arguments),x2e),u,s=a.length,l=-1,c;for(const d of o)for(u=0,++l;u0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XU={symbolCircle:m5,symbolCross:Xwe,symbolDiamond:Jwe,symbolSquare:e2e,symbolStar:i2e,symbolTriangle:o2e,symbolWye:u2e},M2e=Math.PI/180,R2e=function(t){var n="symbol".concat(mw(t));return XU[n]||m5},D2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*M2e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},$2e=function(t,n){XU["symbol".concat(mw(t))]=n},ww=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,u=a===void 0?"area":a,s=k2e(t,E2e),l=n9(n9({},s),{},{type:r,size:o,sizeType:u}),c=function(){var b=R2e(r),w=s2e().type(b).size(D2e(o,u,r));return w()},d=l.className,h=l.cx,v=l.cy,g=Bt(l,!0);return h===+h&&v===+v&&o===+o?j.createElement("path",dE({},g,{className:fn("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(v,")"),d:c()})):null};ww.registerSymbol=$2e;function qd(e){"@babel/helpers - typeof";return qd=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},qd(e)}function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},bc=function(t){return Sg(t)&&t.indexOf("%")===t.length-1},Ke=function(t){return $xe(t)&&!jh(t)},Hr=function(t){return Ke(t)||Sg(t)},Lxe=0,df=function(t){var n=++Lxe;return"".concat(t||"").concat(n)},Yc=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&!Sg(t))return r;var o;if(bc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return jh(o)&&(o=r),i&&o>n&&(o=n),o},Js=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},jxe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tE(e){"@babel/helpers - typeof";return tE=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},tE(e)}var KR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},us=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},GR=null,xS=null,v5=function e(t){if(t===GR&&Array.isArray(xS))return xS;var n=[];return y.Children.forEach(t,function(r){zt(r)||(kxe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),xS=n,GR=t,n};function fo(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return us(i)}):r=[us(t)],v5(e).forEach(function(i){var o=da(i,"type.displayName")||da(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Oo(e,t){var n=fo(e,t);return n[0]}var YR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ke(r)||r<=0||!Ke(i)||i<=0)},Kxe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Gxe=function(t){return t&&t.type&&Sg(t.type)&&Kxe.indexOf(t.type)>=0},kU=function(t){return t&&tE(t)==="object"&&"clipDot"in t},Yxe=function(t,n,r,i){var o,a=(o=bS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||Uxe.includes(n))||r&&p5.includes(n)},Bt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Ih(i))return null;var o={};return Object.keys(i).forEach(function(a){var u;Yxe((u=i)===null||u===void 0?void 0:u[a],a,n,r)&&(o[a]=i[a])}),o},nE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return ZR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ewe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,u=e.title,s=e.desc,l=Jxe(e,Qxe),c=i||{width:n,height:r,x:0,y:0},d=fn("recharts-surface",o);return j.createElement("svg",rE({},Bt(l,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),j.createElement("title",null,u),j.createElement("desc",null,s),t)}var twe=["children","className"];function oE(){return oE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Sn=j.forwardRef(function(e,t){var n=e.children,r=e.className,i=nwe(e,twe),o=fn("recharts-layer",r);return j.createElement("g",oE({className:o},Bt(i,!0),{ref:t}),n)}),ss=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:awe(e,t,n)}var swe=uwe,lwe="\\ud800-\\udfff",cwe="\\u0300-\\u036f",fwe="\\ufe20-\\ufe2f",dwe="\\u20d0-\\u20ff",hwe=cwe+fwe+dwe,pwe="\\ufe0e\\ufe0f",vwe="\\u200d",gwe=RegExp("["+vwe+lwe+hwe+pwe+"]");function mwe(e){return gwe.test(e)}var TU=mwe;function ywe(e){return e.split("")}var bwe=ywe,MU="\\ud800-\\udfff",xwe="\\u0300-\\u036f",wwe="\\ufe20-\\ufe2f",_we="\\u20d0-\\u20ff",Swe=xwe+wwe+_we,Cwe="\\ufe0e\\ufe0f",Ewe="["+MU+"]",aE="["+Swe+"]",uE="\\ud83c[\\udffb-\\udfff]",Awe="(?:"+aE+"|"+uE+")",RU="[^"+MU+"]",DU="(?:\\ud83c[\\udde6-\\uddff]){2}",$U="[\\ud800-\\udbff][\\udc00-\\udfff]",Pwe="\\u200d",IU=Awe+"?",NU="["+Cwe+"]?",Owe="(?:"+Pwe+"(?:"+[RU,DU,$U].join("|")+")"+NU+IU+")*",kwe=NU+IU+Owe,Twe="(?:"+[RU+aE+"?",aE,DU,$U,Ewe].join("|")+")",Mwe=RegExp(uE+"(?="+uE+")|"+Twe+kwe,"g");function Rwe(e){return e.match(Mwe)||[]}var Dwe=Rwe,$we=bwe,Iwe=TU,Nwe=Dwe;function Fwe(e){return Iwe(e)?Nwe(e):$we(e)}var Lwe=Fwe,jwe=swe,Bwe=TU,zwe=Lwe,Uwe=SU;function Wwe(e){return function(t){t=Uwe(t);var n=Bwe(t)?zwe(t):void 0,r=n?n[0]:t.charAt(0),i=n?jwe(n,1).join(""):t.slice(1);return r[e]()+i}}var Vwe=Wwe,Hwe=Vwe,qwe=Hwe("toUpperCase"),Kwe=qwe;const mw=Pn(Kwe);function Un(e){return function(){return e}}const FU=Math.cos,X1=Math.sin,tu=Math.sqrt,Q1=Math.PI,yw=2*Q1,sE=Math.PI,lE=2*sE,uc=1e-6,Gwe=lE-uc;function LU(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return LU;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iuc)if(!(Math.abs(d*s-l*c)>uc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-u,m=s*s+l*l,b=v*v+g*g,w=Math.sqrt(m),x=Math.sqrt(h),S=o*Math.tan((sE-Math.acos((m+h-b)/(2*w*x)))/2),A=S/x,E=S/w;Math.abs(A-1)>uc&&this._append`L${t+A*c},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*v>c*g)},${this._x1=t+E*s},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),s=r*Math.sin(i),l=t+u,c=n+s,d=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>uc||Math.abs(this._y1-c)>uc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%lE+lE),h>Gwe?this._append`A${r},${r},0,1,${d},${t-u},${n-s}A${r},${r},0,1,${d},${this._x1=l},${this._y1=c}`:h>uc&&this._append`A${r},${r},0,${+(h>=sE)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function g5(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 Zwe(t)}function m5(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jU(e){this._context=e}jU.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 bw(e){return new jU(e)}function BU(e){return e[0]}function zU(e){return e[1]}function UU(e,t){var n=Un(!0),r=null,i=bw,o=null,a=g5(u);e=typeof e=="function"?e:e===void 0?BU:Un(e),t=typeof t=="function"?t:t===void 0?zU:Un(t);function u(s){var l,c=(s=m5(s)).length,d,h=!1,v;for(r==null&&(o=i(v=a())),l=0;l<=c;++l)!(l=v;--g)u.point(S[g],A[g]);u.lineEnd(),u.areaEnd()}w&&(S[h]=+e(b,h,d),A[h]=+t(b,h,d),u.point(r?+r(b,h,d):S[h],n?+n(b,h,d):A[h]))}if(x)return u=null,x+""||null}function c(){return UU().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Un(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Un(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Un(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Un(+d),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Un(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(u=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=u=null:u=a(o=d),l):o},l}class WU{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Xwe(e){return new WU(e,!0)}function Qwe(e){return new WU(e,!1)}const y5={draw(e,t){const n=tu(t/Q1);e.moveTo(n,0),e.arc(0,0,n,0,yw)}},Jwe={draw(e,t){const n=tu(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},VU=tu(1/3),e2e=VU*2,t2e={draw(e,t){const n=tu(t/e2e),r=n*VU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},n2e={draw(e,t){const n=tu(t),r=-n/2;e.rect(r,r,n,n)}},r2e=.8908130915292852,HU=X1(Q1/10)/X1(7*Q1/10),i2e=X1(yw/10)*HU,o2e=-FU(yw/10)*HU,a2e={draw(e,t){const n=tu(t*r2e),r=i2e*n,i=o2e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=yw*o/5,u=FU(a),s=X1(a);e.lineTo(s*n,-u*n),e.lineTo(u*r-s*i,s*r+u*i)}e.closePath()}},wS=tu(3),u2e={draw(e,t){const n=-tu(t/(wS*3));e.moveTo(0,n*2),e.lineTo(-wS*n,-n),e.lineTo(wS*n,-n),e.closePath()}},Jo=-.5,ea=tu(3)/2,cE=1/tu(12),s2e=(cE/2+1)*3,l2e={draw(e,t){const n=tu(t/s2e),r=n/2,i=n*cE,o=r,a=n*cE+n,u=-o,s=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,s),e.lineTo(Jo*r-ea*i,ea*r+Jo*i),e.lineTo(Jo*o-ea*a,ea*o+Jo*a),e.lineTo(Jo*u-ea*s,ea*u+Jo*s),e.lineTo(Jo*r+ea*i,Jo*i-ea*r),e.lineTo(Jo*o+ea*a,Jo*a-ea*o),e.lineTo(Jo*u+ea*s,Jo*s-ea*u),e.closePath()}};function c2e(e,t){let n=null,r=g5(i);e=typeof e=="function"?e:Un(e||y5),t=typeof t=="function"?t:Un(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Un(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Un(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function J1(){}function eb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function qU(e){this._context=e}qU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:eb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function f2e(e){return new qU(e)}function KU(e){this._context=e}KU.prototype={areaStart:J1,areaEnd:J1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function d2e(e){return new KU(e)}function GU(e){this._context=e}GU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function h2e(e){return new GU(e)}function YU(e){this._context=e}YU.prototype={areaStart:J1,areaEnd:J1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function p2e(e){return new YU(e)}function QR(e){return e<0?-1:1}function JR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(QR(o)+QR(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function e9(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,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function tb(e){this._context=e}tb.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,e9(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,e9(this,n=JR(this,e,t)),n);break;default:_S(this,this._t0,n=JR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ZU(e){this._context=new XU(e)}(ZU.prototype=Object.create(tb.prototype)).point=function(e,t){tb.prototype.point.call(this,t,e)};function XU(e){this._context=e}XU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function v2e(e){return new tb(e)}function g2e(e){return new ZU(e)}function QU(e){this._context=e}QU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=t9(e),i=t9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,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:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function y2e(e){return new xw(e,.5)}function b2e(e){return new xw(e,0)}function x2e(e){return new xw(e,1)}function Hd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,u=o.length;n=0;)n[t]=t;return n}function w2e(e,t){return e[t]}function _2e(e){const t=[];return t.key=e,t}function S2e(){var e=Un([]),t=fE,n=Hd,r=w2e;function i(o){var a=Array.from(e.apply(this,arguments),_2e),u,s=a.length,l=-1,c;for(const d of o)for(u=0,++l;u0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var JU={symbolCircle:y5,symbolCross:Jwe,symbolDiamond:t2e,symbolSquare:n2e,symbolStar:a2e,symbolTriangle:u2e,symbolWye:l2e},D2e=Math.PI/180,$2e=function(t){var n="symbol".concat(mw(t));return JU[n]||y5},I2e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*D2e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},N2e=function(t,n){JU["symbol".concat(mw(t))]=n},ww=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,u=a===void 0?"area":a,s=M2e(t,P2e),l=r9(r9({},s),{},{type:r,size:o,sizeType:u}),c=function(){var b=$2e(r),w=c2e().type(b).size(I2e(o,u,r));return w()},d=l.className,h=l.cx,v=l.cy,g=Bt(l,!0);return h===+h&&v===+v&&o===+o?j.createElement("path",dE({},g,{className:fn("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(v,")"),d:c()})):null};ww.registerSymbol=N2e;function qd(e){"@babel/helpers - typeof";return qd=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},qd(e)}function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=v.inactive?l:v.color;return j.createElement("li",hE({className:b,style:d,key:"legend-item-".concat(g)},uv(r.props,v,g)),j.createElement(iE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(v)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(w,v,g):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])}(y.PureComponent);lv(y5,"displayName","Legend");lv(y5,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var V2e=iw;function H2e(){this.__data__=new V2e,this.size=0}var q2e=H2e;function K2e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var G2e=K2e;function Y2e(e){return this.__data__.get(e)}var Z2e=Y2e;function X2e(e){return this.__data__.has(e)}var Q2e=X2e,J2e=iw,e_e=a5,t_e=u5,n_e=200;function r_e(e,t){var n=this.__data__;if(n instanceof J2e){var r=n.__data__;if(!e_e||r.lengthu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,h=!0,v=n&E_e?new w_e:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=kSe}var _5=TSe,MSe=As,RSe=_5,DSe=Os,$Se="[object Arguments]",ISe="[object Array]",NSe="[object Boolean]",FSe="[object Date]",LSe="[object Error]",jSe="[object Function]",BSe="[object Map]",zSe="[object Number]",USe="[object Object]",WSe="[object RegExp]",VSe="[object Set]",HSe="[object String]",qSe="[object WeakMap]",KSe="[object ArrayBuffer]",GSe="[object DataView]",YSe="[object Float32Array]",ZSe="[object Float64Array]",XSe="[object Int8Array]",QSe="[object Int16Array]",JSe="[object Int32Array]",e3e="[object Uint8Array]",t3e="[object Uint8ClampedArray]",n3e="[object Uint16Array]",r3e="[object Uint32Array]",Jn={};Jn[YSe]=Jn[ZSe]=Jn[XSe]=Jn[QSe]=Jn[JSe]=Jn[e3e]=Jn[t3e]=Jn[n3e]=Jn[r3e]=!0;Jn[$Se]=Jn[ISe]=Jn[KSe]=Jn[NSe]=Jn[GSe]=Jn[FSe]=Jn[LSe]=Jn[jSe]=Jn[BSe]=Jn[zSe]=Jn[USe]=Jn[WSe]=Jn[VSe]=Jn[HSe]=Jn[qSe]=!1;function i3e(e){return DSe(e)&&RSe(e.length)&&!!Jn[MSe(e)]}var o3e=i3e;function a3e(e){return function(t){return e(t)}}var sW=a3e,ib={exports:{}};ib.exports;(function(e,t){var n=vU,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,u=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(ib,ib.exports);var u3e=ib.exports,s3e=o3e,l3e=sW,l9=u3e,c9=l9&&l9.isTypedArray,c3e=c9?l3e(c9):s3e,lW=c3e,f3e=pSe,d3e=x5,h3e=vo,p3e=uW,v3e=w5,g3e=lW,m3e=Object.prototype,y3e=m3e.hasOwnProperty;function b3e(e,t){var n=h3e(e),r=!n&&d3e(e),i=!n&&!r&&p3e(e),o=!n&&!r&&!i&&g3e(e),a=n||r||i||o,u=a?f3e(e.length,String):[],s=u.length;for(var l in e)(t||y3e.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||v3e(l,s)))&&u.push(l);return u}var x3e=b3e,w3e=Object.prototype;function _3e(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||w3e;return e===n}var S3e=_3e;function C3e(e,t){return function(n){return e(t(n))}}var cW=C3e,E3e=cW,A3e=E3e(Object.keys,Object),O3e=A3e,P3e=S3e,k3e=O3e,T3e=Object.prototype,M3e=T3e.hasOwnProperty;function R3e(e){if(!P3e(e))return k3e(e);var t=[];for(var n in Object(e))M3e.call(e,n)&&n!="constructor"&&t.push(n);return t}var D3e=R3e,$3e=i5,I3e=_5;function N3e(e){return e!=null&&I3e(e.length)&&!$3e(e)}var Sg=N3e,F3e=x3e,L3e=D3e,j3e=Sg;function B3e(e){return j3e(e)?F3e(e):L3e(e)}var _w=B3e,z3e=nSe,U3e=dSe,W3e=_w;function V3e(e){return z3e(e,W3e,U3e)}var H3e=V3e,f9=H3e,q3e=1,K3e=Object.prototype,G3e=K3e.hasOwnProperty;function Y3e(e,t,n,r,i,o){var a=n&q3e,u=f9(e),s=u.length,l=f9(t),c=l.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var h=u[d];if(!(a?h in t:G3e.call(t,h)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=a;++d-1}var KEe=qEe;function GEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=l6e){var l=t?null:u6e(e);if(l)return s6e(l);a=!1,i=a6e,s=new r6e}else s=t?[]:u;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A6e(e){return e.value}function O6e(e,t){if(j.isValidElement(e))return j.cloneElement(e,t);if(typeof e=="function")return j.createElement(e,t);t.ref;var n=C6e(t,g6e);return j.createElement(y5,n)}var O9=1,Ad=function(e){function t(){var n;m6e(this,t);for(var r=arguments.length,i=new Array(r),o=0;oO9||Math.abs(i.height-this.lastBoundingBox.height)>O9)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,u=i.verticalAlign,s=i.margin,l=i.chartWidth,c=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((l||0)-v.width)/2}}else d=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var g=this.getBBoxSnapshot();h={top:((c||0)-g.height)/2}}else h=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Vu(Vu({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,u=i.height,s=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,d=Vu(Vu({position:"absolute",width:a||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return j.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},O6e(o,Vu(Vu({},this.props),{},{payload:mW(c,l,A6e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Vu(Vu({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&Ke(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Sw(Ad,"displayName","Legend");Sw(Ad,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var P9=wg,P6e=x5,k6e=vo,k9=P9?P9.isConcatSpreadable:void 0;function T6e(e){return k6e(e)||P6e(e)||!!(k9&&e&&e[k9])}var M6e=T6e,R6e=oW,D6e=M6e;function xW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=D6e),i||(i=[]);++o0&&n(u)?t>1?xW(u,t-1,n,r,i):R6e(i,u):r||(i[i.length]=u)}return i}var wW=xW;function $6e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(n(o[s],s,o)===!1)break}return t}}var I6e=$6e,N6e=I6e,F6e=N6e(),L6e=F6e,j6e=L6e,B6e=_w;function z6e(e,t){return e&&j6e(e,t,B6e)}var _W=z6e,U6e=Sg;function W6e(e,t){return function(n,r){if(n==null)return n;if(!U6e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e=u)return s;var l=n[r];return s*(l=="desc"?-1:1)}}return e.index-t.index}var r4e=n4e,AS=l5,i4e=c5,o4e=jl,a4e=SW,u4e=Q6e,s4e=sW,l4e=r4e,c4e=zh,f4e=vo;function d4e(e,t,n){t.length?t=AS(t,function(o){return f4e(o)?function(a){return i4e(a,o.length===1?o[0]:o)}:o}):t=[c4e];var r=-1;t=AS(t,s4e(o4e));var i=a4e(e,function(o,a,u){var s=AS(t,function(l){return l(o)});return{criteria:s,index:++r,value:o}});return u4e(i,function(o,a){return l4e(o,a,n)})}var h4e=d4e;function p4e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var v4e=p4e,g4e=v4e,M9=Math.max;function m4e(e,t,n){return t=M9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=M9(r.length-t,0),a=Array(o);++i0){if(++t>=O4e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var M4e=T4e,R4e=A4e,D4e=M4e,$4e=D4e(R4e),I4e=$4e,N4e=zh,F4e=y4e,L4e=I4e;function j4e(e,t){return L4e(F4e(e,t,N4e),e+"")}var B4e=j4e,z4e=o5,U4e=Sg,W4e=w5,V4e=Ll;function H4e(e,t,n){if(!V4e(n))return!1;var r=typeof t;return(r=="number"?U4e(n)&&W4e(t,n.length):r=="string"&&t in n)?z4e(n[t],e):!1}var Cw=H4e,q4e=wW,K4e=h4e,G4e=B4e,D9=Cw,Y4e=G4e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&D9(e,t[0],t[1])?t=[]:n>2&&D9(t[0],t[1],t[2])&&(t=[t[0]]),K4e(e,q4e(t,1),[])}),Z4e=Y4e;const E5=On(Z4e);function cv(e){"@babel/helpers - typeof";return cv=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},cv(e)}function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Tp,"-left"),Ke(n)&&t&&Ke(t.x)&&n=t.y),"".concat(Tp,"-top"),Ke(r)&&t&&Ke(t.y)&&rm?Math.max(c,s[r]):Math.max(d,s[r])}function fAe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function dAe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,l,c,d;return a.height>0&&a.width>0&&n?(c=N9({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),d=N9({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),l=fAe({translateX:c,translateY:d,useTranslate3d:u})):l=lAe,{cssProperties:l,cssClasses:cAe({translateX:c,translateY:d,coordinate:n})}}function Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}function F9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L9(e){for(var t=1;tj9||Math.abs(r.height-this.state.lastBoundingBox.height)>j9)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,l=i.children,c=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,v=i.offset,g=i.position,m=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=dAe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:v,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),A=S.cssClasses,E=S.cssProperties,C=L9(L9({transition:h&&o?"transform ".concat(u,"ms ").concat(s):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return j.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),_Ae=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Va={isSsr:_Ae(),get:function(t){return Va[t]},set:function(t,n){if(typeof t=="string")Va[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Va[i]=t[i]})}}};function Yd(e){"@babel/helpers - typeof";return Yd=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},Yd(e)}function B9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z9(e){for(var t=1;t0;return j.createElement(wAe,{allowEscapeViewBox:a,animationDuration:u,animationEasing:s,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:v,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:A},RAe(l,z9(z9({},this.props),{},{payload:E})))}}])}(y.PureComponent);A5(Yu,"displayName","Tooltip");A5(Yu,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Va.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var DAe=ku,$Ae=function(){return DAe.Date.now()},IAe=$Ae,NAe=/\s/;function FAe(e){for(var t=e.length;t--&&NAe.test(e.charAt(t)););return t}var LAe=FAe,jAe=LAe,BAe=/^\s+/;function zAe(e){return e&&e.slice(0,jAe(e)+1).replace(BAe,"")}var UAe=zAe,WAe=UAe,U9=Ll,VAe=Dh,W9=NaN,HAe=/^[-+]0x[0-9a-f]+$/i,qAe=/^0b[01]+$/i,KAe=/^0o[0-7]+$/i,GAe=parseInt;function YAe(e){if(typeof e=="number")return e;if(VAe(e))return W9;if(U9(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=U9(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=WAe(e);var n=qAe.test(e);return n||KAe.test(e)?GAe(e.slice(2),n?2:8):HAe.test(e)?W9:+e}var kW=YAe,ZAe=Ll,PS=IAe,V9=kW,XAe="Expected a function",QAe=Math.max,JAe=Math.min;function e5e(e,t,n){var r,i,o,a,u,s,l=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(XAe);t=V9(t)||0,ZAe(n)&&(c=!!n.leading,d="maxWait"in n,o=d?QAe(V9(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function v(C){var T=r,M=i;return r=i=void 0,l=C,a=e.apply(M,T),a}function g(C){return l=C,u=setTimeout(w,t),c?v(C):a}function m(C){var T=C-s,M=C-l,F=t-T;return d?JAe(F,o-M):F}function b(C){var T=C-s,M=C-l;return s===void 0||T>=t||T<0||d&&M>=o}function w(){var C=PS();if(b(C))return x(C);u=setTimeout(w,m(C))}function x(C){return u=void 0,h&&r?v(C):(r=i=void 0,a)}function S(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function A(){return u===void 0?a:x(PS())}function E(){var C=PS(),T=b(C);if(r=arguments,i=this,s=C,T){if(u===void 0)return g(s);if(d)return clearTimeout(u),u=setTimeout(w,t),v(s)}return u===void 0&&(u=setTimeout(w,t)),a}return E.cancel=S,E.flush=A,E}var t5e=e5e,n5e=t5e,r5e=Ll,i5e="Expected a function";function o5e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(i5e);return r5e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),n5e(e,t,{leading:r,maxWait:t,trailing:i})}var a5e=o5e;const TW=On(a5e);function dv(e){"@babel/helpers - typeof";return dv=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},dv(e)}function H9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ny(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ie=TW(ie,m,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ie),G=E.current.getBoundingClientRect(),K=G.width,V=G.height;return H(K,V),Z.observe(E.current),function(){Z.disconnect()}},[H,m]);var W=y.useMemo(function(){var ie=F.containerWidth,Z=F.containerHeight;if(ie<0||Z<0)return null;ss(bc(a)||bc(s),`The width(%s) and height(%s) are both fixed numbers, + A`).concat(a,",").concat(a,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return j.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(ta/8,"h").concat(ta,"v").concat(ta*3/4,"h").concat(-ta,"z"),className:"recharts-legend-icon"});if(j.isValidElement(r.legendIcon)){var l=F2e({},r);return delete l.legendIcon,j.cloneElement(r.legendIcon,l)}return j.createElement(ww,{fill:s,cx:o,cy:o,size:ta,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,a=i.iconSize,u=i.layout,s=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:ta,height:ta},d={display:u==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(v,g){var m=v.formatter||s,b=fn(cv(cv({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",v.inactive));if(v.type==="none")return null;var w=Wt(v.value)?null:v.value;ss(!Wt(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=v.inactive?l:v.color;return j.createElement("li",hE({className:b,style:d,key:"legend-item-".concat(g)},sv(r.props,v,g)),j.createElement(iE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(v)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(w,v,g):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])}(y.PureComponent);cv(b5,"displayName","Legend");cv(b5,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var q2e=iw;function K2e(){this.__data__=new q2e,this.size=0}var G2e=K2e;function Y2e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Z2e=Y2e;function X2e(e){return this.__data__.get(e)}var Q2e=X2e;function J2e(e){return this.__data__.has(e)}var e_e=J2e,t_e=iw,n_e=u5,r_e=s5,i_e=200;function o_e(e,t){var n=this.__data__;if(n instanceof t_e){var r=n.__data__;if(!n_e||r.lengthu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,h=!0,v=n&P_e?new S_e:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=MSe}var S5=RSe,DSe=As,$Se=S5,ISe=Ps,NSe="[object Arguments]",FSe="[object Array]",LSe="[object Boolean]",jSe="[object Date]",BSe="[object Error]",zSe="[object Function]",USe="[object Map]",WSe="[object Number]",VSe="[object Object]",HSe="[object RegExp]",qSe="[object Set]",KSe="[object String]",GSe="[object WeakMap]",YSe="[object ArrayBuffer]",ZSe="[object DataView]",XSe="[object Float32Array]",QSe="[object Float64Array]",JSe="[object Int8Array]",e3e="[object Int16Array]",t3e="[object Int32Array]",n3e="[object Uint8Array]",r3e="[object Uint8ClampedArray]",i3e="[object Uint16Array]",o3e="[object Uint32Array]",Jn={};Jn[XSe]=Jn[QSe]=Jn[JSe]=Jn[e3e]=Jn[t3e]=Jn[n3e]=Jn[r3e]=Jn[i3e]=Jn[o3e]=!0;Jn[NSe]=Jn[FSe]=Jn[YSe]=Jn[LSe]=Jn[ZSe]=Jn[jSe]=Jn[BSe]=Jn[zSe]=Jn[USe]=Jn[WSe]=Jn[VSe]=Jn[HSe]=Jn[qSe]=Jn[KSe]=Jn[GSe]=!1;function a3e(e){return ISe(e)&&$Se(e.length)&&!!Jn[DSe(e)]}var u3e=a3e;function s3e(e){return function(t){return e(t)}}var cW=s3e,ob={exports:{}};ob.exports;(function(e,t){var n=mU,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,u=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(ob,ob.exports);var l3e=ob.exports,c3e=u3e,f3e=cW,c9=l3e,f9=c9&&c9.isTypedArray,d3e=f9?f3e(f9):c3e,fW=d3e,h3e=gSe,p3e=w5,v3e=vo,g3e=lW,m3e=_5,y3e=fW,b3e=Object.prototype,x3e=b3e.hasOwnProperty;function w3e(e,t){var n=v3e(e),r=!n&&p3e(e),i=!n&&!r&&g3e(e),o=!n&&!r&&!i&&y3e(e),a=n||r||i||o,u=a?h3e(e.length,String):[],s=u.length;for(var l in e)(t||x3e.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||m3e(l,s)))&&u.push(l);return u}var _3e=w3e,S3e=Object.prototype;function C3e(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||S3e;return e===n}var E3e=C3e;function A3e(e,t){return function(n){return e(t(n))}}var dW=A3e,P3e=dW,O3e=P3e(Object.keys,Object),k3e=O3e,T3e=E3e,M3e=k3e,R3e=Object.prototype,D3e=R3e.hasOwnProperty;function $3e(e){if(!T3e(e))return M3e(e);var t=[];for(var n in Object(e))D3e.call(e,n)&&n!="constructor"&&t.push(n);return t}var I3e=$3e,N3e=o5,F3e=S5;function L3e(e){return e!=null&&F3e(e.length)&&!N3e(e)}var Cg=L3e,j3e=_3e,B3e=I3e,z3e=Cg;function U3e(e){return z3e(e)?j3e(e):B3e(e)}var _w=U3e,W3e=iSe,V3e=pSe,H3e=_w;function q3e(e){return W3e(e,H3e,V3e)}var K3e=q3e,d9=K3e,G3e=1,Y3e=Object.prototype,Z3e=Y3e.hasOwnProperty;function X3e(e,t,n,r,i,o){var a=n&G3e,u=d9(e),s=u.length,l=d9(t),c=l.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var h=u[d];if(!(a?h in t:Z3e.call(t,h)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=a;++d-1}var YEe=GEe;function ZEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=f6e){var l=t?null:l6e(e);if(l)return c6e(l);a=!1,i=s6e,s=new o6e}else s=t?[]:u;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function O6e(e){return e.value}function k6e(e,t){if(j.isValidElement(e))return j.cloneElement(e,t);if(typeof e=="function")return j.createElement(e,t);t.ref;var n=A6e(t,y6e);return j.createElement(b5,n)}var O9=1,Ad=function(e){function t(){var n;b6e(this,t);for(var r=arguments.length,i=new Array(r),o=0;oO9||Math.abs(i.height-this.lastBoundingBox.height)>O9)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,u=i.verticalAlign,s=i.margin,l=i.chartWidth,c=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((l||0)-v.width)/2}}else d=a==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var g=this.getBBoxSnapshot();h={top:((c||0)-g.height)/2}}else h=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return Vu(Vu({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,u=i.height,s=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,d=Vu(Vu({position:"absolute",width:a||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return j.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},k6e(o,Vu(Vu({},this.props),{},{payload:bW(c,l,O6e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Vu(Vu({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&Ke(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Sw(Ad,"displayName","Legend");Sw(Ad,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var k9=_g,T6e=w5,M6e=vo,T9=k9?k9.isConcatSpreadable:void 0;function R6e(e){return M6e(e)||T6e(e)||!!(T9&&e&&e[T9])}var D6e=R6e,$6e=uW,I6e=D6e;function _W(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=I6e),i||(i=[]);++o0&&n(u)?t>1?_W(u,t-1,n,r,i):$6e(i,u):r||(i[i.length]=u)}return i}var SW=_W;function N6e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(n(o[s],s,o)===!1)break}return t}}var F6e=N6e,L6e=F6e,j6e=L6e(),B6e=j6e,z6e=B6e,U6e=_w;function W6e(e,t){return e&&z6e(e,t,U6e)}var CW=W6e,V6e=Cg;function H6e(e,t){return function(n,r){if(n==null)return n;if(!V6e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e=u)return s;var l=n[r];return s*(l=="desc"?-1:1)}}return e.index-t.index}var o4e=i4e,AS=c5,a4e=f5,u4e=jl,s4e=EW,l4e=e4e,c4e=cW,f4e=o4e,d4e=Uh,h4e=vo;function p4e(e,t,n){t.length?t=AS(t,function(o){return h4e(o)?function(a){return a4e(a,o.length===1?o[0]:o)}:o}):t=[d4e];var r=-1;t=AS(t,c4e(u4e));var i=s4e(e,function(o,a,u){var s=AS(t,function(l){return l(o)});return{criteria:s,index:++r,value:o}});return l4e(i,function(o,a){return f4e(o,a,n)})}var v4e=p4e;function g4e(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var m4e=g4e,y4e=m4e,R9=Math.max;function b4e(e,t,n){return t=R9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=R9(r.length-t,0),a=Array(o);++i0){if(++t>=k4e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var D4e=R4e,$4e=O4e,I4e=D4e,N4e=I4e($4e),F4e=N4e,L4e=Uh,j4e=x4e,B4e=F4e;function z4e(e,t){return B4e(j4e(e,t,L4e),e+"")}var U4e=z4e,W4e=a5,V4e=Cg,H4e=_5,q4e=Ll;function K4e(e,t,n){if(!q4e(n))return!1;var r=typeof t;return(r=="number"?V4e(n)&&H4e(t,n.length):r=="string"&&t in n)?W4e(n[t],e):!1}var Cw=K4e,G4e=SW,Y4e=v4e,Z4e=U4e,$9=Cw,X4e=Z4e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&$9(e,t[0],t[1])?t=[]:n>2&&$9(t[0],t[1],t[2])&&(t=[t[0]]),Y4e(e,G4e(t,1),[])}),Q4e=X4e;const A5=Pn(Q4e);function fv(e){"@babel/helpers - typeof";return fv=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},fv(e)}function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Mp,"-left"),Ke(n)&&t&&Ke(t.x)&&n=t.y),"".concat(Mp,"-top"),Ke(r)&&t&&Ke(t.y)&&rm?Math.max(c,s[r]):Math.max(d,s[r])}function hAe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function pAe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,l,c,d;return a.height>0&&a.width>0&&n?(c=F9({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:s,viewBoxDimension:s.width}),d=F9({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:s,viewBoxDimension:s.height}),l=hAe({translateX:c,translateY:d,useTranslate3d:u})):l=fAe,{cssProperties:l,cssClasses:dAe({translateX:c,translateY:d,coordinate:n})}}function Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}function L9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j9(e){for(var t=1;tB9||Math.abs(r.height-this.state.lastBoundingBox.height)>B9)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,l=i.children,c=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,v=i.offset,g=i.position,m=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=pAe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:v,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),A=S.cssClasses,E=S.cssProperties,C=j9(j9({transition:h&&o?"transform ".concat(u,"ms ").concat(s):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return j.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),CAe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Va={isSsr:CAe(),get:function(t){return Va[t]},set:function(t,n){if(typeof t=="string")Va[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Va[i]=t[i]})}}};function Yd(e){"@babel/helpers - typeof";return Yd=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},Yd(e)}function z9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U9(e){for(var t=1;t0;return j.createElement(SAe,{allowEscapeViewBox:a,animationDuration:u,animationEasing:s,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:v,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:A},$Ae(l,U9(U9({},this.props),{},{payload:E})))}}])}(y.PureComponent);P5(Yu,"displayName","Tooltip");P5(Yu,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Va.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var IAe=ku,NAe=function(){return IAe.Date.now()},FAe=NAe,LAe=/\s/;function jAe(e){for(var t=e.length;t--&&LAe.test(e.charAt(t)););return t}var BAe=jAe,zAe=BAe,UAe=/^\s+/;function WAe(e){return e&&e.slice(0,zAe(e)+1).replace(UAe,"")}var VAe=WAe,HAe=VAe,W9=Ll,qAe=$h,V9=NaN,KAe=/^[-+]0x[0-9a-f]+$/i,GAe=/^0b[01]+$/i,YAe=/^0o[0-7]+$/i,ZAe=parseInt;function XAe(e){if(typeof e=="number")return e;if(qAe(e))return V9;if(W9(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=W9(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=HAe(e);var n=GAe.test(e);return n||YAe.test(e)?ZAe(e.slice(2),n?2:8):KAe.test(e)?V9:+e}var MW=XAe,QAe=Ll,OS=FAe,H9=MW,JAe="Expected a function",e5e=Math.max,t5e=Math.min;function n5e(e,t,n){var r,i,o,a,u,s,l=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(JAe);t=H9(t)||0,QAe(n)&&(c=!!n.leading,d="maxWait"in n,o=d?e5e(H9(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function v(C){var T=r,M=i;return r=i=void 0,l=C,a=e.apply(M,T),a}function g(C){return l=C,u=setTimeout(w,t),c?v(C):a}function m(C){var T=C-s,M=C-l,F=t-T;return d?t5e(F,o-M):F}function b(C){var T=C-s,M=C-l;return s===void 0||T>=t||T<0||d&&M>=o}function w(){var C=OS();if(b(C))return x(C);u=setTimeout(w,m(C))}function x(C){return u=void 0,h&&r?v(C):(r=i=void 0,a)}function S(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function A(){return u===void 0?a:x(OS())}function E(){var C=OS(),T=b(C);if(r=arguments,i=this,s=C,T){if(u===void 0)return g(s);if(d)return clearTimeout(u),u=setTimeout(w,t),v(s)}return u===void 0&&(u=setTimeout(w,t)),a}return E.cancel=S,E.flush=A,E}var r5e=n5e,i5e=r5e,o5e=Ll,a5e="Expected a function";function u5e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(a5e);return o5e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),i5e(e,t,{leading:r,maxWait:t,trailing:i})}var s5e=u5e;const RW=Pn(s5e);function hv(e){"@babel/helpers - typeof";return hv=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},hv(e)}function q9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ry(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ie=RW(ie,m,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ie),G=E.current.getBoundingClientRect(),K=G.width,V=G.height;return H(K,V),Z.observe(E.current),function(){Z.disconnect()}},[H,m]);var W=y.useMemo(function(){var ie=F.containerWidth,Z=F.containerHeight;if(ie<0||Z<0)return null;ss(bc(a)||bc(s),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,s),ss(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=bc(a)?ie:a,K=bc(s)?Z:s;n&&n>0&&(G?K=G/n:K&&(G=K*n),h&&K>h&&(K=h)),ss(G>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,G,K,a,s,c,d,n);var V=!Array.isArray(v)&&us(v.type).endsWith("Chart");return j.Children.map(v,function(B){return j.isValidElement(B)?y.cloneElement(B,ny({width:G,height:K},V?{style:ny({height:"100%",width:"100%",maxHeight:K,maxWidth:G},B.props.style)}:{})):B})},[n,v,s,h,d,c,F,a]);return j.createElement("div",{id:b?"".concat(b):void 0,className:fn("recharts-responsive-container",w),style:ny(ny({},A),{},{width:a,height:s,minWidth:c,minHeight:d,maxHeight:h}),ref:E},W)}),O5=function(t){return null};O5.displayName="Cell";function hv(e){"@babel/helpers - typeof";return hv=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},hv(e)}function K9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function EE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Va.isSsr)return{width:0,height:0};var r=x5e(n),i=JSON.stringify({text:t,copyStyle:r});if(zf.widthCache[i])return zf.widthCache[i];try{var o=document.getElementById(G9);o||(o=document.createElement("span"),o.setAttribute("id",G9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=EE(EE({},b5e),r);Object.assign(o.style,a),o.textContent="".concat(t);var u=o.getBoundingClientRect(),s={width:u.width,height:u.height};return zf.widthCache[i]=s,++zf.cacheCount>y5e&&(zf.cacheCount=0,zf.widthCache={}),s}catch{return{width:0,height:0}}},w5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function pv(e){"@babel/helpers - typeof";return pv=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},pv(e)}function sb(e,t){return E5e(e)||C5e(e,t)||S5e(e,t)||_5e()}function _5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S5e(e,t){if(e){if(typeof e=="string")return Y9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y9(e,t)}}function Y9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tD(e,t){return W5e(e)||U5e(e,t)||z5e(e,t)||B5e()}function B5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z5e(e,t){if(e){if(typeof e=="string")return nD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nD(e,t)}}function nD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(K,V){var B=V.word,q=V.width,Y=K[K.length-1];if(Y&&(i==null||o||Y.width+q+rV.width?K:V})};if(!c)return v;for(var m="…",b=function(G){var K=d.slice(0,G),V=$W({breakAll:l,style:s,children:K+m}).wordsWithComputedWidth,B=h(V),q=B.length>a||g(B).width>Number(i);return[q,B]},w=0,x=d.length-1,S=0,A;w<=x&&S<=d.length-1;){var E=Math.floor((w+x)/2),C=E-1,T=b(C),M=tD(T,2),F=M[0],U=M[1],H=b(E),W=tD(H,1),ie=W[0];if(!F&&!ie&&(w=E+1),F&&ie&&(x=E-1),!F&&ie){A=U;break}S++}return A||v},rD=function(t){var n=zt(t)?[]:t.toString().split(DW);return[{words:n}]},H5e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,u=t.maxLines;if((n||r)&&!Va.isSsr){var s,l,c=$W({breakAll:a,children:i,style:o});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;s=d,l=h}else return rD(i);return V5e({breakAll:a,children:i,maxLines:u,style:o},s,l,n,r)}return rD(i)},iD="#808080",lb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,u=a===void 0?"1em":a,s=t.capHeight,l=s===void 0?"0.71em":s,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,v=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,b=t.fill,w=b===void 0?iD:b,x=eD(t,F5e),S=y.useMemo(function(){return H5e({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),A=x.dx,E=x.dy,C=x.angle,T=x.className,M=x.breakAll,F=eD(x,L5e);if(!Hr(r)||!Hr(o))return null;var U=r+(Ke(A)?A:0),H=o+(Ke(E)?E:0),W;switch(m){case"start":W=kS("calc(".concat(l,")"));break;case"middle":W=kS("calc(".concat((S.length-1)/2," * -").concat(u," + (").concat(l," / 2))"));break;default:W=kS("calc(".concat(S.length-1," * -").concat(u,")"));break}var ie=[];if(d){var Z=S[0].width,G=x.width;ie.push("scale(".concat((Ke(G)?G/Z:1)/Z,")"))}return C&&ie.push("rotate(".concat(C,", ").concat(U,", ").concat(H,")")),ie.length&&(F.transform=ie.join(" ")),j.createElement("text",AE({},Bt(F,!0),{x:U,y:H,className:fn("recharts-text",T),textAnchor:v,fill:w.includes("url")?iD:w}),S.map(function(K,V){var B=K.words.join(M?"":" ");return j.createElement("tspan",{x:U,dy:V===0?W:u,key:"".concat(B,"-").concat(V)},B)}))};function yl(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function q5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function P5(e){let t,n,r;e.length!==2?(t=yl,n=(u,s)=>yl(e(u),s),r=(u,s)=>e(u)-s):(t=e===yl||e===q5e?e:K5e,n=e,r=e);function i(u,s,l=0,c=u.length){if(l>>1;n(u[d],s)<0?l=d+1:c=d}while(l>>1;n(u[d],s)<=0?l=d+1:c=d}while(ll&&r(u[d-1],s)>-r(u[d],s)?d-1:d}return{left:i,center:a,right:o}}function K5e(){return 0}function IW(e){return e===null?NaN:+e}function*G5e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Y5e=P5(yl),Cg=Y5e.right;P5(IW).center;class oD extends Map{constructor(t,n=Q5e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(aD(this,t))}has(t){return super.has(aD(this,t))}set(t,n){return super.set(Z5e(this,t),n)}delete(t){return super.delete(X5e(this,t))}}function aD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Z5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function X5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Q5e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function J5e(e=yl){if(e===yl)return NW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function NW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const eOe=Math.sqrt(50),tOe=Math.sqrt(10),nOe=Math.sqrt(2);function cb(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=eOe?10:o>=tOe?5:o>=nOe?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(e*l),s=Math.round(t*l),u/lt&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(e/l),s=Math.round(t/l),u*lt&&--s),s0))return[];if(e===t)return[e];const r=t=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function sD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function FW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?NW:J5e(i);r>n;){if(r-n>600){const s=r-n+1,l=t-n+1,c=Math.log(s),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(s-d)/s)*(l-s/2<0?-1:1),v=Math.max(n,Math.floor(t-l*d/s+h)),g=Math.min(r,Math.floor(t+(s-l)*d/s+h));FW(e,t,v,g,i)}const o=e[t];let a=n,u=r;for(Mp(e,n,t),i(e[r],o)>0&&Mp(e,n,r);a0;)--u}i(e[n],o)===0?Mp(e,n,u):(++u,Mp(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Mp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function rOe(e,t,n){if(e=Float64Array.from(G5e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return sD(e);if(t>=1)return uD(e);var r,i=(r-1)*t,o=Math.floor(i),a=uD(FW(e,o).subarray(0,o+1)),u=sD(e.subarray(o+1));return a+(u-a)*(i-o)}}function iOe(e,t,n=IW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function oOe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?iy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?iy(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=uOe.exec(e))?new oo(t[1],t[2],t[3],1):(t=sOe.exec(e))?new oo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lOe.exec(e))?iy(t[1],t[2],t[3],t[4]):(t=cOe.exec(e))?iy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fOe.exec(e))?vD(t[1],t[2]/100,t[3]/100,1):(t=dOe.exec(e))?vD(t[1],t[2]/100,t[3]/100,t[4]):lD.hasOwnProperty(e)?dD(lD[e]):e==="transparent"?new oo(NaN,NaN,NaN,0):null}function dD(e){return new oo(e>>16&255,e>>8&255,e&255,1)}function iy(e,t,n,r){return r<=0&&(e=t=n=NaN),new oo(e,t,n,r)}function vOe(e){return e instanceof Eg||(e=yv(e)),e?(e=e.rgb(),new oo(e.r,e.g,e.b,e.opacity)):new oo}function ME(e,t,n,r){return arguments.length===1?vOe(e):new oo(e,t,n,r??1)}function oo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}T5(oo,ME,jW(Eg,{brighter(e){return e=e==null?fb:Math.pow(fb,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gv:Math.pow(gv,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oo(Pc(this.r),Pc(this.g),Pc(this.b),db(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:hD,formatHex:hD,formatHex8:gOe,formatRgb:pD,toString:pD}));function hD(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}`}function gOe(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}${xc((isNaN(this.opacity)?1:this.opacity)*255)}`}function pD(){const e=db(this.opacity);return`${e===1?"rgb(":"rgba("}${Pc(this.r)}, ${Pc(this.g)}, ${Pc(this.b)}${e===1?")":`, ${e})`}`}function db(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xc(e){return e=Pc(e),(e<16?"0":"")+e.toString(16)}function vD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new La(e,t,n,r)}function BW(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Eg||(e=yv(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(t===o?a=(n-r)/u+(n0&&s<1?0:a,new La(a,u,s,e.opacity)}function mOe(e,t,n,r){return arguments.length===1?BW(e):new La(e,t,n,r??1)}function La(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}T5(La,mOe,jW(Eg,{brighter(e){return e=e==null?fb:Math.pow(fb,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gv:Math.pow(gv,e),new La(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,i=2*n-r;return new oo(TS(e>=240?e-240:e+120,i,r),TS(e,i,r),TS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new La(gD(this.h),oy(this.s),oy(this.l),db(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=db(this.opacity);return`${e===1?"hsl(":"hsla("}${gD(this.h)}, ${oy(this.s)*100}%, ${oy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gD(e){return e=(e||0)%360,e<0?e+360:e}function oy(e){return Math.max(0,Math.min(1,e||0))}function TS(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 M5=e=>()=>e;function yOe(e,t){return function(n){return e+n*t}}function bOe(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 xOe(e){return(e=+e)==1?zW:function(t,n){return n-t?bOe(t,n,e):M5(isNaN(t)?n:t)}}function zW(e,t){var n=t-e;return n?yOe(e,n):M5(isNaN(e)?t:e)}const mD=function e(t){var n=xOe(t);function r(i,o){var a=n((i=ME(i)).r,(o=ME(o)).r),u=n(i.g,o.g),s=n(i.b,o.b),l=zW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function wOe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,s.push({i:a,x:hb(r,i)})),n=MS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function ROe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?DOe:ROe,s=l=null,d}function d(h){return h==null||isNaN(h=+h)?o:(s||(s=u(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((l||(l=u(t,e.map(r),hb)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,pb),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=R5,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Wi,c()):a!==Wi},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,v){return r=h,i=v,c()}}function D5(){return Ew()(Wi,Wi)}function $Oe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Zd(e){return e=vb(Math.abs(e)),e?e[1]:NaN}function IOe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function NOe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var FOe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bv(e){if(!(t=FOe.exec(e)))throw new Error("invalid format: "+e);var t;return new $5({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]})}bv.prototype=$5.prototype;function $5(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+""}$5.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 LOe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var UW;function jOe(e,t){var n=vb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(UW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+vb(e,Math.max(0,t+o-1))[0]}function bD(e,t){var n=vb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const xD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$Oe,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)=>bD(e*100,t),r:bD,s:jOe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wD(e){return e}var _D=Array.prototype.map,SD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function BOe(e){var t=e.grouping===void 0||e.thousands===void 0?wD:IOe(_D.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?wD:NOe(_D.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function l(d){d=bv(d);var h=d.fill,v=d.align,g=d.sign,m=d.symbol,b=d.zero,w=d.width,x=d.comma,S=d.precision,A=d.trim,E=d.type;E==="n"?(x=!0,E="g"):xD[E]||(S===void 0&&(S=12),A=!0,E="g"),(b||h==="0"&&v==="=")&&(b=!0,h="0",v="=");var C=m==="$"?n:m==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",T=m==="$"?r:/[%p]/.test(E)?a:"",M=xD[E],F=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function U(H){var W=C,ie=T,Z,G,K;if(E==="c")ie=M(H)+ie,H="";else{H=+H;var V=H<0||1/H<0;if(H=isNaN(H)?s:M(Math.abs(H),S),A&&(H=LOe(H)),V&&+H==0&&g!=="+"&&(V=!1),W=(V?g==="("?g:u:g==="-"||g==="("?"":g)+W,ie=(E==="s"?SD[8+UW/3]:"")+ie+(V&&g==="("?")":""),F){for(Z=-1,G=H.length;++ZK||K>57){ie=(K===46?i+H.slice(Z+1):H.slice(Z))+ie,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var B=W.length+H.length+ie.length,q=B>1)+W+H+ie+q.slice(B);break;default:H=q+W+H+ie;break}return o(H)}return U.toString=function(){return d+""},U}function c(d,h){var v=l((d=bv(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Zd(h)/3)))*3,m=Math.pow(10,-g),b=SD[8+g/3];return function(w){return v(m*w)+b}}return{format:l,formatPrefix:c}}var ay,I5,WW;zOe({thousands:",",grouping:[3],currency:["$",""]});function zOe(e){return ay=BOe(e),I5=ay.format,WW=ay.formatPrefix,ay}function UOe(e){return Math.max(0,-Zd(Math.abs(e)))}function WOe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Zd(t)/3)))*3-Zd(Math.abs(e)))}function VOe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zd(t)-Zd(e))+1}function VW(e,t,n,r){var i=kE(e,t,n),o;switch(r=bv(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=WOe(i,a))&&(r.precision=o),WW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=VOe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=UOe(i))&&(r.precision=o-(r.type==="%")*2);break}}return I5(r)}function Bl(e){var t=e.domain;return e.ticks=function(n){var r=t();return OE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return VW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],s,l,c=10;for(u0;){if(l=PE(a,u,n),l===s)return r[i]=a,r[o]=u,t(r);if(l>0)a=Math.floor(a/l)*l,u=Math.ceil(u/l)*l;else if(l<0)a=Math.ceil(a*l)/l,u=Math.floor(u*l)/l;else break;s=l}return e},e}function gb(){var e=D5();return e.copy=function(){return Ag(e,gb())},ba.apply(e,arguments),Bl(e)}function HW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,pb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return HW(e).unknown(t)},e=arguments.length?Array.from(e,pb):[0,1],Bl(n)}function qW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function YOe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function AD(e){return(t,n)=>-e(-t,n)}function N5(e){const t=e(CD,ED),n=t.domain;let r=10,i,o;function a(){return i=YOe(r),o=GOe(r),n()[0]<0?(i=AD(i),o=AD(o),e(HOe,qOe)):e(CD,ED),t}return t.base=function(u){return arguments.length?(r=+u,a()):r},t.domain=function(u){return arguments.length?(n(u),a()):n()},t.ticks=u=>{const s=n();let l=s[0],c=s[s.length-1];const d=c0){for(;h<=v;++h)for(g=1;gc)break;w.push(m)}}else for(;h<=v;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/o(-h):g*o(h),!(mc)break;w.push(m)}w.length*2{if(u==null&&(u=10),s==null&&(s=r===10?"s":","),typeof s!="function"&&(!(r%1)&&(s=bv(s)).precision==null&&(s.trim=!0),s=I5(s)),u===1/0)return s;const l=Math.max(1,r*u/t.ticks().length);return c=>{let d=c/o(Math.round(i(c)));return d*rn(qW(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function KW(){const e=N5(Ew()).domain([1,10]);return e.copy=()=>Ag(e,KW()).base(e.base()),ba.apply(e,arguments),e}function OD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function PD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function F5(e){var t=1,n=e(OD(t),PD(t));return n.constant=function(r){return arguments.length?e(OD(t=+r),PD(t)):t},Bl(n)}function GW(){var e=F5(Ew());return e.copy=function(){return Ag(e,GW()).constant(e.constant())},ba.apply(e,arguments)}function kD(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ZOe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function XOe(e){return e<0?-e*e:e*e}function L5(e){var t=e(Wi,Wi),n=1;function r(){return n===1?e(Wi,Wi):n===.5?e(ZOe,XOe):e(kD(n),kD(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bl(t)}function j5(){var e=L5(Ew());return e.copy=function(){return Ag(e,j5()).exponent(e.exponent())},ba.apply(e,arguments),e}function QOe(){return j5.apply(null,arguments).exponent(.5)}function TD(e){return Math.sign(e)*e*e}function JOe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function YW(){var e=D5(),t=[0,1],n=!1,r;function i(o){var a=JOe(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(TD(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,pb)).map(TD)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return YW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ba.apply(i,arguments),Bl(i)}function ZW(){var e=[],t=[],n=[],r;function i(){var a=0,u=Math.max(1,t.length);for(n=new Array(u-1);++a0?n[u-1]:e[0],u=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return r.slice()},a.copy=function(){return XW().domain([e,t]).range(i).unknown(o)},ba.apply(Bl(a),arguments)}function QW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Cg(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return QW().domain(e).range(t).unknown(n)},ba.apply(i,arguments)}const RS=new Date,DS=new Date;function Yr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const s=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return s;let l;do s.push(l=new Date(+o)),t(o,u),e(o);while(lYr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(RS.setTime(+o),DS.setTime(+a),e(RS),e(DS),Math.floor(n(RS,DS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const mb=Yr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):mb);mb.range;const ts=1e3,la=ts*60,ns=la*60,bs=ns*24,B5=bs*7,MD=bs*30,$S=bs*365,wc=Yr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ts)},(e,t)=>(t-e)/ts,e=>e.getUTCSeconds());wc.range;const z5=Yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());z5.range;const U5=Yr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());U5.range;const W5=Yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getHours());W5.range;const V5=Yr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getUTCHours());V5.range;const Og=Yr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/bs,e=>e.getDate()-1);Og.range;const Aw=Yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>e.getUTCDate()-1);Aw.range;const JW=Yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>Math.floor(e/bs));JW.range;function hf(e){return Yr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*la)/B5)}const Ow=hf(0),yb=hf(1),ePe=hf(2),tPe=hf(3),Xd=hf(4),nPe=hf(5),rPe=hf(6);Ow.range;yb.range;ePe.range;tPe.range;Xd.range;nPe.range;rPe.range;function pf(e){return Yr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/B5)}const Pw=pf(0),bb=pf(1),iPe=pf(2),oPe=pf(3),Qd=pf(4),aPe=pf(5),uPe=pf(6);Pw.range;bb.range;iPe.range;oPe.range;Qd.range;aPe.range;uPe.range;const H5=Yr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());H5.range;const q5=Yr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());q5.range;const xs=Yr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xs.range;const ws=Yr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ws.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ws.range;function eV(e,t,n,r,i,o){const a=[[wc,1,ts],[wc,5,5*ts],[wc,15,15*ts],[wc,30,30*ts],[o,1,la],[o,5,5*la],[o,15,15*la],[o,30,30*la],[i,1,ns],[i,3,3*ns],[i,6,6*ns],[i,12,12*ns],[r,1,bs],[r,2,2*bs],[n,1,B5],[t,1,MD],[t,3,3*MD],[e,1,$S]];function u(l,c,d){const h=cb).right(a,h);if(v===a.length)return e.every(kE(l/$S,c/$S,d));if(v===0)return mb.every(Math.max(kE(l,c,d),1));const[g,m]=a[h/a[v-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=NS(Rp(be.y,0,1)),It=lt.getUTCDay(),lt=It>4||It===0?bb.ceil(lt):bb(lt),lt=Aw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=IS(Rp(be.y,0,1)),It=lt.getDay(),lt=It>4||It===0?yb.ceil(lt):yb(lt),lt=Og.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),It="Z"in be?NS(Rp(be.y,0,1)).getUTCDay():IS(Rp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(It+5)%7:be.w+be.U*7-(It+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,NS(be)):IS(be)}}function M(Oe,Fe,$e,be){for(var yt=0,lt=Fe.length,It=$e.length,mn,en;yt=It)return-1;if(mn=Fe.charCodeAt(yt++),mn===37){if(mn=Fe.charAt(yt++),en=E[mn in RD?Fe.charAt(yt++):mn],!en||(be=en(Oe,$e,be))<0)return-1}else if(mn!=$e.charCodeAt(be++))return-1}return be}function F(Oe,Fe,$e){var be=l.exec(Fe.slice($e));return be?(Oe.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function U(Oe,Fe,$e){var be=v.exec(Fe.slice($e));return be?(Oe.w=g.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Oe,Fe,$e){var be=d.exec(Fe.slice($e));return be?(Oe.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function W(Oe,Fe,$e){var be=w.exec(Fe.slice($e));return be?(Oe.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ie(Oe,Fe,$e){var be=m.exec(Fe.slice($e));return be?(Oe.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Oe,Fe,$e){return M(Oe,t,Fe,$e)}function G(Oe,Fe,$e){return M(Oe,n,Fe,$e)}function K(Oe,Fe,$e){return M(Oe,r,Fe,$e)}function V(Oe){return a[Oe.getDay()]}function B(Oe){return o[Oe.getDay()]}function q(Oe){return s[Oe.getMonth()]}function Y(Oe){return u[Oe.getMonth()]}function ue(Oe){return i[+(Oe.getHours()>=12)]}function Q(Oe){return 1+~~(Oe.getMonth()/3)}function J(Oe){return a[Oe.getUTCDay()]}function se(Oe){return o[Oe.getUTCDay()]}function de(Oe){return s[Oe.getUTCMonth()]}function Se(Oe){return u[Oe.getUTCMonth()]}function ge(Oe){return i[+(Oe.getUTCHours()>=12)]}function Ze(Oe){return 1+~~(Oe.getUTCMonth()/3)}return{format:function(Oe){var Fe=C(Oe+="",S);return Fe.toString=function(){return Oe},Fe},parse:function(Oe){var Fe=T(Oe+="",!1);return Fe.toString=function(){return Oe},Fe},utcFormat:function(Oe){var Fe=C(Oe+="",A);return Fe.toString=function(){return Oe},Fe},utcParse:function(Oe){var Fe=T(Oe+="",!0);return Fe.toString=function(){return Oe},Fe}}}var RD={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,hPe=/^%/,pPe=/[\\^$*+?|[\]().{}]/g;function yn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function gPe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function mPe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function yPe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function bPe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function xPe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function DD(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $D(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function wPe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _Pe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function SPe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ID(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function CPe(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ND(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function EPe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function APe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function OPe(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function PPe(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kPe(e,t,n){var r=hPe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function TPe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function MPe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function FD(e,t){return yn(e.getDate(),t,2)}function RPe(e,t){return yn(e.getHours(),t,2)}function DPe(e,t){return yn(e.getHours()%12||12,t,2)}function $Pe(e,t){return yn(1+Og.count(xs(e),e),t,3)}function tV(e,t){return yn(e.getMilliseconds(),t,3)}function IPe(e,t){return tV(e,t)+"000"}function NPe(e,t){return yn(e.getMonth()+1,t,2)}function FPe(e,t){return yn(e.getMinutes(),t,2)}function LPe(e,t){return yn(e.getSeconds(),t,2)}function jPe(e){var t=e.getDay();return t===0?7:t}function BPe(e,t){return yn(Ow.count(xs(e)-1,e),t,2)}function nV(e){var t=e.getDay();return t>=4||t===0?Xd(e):Xd.ceil(e)}function zPe(e,t){return e=nV(e),yn(Xd.count(xs(e),e)+(xs(e).getDay()===4),t,2)}function UPe(e){return e.getDay()}function WPe(e,t){return yn(yb.count(xs(e)-1,e),t,2)}function VPe(e,t){return yn(e.getFullYear()%100,t,2)}function HPe(e,t){return e=nV(e),yn(e.getFullYear()%100,t,2)}function qPe(e,t){return yn(e.getFullYear()%1e4,t,4)}function KPe(e,t){var n=e.getDay();return e=n>=4||n===0?Xd(e):Xd.ceil(e),yn(e.getFullYear()%1e4,t,4)}function GPe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yn(t/60|0,"0",2)+yn(t%60,"0",2)}function LD(e,t){return yn(e.getUTCDate(),t,2)}function YPe(e,t){return yn(e.getUTCHours(),t,2)}function ZPe(e,t){return yn(e.getUTCHours()%12||12,t,2)}function XPe(e,t){return yn(1+Aw.count(ws(e),e),t,3)}function rV(e,t){return yn(e.getUTCMilliseconds(),t,3)}function QPe(e,t){return rV(e,t)+"000"}function JPe(e,t){return yn(e.getUTCMonth()+1,t,2)}function e8e(e,t){return yn(e.getUTCMinutes(),t,2)}function t8e(e,t){return yn(e.getUTCSeconds(),t,2)}function n8e(e){var t=e.getUTCDay();return t===0?7:t}function r8e(e,t){return yn(Pw.count(ws(e)-1,e),t,2)}function iV(e){var t=e.getUTCDay();return t>=4||t===0?Qd(e):Qd.ceil(e)}function i8e(e,t){return e=iV(e),yn(Qd.count(ws(e),e)+(ws(e).getUTCDay()===4),t,2)}function o8e(e){return e.getUTCDay()}function a8e(e,t){return yn(bb.count(ws(e)-1,e),t,2)}function u8e(e,t){return yn(e.getUTCFullYear()%100,t,2)}function s8e(e,t){return e=iV(e),yn(e.getUTCFullYear()%100,t,2)}function l8e(e,t){return yn(e.getUTCFullYear()%1e4,t,4)}function c8e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Qd(e):Qd.ceil(e),yn(e.getUTCFullYear()%1e4,t,4)}function f8e(){return"+0000"}function jD(){return"%"}function BD(e){return+e}function zD(e){return Math.floor(+e/1e3)}var Uf,oV,aV;d8e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function d8e(e){return Uf=dPe(e),oV=Uf.format,Uf.parse,aV=Uf.utcFormat,Uf.utcParse,Uf}function h8e(e){return new Date(e)}function p8e(e){return e instanceof Date?+e:+new Date(+e)}function K5(e,t,n,r,i,o,a,u,s,l){var c=D5(),d=c.invert,h=c.domain,v=l(".%L"),g=l(":%S"),m=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),A=l("%Y");function E(C){return(s(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>rOe(e,o/r))},n.copy=function(){return cV(t).domain(e)},Ps.apply(n,arguments)}function Tw(){var e=0,t=.5,n=1,r=1,i,o,a,u,s,l=Wi,c,d=!1,h;function v(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*mt}var _8e=w8e,S8e=pV,C8e=_8e,E8e=zh;function A8e(e){return e&&e.length?S8e(e,E8e,C8e):void 0}var O8e=A8e;const il=On(O8e);function P8e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ut.decimalPlaces=ut.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*er;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ut.dividedBy=ut.div=function(e){return ls(this,new this.constructor(e))};ut.dividedToIntegerBy=ut.idiv=function(e){var t=this,n=t.constructor;return Bn(ls(t,new n(e),0,1),n.precision)};ut.equals=ut.eq=function(e){return!this.cmp(e)};ut.exponent=function(){return Mr(this)};ut.greaterThan=ut.gt=function(e){return this.cmp(e)>0};ut.greaterThanOrEqualTo=ut.gte=function(e){return this.cmp(e)>=0};ut.isInteger=ut.isint=function(){return this.e>this.d.length-2};ut.isNegative=ut.isneg=function(){return this.s<0};ut.isPositive=ut.ispos=function(){return this.s>0};ut.isZero=function(){return this.s===0};ut.lessThan=ut.lt=function(e){return this.cmp(e)<0};ut.lessThanOrEqualTo=ut.lte=function(e){return this.cmp(e)<1};ut.logarithm=ut.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Mo))throw Error(ga+"NaN");if(n.s<1)throw Error(ga+(n.s?"NaN":"-Infinity"));return n.eq(Mo)?new r(0):(or=!1,t=ls(xv(n,o),xv(e,o),o),or=!0,Bn(t,i))};ut.minus=ut.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?yV(t,e):gV(t,(e.s=-e.s,e))};ut.modulo=ut.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ga+"NaN");return n.s?(or=!1,t=ls(n,e,0,1).times(e),or=!0,n.minus(t)):Bn(new r(n),i)};ut.naturalExponential=ut.exp=function(){return mV(this)};ut.naturalLogarithm=ut.ln=function(){return xv(this)};ut.negated=ut.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ut.plus=ut.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gV(t,e):yV(t,(e.s=-e.s,e))};ut.precision=ut.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(kc+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*er+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ut.squareRoot=ut.sqrt=function(){var e,t,n,r,i,o,a,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(ga+"NaN")}for(e=Mr(u),or=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=pu(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Vh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new s(t)):r=new s(i.toString()),n=s.precision,i=a=n+3;;)if(o=r,r=o.plus(ls(u,o,a+2)).times(.5),pu(o.d).slice(0,a)===(t=pu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Bn(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;a+=4}return or=!0,Bn(r,n)};ut.times=ut.mul=function(e){var t,n,r,i,o,a,u,s,l,c=this,d=c.constructor,h=c.d,v=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,s=h.length,l=v.length,s=0;){for(t=0,i=s+r;i>r;)u=o[i]+v[r]*h[i-r-1]+t,o[i--]=u%Jr|0,t=u/Jr|0;o[i]=(o[i]+t)%Jr|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,or?Bn(e,d.precision):e};ut.toDecimalPlaces=ut.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Pu(e,0,Wh),t===void 0?t=r.rounding:Pu(t,0,8),Bn(n,e+Mr(n)+1,t))};ut.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xc(r,!0):(Pu(e,0,Wh),t===void 0?t=i.rounding:Pu(t,0,8),r=Bn(new i(r),e+1,t),n=Xc(r,!0,e+1)),n};ut.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xc(i):(Pu(e,0,Wh),t===void 0?t=o.rounding:Pu(t,0,8),r=Bn(new o(i),e+Mr(i)+1,t),n=Xc(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ut.toInteger=ut.toint=function(){var e=this,t=e.constructor;return Bn(new t(e),Mr(e)+1,t.rounding)};ut.toNumber=function(){return+this};ut.toPower=ut.pow=function(e){var t,n,r,i,o,a,u=this,s=u.constructor,l=12,c=+(e=new s(e));if(!e.s)return new s(Mo);if(u=new s(u),!u.s){if(e.s<1)throw Error(ga+"Infinity");return u}if(u.eq(Mo))return u;if(r=s.precision,e.eq(Mo))return Bn(u,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=u.s,a){if((n=c<0?-c:c)<=vV){for(i=new s(Mo),t=Math.ceil(r/er+4),or=!1;n%2&&(i=i.times(u),VD(i.d,t)),n=Vh(n/2),n!==0;)u=u.times(u),VD(u.d,t);return or=!0,e.s<0?new s(Mo).div(i):Bn(i,r)}}else if(o<0)throw Error(ga+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,or=!1,i=e.times(xv(u,r+l)),or=!0,i=mV(i),i.s=o,i};ut.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=Xc(i,n<=o.toExpNeg||n>=o.toExpPos)):(Pu(e,1,Wh),t===void 0?t=o.rounding:Pu(t,0,8),i=Bn(new o(i),e,t),n=Mr(i),r=Xc(i,e<=n||n<=o.toExpNeg,e)),r};ut.toSignificantDigits=ut.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Pu(e,1,Wh),t===void 0?t=r.rounding:Pu(t,0,8)),Bn(new r(n),e,t)};ut.toString=ut.valueOf=ut.val=ut.toJSON=ut[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return Xc(e,t<=n.toExpNeg||t>=n.toExpPos)};function gV(e,t){var n,r,i,o,a,u,s,l,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),or?Bn(t,d):t;if(s=e.d,l=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(r=s,o=-o,u=l.length):(r=l,i=a,u=s.length),a=Math.ceil(d/er),u=a>u?a+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=s.length,o=l.length,u-o<0&&(o=u,r=l,l=s,s=r),n=0;o;)n=(s[--o]=s[o]+l[o]+n)/Jr|0,s[o]%=Jr;for(n&&(s.unshift(n),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,or?Bn(t,d):t}function Pu(e,t,n){if(e!==~~e||en)throw Error(kc+e)}function pu(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(u=s=0;ui[u]?1:-1;break}return s}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var u,s,l,c,d,h,v,g,m,b,w,x,S,A,E,C,T,M,F=r.constructor,U=r.s==i.s?1:-1,H=r.d,W=i.d;if(!r.s)return new F(r);if(!i.s)throw Error(ga+"Division by zero");for(s=r.e-i.e,T=W.length,E=H.length,v=new F(U),g=v.d=[],l=0;W[l]==(H[l]||0);)++l;if(W[l]>(H[l]||0)&&--s,o==null?x=o=F.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new F(0);if(x=x/er+2|0,l=0,T==1)for(c=0,W=W[0],x++;(l1&&(W=e(W,c),H=e(H,c),T=W.length,E=H.length),A=T,m=H.slice(0,T),b=m.length;b=Jr/2&&++C;do c=0,u=t(W,m,T,b),u<0?(w=m[0],T!=b&&(w=w*Jr+(m[1]||0)),c=w/C|0,c>1?(c>=Jr&&(c=Jr-1),d=e(W,c),h=d.length,b=m.length,u=t(d,m,h,b),u==1&&(c--,n(d,T16)throw Error(Z5+Mr(e));if(!e.s)return new c(Mo);for(t==null?(or=!1,u=d):u=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(lc(2,l))/Math.LN10*2+5|0,u+=r,n=i=o=new c(Mo),c.precision=u;;){if(i=Bn(i.times(e),u),n=n.times(++s),a=o.plus(ls(i,n,u)),pu(a.d).slice(0,u)===pu(o.d).slice(0,u)){for(;l--;)o=Bn(o.times(o),u);return c.precision=d,t==null?(or=!0,Bn(o,d)):o}o=a}}function Mr(e){for(var t=e.e*er,n=e.d[0];n>=10;n/=10)t++;return t}function FS(e,t,n){if(t>e.LN10.sd())throw or=!0,n&&(e.precision=n),Error(ga+"LN10 precision limit exceeded");return Bn(new e(e.LN10),t)}function Gs(e){for(var t="";e--;)t+="0";return t}function xv(e,t){var n,r,i,o,a,u,s,l,c,d=1,h=10,v=e,g=v.d,m=v.constructor,b=m.precision;if(v.s<1)throw Error(ga+(v.s?"NaN":"-Infinity"));if(v.eq(Mo))return new m(0);if(t==null?(or=!1,l=b):l=t,v.eq(10))return t==null&&(or=!0),FS(m,l);if(l+=h,m.precision=l,n=pu(g),r=n.charAt(0),o=Mr(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=pu(v.d),r=n.charAt(0),d++;o=Mr(v),r>1?(v=new m("0."+n),o++):v=new m(r+"."+n.slice(1))}else return s=FS(m,l+2,b).times(o+""),v=xv(new m(r+"."+n.slice(1)),l-h).plus(s),m.precision=b,t==null?(or=!0,Bn(v,b)):v;for(u=a=v=ls(v.minus(Mo),v.plus(Mo),l),c=Bn(v.times(v),l),i=3;;){if(a=Bn(a.times(c),l),s=u.plus(ls(a,new m(i),l)),pu(s.d).slice(0,l)===pu(u.d).slice(0,l))return u=u.times(2),o!==0&&(u=u.plus(FS(m,l+2,b).times(o+""))),u=ls(u,new m(d),l),m.precision=b,t==null?(or=!0,Bn(u,b)):u;u=s,i+=2}}function WD(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Vh(n/er),e.d=[],r=(n+1)%er,n<0&&(r+=er),rxb||e.e<-xb))throw Error(Z5+n)}else e.s=0,e.e=0,e.d=[0];return e}function Bn(e,t,n){var r,i,o,a,u,s,l,c,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=er,i=t,l=d[c=0];else{if(c=Math.ceil((r+1)/er),o=d.length,c>=o)return e;for(l=o=d[c],a=1;o>=10;o/=10)a++;r%=er,i=r-er+a}if(n!==void 0&&(o=lc(10,a-i-1),u=l/o%10|0,s=t<0||d[c+1]!==void 0||l%o,s=n<4?(u||s)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||s||n==6&&(r>0?i>0?l/lc(10,a-i):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return s?(o=Mr(e),d.length=1,t=t-o-1,d[0]=lc(10,(er-t%er)%er),e.e=Vh(-t/er)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,o=1,c--):(d.length=c+1,o=lc(10,er-r),d[c]=i>0?(l/lc(10,a-i)%lc(10,i)|0)*o:0),s)for(;;)if(c==0){(d[0]+=o)==Jr&&(d[0]=1,++e.e);break}else{if(d[c]+=o,d[c]!=Jr)break;d[c--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(or&&(e.e>xb||e.e<-xb))throw Error(Z5+Mr(e));return e}function yV(e,t){var n,r,i,o,a,u,s,l,c,d,h=e.constructor,v=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),or?Bn(t,v):t;if(s=e.d,d=t.d,r=t.e,l=e.e,s=s.slice(),a=l-r,a){for(c=a<0,c?(n=s,a=-a,u=d.length):(n=d,r=l,u=s.length),i=Math.max(Math.ceil(v/er),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=s.length,u=d.length,c=i0;--i)s[u++]=0;for(i=d.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+Gs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Gs(-i-1)+o,n&&(r=n-a)>0&&(o+=Gs(r))):i>=a?(o+=Gs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Gs(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Gs(r))),e.s<0?"-"+o:o}function VD(e,t){if(e.length>t)return e.length=t,!0}function bV(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(kc+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return WD(a,o.toString())}else if(typeof o!="string")throw Error(kc+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Z8e.test(o))WD(a,o);else throw Error(kc+o)}if(i.prototype=ut,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=bV,i.config=i.set=X8e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(kc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(kc+n+": "+r);return this}var X5=bV(Y8e);Mo=new X5(1);const In=X5;function Q8e(e){return nke(e)||tke(e)||eke(e)||J8e()}function J8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eke(e,t){if(e){if(typeof e=="string")return $E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $E(e,t)}}function tke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nke(e){if(Array.isArray(e))return $E(e)}function $E(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,HD(function(){for(var u=arguments.length,s=new Array(u),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),u;!(r=(u=a.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function mke(e){if(Array.isArray(e))return e}function CV(e){var t=wv(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function EV(e,t,n){if(e.lte(0))return new In(0);var r=Dw.getDigitCount(e.toNumber()),i=new In(10).pow(r),o=e.div(i),a=r!==1?.05:.1,u=new In(Math.ceil(o.div(a).toNumber())).add(n).mul(a),s=u.mul(i);return t?s:new In(Math.ceil(s))}function yke(e,t,n){var r=1,i=new In(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new In(10).pow(Dw.getDigitCount(e)-1),i=new In(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new In(Math.floor(e)))}else e===0?i=new In(Math.floor((t-1)/2)):n||(i=new In(Math.floor(e)));var a=Math.floor((t-1)/2),u=ake(oke(function(s){return i.add(new In(s-a).mul(r)).toNumber()}),IE);return u(0,t)}function AV(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new In(0),tickMin:new In(0),tickMax:new In(0)};var o=EV(new In(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new In(0):(a=new In(e).add(t).div(2),a=a.sub(new In(a).mod(o)));var u=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new In(t).sub(a).div(o).toNumber()),l=u+s+1;return l>n?AV(e,t,n,r,i+1):(l0?s+(n-l):s,u=t>0?u:u+(n-l)),{step:o,tickMin:a.sub(new In(u).mul(o)),tickMax:a.add(new In(s).mul(o))})}function bke(e){var t=wv(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),u=CV([n,r]),s=wv(u,2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(FE(IE(0,i-1).map(function(){return 1/0}))):[].concat(FE(IE(0,i-1).map(function(){return-1/0})),[c]);return n>r?NE(d):d}if(l===c)return yke(l,i,o);var h=AV(l,c,a,o),v=h.step,g=h.tickMin,m=h.tickMax,b=Dw.rangeStep(g,m.add(new In(.1).mul(v)),v);return n>r?NE(b):b}function xke(e,t){var n=wv(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=CV([r,i]),u=wv(a,2),s=u[0],l=u[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=EV(new In(l).sub(s).div(c-1),o,0),h=[].concat(FE(Dw.rangeStep(new In(s),new In(l).sub(new In(.99).mul(d)),d)),[l]);return r>i?NE(h):h}var wke=_V(bke),_ke=_V(xke),Ske="Invariant failed";function Qc(e,t){throw new Error(Ske)}var Cke=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function wb(){return wb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dke(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l0?i[l-1].coordinate:i[u-1].coordinate,d=i[l].coordinate,h=l>=u-1?i[0].coordinate:i[l+1].coordinate,v=void 0;if(Ba(d-c)!==Ba(h-d)){var g=[];if(Ba(h-d)===Ba(s[1]-s[0])){v=h;var m=d+s[1]-s[0];g[0]=Math.min(m,(m+c)/2),g[1]=Math.max(m,(m+c)/2)}else{v=c;var b=h+s[1]-s[0];g[0]=Math.min(d,(b+d)/2),g[1]=Math.max(d,(b+d)/2)}var w=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+d)/2&&t<=(S+d)/2){a=i[l].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){a=r[A].index;break}return a},Q5=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,a=o.stroke,u=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:u;break;default:s=u;break}return s},Zke=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},u=Object.keys(o),s=0,l=u.length;s=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?gr(gr({},x),w[0].props):w[0].props,A=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=zt(A)?n:A;a[E].push({item:w[0],stackList:w.slice(1),barSize:zt(C)?void 0:Yc(C,r,0)})}}return a},Xke=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,u=t.maxBarSize,s=a.length;if(s<1)return null;var l=Yc(n,i,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,v=i/s,g=a.reduce(function(A,E){return A+E.barSize||0},0);g+=(s-1)*l,g>=i&&(g-=(s-1)*l,l=0),g>=i&&v>0&&(h=!0,v*=.9,g=s*v);var m=(i-g)/2>>0,b={offset:m-l,size:0};c=a.reduce(function(A,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?v:E.barSize}},T=[].concat(GD(A),[C]);return b=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:b})}),T},d)}else{var w=Yc(r,i,0,!0);i-2*w-(s-1)*l<=0&&(l=0);var x=(i-2*w-(s-1)*l)/s;x>1&&(x>>=0);var S=u===+u?Math.min(x,u):x;c=a.reduce(function(A,E,C){var T=[].concat(GD(A),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:T[T.length-1].position})}),T},d)}return c},Qke=function(t,n,r,i){var o=r.children,a=r.width,u=r.margin,s=a-(u.left||0)-(u.right||0),l=TV({children:o,legendWidth:s});if(l){var c=i||{},d=c.width,h=c.height,v=l.align,g=l.verticalAlign,m=l.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&v!=="center"&&Ke(t[v]))return gr(gr({},t),{},Pd({},v,t[v]+(d||0)));if((m==="horizontal"||m==="vertical"&&v==="center")&&g!=="middle"&&Ke(t[g]))return gr(gr({},t),{},Pd({},g,t[g]+(h||0)))}return t},Jke=function(t,n,r){return zt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},MV=function(t,n,r,i,o){var a=n.props.children,u=fo(a,Hh).filter(function(l){return Jke(i,o,l.props.direction)});if(u&&u.length){var s=u.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var d=qr(c,r);if(zt(d))return l;var h=Array.isArray(d)?[Mw(d),il(d)]:[d,d],v=s.reduce(function(g,m){var b=qr(c,m,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(v[0],l[0]),Math.max(v[1],l[1])]},[1/0,-1/0])}return null},eTe=function(t,n,r,i,o){var a=n.map(function(u){return MV(t,u,r,o,i)}).filter(function(u){return!zt(u)});return a&&a.length?a.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},RV=function(t,n,r,i,o){var a=n.map(function(s){var l=s.props.dataKey;return r==="number"&&l&&MV(t,s,l,i)||h0(t,l,r,o)});if(r==="number")return a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]);var u={};return a.reduce(function(s,l){for(var c=0,d=l.length;c=2?Ba(u[0]-u[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:i(h)+l,value:d,offset:l}});return c.filter(function(d){return!Lh(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+l,value:d,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+l,value:d,offset:l}}):i.domain().map(function(d,h){return{coordinate:i(d)+l,value:o?o[d]:d,index:h,offset:l}})},LS=new WeakMap,uy=function(t,n){if(typeof n!="function")return t;LS.has(t)||LS.set(t,new WeakMap);var r=LS.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},tTe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,u=t.axisType;if(i==="auto")return a==="radial"&&u==="radiusAxis"?{scale:vv(),realScaleType:"band"}:a==="radial"&&u==="angleAxis"?{scale:gb(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:d0(),realScaleType:"point"}:o==="category"?{scale:vv(),realScaleType:"band"}:{scale:gb(),realScaleType:"linear"};if(_g(i)){var s="scale".concat(mw(i));return{scale:(UD[s]||d0)(),realScaleType:UD[s]?s:"point"}}return Wt(i)?{scale:i}:{scale:d0(),realScaleType:"point"}},ZD=1e-4,nTe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-ZD,a=Math.max(i[0],i[1])+ZD,u=t(n[0]),s=t(n[r-1]);(ua||sa)&&t.domain([n[0],n[r-1]])}},rTe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][r][0]=o,t[u][r][1]=o+s,o=t[u][r][1]):(t[u][r][0]=a,t[u][r][1]=a+s,a=t[u][r][1])}},aTe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+u,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},uTe={sign:oTe,expand:_2e,none:Hd,silhouette:S2e,wiggle:C2e,positive:aTe},sTe=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=uTe[r],a=w2e().keys(i).value(function(u,s){return+qr(u,s,0)}).order(fE).offset(o);return a(t)},lTe=function(t,n,r,i,o,a){if(!t)return null;var u=a?n.reverse():n,s={},l=u.reduce(function(d,h){var v,g=(v=h.type)!==null&&v!==void 0&&v.defaultProps?gr(gr({},h.type.defaultProps),h.props):h.props,m=g.stackId,b=g.hide;if(b)return d;var w=g[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Hr(m)){var S=x.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[m]=S}else x.stackGroups[df("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return gr(gr({},d),{},Pd({},w,x))},s),c={};return Object.keys(l).reduce(function(d,h){var v=l[h];if(v.hasStack){var g={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(m,b){var w=v.stackGroups[b];return gr(gr({},m),{},Pd({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:sTe(t,w.items,o)}))},g)}return gr(gr({},d),{},Pd({},h,v))},c)},cTe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,u=n.allowDecimals,s=r||n.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=wke(l,o,u);return t.domain([Mw(c),il(c)]),{niceTicks:c}}if(o&&i==="number"){var d=t.domain(),h=_ke(d,o,u);return{niceTicks:h}}return null};function eh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!zt(i[t.dataKey])){var u=G1(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var s=qr(i,zt(a)?t.dataKey:a);return zt(s)?null:t.scale(s)}var XD=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var s=qr(a,n.dataKey,n.domain[u]);return zt(s)?null:n.scale(s)-o/2+i},fTe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},dTe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var u=a.items.indexOf(t);return u>=0?a.stackedData[u]:null}}return null},hTe=function(t){return t.reduce(function(n,r){return[Mw(r.concat([n[0]]).filter(Ke)),il(r.concat([n[1]]).filter(Ke))]},[1/0,-1/0])},IV=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],u=a.stackedData,s=u.reduce(function(l,c){var d=hTe(c.slice(n,r+1));return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},QD=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JD=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zE=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Ke(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(QD.test(t[0])){var o=+QD.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Ke(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(JD.test(t[1])){var a=+JD.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Sb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=E5(n,function(d){return d.coordinate}),a=1/0,u=1,s=o.length;ua&&(l=2*Math.PI-l),{radius:u,angle:mTe(l),angleInRadian:l}},xTe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},wTe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),u=Math.min(o,a);return t+u*360},r7=function(t,n){var r=t.x,i=t.y,o=bTe({x:r,y:i},n),a=o.radius,u=o.angle,s=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=xTe(n),d=c.startAngle,h=c.endAngle,v=u,g;if(d<=h){for(;v>h;)v-=360;for(;v=d&&v<=h}else{for(;v>d;)v-=360;for(;v=h&&v<=d}return g?n7(n7({},n),{},{radius:a,angle:wTe(v,n)}):null};function Ev(e){"@babel/helpers - typeof";return Ev=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},Ev(e)}var _Te=["offset"];function STe(e){return OTe(e)||ATe(e)||ETe(e)||CTe()}function CTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ETe(e,t){if(e){if(typeof e=="string")return UE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UE(e,t)}}function ATe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OTe(e){if(Array.isArray(e))return UE(e)}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function i7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=v+x*a,A=m):i==="insideEnd"?(S=g-x*a,A=!m):i==="end"&&(S=g+x*a,A=m),A=w<=0?A:!A;var E=pi(l,c,b,S),C=pi(l,c,b,S+(A?1:-1)*359),T="M".concat(E.x,",").concat(E.y,` + height and width.`,G,K,a,s,c,d,n);var V=!Array.isArray(v)&&us(v.type).endsWith("Chart");return j.Children.map(v,function(B){return j.isValidElement(B)?y.cloneElement(B,ry({width:G,height:K},V?{style:ry({height:"100%",width:"100%",maxHeight:K,maxWidth:G},B.props.style)}:{})):B})},[n,v,s,h,d,c,F,a]);return j.createElement("div",{id:b?"".concat(b):void 0,className:fn("recharts-responsive-container",w),style:ry(ry({},A),{},{width:a,height:s,minWidth:c,minHeight:d,maxHeight:h}),ref:E},W)}),O5=function(t){return null};O5.displayName="Cell";function pv(e){"@babel/helpers - typeof";return pv=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},pv(e)}function G9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function EE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Va.isSsr)return{width:0,height:0};var r=_5e(n),i=JSON.stringify({text:t,copyStyle:r});if(zf.widthCache[i])return zf.widthCache[i];try{var o=document.getElementById(Y9);o||(o=document.createElement("span"),o.setAttribute("id",Y9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=EE(EE({},w5e),r);Object.assign(o.style,a),o.textContent="".concat(t);var u=o.getBoundingClientRect(),s={width:u.width,height:u.height};return zf.widthCache[i]=s,++zf.cacheCount>x5e&&(zf.cacheCount=0,zf.widthCache={}),s}catch{return{width:0,height:0}}},S5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function vv(e){"@babel/helpers - typeof";return vv=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},vv(e)}function lb(e,t){return P5e(e)||A5e(e,t)||E5e(e,t)||C5e()}function C5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E5e(e,t){if(e){if(typeof e=="string")return Z9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z9(e,t)}}function Z9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nD(e,t){return H5e(e)||V5e(e,t)||W5e(e,t)||U5e()}function U5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W5e(e,t){if(e){if(typeof e=="string")return rD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rD(e,t)}}function rD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(K,V){var B=V.word,q=V.width,Y=K[K.length-1];if(Y&&(i==null||o||Y.width+q+rV.width?K:V})};if(!c)return v;for(var m="…",b=function(G){var K=d.slice(0,G),V=NW({breakAll:l,style:s,children:K+m}).wordsWithComputedWidth,B=h(V),q=B.length>a||g(B).width>Number(i);return[q,B]},w=0,x=d.length-1,S=0,A;w<=x&&S<=d.length-1;){var E=Math.floor((w+x)/2),C=E-1,T=b(C),M=nD(T,2),F=M[0],U=M[1],H=b(E),W=nD(H,1),ie=W[0];if(!F&&!ie&&(w=E+1),F&&ie&&(x=E-1),!F&&ie){A=U;break}S++}return A||v},iD=function(t){var n=zt(t)?[]:t.toString().split(IW);return[{words:n}]},K5e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,u=t.maxLines;if((n||r)&&!Va.isSsr){var s,l,c=NW({breakAll:a,children:i,style:o});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;s=d,l=h}else return iD(i);return q5e({breakAll:a,children:i,maxLines:u,style:o},s,l,n,r)}return iD(i)},oD="#808080",cb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,u=a===void 0?"1em":a,s=t.capHeight,l=s===void 0?"0.71em":s,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,v=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,b=t.fill,w=b===void 0?oD:b,x=tD(t,j5e),S=y.useMemo(function(){return K5e({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),A=x.dx,E=x.dy,C=x.angle,T=x.className,M=x.breakAll,F=tD(x,B5e);if(!Hr(r)||!Hr(o))return null;var U=r+(Ke(A)?A:0),H=o+(Ke(E)?E:0),W;switch(m){case"start":W=kS("calc(".concat(l,")"));break;case"middle":W=kS("calc(".concat((S.length-1)/2," * -").concat(u," + (").concat(l," / 2))"));break;default:W=kS("calc(".concat(S.length-1," * -").concat(u,")"));break}var ie=[];if(d){var Z=S[0].width,G=x.width;ie.push("scale(".concat((Ke(G)?G/Z:1)/Z,")"))}return C&&ie.push("rotate(".concat(C,", ").concat(U,", ").concat(H,")")),ie.length&&(F.transform=ie.join(" ")),j.createElement("text",AE({},Bt(F,!0),{x:U,y:H,className:fn("recharts-text",T),textAnchor:v,fill:w.includes("url")?oD:w}),S.map(function(K,V){var B=K.words.join(M?"":" ");return j.createElement("tspan",{x:U,dy:V===0?W:u,key:"".concat(B,"-").concat(V)},B)}))};function yl(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function G5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function k5(e){let t,n,r;e.length!==2?(t=yl,n=(u,s)=>yl(e(u),s),r=(u,s)=>e(u)-s):(t=e===yl||e===G5e?e:Y5e,n=e,r=e);function i(u,s,l=0,c=u.length){if(l>>1;n(u[d],s)<0?l=d+1:c=d}while(l>>1;n(u[d],s)<=0?l=d+1:c=d}while(ll&&r(u[d-1],s)>-r(u[d],s)?d-1:d}return{left:i,center:a,right:o}}function Y5e(){return 0}function FW(e){return e===null?NaN:+e}function*Z5e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const X5e=k5(yl),Eg=X5e.right;k5(FW).center;class aD extends Map{constructor(t,n=ePe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(uD(this,t))}has(t){return super.has(uD(this,t))}set(t,n){return super.set(Q5e(this,t),n)}delete(t){return super.delete(J5e(this,t))}}function uD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Q5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function J5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ePe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tPe(e=yl){if(e===yl)return LW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function LW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const nPe=Math.sqrt(50),rPe=Math.sqrt(10),iPe=Math.sqrt(2);function fb(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=nPe?10:o>=rPe?5:o>=iPe?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(e*l),s=Math.round(t*l),u/lt&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(e/l),s=Math.round(t/l),u*lt&&--s),s0))return[];if(e===t)return[e];const r=t=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function lD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function jW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?LW:tPe(i);r>n;){if(r-n>600){const s=r-n+1,l=t-n+1,c=Math.log(s),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(s-d)/s)*(l-s/2<0?-1:1),v=Math.max(n,Math.floor(t-l*d/s+h)),g=Math.min(r,Math.floor(t+(s-l)*d/s+h));jW(e,t,v,g,i)}const o=e[t];let a=n,u=r;for(Rp(e,n,t),i(e[r],o)>0&&Rp(e,n,r);a0;)--u}i(e[n],o)===0?Rp(e,n,u):(++u,Rp(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Rp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function oPe(e,t,n){if(e=Float64Array.from(Z5e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return lD(e);if(t>=1)return sD(e);var r,i=(r-1)*t,o=Math.floor(i),a=sD(jW(e,o).subarray(0,o+1)),u=lD(e.subarray(o+1));return a+(u-a)*(i-o)}}function aPe(e,t,n=FW){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function uPe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?oy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?oy(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=lPe.exec(e))?new oo(t[1],t[2],t[3],1):(t=cPe.exec(e))?new oo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fPe.exec(e))?oy(t[1],t[2],t[3],t[4]):(t=dPe.exec(e))?oy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hPe.exec(e))?gD(t[1],t[2]/100,t[3]/100,1):(t=pPe.exec(e))?gD(t[1],t[2]/100,t[3]/100,t[4]):cD.hasOwnProperty(e)?hD(cD[e]):e==="transparent"?new oo(NaN,NaN,NaN,0):null}function hD(e){return new oo(e>>16&255,e>>8&255,e&255,1)}function oy(e,t,n,r){return r<=0&&(e=t=n=NaN),new oo(e,t,n,r)}function mPe(e){return e instanceof Ag||(e=bv(e)),e?(e=e.rgb(),new oo(e.r,e.g,e.b,e.opacity)):new oo}function ME(e,t,n,r){return arguments.length===1?mPe(e):new oo(e,t,n,r??1)}function oo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}M5(oo,ME,zW(Ag,{brighter(e){return e=e==null?db:Math.pow(db,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mv:Math.pow(mv,e),new oo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oo(Oc(this.r),Oc(this.g),Oc(this.b),hb(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:pD,formatHex:pD,formatHex8:yPe,formatRgb:vD,toString:vD}));function pD(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}`}function yPe(){return`#${xc(this.r)}${xc(this.g)}${xc(this.b)}${xc((isNaN(this.opacity)?1:this.opacity)*255)}`}function vD(){const e=hb(this.opacity);return`${e===1?"rgb(":"rgba("}${Oc(this.r)}, ${Oc(this.g)}, ${Oc(this.b)}${e===1?")":`, ${e})`}`}function hb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xc(e){return e=Oc(e),(e<16?"0":"")+e.toString(16)}function gD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new La(e,t,n,r)}function UW(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Ag||(e=bv(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(t===o?a=(n-r)/u+(n0&&s<1?0:a,new La(a,u,s,e.opacity)}function bPe(e,t,n,r){return arguments.length===1?UW(e):new La(e,t,n,r??1)}function La(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}M5(La,bPe,zW(Ag,{brighter(e){return e=e==null?db:Math.pow(db,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mv:Math.pow(mv,e),new La(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,i=2*n-r;return new oo(TS(e>=240?e-240:e+120,i,r),TS(e,i,r),TS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new La(mD(this.h),ay(this.s),ay(this.l),hb(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=hb(this.opacity);return`${e===1?"hsl(":"hsla("}${mD(this.h)}, ${ay(this.s)*100}%, ${ay(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mD(e){return e=(e||0)%360,e<0?e+360:e}function ay(e){return Math.max(0,Math.min(1,e||0))}function TS(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 R5=e=>()=>e;function xPe(e,t){return function(n){return e+n*t}}function wPe(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 _Pe(e){return(e=+e)==1?WW:function(t,n){return n-t?wPe(t,n,e):R5(isNaN(t)?n:t)}}function WW(e,t){var n=t-e;return n?xPe(e,n):R5(isNaN(e)?t:e)}const yD=function e(t){var n=_Pe(t);function r(i,o){var a=n((i=ME(i)).r,(o=ME(o)).r),u=n(i.g,o.g),s=n(i.b,o.b),l=WW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=u(c),i.b=s(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function SPe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,s.push({i:a,x:pb(r,i)})),n=MS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function $Pe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?IPe:$Pe,s=l=null,d}function d(h){return h==null||isNaN(h=+h)?o:(s||(s=u(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((l||(l=u(t,e.map(r),pb)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,vb),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=D5,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Wi,c()):a!==Wi},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,v){return r=h,i=v,c()}}function $5(){return Ew()(Wi,Wi)}function NPe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Zd(e){return e=gb(Math.abs(e)),e?e[1]:NaN}function FPe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function LPe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var jPe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xv(e){if(!(t=jPe.exec(e)))throw new Error("invalid format: "+e);var t;return new I5({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]})}xv.prototype=I5.prototype;function I5(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+""}I5.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 BPe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var VW;function zPe(e,t){var n=gb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(VW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+gb(e,Math.max(0,t+o-1))[0]}function xD(e,t){var n=gb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const wD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:NPe,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)=>xD(e*100,t),r:xD,s:zPe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _D(e){return e}var SD=Array.prototype.map,CD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function UPe(e){var t=e.grouping===void 0||e.thousands===void 0?_D:FPe(SD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?_D:LPe(SD.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function l(d){d=xv(d);var h=d.fill,v=d.align,g=d.sign,m=d.symbol,b=d.zero,w=d.width,x=d.comma,S=d.precision,A=d.trim,E=d.type;E==="n"?(x=!0,E="g"):wD[E]||(S===void 0&&(S=12),A=!0,E="g"),(b||h==="0"&&v==="=")&&(b=!0,h="0",v="=");var C=m==="$"?n:m==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",T=m==="$"?r:/[%p]/.test(E)?a:"",M=wD[E],F=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function U(H){var W=C,ie=T,Z,G,K;if(E==="c")ie=M(H)+ie,H="";else{H=+H;var V=H<0||1/H<0;if(H=isNaN(H)?s:M(Math.abs(H),S),A&&(H=BPe(H)),V&&+H==0&&g!=="+"&&(V=!1),W=(V?g==="("?g:u:g==="-"||g==="("?"":g)+W,ie=(E==="s"?CD[8+VW/3]:"")+ie+(V&&g==="("?")":""),F){for(Z=-1,G=H.length;++ZK||K>57){ie=(K===46?i+H.slice(Z+1):H.slice(Z))+ie,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var B=W.length+H.length+ie.length,q=B>1)+W+H+ie+q.slice(B);break;default:H=q+W+H+ie;break}return o(H)}return U.toString=function(){return d+""},U}function c(d,h){var v=l((d=xv(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Zd(h)/3)))*3,m=Math.pow(10,-g),b=CD[8+g/3];return function(w){return v(m*w)+b}}return{format:l,formatPrefix:c}}var uy,N5,HW;WPe({thousands:",",grouping:[3],currency:["$",""]});function WPe(e){return uy=UPe(e),N5=uy.format,HW=uy.formatPrefix,uy}function VPe(e){return Math.max(0,-Zd(Math.abs(e)))}function HPe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Zd(t)/3)))*3-Zd(Math.abs(e)))}function qPe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zd(t)-Zd(e))+1}function qW(e,t,n,r){var i=kE(e,t,n),o;switch(r=xv(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=HPe(i,a))&&(r.precision=o),HW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=qPe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=VPe(i))&&(r.precision=o-(r.type==="%")*2);break}}return N5(r)}function Bl(e){var t=e.domain;return e.ticks=function(n){var r=t();return PE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return qW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],s,l,c=10;for(u0;){if(l=OE(a,u,n),l===s)return r[i]=a,r[o]=u,t(r);if(l>0)a=Math.floor(a/l)*l,u=Math.ceil(u/l)*l;else if(l<0)a=Math.ceil(a*l)/l,u=Math.floor(u*l)/l;else break;s=l}return e},e}function mb(){var e=$5();return e.copy=function(){return Pg(e,mb())},ba.apply(e,arguments),Bl(e)}function KW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,vb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return KW(e).unknown(t)},e=arguments.length?Array.from(e,vb):[0,1],Bl(n)}function GW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function XPe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function PD(e){return(t,n)=>-e(-t,n)}function F5(e){const t=e(ED,AD),n=t.domain;let r=10,i,o;function a(){return i=XPe(r),o=ZPe(r),n()[0]<0?(i=PD(i),o=PD(o),e(KPe,GPe)):e(ED,AD),t}return t.base=function(u){return arguments.length?(r=+u,a()):r},t.domain=function(u){return arguments.length?(n(u),a()):n()},t.ticks=u=>{const s=n();let l=s[0],c=s[s.length-1];const d=c0){for(;h<=v;++h)for(g=1;gc)break;w.push(m)}}else for(;h<=v;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/o(-h):g*o(h),!(mc)break;w.push(m)}w.length*2{if(u==null&&(u=10),s==null&&(s=r===10?"s":","),typeof s!="function"&&(!(r%1)&&(s=xv(s)).precision==null&&(s.trim=!0),s=N5(s)),u===1/0)return s;const l=Math.max(1,r*u/t.ticks().length);return c=>{let d=c/o(Math.round(i(c)));return d*rn(GW(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function YW(){const e=F5(Ew()).domain([1,10]);return e.copy=()=>Pg(e,YW()).base(e.base()),ba.apply(e,arguments),e}function OD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function kD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function L5(e){var t=1,n=e(OD(t),kD(t));return n.constant=function(r){return arguments.length?e(OD(t=+r),kD(t)):t},Bl(n)}function ZW(){var e=L5(Ew());return e.copy=function(){return Pg(e,ZW()).constant(e.constant())},ba.apply(e,arguments)}function TD(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function QPe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function JPe(e){return e<0?-e*e:e*e}function j5(e){var t=e(Wi,Wi),n=1;function r(){return n===1?e(Wi,Wi):n===.5?e(QPe,JPe):e(TD(n),TD(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bl(t)}function B5(){var e=j5(Ew());return e.copy=function(){return Pg(e,B5()).exponent(e.exponent())},ba.apply(e,arguments),e}function eOe(){return B5.apply(null,arguments).exponent(.5)}function MD(e){return Math.sign(e)*e*e}function tOe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XW(){var e=$5(),t=[0,1],n=!1,r;function i(o){var a=tOe(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(MD(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,vb)).map(MD)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return XW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ba.apply(i,arguments),Bl(i)}function QW(){var e=[],t=[],n=[],r;function i(){var a=0,u=Math.max(1,t.length);for(n=new Array(u-1);++a0?n[u-1]:e[0],u=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(s){return arguments.length&&(o=s),a},a.thresholds=function(){return r.slice()},a.copy=function(){return JW().domain([e,t]).range(i).unknown(o)},ba.apply(Bl(a),arguments)}function eV(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Eg(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return eV().domain(e).range(t).unknown(n)},ba.apply(i,arguments)}const RS=new Date,DS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const s=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return s;let l;do s.push(l=new Date(+o)),t(o,u),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(RS.setTime(+o),DS.setTime(+a),e(RS),e(DS),Math.floor(n(RS,DS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const yb=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yb);yb.range;const ts=1e3,la=ts*60,ns=la*60,bs=ns*24,z5=bs*7,RD=bs*30,$S=bs*365,wc=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ts)},(e,t)=>(t-e)/ts,e=>e.getUTCSeconds());wc.range;const U5=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());U5.range;const W5=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());W5.range;const V5=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ts-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getHours());V5.range;const H5=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ns)},(e,t)=>(t-e)/ns,e=>e.getUTCHours());H5.range;const Og=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/bs,e=>e.getDate()-1);Og.range;const Aw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>e.getUTCDate()-1);Aw.range;const tV=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bs,e=>Math.floor(e/bs));tV.range;function hf(e){return Zr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*la)/z5)}const Pw=hf(0),bb=hf(1),nOe=hf(2),rOe=hf(3),Xd=hf(4),iOe=hf(5),oOe=hf(6);Pw.range;bb.range;nOe.range;rOe.range;Xd.range;iOe.range;oOe.range;function pf(e){return Zr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/z5)}const Ow=pf(0),xb=pf(1),aOe=pf(2),uOe=pf(3),Qd=pf(4),sOe=pf(5),lOe=pf(6);Ow.range;xb.range;aOe.range;uOe.range;Qd.range;sOe.range;lOe.range;const q5=Zr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());q5.range;const K5=Zr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());K5.range;const xs=Zr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xs.range;const ws=Zr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ws.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ws.range;function nV(e,t,n,r,i,o){const a=[[wc,1,ts],[wc,5,5*ts],[wc,15,15*ts],[wc,30,30*ts],[o,1,la],[o,5,5*la],[o,15,15*la],[o,30,30*la],[i,1,ns],[i,3,3*ns],[i,6,6*ns],[i,12,12*ns],[r,1,bs],[r,2,2*bs],[n,1,z5],[t,1,RD],[t,3,3*RD],[e,1,$S]];function u(l,c,d){const h=cb).right(a,h);if(v===a.length)return e.every(kE(l/$S,c/$S,d));if(v===0)return yb.every(Math.max(kE(l,c,d),1));const[g,m]=a[h/a[v-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=NS(Dp(be.y,0,1)),It=lt.getUTCDay(),lt=It>4||It===0?xb.ceil(lt):xb(lt),lt=Aw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=IS(Dp(be.y,0,1)),It=lt.getDay(),lt=It>4||It===0?bb.ceil(lt):bb(lt),lt=Og.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),It="Z"in be?NS(Dp(be.y,0,1)).getUTCDay():IS(Dp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(It+5)%7:be.w+be.U*7-(It+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,NS(be)):IS(be)}}function M(Pe,Fe,$e,be){for(var yt=0,lt=Fe.length,It=$e.length,mn,en;yt=It)return-1;if(mn=Fe.charCodeAt(yt++),mn===37){if(mn=Fe.charAt(yt++),en=E[mn in DD?Fe.charAt(yt++):mn],!en||(be=en(Pe,$e,be))<0)return-1}else if(mn!=$e.charCodeAt(be++))return-1}return be}function F(Pe,Fe,$e){var be=l.exec(Fe.slice($e));return be?(Pe.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function U(Pe,Fe,$e){var be=v.exec(Fe.slice($e));return be?(Pe.w=g.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Pe,Fe,$e){var be=d.exec(Fe.slice($e));return be?(Pe.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function W(Pe,Fe,$e){var be=w.exec(Fe.slice($e));return be?(Pe.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ie(Pe,Fe,$e){var be=m.exec(Fe.slice($e));return be?(Pe.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Pe,Fe,$e){return M(Pe,t,Fe,$e)}function G(Pe,Fe,$e){return M(Pe,n,Fe,$e)}function K(Pe,Fe,$e){return M(Pe,r,Fe,$e)}function V(Pe){return a[Pe.getDay()]}function B(Pe){return o[Pe.getDay()]}function q(Pe){return s[Pe.getMonth()]}function Y(Pe){return u[Pe.getMonth()]}function ue(Pe){return i[+(Pe.getHours()>=12)]}function Q(Pe){return 1+~~(Pe.getMonth()/3)}function J(Pe){return a[Pe.getUTCDay()]}function se(Pe){return o[Pe.getUTCDay()]}function de(Pe){return s[Pe.getUTCMonth()]}function Se(Pe){return u[Pe.getUTCMonth()]}function ge(Pe){return i[+(Pe.getUTCHours()>=12)]}function Ze(Pe){return 1+~~(Pe.getUTCMonth()/3)}return{format:function(Pe){var Fe=C(Pe+="",S);return Fe.toString=function(){return Pe},Fe},parse:function(Pe){var Fe=T(Pe+="",!1);return Fe.toString=function(){return Pe},Fe},utcFormat:function(Pe){var Fe=C(Pe+="",A);return Fe.toString=function(){return Pe},Fe},utcParse:function(Pe){var Fe=T(Pe+="",!0);return Fe.toString=function(){return Pe},Fe}}}var DD={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,vOe=/^%/,gOe=/[\\^$*+?|[\]().{}]/g;function yn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function yOe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function bOe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function xOe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function wOe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _Oe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $D(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ID(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function SOe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function COe(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function EOe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ND(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function AOe(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function FD(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function POe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function OOe(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function kOe(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function TOe(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function MOe(e,t,n){var r=vOe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ROe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function DOe(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function LD(e,t){return yn(e.getDate(),t,2)}function $Oe(e,t){return yn(e.getHours(),t,2)}function IOe(e,t){return yn(e.getHours()%12||12,t,2)}function NOe(e,t){return yn(1+Og.count(xs(e),e),t,3)}function rV(e,t){return yn(e.getMilliseconds(),t,3)}function FOe(e,t){return rV(e,t)+"000"}function LOe(e,t){return yn(e.getMonth()+1,t,2)}function jOe(e,t){return yn(e.getMinutes(),t,2)}function BOe(e,t){return yn(e.getSeconds(),t,2)}function zOe(e){var t=e.getDay();return t===0?7:t}function UOe(e,t){return yn(Pw.count(xs(e)-1,e),t,2)}function iV(e){var t=e.getDay();return t>=4||t===0?Xd(e):Xd.ceil(e)}function WOe(e,t){return e=iV(e),yn(Xd.count(xs(e),e)+(xs(e).getDay()===4),t,2)}function VOe(e){return e.getDay()}function HOe(e,t){return yn(bb.count(xs(e)-1,e),t,2)}function qOe(e,t){return yn(e.getFullYear()%100,t,2)}function KOe(e,t){return e=iV(e),yn(e.getFullYear()%100,t,2)}function GOe(e,t){return yn(e.getFullYear()%1e4,t,4)}function YOe(e,t){var n=e.getDay();return e=n>=4||n===0?Xd(e):Xd.ceil(e),yn(e.getFullYear()%1e4,t,4)}function ZOe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yn(t/60|0,"0",2)+yn(t%60,"0",2)}function jD(e,t){return yn(e.getUTCDate(),t,2)}function XOe(e,t){return yn(e.getUTCHours(),t,2)}function QOe(e,t){return yn(e.getUTCHours()%12||12,t,2)}function JOe(e,t){return yn(1+Aw.count(ws(e),e),t,3)}function oV(e,t){return yn(e.getUTCMilliseconds(),t,3)}function e8e(e,t){return oV(e,t)+"000"}function t8e(e,t){return yn(e.getUTCMonth()+1,t,2)}function n8e(e,t){return yn(e.getUTCMinutes(),t,2)}function r8e(e,t){return yn(e.getUTCSeconds(),t,2)}function i8e(e){var t=e.getUTCDay();return t===0?7:t}function o8e(e,t){return yn(Ow.count(ws(e)-1,e),t,2)}function aV(e){var t=e.getUTCDay();return t>=4||t===0?Qd(e):Qd.ceil(e)}function a8e(e,t){return e=aV(e),yn(Qd.count(ws(e),e)+(ws(e).getUTCDay()===4),t,2)}function u8e(e){return e.getUTCDay()}function s8e(e,t){return yn(xb.count(ws(e)-1,e),t,2)}function l8e(e,t){return yn(e.getUTCFullYear()%100,t,2)}function c8e(e,t){return e=aV(e),yn(e.getUTCFullYear()%100,t,2)}function f8e(e,t){return yn(e.getUTCFullYear()%1e4,t,4)}function d8e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Qd(e):Qd.ceil(e),yn(e.getUTCFullYear()%1e4,t,4)}function h8e(){return"+0000"}function BD(){return"%"}function zD(e){return+e}function UD(e){return Math.floor(+e/1e3)}var Uf,uV,sV;p8e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function p8e(e){return Uf=pOe(e),uV=Uf.format,Uf.parse,sV=Uf.utcFormat,Uf.utcParse,Uf}function v8e(e){return new Date(e)}function g8e(e){return e instanceof Date?+e:+new Date(+e)}function G5(e,t,n,r,i,o,a,u,s,l){var c=$5(),d=c.invert,h=c.domain,v=l(".%L"),g=l(":%S"),m=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),A=l("%Y");function E(C){return(s(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>oPe(e,o/r))},n.copy=function(){return dV(t).domain(e)},Os.apply(n,arguments)}function Tw(){var e=0,t=.5,n=1,r=1,i,o,a,u,s,l=Wi,c,d=!1,h;function v(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*mt}var C8e=S8e,E8e=gV,A8e=C8e,P8e=Uh;function O8e(e){return e&&e.length?E8e(e,P8e,A8e):void 0}var k8e=O8e;const il=Pn(k8e);function T8e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ut.decimalPlaces=ut.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*er;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ut.dividedBy=ut.div=function(e){return ls(this,new this.constructor(e))};ut.dividedToIntegerBy=ut.idiv=function(e){var t=this,n=t.constructor;return Bn(ls(t,new n(e),0,1),n.precision)};ut.equals=ut.eq=function(e){return!this.cmp(e)};ut.exponent=function(){return Mr(this)};ut.greaterThan=ut.gt=function(e){return this.cmp(e)>0};ut.greaterThanOrEqualTo=ut.gte=function(e){return this.cmp(e)>=0};ut.isInteger=ut.isint=function(){return this.e>this.d.length-2};ut.isNegative=ut.isneg=function(){return this.s<0};ut.isPositive=ut.ispos=function(){return this.s>0};ut.isZero=function(){return this.s===0};ut.lessThan=ut.lt=function(e){return this.cmp(e)<0};ut.lessThanOrEqualTo=ut.lte=function(e){return this.cmp(e)<1};ut.logarithm=ut.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Mo))throw Error(ga+"NaN");if(n.s<1)throw Error(ga+(n.s?"NaN":"-Infinity"));return n.eq(Mo)?new r(0):(or=!1,t=ls(wv(n,o),wv(e,o),o),or=!0,Bn(t,i))};ut.minus=ut.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xV(t,e):yV(t,(e.s=-e.s,e))};ut.modulo=ut.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ga+"NaN");return n.s?(or=!1,t=ls(n,e,0,1).times(e),or=!0,n.minus(t)):Bn(new r(n),i)};ut.naturalExponential=ut.exp=function(){return bV(this)};ut.naturalLogarithm=ut.ln=function(){return wv(this)};ut.negated=ut.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ut.plus=ut.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?yV(t,e):xV(t,(e.s=-e.s,e))};ut.precision=ut.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(kc+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*er+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ut.squareRoot=ut.sqrt=function(){var e,t,n,r,i,o,a,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(ga+"NaN")}for(e=Mr(u),or=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=pu(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Hh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new s(t)):r=new s(i.toString()),n=s.precision,i=a=n+3;;)if(o=r,r=o.plus(ls(u,o,a+2)).times(.5),pu(o.d).slice(0,a)===(t=pu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Bn(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;a+=4}return or=!0,Bn(r,n)};ut.times=ut.mul=function(e){var t,n,r,i,o,a,u,s,l,c=this,d=c.constructor,h=c.d,v=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,s=h.length,l=v.length,s=0;){for(t=0,i=s+r;i>r;)u=o[i]+v[r]*h[i-r-1]+t,o[i--]=u%ei|0,t=u/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,or?Bn(e,d.precision):e};ut.toDecimalPlaces=ut.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ou(e,0,Vh),t===void 0?t=r.rounding:Ou(t,0,8),Bn(n,e+Mr(n)+1,t))};ut.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xc(r,!0):(Ou(e,0,Vh),t===void 0?t=i.rounding:Ou(t,0,8),r=Bn(new i(r),e+1,t),n=Xc(r,!0,e+1)),n};ut.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xc(i):(Ou(e,0,Vh),t===void 0?t=o.rounding:Ou(t,0,8),r=Bn(new o(i),e+Mr(i)+1,t),n=Xc(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ut.toInteger=ut.toint=function(){var e=this,t=e.constructor;return Bn(new t(e),Mr(e)+1,t.rounding)};ut.toNumber=function(){return+this};ut.toPower=ut.pow=function(e){var t,n,r,i,o,a,u=this,s=u.constructor,l=12,c=+(e=new s(e));if(!e.s)return new s(Mo);if(u=new s(u),!u.s){if(e.s<1)throw Error(ga+"Infinity");return u}if(u.eq(Mo))return u;if(r=s.precision,e.eq(Mo))return Bn(u,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=u.s,a){if((n=c<0?-c:c)<=mV){for(i=new s(Mo),t=Math.ceil(r/er+4),or=!1;n%2&&(i=i.times(u),HD(i.d,t)),n=Hh(n/2),n!==0;)u=u.times(u),HD(u.d,t);return or=!0,e.s<0?new s(Mo).div(i):Bn(i,r)}}else if(o<0)throw Error(ga+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,or=!1,i=e.times(wv(u,r+l)),or=!0,i=bV(i),i.s=o,i};ut.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=Xc(i,n<=o.toExpNeg||n>=o.toExpPos)):(Ou(e,1,Vh),t===void 0?t=o.rounding:Ou(t,0,8),i=Bn(new o(i),e,t),n=Mr(i),r=Xc(i,e<=n||n<=o.toExpNeg,e)),r};ut.toSignificantDigits=ut.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ou(e,1,Vh),t===void 0?t=r.rounding:Ou(t,0,8)),Bn(new r(n),e,t)};ut.toString=ut.valueOf=ut.val=ut.toJSON=ut[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return Xc(e,t<=n.toExpNeg||t>=n.toExpPos)};function yV(e,t){var n,r,i,o,a,u,s,l,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),or?Bn(t,d):t;if(s=e.d,l=t.d,a=e.e,i=t.e,s=s.slice(),o=a-i,o){for(o<0?(r=s,o=-o,u=l.length):(r=l,i=a,u=s.length),a=Math.ceil(d/er),u=a>u?a+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=s.length,o=l.length,u-o<0&&(o=u,r=l,l=s,s=r),n=0;o;)n=(s[--o]=s[o]+l[o]+n)/ei|0,s[o]%=ei;for(n&&(s.unshift(n),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,or?Bn(t,d):t}function Ou(e,t,n){if(e!==~~e||en)throw Error(kc+e)}function pu(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(u=s=0;ui[u]?1:-1;break}return s}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var u,s,l,c,d,h,v,g,m,b,w,x,S,A,E,C,T,M,F=r.constructor,U=r.s==i.s?1:-1,H=r.d,W=i.d;if(!r.s)return new F(r);if(!i.s)throw Error(ga+"Division by zero");for(s=r.e-i.e,T=W.length,E=H.length,v=new F(U),g=v.d=[],l=0;W[l]==(H[l]||0);)++l;if(W[l]>(H[l]||0)&&--s,o==null?x=o=F.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new F(0);if(x=x/er+2|0,l=0,T==1)for(c=0,W=W[0],x++;(l1&&(W=e(W,c),H=e(H,c),T=W.length,E=H.length),A=T,m=H.slice(0,T),b=m.length;b=ei/2&&++C;do c=0,u=t(W,m,T,b),u<0?(w=m[0],T!=b&&(w=w*ei+(m[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),d=e(W,c),h=d.length,b=m.length,u=t(d,m,h,b),u==1&&(c--,n(d,T16)throw Error(X5+Mr(e));if(!e.s)return new c(Mo);for(t==null?(or=!1,u=d):u=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(lc(2,l))/Math.LN10*2+5|0,u+=r,n=i=o=new c(Mo),c.precision=u;;){if(i=Bn(i.times(e),u),n=n.times(++s),a=o.plus(ls(i,n,u)),pu(a.d).slice(0,u)===pu(o.d).slice(0,u)){for(;l--;)o=Bn(o.times(o),u);return c.precision=d,t==null?(or=!0,Bn(o,d)):o}o=a}}function Mr(e){for(var t=e.e*er,n=e.d[0];n>=10;n/=10)t++;return t}function FS(e,t,n){if(t>e.LN10.sd())throw or=!0,n&&(e.precision=n),Error(ga+"LN10 precision limit exceeded");return Bn(new e(e.LN10),t)}function Gs(e){for(var t="";e--;)t+="0";return t}function wv(e,t){var n,r,i,o,a,u,s,l,c,d=1,h=10,v=e,g=v.d,m=v.constructor,b=m.precision;if(v.s<1)throw Error(ga+(v.s?"NaN":"-Infinity"));if(v.eq(Mo))return new m(0);if(t==null?(or=!1,l=b):l=t,v.eq(10))return t==null&&(or=!0),FS(m,l);if(l+=h,m.precision=l,n=pu(g),r=n.charAt(0),o=Mr(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=pu(v.d),r=n.charAt(0),d++;o=Mr(v),r>1?(v=new m("0."+n),o++):v=new m(r+"."+n.slice(1))}else return s=FS(m,l+2,b).times(o+""),v=wv(new m(r+"."+n.slice(1)),l-h).plus(s),m.precision=b,t==null?(or=!0,Bn(v,b)):v;for(u=a=v=ls(v.minus(Mo),v.plus(Mo),l),c=Bn(v.times(v),l),i=3;;){if(a=Bn(a.times(c),l),s=u.plus(ls(a,new m(i),l)),pu(s.d).slice(0,l)===pu(u.d).slice(0,l))return u=u.times(2),o!==0&&(u=u.plus(FS(m,l+2,b).times(o+""))),u=ls(u,new m(d),l),m.precision=b,t==null?(or=!0,Bn(u,b)):u;u=s,i+=2}}function VD(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Hh(n/er),e.d=[],r=(n+1)%er,n<0&&(r+=er),rwb||e.e<-wb))throw Error(X5+n)}else e.s=0,e.e=0,e.d=[0];return e}function Bn(e,t,n){var r,i,o,a,u,s,l,c,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=er,i=t,l=d[c=0];else{if(c=Math.ceil((r+1)/er),o=d.length,c>=o)return e;for(l=o=d[c],a=1;o>=10;o/=10)a++;r%=er,i=r-er+a}if(n!==void 0&&(o=lc(10,a-i-1),u=l/o%10|0,s=t<0||d[c+1]!==void 0||l%o,s=n<4?(u||s)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||s||n==6&&(r>0?i>0?l/lc(10,a-i):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return s?(o=Mr(e),d.length=1,t=t-o-1,d[0]=lc(10,(er-t%er)%er),e.e=Hh(-t/er)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,o=1,c--):(d.length=c+1,o=lc(10,er-r),d[c]=i>0?(l/lc(10,a-i)%lc(10,i)|0)*o:0),s)for(;;)if(c==0){(d[0]+=o)==ei&&(d[0]=1,++e.e);break}else{if(d[c]+=o,d[c]!=ei)break;d[c--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(or&&(e.e>wb||e.e<-wb))throw Error(X5+Mr(e));return e}function xV(e,t){var n,r,i,o,a,u,s,l,c,d,h=e.constructor,v=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),or?Bn(t,v):t;if(s=e.d,d=t.d,r=t.e,l=e.e,s=s.slice(),a=l-r,a){for(c=a<0,c?(n=s,a=-a,u=d.length):(n=d,r=l,u=s.length),i=Math.max(Math.ceil(v/er),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=s.length,u=d.length,c=i0;--i)s[u++]=0;for(i=d.length;i>a;){if(s[--i]0?o=o.charAt(0)+"."+o.slice(1)+Gs(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Gs(-i-1)+o,n&&(r=n-a)>0&&(o+=Gs(r))):i>=a?(o+=Gs(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Gs(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Gs(r))),e.s<0?"-"+o:o}function HD(e,t){if(e.length>t)return e.length=t,!0}function wV(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(kc+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return VD(a,o.toString())}else if(typeof o!="string")throw Error(kc+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Q8e.test(o))VD(a,o);else throw Error(kc+o)}if(i.prototype=ut,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=wV,i.config=i.set=J8e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(kc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(kc+n+": "+r);return this}var Q5=wV(X8e);Mo=new Q5(1);const In=Q5;function eke(e){return ike(e)||rke(e)||nke(e)||tke()}function tke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nke(e,t){if(e){if(typeof e=="string")return $E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $E(e,t)}}function rke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ike(e){if(Array.isArray(e))return $E(e)}function $E(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,qD(function(){for(var u=arguments.length,s=new Array(u),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),u;!(r=(u=a.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function bke(e){if(Array.isArray(e))return e}function AV(e){var t=_v(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function PV(e,t,n){if(e.lte(0))return new In(0);var r=Dw.getDigitCount(e.toNumber()),i=new In(10).pow(r),o=e.div(i),a=r!==1?.05:.1,u=new In(Math.ceil(o.div(a).toNumber())).add(n).mul(a),s=u.mul(i);return t?s:new In(Math.ceil(s))}function xke(e,t,n){var r=1,i=new In(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new In(10).pow(Dw.getDigitCount(e)-1),i=new In(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new In(Math.floor(e)))}else e===0?i=new In(Math.floor((t-1)/2)):n||(i=new In(Math.floor(e)));var a=Math.floor((t-1)/2),u=ske(uke(function(s){return i.add(new In(s-a).mul(r)).toNumber()}),IE);return u(0,t)}function OV(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new In(0),tickMin:new In(0),tickMax:new In(0)};var o=PV(new In(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new In(0):(a=new In(e).add(t).div(2),a=a.sub(new In(a).mod(o)));var u=Math.ceil(a.sub(e).div(o).toNumber()),s=Math.ceil(new In(t).sub(a).div(o).toNumber()),l=u+s+1;return l>n?OV(e,t,n,r,i+1):(l0?s+(n-l):s,u=t>0?u:u+(n-l)),{step:o,tickMin:a.sub(new In(u).mul(o)),tickMax:a.add(new In(s).mul(o))})}function wke(e){var t=_v(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),u=AV([n,r]),s=_v(u,2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(FE(IE(0,i-1).map(function(){return 1/0}))):[].concat(FE(IE(0,i-1).map(function(){return-1/0})),[c]);return n>r?NE(d):d}if(l===c)return xke(l,i,o);var h=OV(l,c,a,o),v=h.step,g=h.tickMin,m=h.tickMax,b=Dw.rangeStep(g,m.add(new In(.1).mul(v)),v);return n>r?NE(b):b}function _ke(e,t){var n=_v(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=AV([r,i]),u=_v(a,2),s=u[0],l=u[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=PV(new In(l).sub(s).div(c-1),o,0),h=[].concat(FE(Dw.rangeStep(new In(s),new In(l).sub(new In(.99).mul(d)),d)),[l]);return r>i?NE(h):h}var Ske=CV(wke),Cke=CV(_ke),Eke="Invariant failed";function Qc(e,t){throw new Error(Eke)}var Ake=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ike(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l0?i[l-1].coordinate:i[u-1].coordinate,d=i[l].coordinate,h=l>=u-1?i[0].coordinate:i[l+1].coordinate,v=void 0;if(Ba(d-c)!==Ba(h-d)){var g=[];if(Ba(h-d)===Ba(s[1]-s[0])){v=h;var m=d+s[1]-s[0];g[0]=Math.min(m,(m+c)/2),g[1]=Math.max(m,(m+c)/2)}else{v=c;var b=h+s[1]-s[0];g[0]=Math.min(d,(b+d)/2),g[1]=Math.max(d,(b+d)/2)}var w=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+d)/2&&t<=(S+d)/2){a=i[l].index;break}}}else for(var A=0;A0&&A(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){a=r[A].index;break}return a},J5=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,a=o.stroke,u=o.fill,s;switch(i){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:u;break;default:s=u;break}return s},Qke=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},u=Object.keys(o),s=0,l=u.length;s=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?gr(gr({},x),w[0].props):w[0].props,A=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=zt(A)?n:A;a[E].push({item:w[0],stackList:w.slice(1),barSize:zt(C)?void 0:Yc(C,r,0)})}}return a},Jke=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,u=t.maxBarSize,s=a.length;if(s<1)return null;var l=Yc(n,i,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,v=i/s,g=a.reduce(function(A,E){return A+E.barSize||0},0);g+=(s-1)*l,g>=i&&(g-=(s-1)*l,l=0),g>=i&&v>0&&(h=!0,v*=.9,g=s*v);var m=(i-g)/2>>0,b={offset:m-l,size:0};c=a.reduce(function(A,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?v:E.barSize}},T=[].concat(YD(A),[C]);return b=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:b})}),T},d)}else{var w=Yc(r,i,0,!0);i-2*w-(s-1)*l<=0&&(l=0);var x=(i-2*w-(s-1)*l)/s;x>1&&(x>>=0);var S=u===+u?Math.min(x,u):x;c=a.reduce(function(A,E,C){var T=[].concat(YD(A),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:T[T.length-1].position})}),T},d)}return c},eTe=function(t,n,r,i){var o=r.children,a=r.width,u=r.margin,s=a-(u.left||0)-(u.right||0),l=RV({children:o,legendWidth:s});if(l){var c=i||{},d=c.width,h=c.height,v=l.align,g=l.verticalAlign,m=l.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&v!=="center"&&Ke(t[v]))return gr(gr({},t),{},Od({},v,t[v]+(d||0)));if((m==="horizontal"||m==="vertical"&&v==="center")&&g!=="middle"&&Ke(t[g]))return gr(gr({},t),{},Od({},g,t[g]+(h||0)))}return t},tTe=function(t,n,r){return zt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},DV=function(t,n,r,i,o){var a=n.props.children,u=fo(a,qh).filter(function(l){return tTe(i,o,l.props.direction)});if(u&&u.length){var s=u.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var d=qr(c,r);if(zt(d))return l;var h=Array.isArray(d)?[Mw(d),il(d)]:[d,d],v=s.reduce(function(g,m){var b=qr(c,m,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(v[0],l[0]),Math.max(v[1],l[1])]},[1/0,-1/0])}return null},nTe=function(t,n,r,i,o){var a=n.map(function(u){return DV(t,u,r,o,i)}).filter(function(u){return!zt(u)});return a&&a.length?a.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},$V=function(t,n,r,i,o){var a=n.map(function(s){var l=s.props.dataKey;return r==="number"&&l&&DV(t,s,l,i)||p0(t,l,r,o)});if(r==="number")return a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]);var u={};return a.reduce(function(s,l){for(var c=0,d=l.length;c=2?Ba(u[0]-u[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:i(h)+l,value:d,offset:l}});return c.filter(function(d){return!jh(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+l,value:d,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+l,value:d,offset:l}}):i.domain().map(function(d,h){return{coordinate:i(d)+l,value:o?o[d]:d,index:h,offset:l}})},LS=new WeakMap,sy=function(t,n){if(typeof n!="function")return t;LS.has(t)||LS.set(t,new WeakMap);var r=LS.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},rTe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,u=t.axisType;if(i==="auto")return a==="radial"&&u==="radiusAxis"?{scale:gv(),realScaleType:"band"}:a==="radial"&&u==="angleAxis"?{scale:mb(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:h0(),realScaleType:"point"}:o==="category"?{scale:gv(),realScaleType:"band"}:{scale:mb(),realScaleType:"linear"};if(Sg(i)){var s="scale".concat(mw(i));return{scale:(WD[s]||h0)(),realScaleType:WD[s]?s:"point"}}return Wt(i)?{scale:i}:{scale:h0(),realScaleType:"point"}},XD=1e-4,iTe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-XD,a=Math.max(i[0],i[1])+XD,u=t(n[0]),s=t(n[r-1]);(ua||sa)&&t.domain([n[0],n[r-1]])}},oTe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][r][0]=o,t[u][r][1]=o+s,o=t[u][r][1]):(t[u][r][0]=a,t[u][r][1]=a+s,a=t[u][r][1])}},sTe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+u,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},lTe={sign:uTe,expand:C2e,none:Hd,silhouette:E2e,wiggle:A2e,positive:sTe},cTe=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=lTe[r],a=S2e().keys(i).value(function(u,s){return+qr(u,s,0)}).order(fE).offset(o);return a(t)},fTe=function(t,n,r,i,o,a){if(!t)return null;var u=a?n.reverse():n,s={},l=u.reduce(function(d,h){var v,g=(v=h.type)!==null&&v!==void 0&&v.defaultProps?gr(gr({},h.type.defaultProps),h.props):h.props,m=g.stackId,b=g.hide;if(b)return d;var w=g[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Hr(m)){var S=x.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[m]=S}else x.stackGroups[df("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return gr(gr({},d),{},Od({},w,x))},s),c={};return Object.keys(l).reduce(function(d,h){var v=l[h];if(v.hasStack){var g={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(m,b){var w=v.stackGroups[b];return gr(gr({},m),{},Od({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:cTe(t,w.items,o)}))},g)}return gr(gr({},d),{},Od({},h,v))},c)},dTe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,u=n.allowDecimals,s=r||n.scale;if(s!=="auto"&&s!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=Ske(l,o,u);return t.domain([Mw(c),il(c)]),{niceTicks:c}}if(o&&i==="number"){var d=t.domain(),h=Cke(d,o,u);return{niceTicks:h}}return null};function eh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!zt(i[t.dataKey])){var u=Y1(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var s=qr(i,zt(a)?t.dataKey:a);return zt(s)?null:t.scale(s)}var QD=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var s=qr(a,n.dataKey,n.domain[u]);return zt(s)?null:n.scale(s)-o/2+i},hTe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},pTe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?gr(gr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var u=a.items.indexOf(t);return u>=0?a.stackedData[u]:null}}return null},vTe=function(t){return t.reduce(function(n,r){return[Mw(r.concat([n[0]]).filter(Ke)),il(r.concat([n[1]]).filter(Ke))]},[1/0,-1/0])},FV=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],u=a.stackedData,s=u.reduce(function(l,c){var d=vTe(c.slice(n,r+1));return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},JD=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,e7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zE=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Ke(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(JD.test(t[0])){var o=+JD.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Ke(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(e7.test(t[1])){var a=+e7.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Cb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=A5(n,function(d){return d.coordinate}),a=1/0,u=1,s=o.length;ua&&(l=2*Math.PI-l),{radius:u,angle:bTe(l),angleInRadian:l}},_Te=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},STe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),u=Math.min(o,a);return t+u*360},i7=function(t,n){var r=t.x,i=t.y,o=wTe({x:r,y:i},n),a=o.radius,u=o.angle,s=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=_Te(n),d=c.startAngle,h=c.endAngle,v=u,g;if(d<=h){for(;v>h;)v-=360;for(;v=d&&v<=h}else{for(;v>d;)v-=360;for(;v=h&&v<=d}return g?r7(r7({},n),{},{radius:a,angle:STe(v,n)}):null};function Av(e){"@babel/helpers - typeof";return Av=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},Av(e)}var CTe=["offset"];function ETe(e){return kTe(e)||OTe(e)||PTe(e)||ATe()}function ATe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PTe(e,t){if(e){if(typeof e=="string")return UE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UE(e,t)}}function OTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kTe(e){if(Array.isArray(e))return UE(e)}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function o7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=v+x*a,A=m):i==="insideEnd"?(S=g-x*a,A=!m):i==="end"&&(S=g+x*a,A=m),A=w<=0?A:!A;var E=pi(l,c,b,S),C=pi(l,c,b,S+(A?1:-1)*359),T="M".concat(E.x,",").concat(E.y,` A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`, - `).concat(C.x,",").concat(C.y),M=zt(t.id)?df("recharts-radial-line-"):t.id;return j.createElement("text",Av({},r,{dominantBaseline:"central",className:fn("recharts-radial-bar-label",u)}),j.createElement("defs",null,j.createElement("path",{id:M,d:T})),j.createElement("textPath",{xlinkHref:"#".concat(M)},n))},NTe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,u=o.cy,s=o.innerRadius,l=o.outerRadius,c=o.startAngle,d=o.endAngle,h=(c+d)/2;if(i==="outside"){var v=pi(a,u,l+r,h),g=v.x,m=v.y;return{x:g,y:m,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"end"};var b=(s+l)/2,w=pi(a,u,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},FTe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,u=a.x,s=a.y,l=a.width,c=a.height,d=c>=0?1:-1,h=d*i,v=d>0?"end":"start",g=d>0?"start":"end",m=l>=0?1:-1,b=m*i,w=m>0?"end":"start",x=m>0?"start":"end";if(o==="top"){var S={x:u+l/2,y:s-d*i,textAnchor:"middle",verticalAnchor:v};return jr(jr({},S),r?{height:Math.max(s-r.y,0),width:l}:{})}if(o==="bottom"){var A={x:u+l/2,y:s+c+h,textAnchor:"middle",verticalAnchor:g};return jr(jr({},A),r?{height:Math.max(r.y+r.height-(s+c),0),width:l}:{})}if(o==="left"){var E={x:u-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:u+l+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var T=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:u+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"},T):o==="insideRight"?jr({x:u+l-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"},T):o==="insideTop"?jr({x:u+l/2,y:s+h,textAnchor:"middle",verticalAnchor:g},T):o==="insideBottom"?jr({x:u+l/2,y:s+c-h,textAnchor:"middle",verticalAnchor:v},T):o==="insideTopLeft"?jr({x:u+b,y:s+h,textAnchor:x,verticalAnchor:g},T):o==="insideTopRight"?jr({x:u+l-b,y:s+h,textAnchor:w,verticalAnchor:g},T):o==="insideBottomLeft"?jr({x:u+b,y:s+c-h,textAnchor:x,verticalAnchor:v},T):o==="insideBottomRight"?jr({x:u+l-b,y:s+c-h,textAnchor:w,verticalAnchor:v},T):$h(o)&&(Ke(o.x)||bc(o.x))&&(Ke(o.y)||bc(o.y))?jr({x:u+Yc(o.x,l),y:s+Yc(o.y,c),textAnchor:"end",verticalAnchor:"end"},T):jr({x:u+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},LTe=function(t){return"cx"in t&&Ke(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=PTe(e,_Te),i=jr({offset:n},r),o=i.viewBox,a=i.position,u=i.value,s=i.children,l=i.content,c=i.className,d=c===void 0?"":c,h=i.textBreakAll;if(!o||zt(u)&&zt(s)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var v;if(Wt(l)){if(v=y.createElement(l,i),y.isValidElement(v))return v}else v=DTe(i);var g=LTe(o),m=Bt(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return ITe(i,v,m);var b=g?NTe(i):FTe(i);return j.createElement(lb,Av({className:fn("recharts-label",d)},m,b,{breakAll:h}),v)}ki.displayName="Label";var FV=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,u=t.r,s=t.radius,l=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,v=t.top,g=t.left,m=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ke(m)&&Ke(b)){if(Ke(d)&&Ke(h))return{x:d,y:h,width:m,height:b};if(Ke(v)&&Ke(g))return{x:v,y:g,width:m,height:b}}return Ke(d)&&Ke(h)?{x:d,y:h,width:0,height:0}:Ke(n)&&Ke(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||s||u||0,clockWise:w}:t.viewBox?t.viewBox:{}},jTe=function(t,n){return t?t===!0?j.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?j.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):$h(t)?j.createElement(ki,Av({viewBox:n},t,{key:"label-implicit"})):null:null},BTe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=FV(t),a=fo(i,ki).map(function(s,l){return y.cloneElement(s,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var u=jTe(t.label,n||o);return[u].concat(STe(a))};ki.parseViewBox=FV;ki.renderCallByParent=BTe;function zTe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var UTe=zTe;const WTe=On(UTe);function Ov(e){"@babel/helpers - typeof";return Ov=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},Ov(e)}var VTe=["valueAccessor"],HTe=["data","dataKey","clockWise","id","textBreakAll"];function qTe(e){return ZTe(e)||YTe(e)||GTe(e)||KTe()}function KTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GTe(e,t){if(e){if(typeof e=="string")return WE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WE(e,t)}}function YTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZTe(e){if(Array.isArray(e))return WE(e)}function WE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var tMe=function(t){return Array.isArray(t.value)?WTe(t.value):t.value};function Su(e){var t=e.valueAccessor,n=t===void 0?tMe:t,r=u7(e,VTe),i=r.data,o=r.dataKey,a=r.clockWise,u=r.id,s=r.textBreakAll,l=u7(r,HTe);return!i||!i.length?null:j.createElement(Sn,{className:"recharts-label-list"},i.map(function(c,d){var h=zt(o)?n(c,d):qr(c&&c.payload,o),v=zt(u)?{}:{id:"".concat(u,"-").concat(d)};return j.createElement(ki,Eb({},Bt(c,!0),l,v,{parentViewBox:c.parentViewBox,value:h,textBreakAll:s,viewBox:ki.parseViewBox(zt(a)?c:a7(a7({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Su.displayName="LabelList";function nMe(e,t){return e?e===!0?j.createElement(Su,{key:"labelList-implicit",data:t}):j.isValidElement(e)||Wt(e)?j.createElement(Su,{key:"labelList-implicit",data:t,content:e}):$h(e)?j.createElement(Su,Eb({data:t},e,{key:"labelList-implicit"})):null:null}function rMe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=fo(r,Su).map(function(a,u){return y.cloneElement(a,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=nMe(e.label,t);return[o].concat(qTe(i))}Su.renderCallByParent=rMe;function Pv(e){"@babel/helpers - typeof";return Pv=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},Pv(e)}function VE(){return VE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"end"};var b=(s+l)/2,w=pi(a,u,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},jTe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,u=a.x,s=a.y,l=a.width,c=a.height,d=c>=0?1:-1,h=d*i,v=d>0?"end":"start",g=d>0?"start":"end",m=l>=0?1:-1,b=m*i,w=m>0?"end":"start",x=m>0?"start":"end";if(o==="top"){var S={x:u+l/2,y:s-d*i,textAnchor:"middle",verticalAnchor:v};return jr(jr({},S),r?{height:Math.max(s-r.y,0),width:l}:{})}if(o==="bottom"){var A={x:u+l/2,y:s+c+h,textAnchor:"middle",verticalAnchor:g};return jr(jr({},A),r?{height:Math.max(r.y+r.height-(s+c),0),width:l}:{})}if(o==="left"){var E={x:u-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:u+l+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var T=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:u+b,y:s+c/2,textAnchor:x,verticalAnchor:"middle"},T):o==="insideRight"?jr({x:u+l-b,y:s+c/2,textAnchor:w,verticalAnchor:"middle"},T):o==="insideTop"?jr({x:u+l/2,y:s+h,textAnchor:"middle",verticalAnchor:g},T):o==="insideBottom"?jr({x:u+l/2,y:s+c-h,textAnchor:"middle",verticalAnchor:v},T):o==="insideTopLeft"?jr({x:u+b,y:s+h,textAnchor:x,verticalAnchor:g},T):o==="insideTopRight"?jr({x:u+l-b,y:s+h,textAnchor:w,verticalAnchor:g},T):o==="insideBottomLeft"?jr({x:u+b,y:s+c-h,textAnchor:x,verticalAnchor:v},T):o==="insideBottomRight"?jr({x:u+l-b,y:s+c-h,textAnchor:w,verticalAnchor:v},T):Ih(o)&&(Ke(o.x)||bc(o.x))&&(Ke(o.y)||bc(o.y))?jr({x:u+Yc(o.x,l),y:s+Yc(o.y,c),textAnchor:"end",verticalAnchor:"end"},T):jr({x:u+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},BTe=function(t){return"cx"in t&&Ke(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=TTe(e,CTe),i=jr({offset:n},r),o=i.viewBox,a=i.position,u=i.value,s=i.children,l=i.content,c=i.className,d=c===void 0?"":c,h=i.textBreakAll;if(!o||zt(u)&&zt(s)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var v;if(Wt(l)){if(v=y.createElement(l,i),y.isValidElement(v))return v}else v=ITe(i);var g=BTe(o),m=Bt(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return FTe(i,v,m);var b=g?LTe(i):jTe(i);return j.createElement(cb,Pv({className:fn("recharts-label",d)},m,b,{breakAll:h}),v)}ki.displayName="Label";var jV=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,u=t.r,s=t.radius,l=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,v=t.top,g=t.left,m=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ke(m)&&Ke(b)){if(Ke(d)&&Ke(h))return{x:d,y:h,width:m,height:b};if(Ke(v)&&Ke(g))return{x:v,y:g,width:m,height:b}}return Ke(d)&&Ke(h)?{x:d,y:h,width:0,height:0}:Ke(n)&&Ke(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||s||u||0,clockWise:w}:t.viewBox?t.viewBox:{}},zTe=function(t,n){return t?t===!0?j.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?j.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?j.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Ih(t)?j.createElement(ki,Pv({viewBox:n},t,{key:"label-implicit"})):null:null},UTe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=jV(t),a=fo(i,ki).map(function(s,l){return y.cloneElement(s,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var u=zTe(t.label,n||o);return[u].concat(ETe(a))};ki.parseViewBox=jV;ki.renderCallByParent=UTe;function WTe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var VTe=WTe;const HTe=Pn(VTe);function Ov(e){"@babel/helpers - typeof";return Ov=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},Ov(e)}var qTe=["valueAccessor"],KTe=["data","dataKey","clockWise","id","textBreakAll"];function GTe(e){return QTe(e)||XTe(e)||ZTe(e)||YTe()}function YTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZTe(e,t){if(e){if(typeof e=="string")return WE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WE(e,t)}}function XTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QTe(e){if(Array.isArray(e))return WE(e)}function WE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rMe=function(t){return Array.isArray(t.value)?HTe(t.value):t.value};function Su(e){var t=e.valueAccessor,n=t===void 0?rMe:t,r=s7(e,qTe),i=r.data,o=r.dataKey,a=r.clockWise,u=r.id,s=r.textBreakAll,l=s7(r,KTe);return!i||!i.length?null:j.createElement(Sn,{className:"recharts-label-list"},i.map(function(c,d){var h=zt(o)?n(c,d):qr(c&&c.payload,o),v=zt(u)?{}:{id:"".concat(u,"-").concat(d)};return j.createElement(ki,Ab({},Bt(c,!0),l,v,{parentViewBox:c.parentViewBox,value:h,textBreakAll:s,viewBox:ki.parseViewBox(zt(a)?c:u7(u7({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Su.displayName="LabelList";function iMe(e,t){return e?e===!0?j.createElement(Su,{key:"labelList-implicit",data:t}):j.isValidElement(e)||Wt(e)?j.createElement(Su,{key:"labelList-implicit",data:t,content:e}):Ih(e)?j.createElement(Su,Ab({data:t},e,{key:"labelList-implicit"})):null:null}function oMe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=fo(r,Su).map(function(a,u){return y.cloneElement(a,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=iMe(e.label,t);return[o].concat(GTe(i))}Su.renderCallByParent=oMe;function kv(e){"@babel/helpers - typeof";return kv=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},kv(e)}function VE(){return VE=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>l),`, `).concat(d.x,",").concat(d.y,` `);if(i>0){var v=pi(n,r,i,a),g=pi(n,r,i,l);h+="L ".concat(g.x,",").concat(g.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(s)>180),",").concat(+(a<=l),`, - `).concat(v.x,",").concat(v.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},sMe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,d=Ba(c-l),h=sy({cx:n,cy:r,radius:o,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),v=h.circleTangency,g=h.lineTangency,m=h.theta,b=sy({cx:n,cy:r,radius:o,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:s}),w=b.circleTangency,x=b.lineTangency,S=b.theta,A=s?Math.abs(l-c):Math.abs(l-c)-m-S;if(A<0)return u?"M ".concat(g.x,",").concat(g.y,` + `).concat(v.x,",").concat(v.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},cMe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,d=Ba(c-l),h=ly({cx:n,cy:r,radius:o,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),v=h.circleTangency,g=h.lineTangency,m=h.theta,b=ly({cx:n,cy:r,radius:o,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:s}),w=b.circleTangency,x=b.lineTangency,S=b.theta,A=s?Math.abs(l-c):Math.abs(l-c)-m-S;if(A<0)return u?"M ".concat(g.x,",").concat(g.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):LV({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(g.x,",").concat(g.y,` + `):BV({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(g.x,",").concat(g.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` A`).concat(o,",").concat(o,",0,").concat(+(A>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - `);if(i>0){var C=sy({cx:n,cy:r,radius:i,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=C.circleTangency,M=C.lineTangency,F=C.theta,U=sy({cx:n,cy:r,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),H=U.circleTangency,W=U.lineTangency,ie=U.theta,Z=s?Math.abs(l-c):Math.abs(l-c)-F-ie;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(W.x,",").concat(W.y,` + `);if(i>0){var C=ly({cx:n,cy:r,radius:i,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=C.circleTangency,M=C.lineTangency,F=C.theta,U=ly({cx:n,cy:r,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),H=U.circleTangency,W=U.lineTangency,ie=U.theta,Z=s?Math.abs(l-c):Math.abs(l-c)-F-ie;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(W.x,",").concat(W.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(H.x,",").concat(H.y,` A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(d>0),",").concat(T.x,",").concat(T.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},lMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jV=function(t){var n=l7(l7({},lMe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,s=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?b=sMe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):b=LV({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:d}),j.createElement("path",VE({},Bt(n,!0),{className:v,d:b,role:"img"}))};function kv(e){"@babel/helpers - typeof";return kv=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},kv(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function bMe(e,t){return qh(e.getTime(),t.getTime())}function m7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,u;(a=i.next())&&!a.done;){for(var s=t.entries(),l=!1,c=0;(u=s.next())&&!u.done;){var d=a.value,h=d[0],v=d[1],g=u.value,m=g[0],b=g[1];!l&&!r[c]&&(l=n.equals(h,m,o,c,e,t,n)&&n.equals(v,b,h,m,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function xMe(e,t,n){var r=g7(e),i=r.length;if(g7(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===zV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!BV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Fp(e,t,n){var r=p7(e),i=r.length;if(p7(t).length!==i)return!1;for(var o,a,u;i-- >0;)if(o=r[i],o===zV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!BV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=v7(e,o),u=v7(t,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function wMe(e,t){return qh(e.valueOf(),t.valueOf())}function _Me(e,t){return e.source===t.source&&e.flags===t.flags}function y7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var u=t.values(),s=!1,l=0;(a=u.next())&&!a.done;)!s&&!r[l]&&(s=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!s)return!1}return!0}function SMe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var CMe="[object Arguments]",EMe="[object Boolean]",AMe="[object Date]",OMe="[object Map]",PMe="[object Number]",kMe="[object Object]",TMe="[object RegExp]",MMe="[object Set]",RMe="[object String]",DMe=Array.isArray,b7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,x7=Object.assign,$Me=Object.prototype.toString.call.bind(Object.prototype.toString);function IMe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,s=e.areTypedArraysEqual;return function(c,d,h){if(c===d)return!0;if(c==null||d==null||typeof c!="object"||typeof d!="object")return c!==c&&d!==d;var v=c.constructor;if(v!==d.constructor)return!1;if(v===Object)return i(c,d,h);if(DMe(c))return t(c,d,h);if(b7!=null&&b7(c))return s(c,d,h);if(v===Date)return n(c,d,h);if(v===RegExp)return a(c,d,h);if(v===Map)return r(c,d,h);if(v===Set)return u(c,d,h);var g=$Me(c);return g===AMe?n(c,d,h):g===TMe?a(c,d,h):g===OMe?r(c,d,h):g===MMe?u(c,d,h):g===kMe?typeof c.then!="function"&&typeof d.then!="function"&&i(c,d,h):g===CMe?i(c,d,h):g===EMe||g===PMe||g===RMe?o(c,d,h):!1}}function NMe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Fp:yMe,areDatesEqual:bMe,areMapsEqual:r?h7(m7,Fp):m7,areObjectsEqual:r?Fp:xMe,arePrimitiveWrappersEqual:wMe,areRegExpsEqual:_Me,areSetsEqual:r?h7(y7,Fp):y7,areTypedArraysEqual:r?Fp:SMe};if(n&&(i=x7({},i,n(i))),t){var o=cy(i.areArraysEqual),a=cy(i.areMapsEqual),u=cy(i.areObjectsEqual),s=cy(i.areSetsEqual);i=x7({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:s})}return i}function FMe(e){return function(t,n,r,i,o,a,u){return e(t,n,u)}}function LMe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(s,l){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,v=c.meta;return n(s,l,{cache:h,equals:i,meta:v,strict:o})};if(t)return function(s,l){return n(s,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(s,l){return n(s,l,a)}}var jMe=Ul();Ul({strict:!0});Ul({circular:!0});Ul({circular:!0,strict:!0});Ul({createInternalComparator:function(){return qh}});Ul({strict:!0,createInternalComparator:function(){return qh}});Ul({circular:!0,createInternalComparator:function(){return qh}});Ul({circular:!0,createInternalComparator:function(){return qh},strict:!0});function Ul(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,u=NMe(e),s=IMe(u),l=r?r(s):FMe(s);return LMe({circular:n,comparator:s,createState:i,equals:l,strict:a})}function BMe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function w7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):BMe(i)};requestAnimationFrame(r)}function qE(e){"@babel/helpers - typeof";return qE=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},qE(e)}function zMe(e){return HMe(e)||VMe(e)||WMe(e)||UMe()}function UMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WMe(e,t){if(e){if(typeof e=="string")return _7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _7(e,t)}}function _7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},m=function(w){for(var x=w>1?1:w,S=x,A=0;A<8;++A){var E=d(S)-x,C=v(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,u=a===void 0?17:a,s=function(c,d,h){var v=-(c-d)*r,g=h*o,m=h+(v-g)*u/1e3,b=h*u/1e3+c;return Math.abs(b-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Re(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function jS(e){return ARe(e)||ERe(e)||CRe(e)||SRe()}function SRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CRe(e,t){if(e){if(typeof e=="string")return XE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XE(e,t)}}function ERe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ARe(e){if(Array.isArray(e))return XE(e)}function XE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"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 Pb(e){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pb(e)}var Ya=function(e){MRe(n,e);var t=RRe(n);function n(r,i){var o;ORe(this,n),o=t.call(this,r,i);var a=o.props,u=a.isActive,s=a.attributeName,l=a.from,c=a.to,d=a.steps,h=a.children,v=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(e6(o)),o.changeStyle=o.changeStyle.bind(e6(o)),!u||v<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),JE(o);if(d&&d.length)o.state={style:d[0].style};else if(l){if(typeof h=="function")return o.state={style:l},JE(o);o.state={style:s?Xp({},s,l):l}}else o.state={style:{}};return o}return kRe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,u=o.canBegin,s=o.attributeName,l=o.shouldReAnimate,c=o.to,d=o.from,h=this.state.style;if(u){if(!a){var v={style:s?Xp({},s,c):c};this.state&&h&&(s&&h[s]!==c||!s&&h!==c)&&this.setState(v);return}if(!(jMe(i.to,c)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||l?d:i.to;if(this.state&&h){var b={style:s?Xp({},s,m):m};(s&&h[s]!==m||!s&&h!==m)&&this.setState(b)}this.runAnimation(Oa(Oa({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,u=i.to,s=i.duration,l=i.easing,c=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,v=bRe(a,u,sRe(l),s,this.changeStyle),g=function(){o.stopJSAnimation=v()};this.manager.start([h,c,g,s,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,u=i.begin,s=i.onAnimationStart,l=a[0],c=l.style,d=l.duration,h=d===void 0?0:d,v=function(m,b,w){if(w===0)return m;var x=b.duration,S=b.easing,A=S===void 0?"ease":S,E=b.style,C=b.properties,T=b.onAnimationEnd,M=w>0?a[w-1]:b,F=C||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(jS(m),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:A}),x]);var U=E7(F,x,A),H=Oa(Oa(Oa({},M.style),E),{},{transition:U});return[].concat(jS(m),[H,x,T]).filter(ZMe)};return this.manager.start([s].concat(jS(a.reduce(v,[c,Math.max(h,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=qMe());var o=i.begin,a=i.duration,u=i.attributeName,s=i.to,l=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,v=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof l=="function"||typeof v=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=u?Xp({},u,s):s,b=E7(Object.keys(m),a,l);g.start([c,o,Oa(Oa({},m),{},{transition:b}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=wRe(i,xRe),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!u||l===0||a<=0)return o;var d=function(v){var g=v.props,m=g.style,b=m===void 0?{}:m,w=g.className,x=y.cloneElement(v,Oa(Oa({},s),{},{style:Oa(Oa({},b),c),className:w}));return x};return l===1?d(y.Children.only(o)):j.createElement("div",null,y.Children.map(o,function(h){return d(h)}))}}]),n}(y.PureComponent);Ya.displayName="Animate";Ya.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ya.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};function t6(e,t){return t6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},t6(e,t)}function Fn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,t6(e,t)}function jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Rv(e){"@babel/helpers - typeof";return Rv=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},Rv(e)}function kb(){return kb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,s=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,v=4;ha?a:o[h];c="M".concat(t,",").concat(n+u*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(l,",").concat(t+s*d[0],",").concat(n)),c+="L ".concat(t+r-s*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(l,`, + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},fMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zV=function(t){var n=c7(c7({},fMe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,s=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?b=cMe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):b=BV({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:d}),j.createElement("path",VE({},Bt(n,!0),{className:v,d:b,role:"img"}))};function Tv(e){"@babel/helpers - typeof";return Tv=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},Tv(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function wMe(e,t){return Kh(e.getTime(),t.getTime())}function y7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,u;(a=i.next())&&!a.done;){for(var s=t.entries(),l=!1,c=0;(u=s.next())&&!u.done;){var d=a.value,h=d[0],v=d[1],g=u.value,m=g[0],b=g[1];!l&&!r[c]&&(l=n.equals(h,m,o,c,e,t,n)&&n.equals(v,b,h,m,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function _Me(e,t,n){var r=m7(e),i=r.length;if(m7(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===WV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!UV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Lp(e,t,n){var r=v7(e),i=r.length;if(v7(t).length!==i)return!1;for(var o,a,u;i-- >0;)if(o=r[i],o===WV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!UV(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=g7(e,o),u=g7(t,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function SMe(e,t){return Kh(e.valueOf(),t.valueOf())}function CMe(e,t){return e.source===t.source&&e.flags===t.flags}function b7(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var u=t.values(),s=!1,l=0;(a=u.next())&&!a.done;)!s&&!r[l]&&(s=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!s)return!1}return!0}function EMe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var AMe="[object Arguments]",PMe="[object Boolean]",OMe="[object Date]",kMe="[object Map]",TMe="[object Number]",MMe="[object Object]",RMe="[object RegExp]",DMe="[object Set]",$Me="[object String]",IMe=Array.isArray,x7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,w7=Object.assign,NMe=Object.prototype.toString.call.bind(Object.prototype.toString);function FMe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,s=e.areTypedArraysEqual;return function(c,d,h){if(c===d)return!0;if(c==null||d==null||typeof c!="object"||typeof d!="object")return c!==c&&d!==d;var v=c.constructor;if(v!==d.constructor)return!1;if(v===Object)return i(c,d,h);if(IMe(c))return t(c,d,h);if(x7!=null&&x7(c))return s(c,d,h);if(v===Date)return n(c,d,h);if(v===RegExp)return a(c,d,h);if(v===Map)return r(c,d,h);if(v===Set)return u(c,d,h);var g=NMe(c);return g===OMe?n(c,d,h):g===RMe?a(c,d,h):g===kMe?r(c,d,h):g===DMe?u(c,d,h):g===MMe?typeof c.then!="function"&&typeof d.then!="function"&&i(c,d,h):g===AMe?i(c,d,h):g===PMe||g===TMe||g===$Me?o(c,d,h):!1}}function LMe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Lp:xMe,areDatesEqual:wMe,areMapsEqual:r?p7(y7,Lp):y7,areObjectsEqual:r?Lp:_Me,arePrimitiveWrappersEqual:SMe,areRegExpsEqual:CMe,areSetsEqual:r?p7(b7,Lp):b7,areTypedArraysEqual:r?Lp:EMe};if(n&&(i=w7({},i,n(i))),t){var o=fy(i.areArraysEqual),a=fy(i.areMapsEqual),u=fy(i.areObjectsEqual),s=fy(i.areSetsEqual);i=w7({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:s})}return i}function jMe(e){return function(t,n,r,i,o,a,u){return e(t,n,u)}}function BMe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(s,l){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,v=c.meta;return n(s,l,{cache:h,equals:i,meta:v,strict:o})};if(t)return function(s,l){return n(s,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(s,l){return n(s,l,a)}}var zMe=Ul();Ul({strict:!0});Ul({circular:!0});Ul({circular:!0,strict:!0});Ul({createInternalComparator:function(){return Kh}});Ul({strict:!0,createInternalComparator:function(){return Kh}});Ul({circular:!0,createInternalComparator:function(){return Kh}});Ul({circular:!0,createInternalComparator:function(){return Kh},strict:!0});function Ul(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,u=LMe(e),s=FMe(u),l=r?r(s):jMe(s);return BMe({circular:n,comparator:s,createState:i,equals:l,strict:a})}function UMe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function _7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):UMe(i)};requestAnimationFrame(r)}function qE(e){"@babel/helpers - typeof";return qE=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},qE(e)}function WMe(e){return KMe(e)||qMe(e)||HMe(e)||VMe()}function VMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HMe(e,t){if(e){if(typeof e=="string")return S7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S7(e,t)}}function S7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},m=function(w){for(var x=w>1?1:w,S=x,A=0;A<8;++A){var E=d(S)-x,C=v(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,u=a===void 0?17:a,s=function(c,d,h){var v=-(c-d)*r,g=h*o,m=h+(v-g)*u/1e3,b=h*u/1e3+c;return Math.abs(b-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CRe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function jS(e){return ORe(e)||PRe(e)||ARe(e)||ERe()}function ERe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ARe(e,t){if(e){if(typeof e=="string")return XE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XE(e,t)}}function PRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ORe(e){if(Array.isArray(e))return XE(e)}function XE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"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 kb(e){return kb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kb(e)}var Ya=function(e){DRe(n,e);var t=$Re(n);function n(r,i){var o;kRe(this,n),o=t.call(this,r,i);var a=o.props,u=a.isActive,s=a.attributeName,l=a.from,c=a.to,d=a.steps,h=a.children,v=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(e6(o)),o.changeStyle=o.changeStyle.bind(e6(o)),!u||v<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),JE(o);if(d&&d.length)o.state={style:d[0].style};else if(l){if(typeof h=="function")return o.state={style:l},JE(o);o.state={style:s?Qp({},s,l):l}}else o.state={style:{}};return o}return MRe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,u=o.canBegin,s=o.attributeName,l=o.shouldReAnimate,c=o.to,d=o.from,h=this.state.style;if(u){if(!a){var v={style:s?Qp({},s,c):c};this.state&&h&&(s&&h[s]!==c||!s&&h!==c)&&this.setState(v);return}if(!(zMe(i.to,c)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||l?d:i.to;if(this.state&&h){var b={style:s?Qp({},s,m):m};(s&&h[s]!==m||!s&&h!==m)&&this.setState(b)}this.runAnimation(Pa(Pa({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,u=i.to,s=i.duration,l=i.easing,c=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,v=wRe(a,u,cRe(l),s,this.changeStyle),g=function(){o.stopJSAnimation=v()};this.manager.start([h,c,g,s,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,u=i.begin,s=i.onAnimationStart,l=a[0],c=l.style,d=l.duration,h=d===void 0?0:d,v=function(m,b,w){if(w===0)return m;var x=b.duration,S=b.easing,A=S===void 0?"ease":S,E=b.style,C=b.properties,T=b.onAnimationEnd,M=w>0?a[w-1]:b,F=C||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(jS(m),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:A}),x]);var U=A7(F,x,A),H=Pa(Pa(Pa({},M.style),E),{},{transition:U});return[].concat(jS(m),[H,x,T]).filter(QMe)};return this.manager.start([s].concat(jS(a.reduce(v,[c,Math.max(h,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=GMe());var o=i.begin,a=i.duration,u=i.attributeName,s=i.to,l=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,v=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof l=="function"||typeof v=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=u?Qp({},u,s):s,b=A7(Object.keys(m),a,l);g.start([c,o,Pa(Pa({},m),{},{transition:b}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=SRe(i,_Re),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!u||l===0||a<=0)return o;var d=function(v){var g=v.props,m=g.style,b=m===void 0?{}:m,w=g.className,x=y.cloneElement(v,Pa(Pa({},s),{},{style:Pa(Pa({},b),c),className:w}));return x};return l===1?d(y.Children.only(o)):j.createElement("div",null,y.Children.map(o,function(h){return d(h)}))}}]),n}(y.PureComponent);Ya.displayName="Animate";Ya.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ya.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};function t6(e,t){return t6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},t6(e,t)}function Fn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,t6(e,t)}function jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Dv(e){"@babel/helpers - typeof";return Dv=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},Dv(e)}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,s=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,v=4;ha?a:o[h];c="M".concat(t,",").concat(n+u*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(l,",").concat(t+s*d[0],",").concat(n)),c+="L ".concat(t+r-s*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(l,`, `).concat(t+r,",").concat(n+u*d[1])),c+="L ".concat(t+r,",").concat(n+i-u*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(l,`, `).concat(t+r-s*d[2],",").concat(n+i)),c+="L ".concat(t+s*d[3],",").concat(n+i),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(l,`, `).concat(t,",").concat(n+i-u*d[3])),c+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);c="M ".concat(t,",").concat(n+u*g,` @@ -435,44 +435,44 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+i-u*g,` A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t+r-s*g,",").concat(n+i,` L `).concat(t+s*g,",").concat(n+i,` - A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t,",").concat(n+i-u*g," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},URe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,u=n.width,s=n.height;if(Math.abs(u)>0&&Math.abs(s)>0){var l=Math.min(o,o+u),c=Math.max(o,o+u),d=Math.min(a,a+s),h=Math.max(a,a+s);return r>=l&&r<=c&&i>=d&&i<=h}return!1},WRe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},J5=function(t){var n=D7(D7({},WRe),t),r=y.useRef(),i=y.useState(-1),o=$Re(i,2),a=o[0],u=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&u(A)}catch{}},[]);var s=n.x,l=n.y,c=n.width,d=n.height,h=n.radius,v=n.className,g=n.animationEasing,m=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||d!==+d||c===0||d===0)return null;var S=fn("recharts-rectangle",v);return x?j.createElement(Ya,{canBegin:a>0,from:{width:c,height:d,x:s,y:l},to:{width:c,height:d,x:s,y:l},duration:m,animationEasing:g,isActive:x},function(A){var E=A.width,C=A.height,T=A.x,M=A.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,isActive:w,easing:g},j.createElement("path",kb({},Bt(n,!0),{className:S,d:$7(T,M,E,C,h),ref:r})))}):j.createElement("path",kb({},Bt(n,!0),{className:S,d:$7(s,l,c,d,h)}))};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XRe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},QRe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,u=a===void 0?0:a,s=t.left,l=s===void 0?0:s,c=t.width,d=c===void 0?0:c,h=t.height,v=h===void 0?0:h,g=t.className,m=YRe(t,VRe),b=HRe({x:r,y:o,top:u,left:l,width:d,height:v},m);return!Ke(r)||!Ke(o)||!Ke(d)||!Ke(v)||!Ke(u)||!Ke(l)?null:j.createElement("path",r6({},Bt(b,!0),{className:fn("recharts-cross",g),d:XRe(r,o,d,v,u,l)}))},JRe=cW,e9e=JRe(Object.getPrototypeOf,Object),t9e=e9e,n9e=As,r9e=t9e,i9e=Os,o9e="[object Object]",a9e=Function.prototype,u9e=Object.prototype,GV=a9e.toString,s9e=u9e.hasOwnProperty,l9e=GV.call(Object);function c9e(e){if(!i9e(e)||n9e(e)!=o9e)return!1;var t=r9e(e);if(t===null)return!0;var n=s9e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&GV.call(n)==l9e}var f9e=c9e;const d9e=On(f9e);var h9e=As,p9e=Os,v9e="[object Boolean]";function g9e(e){return e===!0||e===!1||p9e(e)&&h9e(e)==v9e}var m9e=g9e;const y9e=On(m9e);function $v(e){"@babel/helpers - typeof";return $v=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},$v(e)}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:s,y:l},to:{upperWidth:c,lowerWidth:d,height:h,x:s,y:l},duration:m,animationEasing:g,isActive:w},function(S){var A=S.upperWidth,E=S.lowerWidth,C=S.height,T=S.x,M=S.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,easing:g},j.createElement("path",Tb({},Bt(n,!0),{className:x,d:j7(T,M,A,E,C),ref:r})))}):j.createElement("g",null,j.createElement("path",Tb({},Bt(n,!0),{className:x,d:j7(s,l,c,d,h)})))},k9e=["option","shapeType","propTransformer","activeClassName","isActive"];function Iv(e){"@babel/helpers - typeof";return Iv=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},Iv(e)}function T9e(e,t){if(e==null)return{};var n=M9e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function M9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function B7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Eo(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,u=i.startIndex;a?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Eo(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Eo(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Eo(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Eo(r,"handleSlideDragStart",function(i){var o=K7(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return pDe(t,e),cDe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,u=this.props,s=u.gap,l=u.data,c=l.length-1,d=Math.min(i,o),h=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,h);return{startIndex:v-v%s,endIndex:g===c?c:g-g%s}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,u=i.dataKey,s=qr(o[r],u,r);return Wt(a)?a(s,r):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,u=i.endX,s=this.props,l=s.x,c=s.width,d=s.travellerWidth,h=s.startIndex,v=s.endIndex,g=s.onChange,m=r.pageX-o;m>0?m=Math.min(m,l+c-d-u,l+c-d-a):m<0&&(m=Math.max(m,l-a,l-u));var b=this.getIndex({startX:a+m,endX:u+m});(b.startIndex!==h||b.endIndex!==v)&&g&&g(b),this.setState({startX:a+m,endX:u+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=K7(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,u=i.endX,s=i.startX,l=this.state[a],c=this.props,d=c.x,h=c.width,v=c.travellerWidth,g=c.onChange,m=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,d+h-v-l):x<0&&(x=Math.max(x,d-l)),w[a]=l+x;var S=this.getIndex(w),A=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(u>s?A%m===0:E%m===0)||us?E%m===0:A%m===0)||u>s&&E===M};this.setState(Eo(Eo({},a,l+x),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,u=a.scaleValues,s=a.startX,l=a.endX,c=this.state[i],d=u.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=u.length)){var v=u[h];i==="startX"&&v>=l||i==="endX"&&v<=s||this.setState(Eo({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.fill,l=r.stroke;return j.createElement("rect",{stroke:l,fill:s,x:i,y:o,width:a,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.data,l=r.children,c=r.padding,d=y.Children.only(l);return d?j.cloneElement(d,{x:i,y:o,width:a,height:u,margin:c,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,u=this,s=this.props,l=s.y,c=s.travellerWidth,d=s.height,h=s.traveller,v=s.ariaLabel,g=s.data,m=s.startIndex,b=s.endIndex,w=Math.max(r,this.props.x),x=zS(zS({},Bt(this.props,!1)),{},{x:w,y:l,width:c,height:d}),S=v||"Min value: ".concat((o=g[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[b])===null||a===void 0?void 0:a.name);return j.createElement(Sn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,u=o.height,s=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,d=Math.max(Math.abs(i-r)-l,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:c,y:a,width:d,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,u=r.height,s=r.travellerWidth,l=r.stroke,c=this.state,d=c.startX,h=c.endX,v=5,g={pointerEvents:"none",fill:l};return j.createElement(Sn,{className:"recharts-brush-texts"},j.createElement(lb,Db({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-v,y:a+u/2},g),this.getTextOfTick(i)),j.createElement(lb,Db({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+s+v,y:a+u/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,u=r.x,s=r.y,l=r.width,c=r.height,d=r.alwaysShowText,h=this.state,v=h.startX,g=h.endX,m=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!Ke(u)||!Ke(s)||!Ke(l)||!Ke(c)||l<=0||c<=0)return null;var S=fn("recharts-brush",o),A=j.Children.count(a)===1,E=sDe("userSelect","none");return j.createElement(Sn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(m||b||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,u=r.height,s=r.stroke,l=Math.floor(o+u/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:i,y:o,width:a,height:u,fill:s,stroke:"none"}),j.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return j.isValidElement(r)?o=j.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,u=r.x,s=r.travellerWidth,l=r.updateId,c=r.startIndex,d=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return zS({prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a},o&&o.length?gDe({data:o,width:a,x:u,travellerWidth:s,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+a-s]);var h=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,u=o-1;u-a>1;){var s=Math.floor((a+u)/2);r[s]>i?u=s:a=s}return i>=r[u]?u:a}}])}(y.PureComponent);Eo(rh,"displayName","Brush");Eo(rh,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var mDe=C5;function yDe(e,t){var n;return mDe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var bDe=yDe,xDe=nW,wDe=jl,_De=bDe,SDe=vo,CDe=Cw;function EDe(e,t,n){var r=SDe(e)?xDe:_De;return n&&CDe(e,t,n)&&(t=void 0),r(e,wDe(t))}var ADe=EDe;const ODe=On(ADe);var Cu=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},G7=CW;function PDe(e,t,n){t=="__proto__"&&G7?G7(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var kDe=PDe,TDe=kDe,MDe=_W,RDe=jl;function DDe(e,t){var n={};return t=RDe(t),MDe(e,function(r,i,o){TDe(n,i,t(r,i,o))}),n}var $De=DDe;const IDe=On($De);function NDe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function e7e(e,t){var n=e.x,r=e.y,i=QDe(e,GDe),o="".concat(n),a=parseInt(o,10),u="".concat(r),s=parseInt(u,10),l="".concat(t.height||i.height),c=parseInt(l,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Lp(Lp(Lp(Lp(Lp({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function Z7(e){return j.createElement(i6,a6({shapeType:"rectangle",propTransformer:e7e,activeClassName:"recharts-active-bar"},e))}var t7e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Qc(),n)}},n7e=["value","background"],eH;function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function r7e(e,t){if(e==null)return{};var n=i7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ib(){return Ib=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ie=Math.min((se||0)-(Z[de-1]||0),ie))}),Number.isFinite(ie)){var G=ie/W,K=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(T=G*K/2),m.padding==="no-gap"){var V=Yc(t.barCategoryGap,G*K),B=G*K/2;T=B-V-(B-V)/K*V}}}i==="xAxis"?M=[r.left+(S.left||0)+(T||0),r.left+r.width-(S.right||0)-(T||0)]:i==="yAxis"?M=s==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(T||0),r.top+r.height-(S.bottom||0)-(T||0)]:M=m.range,E&&(M=[M[1],M[0]]);var q=tTe(m,o,h),Y=q.scale,ue=q.realScaleType;Y.domain(w).range(M),nTe(Y);var Q=cTe(Y,Ra(Ra({},m),{},{realScaleType:ue}));i==="xAxis"?(H=b==="top"&&!A||b==="bottom"&&A,F=r.left,U=d[C]-H*m.height):i==="yAxis"&&(H=b==="left"&&!A||b==="right"&&A,F=d[C]-H*m.width,U=r.top);var J=Ra(Ra(Ra({},m),Q),{},{realScaleType:ue,x:F,y:U,scale:Y,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return J.bandSize=Sb(J,Q),!m.hide&&i==="xAxis"?d[C]+=(H?-1:1)*J.height:m.hide||(d[C]+=(H?-1:1)*J.width),Ra(Ra({},v),{},Fw({},g,J))},{})},iH=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},g7e=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return iH({x:n,y:r},{x:i,y:o})},oH=function(){function e(t){d7e(this,e),this.scale=t}return h7e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Fw(oH,"EPS",1e-4);var eO=function(t){var n=Object.keys(t).reduce(function(r,i){return Ra(Ra({},r),{},Fw({},i,oH.create(t[i])))},{});return Ra(Ra({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,u=o.position;return IDe(i,function(s,l){return n[l].apply(s,{bandAware:a,position:u})})},isInRange:function(i){return JV(i,function(o,a){return n[a].isInRange(o)})}})};function m7e(e){return(e%180+180)%180}var y7e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=m7e(i),a=o*Math.PI/180,u=Math.atan(r/n),s=a>u&&a-1?i[o?t[a]:a]:void 0}}var S7e=_7e,C7e=YV;function E7e(e){var t=C7e(e),n=t%1;return t===t?n?t-n:t:0}var A7e=E7e,O7e=gW,P7e=jl,k7e=A7e,T7e=Math.max;function M7e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:k7e(n);return i<0&&(i=T7e(r+i,0)),O7e(e,P7e(t),i)}var R7e=M7e,D7e=S7e,$7e=R7e,I7e=D7e($7e),N7e=I7e;const F7e=On(N7e);var L7e=Bbe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),tO=y.createContext(void 0),nO=y.createContext(void 0),aH=y.createContext(void 0),uH=y.createContext({}),sH=y.createContext(void 0),lH=y.createContext(0),cH=y.createContext(0),t$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,u=t.children,s=t.width,l=t.height,c=L7e(o);return j.createElement(tO.Provider,{value:r},j.createElement(nO.Provider,{value:i},j.createElement(uH.Provider,{value:o},j.createElement(aH.Provider,{value:c},j.createElement(sH.Provider,{value:a},j.createElement(lH.Provider,{value:l},j.createElement(cH.Provider,{value:s},u)))))))},j7e=function(){return y.useContext(sH)},fH=function(t){var n=y.useContext(tO);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},B7e=function(){var t=y.useContext(tO);return Js(t)},z7e=function(){var t=y.useContext(nO),n=F7e(t,function(r){return JV(r.domain,Number.isFinite)});return n||Js(t)},dH=function(t){var n=y.useContext(nO);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},U7e=function(){var t=y.useContext(aH);return t},W7e=function(){return y.useContext(uH)},rO=function(){return y.useContext(cH)},iO=function(){return y.useContext(lH)};function oh(e){"@babel/helpers - typeof";return oh=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},oh(e)}function V7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H7e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function A$e(e,t){return bH(e,t+1)}function O$e(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,u=t.end,s=0,l=1,c=a,d=function(){var g=r?.[s];if(g===void 0)return{v:bH(r,l)};var m=s,b,w=function(){return b===void 0&&(b=n(g,m)),b},x=g.coordinate,S=s===0||Bb(e,x,w,c,u);S||(s=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),s+=l)},h;l<=o.length;)if(h=d(),h)return h.v;return[]}function Bv(e){"@babel/helpers - typeof";return Bv=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},Bv(e)}function l$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t0?v.coordinate-b*e:v.coordinate})}else o[h]=v=Oi(Oi({},v),{},{tickCoord:v.coordinate});var w=Bb(e,v.tickCoord,m,u,s);w&&(s=v.tickCoord-e*(m()/2+i),o[h]=Oi(Oi({},v),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function R$e(e,t,n,r,i,o){var a=(r||[]).slice(),u=a.length,s=t.start,l=t.end;if(o){var c=r[u-1],d=n(c,u-1),h=e*(c.coordinate+e*d/2-l);a[u-1]=c=Oi(Oi({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var v=Bb(e,c.tickCoord,function(){return d},s,l);v&&(l=c.tickCoord-e*(d/2+i),a[u-1]=Oi(Oi({},c),{},{isShow:!0}))}for(var g=o?u-1:u,m=function(x){var S=a[x],A,E=function(){return A===void 0&&(A=n(S,x)),A};if(x===0){var C=e*(S.coordinate-e*E()/2-s);a[x]=S=Oi(Oi({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Oi(Oi({},S),{},{tickCoord:S.coordinate});var T=Bb(e,S.tickCoord,E,s,l);T&&(s=S.tickCoord+e*(E()/2+i),a[x]=Oi(Oi({},S),{},{isShow:!0}))},b=0;b=2?Ba(i[1].coordinate-i[0].coordinate):1,w=E$e(o,b,v);return s==="equidistantPreserveStart"?O$e(b,w,m,i,a):(s==="preserveStart"||s==="preserveStartEnd"?h=R$e(b,w,m,i,a,s==="preserveStartEnd"):h=M$e(b,w,m,i,a),h.filter(function(x){return x.isShow}))}var D$e=["viewBox"],$$e=["viewBox"],I$e=["ticks"];function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function F$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f$(e,t){for(var n=0;n0?s(this.props):s(v)),a<=0||u<=0||!g||!g.length?null:j.createElement(Sn,{className:fn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return j.isValidElement(r)?a=j.cloneElement(r,i):Wt(r)?a=r(i):a=j.createElement(lb,cd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);sO(Gh,"displayName","CartesianAxis");sO(Gh,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var V$e=["x1","y1","x2","y2","key"],H$e=["offset"];function Jc(e){"@babel/helpers - typeof";return Jc=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},Jc(e)}function d$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Z$e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,u=t.height,s=t.ry;return j.createElement("rect",{x:i,y:o,ry:s,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function _H(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,u=t.key,s=h$(t,V$e),l=Bt(s,!1);l.offset;var c=h$(l,H$e);n=j.createElement("line",_c({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:u}))}return n}function X$e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(s),index:s});return _H(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Q$e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(s),index:s});return _H(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function J$e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,u=e.horizontalPoints,s=e.horizontal,l=s===void 0?!0:s;if(!l||!t||!t.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,v){return h-v});i!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?i+a-h:c[v+1]-h;if(m<=0)return null;var b=v%t.length;return j.createElement("rect",{key:"react-".concat(v),y:h,x:r,height:m,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function eIe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,u=e.width,s=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,v){return h-v});o!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?o+u-h:c[v+1]-h;if(m<=0)return null;var b=v%r.length;return j.createElement("rect",{key:"react-".concat(v),x:h,y:a,width:m,height:s,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var tIe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return $V(uO(Ti(Ti(Ti({},Gh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},nIe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return $V(uO(Ti(Ti(Ti({},Gh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Wf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function rIe(e){var t,n,r,i,o,a,u=rO(),s=iO(),l=W7e(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Wf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Wf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Wf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Wf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Wf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Wf.verticalFill,x:Ke(e.x)?e.x:l.left,y:Ke(e.y)?e.y:l.top,width:Ke(e.width)?e.width:l.width,height:Ke(e.height)?e.height:l.height}),d=c.x,h=c.y,v=c.width,g=c.height,m=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=B7e(),S=z7e();if(!Ke(v)||v<=0||!Ke(g)||g<=0||!Ke(d)||d!==+d||!Ke(h)||h!==+h)return null;var A=c.verticalCoordinatesGenerator||tIe,E=c.horizontalCoordinatesGenerator||nIe,C=c.horizontalPoints,T=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,F=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:u,height:s,offset:l},M?!0:m);ss(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(F),"]")),Array.isArray(F)&&(C=F)}if((!T||!T.length)&&Wt(A)){var U=w&&w.length,H=A({xAxis:x?Ti(Ti({},x),{},{ticks:U?w:x.ticks}):void 0,width:u,height:s,offset:l},U?!0:m);ss(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(H),"]")),Array.isArray(H)&&(T=H)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(Z$e,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),j.createElement(X$e,_c({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),j.createElement(Q$e,_c({},c,{offset:l,verticalPoints:T,xAxis:x,yAxis:S})),j.createElement(J$e,_c({},c,{horizontalPoints:C})),j.createElement(eIe,_c({},c,{verticalPoints:T})))}rIe.displayName="CartesianGrid";var iIe=["type","layout","connectNulls","ref"],oIe=["key"];function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}function p$(e,t){if(e==null)return{};var n=aIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(Vf(s.slice(0,g)),[d-m]);break}var b=v.length%2===0?[0,h]:[h];return[].concat(Vf(t.repeat(s,c)),Vf(v),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Da(n,"id",df("recharts-line-")),Da(n,"pathRef",function(a){n.mainCurve=a}),Da(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Da(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return gIe(t,e),dIe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,u=o.xAxis,s=o.yAxis,l=o.layout,c=o.children,d=fo(c,Hh);if(!d)return null;var h=function(m,b){return{x:m.x,y:m.y,value:m.value,errorVal:qr(m.payload,b)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return j.createElement(Sn,v,d.map(function(g){return j.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:u,yAxis:s,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var u=this.props,s=u.dot,l=u.points,c=u.dataKey,d=Bt(this.props,!1),h=Bt(s,!0),v=l.map(function(m,b){var w=Co(Co(Co({key:"dot-".concat(b),r:3},d),h),{},{value:m.value,dataKey:c,cx:m.x,cy:m.y,index:b,payload:m.payload});return t.renderDotItem(s,w)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return j.createElement(Sn,v0({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var u=this.props,s=u.type,l=u.layout,c=u.connectNulls;u.ref;var d=p$(u,iIe),h=Co(Co(Co({},Bt(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:s,layout:l,connectNulls:c});return j.createElement(Tc,v0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,u=a.points,s=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,v=a.animationId,g=a.animateNewValues,m=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return j.createElement(Ya,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var E=A.t;if(x){var C=x.length/u.length,T=u.map(function(W,ie){var Z=Math.floor(ie*C);if(x[Z]){var G=x[Z],K=Er(G.x,W.x),V=Er(G.y,W.y);return Co(Co({},W),{},{x:K(E),y:V(E)})}if(g){var B=Er(m*2,W.x),q=Er(b/2,W.y);return Co(Co({},W),{},{x:B(E),y:q(E)})}return Co(Co({},W),{},{x:W.x,y:W.y})});return o.renderCurveStatically(T,r,i)}var M=Er(0,S),F=M(E),U;if(s){var H="".concat(s).split(/[,\s]+/gim).map(function(W){return parseFloat(W)});U=o.getStrokeDasharray(F,S,H)}else U=o.generateSimpleStrokeDasharray(S,F);return o.renderCurveStatically(u,r,i,{strokeDasharray:U})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,u=o.isAnimationActive,s=this.state,l=s.prevPoints,c=s.totalLength;return u&&a&&a.length&&(!l&&c>0||!Zc(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.xAxis,c=i.yAxis,d=i.top,h=i.left,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=fn("recharts-line",s),A=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=OU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?h:h-v/2,y:E?d:d-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:h-K/2,y:d-K/2,width:v+K,height:g+K}))):null,!x&&this.renderCurve(C,T),this.renderErrorBar(C,T),(x||a)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Vf(r),[0]):r,a=[],u=0;u=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Zc(c,a)||!Zc(d,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.top,c=i.left,d=i.xAxis,h=i.yAxis,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=fn("recharts-area",s),A=d&&d.allowDataOverflow,E=h&&h.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=OU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?c:c-v/2,y:E?l:l-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:c-K/2,y:l-K/2,width:v+K,height:g+K}))):null,x?null:this.renderArea(C,T),(a||x)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);EH=vf;vu(vf,"displayName","Area");vu(vf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Va.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vu(vf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,u=a??o;if(Ke(u)&&typeof u=="number")return u;var s=i==="horizontal"?r:n,l=s.scale.domain();if(s.type==="number"){var c=Math.max(l[0],l[1]),d=Math.min(l[0],l[1]);return u==="dataMin"?d:u==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return u==="dataMin"?l[0]:u==="dataMax"?l[1]:l[0]});vu(vf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,u=e.bandSize,s=e.dataKey,l=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,v=t.layout,g=l&&l.length,m=EH.getBaseValue(t,n,r,i),b=v==="horizontal",w=!1,x=d.map(function(A,E){var C;g?C=l[c+E]:(C=qr(A,s),Array.isArray(C)?w=!0:C=[m,C]);var T=C[1]==null||g&&qr(A,s)==null;return b?{x:eh({axis:r,ticks:o,bandSize:u,entry:A,index:E}),y:T?null:i.scale(C[1]),value:C,payload:A}:{x:T?null:r.scale(C[1]),y:eh({axis:i,ticks:a,bandSize:u,entry:A,index:E}),value:C,payload:A}}),S;return g||w?S=x.map(function(A){var E=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:E!=null&&A.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:A.y}}):S=b?i.scale(m):r.scale(m),Hs({points:x,baseLine:S,layout:v,isRange:w},h)});vu(vf,"renderDotItem",function(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=fn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=AH(t,bIe);n=j.createElement($w,Sc({},o,{key:i,className:r}))}return n});function fh(e){"@babel/helpers - typeof";return fh=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},fh(e)}function PIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kIe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jIe(e){var t=e.option,n=e.isActive,r=FIe(e,NIe);return typeof t=="string"?j.createElement(i6,g0({option:j.createElement(ww,g0({type:t},r)),isActive:n,shapeType:"symbols"},r)):j.createElement(i6,g0({option:t,isActive:n,shapeType:"symbols"},r))}function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function INe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ke(i)&&Ke(o)?t.slice(i,o+1):[]};function GH(e){return e==="number"?[0,"auto"]:void 0}var P6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,u=Hw(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(s,l){var c,d=(c=l.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?u:d;h=G1(v,a.dataKey,i)}else h=d&&d[r]||u[r];return h?[].concat(gh(s),[NV(l,h)]):s},[])},A$=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=KNe(o,r),u=t.orderedTooltipTicks,s=t.tooltipAxis,l=t.tooltipTicks,c=Yke(a,u,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,h=P6(t,n,c,d),v=GNe(r,u,c,o);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:v}}return null},YNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,v=DV(c,o);return r.reduce(function(g,m){var b,w=m.type.defaultProps!==void 0?Ee(Ee({},m.type.defaultProps),m.props):m.props,x=w.type,S=w.dataKey,A=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,T=w.ticks,M=w.includeHidden,F=w[a];if(g[F])return g;var U=Hw(t.data,{graphicalItems:i.filter(function(Q){var J,se=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return se===F}),dataStartIndex:s,dataEndIndex:l}),H=U.length,W,ie,Z;wNe(w.domain,A,x)&&(W=zE(w.domain,null,A),v&&(x==="number"||C!=="auto")&&(Z=h0(U,S,"category")));var G=GH(x);if(!W||W.length===0){var K,V=(K=w.domain)!==null&&K!==void 0?K:G;if(S){if(W=h0(U,S,x),x==="category"&&v){var B=Fxe(W);E&&B?(ie=W,W=Rb(0,H)):E||(W=e7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(gh(Q),[J])},[]))}else if(x==="category")E?W=W.filter(function(Q){return Q!==""&&!zt(Q)}):W=e7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||zt(J)?Q:[].concat(gh(Q),[J])},[]);else if(x==="number"){var q=eTe(U,i.filter(function(Q){var J,se,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(se=Q.type.defaultProps)===null||se===void 0?void 0:se.hide;return de===F&&(M||!Se)}),S,o,c);q&&(W=q)}v&&(x==="number"||C!=="auto")&&(Z=h0(U,S,"category"))}else v?W=Rb(0,H):u&&u[F]&&u[F].hasStack&&x==="number"?W=h==="expand"?[0,1]:IV(u[F].stackGroups,s,l):W=RV(U,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],se="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===F&&(M||!se)}),x,c,!0);if(x==="number")W=E6(d,W,F,o,T),V&&(W=zE(V,W,A));else if(x==="category"&&V){var Y=V,ue=W.every(function(Q){return Y.indexOf(Q)>=0});ue&&(W=Y)}}return Ee(Ee({},g),{},kt({},F,Ee(Ee({},w),{},{axisType:o,domain:W,categoricalDomain:Z,duplicateDomain:ie,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:v,layout:c})))},{})},ZNe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=Hw(t.data,{graphicalItems:r,dataStartIndex:s,dataEndIndex:l}),v=h.length,g=DV(c,o),m=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],A=GH("number");if(!b[S]){m++;var E;return g?E=Rb(0,v):u&&u[S]&&u[S].hasStack?(E=IV(u[S].stackGroups,s,l),E=E6(d,E,S,o)):(E=zE(A,RV(h,r.filter(function(C){var T,M,F=a in C.props?C.props[a]:(T=C.type.defaultProps)===null||T===void 0?void 0:T[a],U="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return F===S&&!U}),"number",c),i.defaultProps.allowDataOverflow),E=E6(d,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:da(HNe,"".concat(o,".").concat(m%2),null),domain:E,originalDomain:A,isCategorical:g,layout:c})))}return b},{})},XNe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.children,d="".concat(i,"Id"),h=fo(c,o),v={};return h.length?v=YNe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(v=ZNe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l})),v},QNe=function(t){var n=Js(t),r=rs(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:E5(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Sb(n,r)}},O$=function(t){var n=t.children,r=t.defaultShowTooltip,i=Po(n,rh),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},JNe=function(t){return!t||!t.length?!1:t.some(function(n){var r=us(n&&n.type);return r&&r.indexOf("Bar")>=0})},P$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},eFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,u=t.yAxisMap,s=u===void 0?{}:u,l=r.width,c=r.height,d=r.children,h=r.margin||{},v=Po(d,rh),g=Po(d,Ad),m=Object.keys(s).reduce(function(E,C){var T=s[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,E[M]+T.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var T=a[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,da(E,"".concat(M))+T.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),m),x=w.bottom;v&&(w.bottom+=v.props.height||rh.defaultProps.height),g&&n&&(w=Qke(w,i,r,n));var S=l-w.left-w.right,A=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(A,0)})},tFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},nFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,u=a===void 0?["axis"]:a,s=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(w,x){var S=x.graphicalItems,A=x.stackGroups,E=x.offset,C=x.updateId,T=x.dataStartIndex,M=x.dataEndIndex,F=w.barSize,U=w.layout,H=w.barGap,W=w.barCategoryGap,ie=w.maxBarSize,Z=P$(U),G=Z.numericAxisName,K=Z.cateAxisName,V=JNe(S),B=[];return S.forEach(function(q,Y){var ue=Hw(w.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:M}),Q=q.type.defaultProps!==void 0?Ee(Ee({},q.type.defaultProps),q.props):q.props,J=Q.dataKey,se=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(K,"Id")],ge={},Ze=s.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||Qc();var gt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,gt),"".concat(je.axisType,"Ticks"),rs(gt)))},ge),Oe=Ze[K],Fe=Ze["".concat(K,"Ticks")],$e=A&&A[de]&&A[de].hasStack&&dTe(q,A[de].stackGroups),be=us(q.type).indexOf("Bar")>=0,yt=Sb(Oe,Fe),lt=[],It=V&&Zke({barSize:F,stackGroups:A,totalSize:tFe(Ze,K)});if(be){var mn,en,re=zt(se)?ie:se,pe=(mn=(en=Sb(Oe,Fe,!0))!==null&&en!==void 0?en:re)!==null&&mn!==void 0?mn:0;lt=Xke({barGap:H,barCategoryGap:W,bandSize:pe!==yt?pe:yt,sizeList:It[Se],maxBarSize:re}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=q&&q.type&&q.type.getComposedData;ye&&B.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:ue,props:w,dataKey:J,item:q,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:U,dataStartIndex:T,dataEndIndex:M}))),{},kt(kt(kt({key:q.key||"item-".concat(Y)},G,Ze[G]),K,Ze[K]),"animationId",C)),childIndex:Yxe(q,w.children),item:q})}),B},v=function(w,x){var S=w.props,A=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!GR({props:S}))return null;var T=S.children,M=S.layout,F=S.stackOffset,U=S.data,H=S.reverseStackOrder,W=P$(M),ie=W.numericAxisName,Z=W.cateAxisName,G=fo(T,r),K=lTe(U,G,"".concat(ie,"Id"),"".concat(Z,"Id"),F,H),V=s.reduce(function(Q,J){var se="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},se,XNe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ie&&K,dataStartIndex:A,dataEndIndex:E}))))},{}),B=eFe(Ee(Ee({},V),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(V).forEach(function(Q){V[Q]=c(S,V[Q],B,Q.replace("Map",""),n)});var q=V["".concat(Z,"Map")],Y=QNe(q),ue=h(S,Ee(Ee({},V),{},{dataStartIndex:A,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:K,offset:B}));return Ee(Ee({formattedGraphicalItems:ue,graphicalItems:G,offset:B,stackGroups:K},Y),V)},g=function(b){function w(x){var S,A,E;return $Ne(this,w),E=FNe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new xNe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var T=E.state,M=T.dataStartIndex,F=T.dataEndIndex,U=T.updateId;E.setState(Ee({legendBBox:C},v({props:E.props,dataStartIndex:M,dataEndIndex:F,updateId:U},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,T,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(T)}}),kt(E,"handleBrushChange",function(C){var T=C.startIndex,M=C.endIndex;if(T!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var F=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:T,dataEndIndex:M},v({props:E.props,dataStartIndex:T,dataEndIndex:M,updateId:F},E.state))}),E.triggerSyncEvent({dataStartIndex:T,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseEnter;Wt(F)&&F(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var T=E.getMouseInfo(C),M=T?Ee(Ee({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseMove;Wt(F)&&F(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};E.setState(T),E.triggerSyncEvent(T);var M=E.props.onMouseLeave;Wt(M)&&M(T,C)}),kt(E,"handleOuterEvent",function(C){var T=Gxe(C),M=da(E.props,"".concat(T));if(T&&Wt(M)){var F,U;/.*touch.*/i.test(T)?U=E.getMouseInfo(C.changedTouches[0]):U=E.getMouseInfo(C),M((F=U)!==null&&F!==void 0?F:{},C)}}),kt(E,"handleClick",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onClick;Wt(F)&&F(M,C)}}),kt(E,"handleMouseDown",function(C){var T=E.props.onMouseDown;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleMouseUp",function(C){var T=E.props.onMouseUp;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var T=E.props.onDoubleClick;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleContextMenu",function(C){var T=E.props.onContextMenu;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&WS.emit(VS,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var T=E.props,M=T.layout,F=T.syncMethod,U=E.state.updateId,H=C.dataStartIndex,W=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:W},v({props:E.props,dataStartIndex:H,dataEndIndex:W,updateId:U},E.state)));else if(C.activeTooltipIndex!==void 0){var ie=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,K=E.state,V=K.offset,B=K.tooltipTicks;if(!V)return;if(typeof F=="function")G=F(B,C);else if(F==="value"){G=-1;for(var q=0;q=0){var $e,be;if(ie.dataKey&&!ie.allowDuplicatedCategory){var yt=typeof ie.dataKey=="function"?Fe:"payload.".concat(ie.dataKey.toString());$e=G1(q,yt,G),be=Y&&ue&&G1(ue,yt,G)}else $e=q?.[Z],be=Y&&ue&&ue[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:lt})),null,null]}if(!zt($e))return[Oe].concat(gh(E.renderActivePoints({item:F,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var It,mn=(It=E.getItemByXY(E.state.activeCoordinate))!==null&&It!==void 0?It:{graphicalItem:Oe},en=mn.graphicalItem,re=en.item,pe=re===void 0?C:re,ye=en.childIndex,Ue=Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Oe,null,null]:[Oe,null]}),kt(E,"renderCustomized",function(C,T,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:dy,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:dy},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:dy},YAxis:{handler:dy},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:df("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=TW(E.triggeredAfterMouseMove,(A=x.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return BNe(w,b),NNe(w,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,E=S.data,C=S.height,T=S.layout,M=Po(A,Yu);if(M){var F=M.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,H=P6(this.state,E,F,U),W=this.state.tooltipTicks[F].coordinate,ie=(this.state.offset.top+C)/2,Z=T==="horizontal",G=Z?{x:W,y:ie}:{y:W,x:ie},K=this.state.formattedGraphicalItems.find(function(B){var q=B.item;return q.type.name==="Scatter"});K&&(G=Ee(Ee({},G),K.props.points[F].tooltipPosition),H=K.props.points[F].tooltipPayload);var V={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:U,activePayload:H,activeCoordinate:G};this.setState(V),this.renderCursor(M),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){nE([Po(S.children,Yu)],[Po(this.props.children,Yu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Po(this.props.children,Yu);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return u.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),C=w5e(E),T={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/A.offsetWidth||1,F=this.inRange(T.chartX,T.chartY,M);if(!F)return null;var U=this.state,H=U.xAxisMap,W=U.yAxisMap,ie=this.getTooltipEventType();if(ie!=="axis"&&H&&W){var Z=Js(H).scale,G=Js(W).scale,K=Z&&Z.invert?Z.invert(T.chartX):null,V=G&&G.invert?G.invert(T.chartY):null;return Ee(Ee({},T),{},{xValue:K,yValue:V})}var B=A$(this.state,this.props.data,this.props.layout,F);return B?Ee(Ee({},T),B):null}},{key:"inRange",value:function(S,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,T=S/E,M=A/E;if(C==="horizontal"||C==="vertical"){var F=this.state.offset,U=T>=F.left&&T<=F.left+F.width&&M>=F.top&&M<=F.top+F.height;return U?{x:T,y:M}:null}var H=this.state,W=H.angleAxisMap,ie=H.radiusAxisMap;if(W&&ie){var Z=Js(W);return r7({x:T,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),E=Po(S,Yu),C={};E&&A==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Y1(this.props,this.handleOuterEvent);return Ee(Ee({},T),C)}},{key:"addListener",value:function(){WS.on(VS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){WS.removeListener(VS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,E){for(var C=this.state.formattedGraphicalItems,T=0,M=C.length;T{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:u,activationMode:s="automatic",...l}=e,c=hg(u),[d,h]=Ga({prop:r,onChange:i,defaultProp:o});return I.jsx(iFe,{scope:n,baseId:No(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:s,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});ZH.displayName=fO;var XH="TabsList",QH=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=dO(XH,n),a=YH(n);return I.jsx(KB,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});QH.displayName=XH;var JH="TabsTrigger",eq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=dO(JH,n),u=YH(n),s=rq(a.baseId,r),l=iq(a.baseId,r),c=r===a.value;return I.jsx(GB,{asChild:!0,...u,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:s,...o,ref:t,onMouseDown:Ye(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:Ye(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!i&&d&&a.onValueChange(r)})})})});eq.displayName=JH;var tq="TabsContent",nq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,u=dO(tq,n),s=rq(u.baseId,r),l=iq(u.baseId,r),c=r===u.value,d=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(oi,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":s,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})});nq.displayName=tq;function rq(e,t){return`${e}-trigger-${t}`}function iq(e,t){return`${e}-content-${t}`}var OYe=ZH,PYe=QH,kYe=eq,TYe=nq;function k6(e,[t,n]){return Math.min(n,Math.max(t,e))}function hO(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oFe=[" ","Enter","ArrowUp","ArrowDown"],aFe=[" ","Enter"],Pg="Select",[qw,Kw,uFe]=RA(Pg),[Yh,MYe]=mi(Pg,[uFe,Fl]),Gw=Fl(),[sFe,Wl]=Yh(Pg),[lFe,cFe]=Yh(Pg),oq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:u,onValueChange:s,dir:l,name:c,autoComplete:d,disabled:h,required:v,form:g}=e,m=Gw(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[A,E]=y.useState(!1),C=hg(l),[T=!1,M]=Ga({prop:r,defaultProp:i,onChange:o}),[F,U]=Ga({prop:a,defaultProp:u,onChange:s}),H=y.useRef(null),W=b?g||!!b.closest("form"):!0,[ie,Z]=y.useState(new Set),G=Array.from(ie).map(K=>K.props.value).join(";");return I.jsx(Ux,{...m,children:I.jsxs(sFe,{required:v,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:No(),value:F,onValueChange:U,open:T,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(qw.Provider,{scope:t,children:I.jsx(lFe,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(K=>{Z(V=>new Set(V).add(K))},[]),onNativeOptionRemove:y.useCallback(K=>{Z(V=>{const B=new Set(V);return B.delete(K),B})},[]),children:n})}),W?I.jsxs(Mq,{"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:d,value:F,onChange:K=>U(K.target.value),disabled:h,form:g,children:[F===void 0?I.jsx("option",{value:""}):null,Array.from(ie)]},G):null]})})};oq.displayName=Pg;var aq="SelectTrigger",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Gw(n),a=Wl(aq,n),u=a.disabled||r,s=Kt(t,a.onTriggerChange),l=Kw(n),c=y.useRef("touch"),[d,h,v]=Rq(m=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Dq(b,m,w);x!==void 0&&a.onValueChange(x.value)}),g=m=>{u||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return I.jsx(vg,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Tq(a.value)?"":void 0,...i,ref:s,onClick:Ye(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:Ye(i.onPointerDown,m=>{c.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:Ye(i.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&oFe.includes(m.key)&&(g(),m.preventDefault())})})})});uq.displayName=aq;var sq="SelectValue",lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...u}=e,s=Wl(sq,n),{onValueNodeHasChildrenChange:l}=s,c=o!==void 0,d=Kt(t,s.onValueNodeChange);return ri(()=>{l(c)},[l,c]),I.jsx(pt.span,{...u,ref:d,style:{pointerEvents:"none"},children:Tq(s.value)?I.jsx(I.Fragment,{children:a}):o})});lq.displayName=sq;var fFe="SelectIcon",cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});cq.displayName=fFe;var dFe="SelectPortal",fq=e=>I.jsx(cg,{asChild:!0,...e});fq.displayName=dFe;var ef="SelectContent",dq=y.forwardRef((e,t)=>{const n=Wl(ef,e.__scopeSelect),[r,i]=y.useState();if(ri(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ss.createPortal(I.jsx(hq,{scope:e.__scopeSelect,children:I.jsx(qw.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(pq,{...e,ref:t})});dq.displayName=ef;var Pa=10,[hq,Vl]=Yh(ef),hFe="SelectContentImpl",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b,...w}=e,x=Wl(ef,n),[S,A]=y.useState(null),[E,C]=y.useState(null),T=Kt(t,ge=>A(ge)),[M,F]=y.useState(null),[U,H]=y.useState(null),W=Kw(n),[ie,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return dg(S)},[S]),Lx();const K=y.useCallback(ge=>{const[Ze,...Oe]=W().map(be=>be.ref.current),[Fe]=Oe.slice(-1),$e=document.activeElement;for(const be of ge)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Fe&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[W,E]),V=y.useCallback(()=>K([M,S]),[K,M,S]);y.useEffect(()=>{ie&&V()},[ie,V]);const{onOpenChange:B,triggerPointerDownPosRef:q}=x;y.useEffect(()=>{if(S){let ge={x:0,y:0};const Ze=Fe=>{ge={x:Math.abs(Math.round(Fe.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(Fe.pageY)-(q.current?.y??0))}},Oe=Fe=>{ge.x<=10&&ge.y<=10?Fe.preventDefault():S.contains(Fe.target)||B(!1),document.removeEventListener("pointermove",Ze),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[S,B,q]),y.useEffect(()=>{const ge=()=>B(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[B]);const[Y,ue]=Rq(ge=>{const Ze=W().filter($e=>!$e.disabled),Oe=Ze.find($e=>$e.ref.current===document.activeElement),Fe=Dq(Ze,ge,Oe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),Q=y.useCallback((ge,Ze,Oe)=>{const Fe=!G.current&&!Oe;(x.value!==void 0&&x.value===Ze||Fe)&&(F(ge),Fe&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),se=y.useCallback((ge,Ze,Oe)=>{const Fe=!G.current&&!Oe;(x.value!==void 0&&x.value===Ze||Fe)&&H(ge)},[x.value]),de=r==="popper"?T6:vq,Se=de===T6?{side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return I.jsx(hq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:se,focusSelectedItem:V,selectedItemText:U,position:r,isPositioned:ie,searchRef:Y,children:I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(lg,{asChild:!0,trapped:x.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:Ye(i,ge=>{x.trigger?.focus({preventScroll:!0}),ge.preventDefault()}),children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ge=>ge.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,ge=>{const Ze=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!Ze&&ge.key.length===1&&ue(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Fe=W().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const $e=ge.target,be=Fe.indexOf($e);Fe=Fe.slice(be+1)}setTimeout(()=>K(Fe)),ge.preventDefault()}})})})})})})});pq.displayName=hFe;var pFe="SelectItemAlignedPosition",vq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Wl(ef,n),a=Vl(ef,n),[u,s]=y.useState(null),[l,c]=y.useState(null),d=Kt(t,T=>c(T)),h=Kw(n),v=y.useRef(!1),g=y.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&l&&m&&b&&w){const T=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=U.left-M.left,be=F.left-$e,yt=T.left-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Pa,en=k6(be,[Pa,Math.max(Pa,mn-It)]);u.style.minWidth=lt+"px",u.style.left=en+"px"}else{const $e=M.right-U.right,be=window.innerWidth-F.right-$e,yt=window.innerWidth-T.right-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Pa,en=k6(be,[Pa,Math.max(Pa,mn-It)]);u.style.minWidth=lt+"px",u.style.right=en+"px"}const H=h(),W=window.innerHeight-Pa*2,ie=m.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),K=parseInt(Z.paddingTop,10),V=parseInt(Z.borderBottomWidth,10),B=parseInt(Z.paddingBottom,10),q=G+K+ie+B+V,Y=Math.min(b.offsetHeight*5,q),ue=window.getComputedStyle(m),Q=parseInt(ue.paddingTop,10),J=parseInt(ue.paddingBottom,10),se=T.top+T.height/2-Pa,de=W-se,Se=b.offsetHeight/2,ge=b.offsetTop+Se,Ze=G+K+ge,Oe=q-Ze;if(Ze<=se){const $e=H.length>0&&b===H[H.length-1].ref.current;u.style.bottom="0px";const be=l.clientHeight-m.offsetTop-m.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+V),lt=Ze+yt;u.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;u.style.top="0px";const yt=Math.max(se,G+m.offsetTop+($e?Q:0)+Se)+Oe;u.style.height=yt+"px",m.scrollTop=Ze-se+m.offsetTop}u.style.margin=`${Pa}px 0`,u.style.minHeight=Y+"px",u.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,o.trigger,o.valueNode,u,l,m,b,w,o.dir,r]);ri(()=>S(),[S]);const[A,E]=y.useState();ri(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(T=>{T&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]);return I.jsx(gFe,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:C,children:I.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:I.jsx(pt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});vq.displayName=pFe;var vFe="SelectPopperPosition",T6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Pa,...o}=e,a=Gw(n);return I.jsx(Wx,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});T6.displayName=vFe;var[gFe,pO]=Yh(ef,{}),M6="SelectViewport",gq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Vl(M6,n),a=pO(M6,n),u=Kt(t,o.onViewportChange),s=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(qw.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){const v=Math.abs(s.current-c.scrollTop);if(v>0){const g=window.innerHeight-Pa*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),w=Math.max(m,b);if(w0?A:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});gq.displayName=M6;var mq="SelectGroup",[mFe,yFe]=Yh(mq),yq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=No();return I.jsx(mFe,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});yq.displayName=mq;var bq="SelectLabel",xq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=yFe(bq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});xq.displayName=bq;var Yb="SelectItem",[bFe,wq]=Yh(Yb),_q=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,u=Wl(Yb,n),s=Vl(Yb,n),l=u.value===r,[c,d]=y.useState(o??""),[h,v]=y.useState(!1),g=Kt(t,x=>s.itemRefCallback?.(x,r,i)),m=No(),b=y.useRef("touch"),w=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(bFe,{scope:n,value:r,disabled:i,textId:m,isSelected:l,onItemTextChange:y.useCallback(x=>{d(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(qw.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:Ye(a.onFocus,()=>v(!0)),onBlur:Ye(a.onBlur,()=>v(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?s.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{s.searchRef?.current!==""&&x.key===" "||(aFe.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});_q.displayName=Yb;var Qp="SelectItemText",Sq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Wl(Qp,n),u=Vl(Qp,n),s=wq(Qp,n),l=cFe(Qp,n),[c,d]=y.useState(null),h=Kt(t,w=>d(w),s.onItemTextChange,w=>u.itemTextRefCallback?.(w,s.value,s.disabled)),v=c?.textContent,g=y.useMemo(()=>I.jsx("option",{value:s.value,disabled:s.disabled,children:v},s.value),[s.disabled,s.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=l;return ri(()=>(m(g),()=>b(g)),[m,b,g]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:s.textId,...o,ref:h}),s.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ss.createPortal(o.children,a.valueNode):null]})});Sq.displayName=Qp;var Cq="SelectItemIndicator",Eq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wq(Cq,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Eq.displayName=Cq;var R6="SelectScrollUpButton",Aq=y.forwardRef((e,t)=>{const n=Vl(R6,e.__scopeSelect),r=pO(R6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ri(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollTop>0;o(l)};const s=n.viewport;return u(),s.addEventListener("scroll",u),()=>s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Pq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop-s.offsetHeight)}}):null});Aq.displayName=R6;var D6="SelectScrollDownButton",Oq=y.forwardRef((e,t)=>{const n=Vl(D6,e.__scopeSelect),r=pO(D6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ri(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Pq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop+s.offsetHeight)}}):null});Oq.displayName=D6;var Pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Vl("SelectScrollButton",n),a=y.useRef(null),u=Kw(n),s=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>s(),[s]),ri(()=>{u().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{s()})})}),xFe="SelectSeparator",kq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});kq.displayName=xFe;var $6="SelectArrow",wFe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Gw(n),o=Wl($6,n),a=Vl($6,n);return o.open&&a.position==="popper"?I.jsx(Vx,{...i,...r,ref:t}):null});wFe.displayName=$6;function Tq(e){return e===""||e===void 0}var Mq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Kt(t,i),a=hO(n);return y.useEffect(()=>{const u=i.current,s=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==n&&c){const d=new Event("change",{bubbles:!0});c.call(u,n),u.dispatchEvent(d)}},[a,n]),I.jsx(ZA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});Mq.displayName="BubbleSelect";function Rq(e){const t=Wr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const u=n.current+a;t(u),function s(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>s(""),1e3))}(u)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Dq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=_Fe(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function _Fe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RYe=oq,DYe=uq,$Ye=lq,IYe=cq,NYe=fq,FYe=dq,LYe=gq,jYe=yq,BYe=xq,zYe=_q,UYe=Sq,WYe=Eq,VYe=Aq,HYe=Oq,qYe=kq;const vO=6048e5,SFe=864e5,k$=Symbol.for("constructDateFrom");function ii(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&k$ in e?e[k$](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rn(e,t){return ii(t||e,e)}function Ui(e,t,n){const r=Rn(e,n?.in);return isNaN(t)?ii(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Za(e,t,n){const r=Rn(e,n?.in);if(isNaN(t))return ii(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=ii(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let CFe={};function kg(){return CFe}function ma(e,t){const n=kg(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Zb(e){const t=Rn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gf(e,...t){const n=ii.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function nf(e,t){const n=Rn(e,t?.in);return n.setHours(0,0,0,0),n}function gu(e,t,n){const[r,i]=gf(n?.in,e,t),o=nf(r),a=nf(i),u=+o-Zb(o),s=+a-Zb(a);return Math.round((u-s)/SFe)}function EFe(e,t){const n=$q(e,t),r=ii(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),tf(r)}function I6(e,t,n){return Ui(e,t*7,n)}function AFe(e,t,n){return Za(e,t*12,n)}function OFe(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=ii.bind(null,i));const o=Rn(i,r);(!n||n{!r&&typeof i=="object"&&(r=ii.bind(null,i));const o=Rn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),ii(r,n||NaN)}function ao(e,t,n){const[r,i]=gf(n?.in,e,t);return+nf(r)==+nf(i)}function gO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function kFe(e){return!(!gO(e)&&typeof e!="number"||isNaN(+Rn(e)))}function Wv(e,t,n){const[r,i]=gf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function TFe(e,t,n){const[r,i]=gf(n?.in,e,t),o=ma(r,n),a=ma(i,n),u=+o-Zb(o),s=+a-Zb(a);return Math.round((u-s)/vO)}function mO(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ho(e,t){const n=Rn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Iq(e,t){const n=Rn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yO(e,t){const n=kg(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o{let r;const i=MFe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function kd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const DFe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$Fe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},IFe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NFe={date:kd({formats:DFe,defaultWidth:"full"}),time:kd({formats:$Fe,defaultWidth:"full"}),dateTime:kd({formats:IFe,defaultWidth:"full"})},FFe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},LFe=(e,t,n,r)=>FFe[e];function fu(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):a;i=e.formattingValues[u]||e.formattingValues[a]}else{const a=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const jFe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},BFe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zFe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},UFe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},WFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},VFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HFe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},qFe={ordinalNumber:HFe,era:fu({values:jFe,defaultWidth:"wide"}),quarter:fu({values:BFe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:zFe,defaultWidth:"wide"}),day:fu({values:UFe,defaultWidth:"wide"}),dayPeriod:fu({values:WFe,defaultWidth:"wide",formattingValues:VFe,defaultFormattingWidth:"wide"})};function du(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?GFe(u,d=>d.test(a)):KFe(u,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function KFe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function GFe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const u=t.slice(i.length);return{value:a,rest:u}}}const YFe=/^(\d+)(th|st|nd|rd)?/i,ZFe=/\d+/i,XFe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},QFe={any:[/^b/i,/^(a|c)/i]},JFe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},eLe={any:[/1/i,/2/i,/3/i,/4/i]},tLe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},nLe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},rLe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iLe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},oLe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},aLe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},uLe={ordinalNumber:Fq({matchPattern:YFe,parsePattern:ZFe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:XFe,defaultMatchWidth:"wide",parsePatterns:QFe,defaultParseWidth:"any"}),quarter:du({matchPatterns:JFe,defaultMatchWidth:"wide",parsePatterns:eLe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:tLe,defaultMatchWidth:"wide",parsePatterns:nLe,defaultParseWidth:"any"}),day:du({matchPatterns:rLe,defaultMatchWidth:"wide",parsePatterns:iLe,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:oLe,defaultMatchWidth:"any",parsePatterns:aLe,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:RFe,formatLong:NFe,formatRelative:LFe,localize:qFe,match:uLe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sLe(e,t){const n=Rn(e,t?.in);return gu(n,Iq(n))+1}function jq(e,t){const n=Rn(e,t?.in),r=+tf(n)-+EFe(n);return Math.round(r/vO)+1}function Bq(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=kg(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=ii(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const u=ma(a,t),s=ii(t?.in||e,0);s.setFullYear(r,0,o),s.setHours(0,0,0,0);const l=ma(s,t);return+n>=+u?r+1:+n>=+l?r:r-1}function lLe(e,t){const n=kg(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Bq(e,t),o=ii(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ma(o,t)}function zq(e,t){const n=Rn(e,t?.in),r=+ma(n,t)-+lLe(n,t);return Math.round(r/vO)+1}function Tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Us={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tn(n+1,2)},d(e,t){return Tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tn(e.getHours()%12||12,t.length)},H(e,t){return Tn(e.getHours(),t.length)},m(e,t){return Tn(e.getMinutes(),t.length)},s(e,t){return Tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tn(i,t.length)}},Hf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},T$={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Us.y(e,t)},Y:function(e,t,n,r){const i=Bq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Tn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Tn(o,t.length)},R:function(e,t){const n=$q(e);return Tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Us.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=zq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tn(i,t.length)},I:function(e,t,n){const r=jq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Us.d(e,t)},D:function(e,t,n){const r=sLe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Tn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Tn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Hf.noon:r===0?i=Hf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Hf.evening:r>=12?i=Hf.afternoon:r>=4?i=Hf.morning:i=Hf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Us.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Us.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Us.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Us.s(e,t)},S:function(e,t){return Us.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return R$(r);case"XXXX":case"XX":return cc(r);case"XXXXX":case"XXX":default:return cc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return R$(r);case"xxxx":case"xx":return cc(r);case"xxxxx":case"xxx":default:return cc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+M$(r,":");case"OOOO":default:return"GMT"+cc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+M$(r,":");case"zzzz":default:return"GMT"+cc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tn(r,t.length)},T:function(e,t,n){return Tn(+e,t.length)}};function M$(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Tn(o,2)}function R$(e,t){return e%60===0?(e>0?"-":"+")+Tn(Math.abs(e)/60,2):cc(e,t)}function cc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tn(Math.trunc(r/60),2),o=Tn(r%60,2);return n+i+t+o}const D$=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Uq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},cLe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return D$(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",D$(r,t)).replace("{{time}}",Uq(i,t))},fLe={p:Uq,P:cLe},dLe=/^D+$/,hLe=/^Y+$/,pLe=["D","DD","YY","YYYY"];function vLe(e){return dLe.test(e)}function gLe(e){return hLe.test(e)}function mLe(e,t,n){const r=yLe(e,t,n);if(console.warn(r),pLe.includes(e))throw new RangeError(r)}function yLe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bLe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xLe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wLe=/^'([^]*?)'?$/,_Le=/''/g,SLe=/[a-zA-Z]/;function mf(e,t,n){const r=kg(),i=n?.locale??r.locale??Lq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Rn(e,n?.in);if(!kFe(u))throw new RangeError("Invalid time value");let s=t.match(xLe).map(c=>{const d=c[0];if(d==="p"||d==="P"){const h=fLe[d];return h(c,i.formatLong)}return c}).join("").match(bLe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const d=c[0];if(d==="'")return{isToken:!1,value:CLe(c)};if(T$[d])return{isToken:!0,value:c};if(d.match(SLe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return s.map(c=>{if(!c.isToken)return c.value;const d=c.value;(!n?.useAdditionalWeekYearTokens&&gLe(d)||!n?.useAdditionalDayOfYearTokens&&vLe(d))&&mLe(d,t,String(e));const h=T$[d[0]];return h(u,d,i.localize,l)}).join("")}function CLe(e){const t=e.match(wLe);return t?t[1].replace(_Le,"'"):e}function ELe(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=ii(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function ALe(e){return Math.trunc(+Rn(e)/1e3)}function OLe(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Rn(n,t?.in)}function PLe(e,t){const n=Rn(e,t?.in);return TFe(OLe(n,t),ho(n,t),t)+1}function N6(e,t){return+Rn(e)>+Rn(t)}function Wq(e,t){return+Rn(e)<+Rn(t)}function kLe(e,t,n){const[r,i]=gf(n?.in,e,t);return+ma(r,n)==+ma(i,n)}function bO(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function TLe(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function qS(e,t,n){return Ui(e,-t,n)}function KS(e,t,n){const r=Rn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=ii(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const u=ELe(a);return r.setMonth(t,Math.min(o,u)),r}function $$(e,t,n){const r=Rn(e,n?.in);return isNaN(+r)?ii(e,NaN):(r.setFullYear(t),r)}function KYe(e){return nf(Date.now(),e)}const MLe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},RLe=(e,t,n)=>{let r;const i=MLe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},DLe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},$Le={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},ILe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},NLe={date:kd({formats:DLe,defaultWidth:"full"}),time:kd({formats:$Le,defaultWidth:"full"}),dateTime:kd({formats:ILe,defaultWidth:"full"})};function I$(e,t,n){const r="eeee p";return kLe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const FLe={lastWeek:I$,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:I$,other:"PP p"},LLe=(e,t,n,r)=>{const i=FLe[e];return typeof i=="function"?i(t,n,r):i},jLe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},BLe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},zLe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},ULe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},WLe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},VLe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},HLe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},qLe={ordinalNumber:HLe,era:fu({values:jLe,defaultWidth:"wide"}),quarter:fu({values:BLe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:zLe,defaultWidth:"wide"}),day:fu({values:ULe,defaultWidth:"wide"}),dayPeriod:fu({values:WLe,defaultWidth:"wide",formattingValues:VLe,defaultFormattingWidth:"wide"})},KLe=/^(第\s*)?\d+(日|时|分|秒)?/i,GLe=/\d+/i,YLe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},ZLe={any:[/^(前)/i,/^(公元)/i]},XLe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},QLe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},JLe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},eje={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},tje={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},nje={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},rje={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},ije={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},oje={ordinalNumber:Fq({matchPattern:KLe,parsePattern:GLe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:YLe,defaultMatchWidth:"wide",parsePatterns:ZLe,defaultParseWidth:"any"}),quarter:du({matchPatterns:XLe,defaultMatchWidth:"wide",parsePatterns:QLe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:JLe,defaultMatchWidth:"wide",parsePatterns:eje,defaultParseWidth:"any"}),day:du({matchPatterns:tje,defaultMatchWidth:"wide",parsePatterns:nje,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:rje,defaultMatchWidth:"any",parsePatterns:ije,defaultParseWidth:"any"})},GYe={code:"zh-CN",formatDistance:RLe,formatLong:NLe,formatRelative:LLe,localize:qLe,match:oje,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(s||!l),d=t>1&&(l||!s),h=function(){r&&o(r)},v=function(){i&&o(i)};return I.jsx(Lje,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:v})}function jje(e){var t,n=Hn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,u=n.components,s=(t=u?.CaptionLabel)!==null&&t!==void 0?t:qq,l;return i?l=I.jsx(s,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(N$,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(N$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(F$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(F$,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Bje(e){var t=Hn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function zje(e,t,n){for(var r=n?tf(new Date):ma(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Uje(){var e=Hn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,u=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=zje(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,d){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(c,{locale:i}),children:u(c,{locale:i})},d)})]})}function Wje(){var e,t=Hn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Uje;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function Vje(e){var t=Hn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var xO=y.createContext(void 0);function Hje(e){if(!Tg(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(xO.Provider,{value:t,children:e.children})}return I.jsx(qje,{initialProps:e.initialProps,children:e.children})}function qje(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,d){var h,v;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,d);var g=!!(c.selected&&i&&r?.length===i);if(!g){var m=!!(!c.selected&&o&&r?.length===o);if(!m){var b=r?Vq([],r):[];if(c.selected){var w=b.findIndex(function(x){return ao(l,x)});b.splice(w,1)}else b.push(l);(v=t.onSelect)===null||v===void 0||v.call(t,b,l,c,d)}}},u={disabled:[]};r&&u.disabled.push(function(l){var c=o&&r.length>o-1,d=r.some(function(h){return ao(h,l)});return!!(c&&!d)});var s={selected:r,onDayClick:a,modifiers:u};return I.jsx(xO.Provider,{value:s,children:n})}function wO(){var e=y.useContext(xO);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Kje(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?ao(i,e)&&ao(r,e)?void 0:ao(i,e)?{from:i,to:void 0}:ao(r,e)?void 0:N6(r,e)?{from:e,to:i}:{from:r,to:e}:i?N6(e,i)?{from:i,to:e}:{from:e,to:i}:r?Wq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var _O=y.createContext(void 0);function Gje(e){if(!Mg(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(_O.Provider,{value:t,children:e.children})}return I.jsx(Yje,{initialProps:e.initialProps,children:e.children})}function Yje(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,u=t.min,s=t.max,l=function(v,g,m){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,v,g,m);var x=Kje(v,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,v,g,m)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],ao(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),u&&(o&&!a&&c.disabled.push({after:qS(o,u-1),before:Ui(o,u-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,u-1)}),!o&&a&&c.disabled.push({after:qS(a,u-1),before:Ui(a,u-1)})),s){if(o&&!a&&(c.disabled.push({before:Ui(o,-s+1)}),c.disabled.push({after:Ui(o,s-1)})),o&&a){var d=gu(a,o)+1,h=s-d;c.disabled.push({before:qS(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-s+1)}),c.disabled.push({after:Ui(a,s-1)}))}return I.jsx(_O.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function SO(){var e=y.useContext(_O);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Wy(e){return Array.isArray(e)?Vq([],e):e!==void 0?[e]:[]}function Zje(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=Wy(i)}),t}var Xa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Xa||(Xa={}));var Xje=Xa.Selected,Hu=Xa.Disabled,Qje=Xa.Hidden,Jje=Xa.Today,GS=Xa.RangeEnd,YS=Xa.RangeMiddle,ZS=Xa.RangeStart,eBe=Xa.Outside;function tBe(e,t,n){var r,i=(r={},r[Xje]=Wy(e.selected),r[Hu]=Wy(e.disabled),r[Qje]=Wy(e.hidden),r[Jje]=[e.today],r[GS]=[],r[YS]=[],r[ZS]=[],r[eBe]=[],r);return e.fromDate&&i[Hu].push({before:e.fromDate}),e.toDate&&i[Hu].push({after:e.toDate}),Tg(e)?i[Hu]=i[Hu].concat(t.modifiers[Hu]):Mg(e)&&(i[Hu]=i[Hu].concat(n.modifiers[Hu]),i[ZS]=n.modifiers[ZS],i[YS]=n.modifiers[YS],i[GS]=n.modifiers[GS]),i}var Yq=y.createContext(void 0);function nBe(e){var t=Hn(),n=wO(),r=SO(),i=tBe(t,n,r),o=Zje(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Yq.Provider,{value:a,children:e.children})}function Zq(){var e=y.useContext(Yq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function rBe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function iBe(e){return!!(e&&typeof e=="object"&&"from"in e)}function oBe(e){return!!(e&&typeof e=="object"&&"after"in e)}function aBe(e){return!!(e&&typeof e=="object"&&"before"in e)}function uBe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function sBe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=gu(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=gu(e,r)>=0&&gu(i,e)>=0;return a}return i?ao(i,e):r?ao(r,e):!1}function lBe(e){return gO(e)}function cBe(e){return Array.isArray(e)&&e.every(gO)}function fBe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(lBe(n))return ao(e,n);if(cBe(n))return n.includes(e);if(iBe(n))return sBe(e,n);if(uBe(n))return n.dayOfWeek.includes(e.getDay());if(rBe(n)){var r=gu(n.before,e),i=gu(n.after,e),o=r>0,a=i<0,u=N6(n.before,n.after);return u?a&&o:o||a}return oBe(n)?gu(e,n.after)>0:aBe(n)?gu(n.before,e)>0:typeof n=="function"?n(e):!1})}function CO(e,t,n){var r=Object.keys(t).reduce(function(o,a){var u=t[a];return fBe(e,u)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!bO(e,n)&&(i.outside=!0),i}function dBe(e,t){for(var n=ho(e[0]),r=mO(e[e.length-1]),i,o,a=n;a<=r;){var u=CO(a,t),s=!u.disabled&&!u.hidden;if(!s){a=Ui(a,1);continue}if(u.selected)return a;u.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var hBe=365;function Xq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,u=a===void 0?{count:0,lastFocused:e}:a,s=i.weekStartsOn,l=i.fromDate,c=i.toDate,d=i.locale,h={day:Ui,week:I6,month:Za,year:AFe,startOfWeek:function(b){return i.ISOWeek?tf(b):ma(b,{locale:d,weekStartsOn:s})},endOfWeek:function(b){return i.ISOWeek?Nq(b):yO(b,{locale:d,weekStartsOn:s})}},v=h[n](e,r==="after"?1:-1);r==="before"&&l?v=OFe([l,v]):r==="after"&&c&&(v=PFe([c,v]));var g=!0;if(o){var m=CO(v,o);g=!m.disabled&&!m.hidden}return g?v:u.count>hBe?u.lastFocused:Xq(v,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},u),{count:u.count+1})})}var Qq=y.createContext(void 0);function pBe(e){var t=Rg(),n=Zq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),u=a[0],s=a[1],l=dBe(t.displayMonths,n),c=i??(u&&t.isDateDisplayed(u))?u:l,d=function(){s(i),o(void 0)},h=function(b){o(b)},v=Hn(),g=function(b,w){if(i){var x=Xq(i,{moveBy:b,direction:w,context:v,modifiers:n});ao(i,x)||(t.goToDate(x,i),h(x))}},m={focusedDay:i,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return I.jsx(Qq.Provider,{value:m,children:e.children})}function EO(){var e=y.useContext(Qq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function vBe(e,t){var n=Zq(),r=CO(e,n,t);return r}var AO=y.createContext(void 0);function gBe(e){if(!Yw(e.initialProps)){var t={selected:void 0};return I.jsx(AO.Provider,{value:t,children:e.children})}return I.jsx(mBe,{initialProps:e.initialProps,children:e.children})}function mBe(e){var t=e.initialProps,n=e.children,r=function(o,a,u){var s,l,c;if((s=t.onDayClick)===null||s===void 0||s.call(t,o,a,u),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,u);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,u)},i={selected:t.selected,onDayClick:r};return I.jsx(AO.Provider,{value:i,children:n})}function Jq(){var e=y.useContext(AO);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function yBe(e,t){var n=Hn(),r=Jq(),i=wO(),o=SO(),a=EO(),u=a.focusDayAfter,s=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,v=a.focusMonthBefore,g=a.focusMonthAfter,m=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(V){var B,q,Y,ue;Yw(n)?(B=r.onDayClick)===null||B===void 0||B.call(r,e,t,V):Tg(n)?(q=i.onDayClick)===null||q===void 0||q.call(i,e,t,V):Mg(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,V):(ue=n.onDayClick)===null||ue===void 0||ue.call(n,e,t,V)},A=function(V){var B;h(e),(B=n.onDayFocus)===null||B===void 0||B.call(n,e,t,V)},E=function(V){var B;d(),(B=n.onDayBlur)===null||B===void 0||B.call(n,e,t,V)},C=function(V){var B;(B=n.onDayMouseEnter)===null||B===void 0||B.call(n,e,t,V)},T=function(V){var B;(B=n.onDayMouseLeave)===null||B===void 0||B.call(n,e,t,V)},M=function(V){var B;(B=n.onDayPointerEnter)===null||B===void 0||B.call(n,e,t,V)},F=function(V){var B;(B=n.onDayPointerLeave)===null||B===void 0||B.call(n,e,t,V)},U=function(V){var B;(B=n.onDayTouchCancel)===null||B===void 0||B.call(n,e,t,V)},H=function(V){var B;(B=n.onDayTouchEnd)===null||B===void 0||B.call(n,e,t,V)},W=function(V){var B;(B=n.onDayTouchMove)===null||B===void 0||B.call(n,e,t,V)},ie=function(V){var B;(B=n.onDayTouchStart)===null||B===void 0||B.call(n,e,t,V)},Z=function(V){var B;(B=n.onDayKeyUp)===null||B===void 0||B.call(n,e,t,V)},G=function(V){var B;switch(V.key){case"ArrowLeft":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowRight":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowDown":V.preventDefault(),V.stopPropagation(),l();break;case"ArrowUp":V.preventDefault(),V.stopPropagation(),c();break;case"PageUp":V.preventDefault(),V.stopPropagation(),V.shiftKey?m():v();break;case"PageDown":V.preventDefault(),V.stopPropagation(),V.shiftKey?b():g();break;case"Home":V.preventDefault(),V.stopPropagation(),w();break;case"End":V.preventDefault(),V.stopPropagation(),x();break}(B=n.onDayKeyDown)===null||B===void 0||B.call(n,e,t,V)},K={onClick:S,onFocus:A,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:T,onPointerEnter:M,onPointerLeave:F,onTouchCancel:U,onTouchEnd:H,onTouchMove:W,onTouchStart:ie};return K}function bBe(){var e=Hn(),t=Jq(),n=wO(),r=SO(),i=Yw(e)?t.selected:Tg(e)?n.selected:Mg(e)?r.selected:void 0;return i}function xBe(e){return Object.values(Xa).includes(e)}function wBe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(xBe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function _Be(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function SBe(e,t,n){var r,i,o,a=Hn(),u=EO(),s=vBe(e,t),l=yBe(e,s),c=bBe(),d=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;s.outside||u.focusedDay&&d&&ao(u.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[u.focusedDay,e,n,d,s.outside]);var h=wBe(a,s).join(" "),v=_Be(a,s),g=!!(s.outside&&!a.showOutsideDays||s.hidden),m=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:Vje,b=I.jsx(m,{date:e,displayMonth:t,activeModifiers:s}),w={style:v,className:h,children:b,role:"gridcell"},x=u.focusTarget&&ao(u.focusTarget,e)&&!s.outside,S=u.focusedDay&&ao(u.focusedDay,e),A=Rt(Rt(Rt({},w),(r={disabled:s.disabled,role:"gridcell"},r["aria-selected"]=s.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:d,isHidden:g,activeModifiers:s,selectedDays:c,buttonProps:A,divProps:w};return E}function CBe(e){var t=y.useRef(null),n=SBe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(Xb,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function EBe(e){var t=e.number,n=e.dates,r=Hn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,u=r.locale,s=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:u});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var d=s(Number(t),{locale:u}),h=function(v){i(t,n,v)};return I.jsx(Xb,{name:"week-number","aria-label":d,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function ABe(e){var t,n,r=Hn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,u=r.components,s=(t=u?.Day)!==null&&t!==void 0?t:CBe,l=(n=u?.WeekNumber)!==null&&n!==void 0?n:EBe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(d){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(s,{displayMonth:e.displayMonth,date:d})},ALe(d))})]})}function L$(e,t,n){for(var r=n?.ISOWeek?Nq(t):yO(t,n),i=n?.ISOWeek?tf(e):ma(e,n),o=gu(r,i),a=[],u=0;u<=o;u++)a.push(Ui(i,u));var s=a.reduce(function(l,c){var d=n?.ISOWeek?jq(c):zq(c,n),h=l.find(function(v){return v.weekNumber===d});return h?(h.dates.push(c),l):(l.push({weekNumber:d,dates:[c]}),l)},[]);return s}function OBe(e,t){var n=L$(ho(e),mO(e),t);if(t?.useFixedWeeks){var r=PLe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=I6(o,6-r),u=L$(I6(o,1),a,t);n.push.apply(n,u)}}return n}function PBe(e){var t,n,r,i=Hn(),o=i.locale,a=i.classNames,u=i.styles,s=i.hideHead,l=i.fixedWeeks,c=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,v=i.ISOWeek,g=OBe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:v,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),m=(t=c?.Head)!==null&&t!==void 0?t:Wje,b=(n=c?.Row)!==null&&n!==void 0?n:ABe,w=(r=c?.Footer)!==null&&r!==void 0?r:Bje;return I.jsxs("table",{id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&I.jsx(m,{}),I.jsx("tbody",{className:a.tbody,style:u.tbody,children:g.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function kBe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var TBe=kBe()?y.useLayoutEffect:y.useEffect,XS=!1,MBe=0;function j$(){return"react-day-picker-".concat(++MBe)}function RBe(e){var t,n=e??(XS?j$():null),r=y.useState(n),i=r[0],o=r[1];return TBe(function(){i===null&&o(j$())},[]),y.useEffect(function(){XS===!1&&(XS=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function DBe(e){var t,n,r=Hn(),i=r.dir,o=r.classNames,a=r.styles,u=r.components,s=Rg().displayMonths,l=RBe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[o.month],h=a.month,v=e.displayIndex===0,g=e.displayIndex===s.length-1,m=!v&&!g;i==="rtl"&&(t=[v,g],g=t[0],v=t[1]),v&&(d.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),g&&(d.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),m&&(d.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=u?.Caption)!==null&&n!==void 0?n:jje;return I.jsxs("div",{className:d.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(PBe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function $Be(e){var t=Hn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function IBe(e){var t,n,r=e.initialProps,i=Hn(),o=EO(),a=Rg(),u=y.useState(!1),s=u[0],l=u[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(s||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,s,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var d=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(g){return g.startsWith("data-")}).reduce(function(g,m){var b;return Rt(Rt({},g),(b={},b[m]=r[m],b))},{}),v=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:$Be;return I.jsx("div",Rt({className:c.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(v,{children:a.displayMonths.map(function(g,m){return I.jsx(DBe,{displayIndex:m,displayMonth:g},m)})})}))}function NBe(e){var t=e.children,n=aje(e,["children"]);return I.jsx(Eje,{initialProps:n,children:I.jsx(Ije,{children:I.jsx(gBe,{initialProps:n,children:I.jsx(Hje,{initialProps:n,children:I.jsx(Gje,{initialProps:n,children:I.jsx(nBe,{children:I.jsx(pBe,{children:t})})})})})})})}function YYe(e){return I.jsx(NBe,Rt({},e,{children:I.jsx(IBe,{initialProps:e})}))}var OO="Popover",[eK,ZYe]=mi(OO,[Fl]),Dg=Fl(),[FBe,Hl]=eK(OO),tK=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,u=Dg(t),s=y.useRef(null),[l,c]=y.useState(!1),[d=!1,h]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(Ux,{...u,children:I.jsx(FBe,{scope:t,contentId:No(),triggerRef:s,open:d,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};tK.displayName=OO;var nK="PopoverAnchor",LBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(nK,n),o=Dg(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=i;return y.useEffect(()=>(a(),()=>u()),[a,u]),I.jsx(vg,{...o,...r,ref:t})});LBe.displayName=nK;var rK="PopoverTrigger",iK=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(rK,n),o=Dg(n),a=Kt(t,i.triggerRef),u=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lK(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:I.jsx(vg,{asChild:!0,...o,children:u})});iK.displayName=rK;var PO="PopoverPortal",[jBe,BBe]=eK(PO,{forceMount:void 0}),oK=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Hl(PO,t);return I.jsx(jBe,{scope:t,forceMount:n,children:I.jsx(oi,{present:n||o.open,children:I.jsx(cg,{asChild:!0,container:i,children:r})})})};oK.displayName=PO;var mh="PopoverContent",aK=y.forwardRef((e,t)=>{const n=BBe(mh,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Hl(mh,e.__scopePopover);return I.jsx(oi,{present:r||o.open,children:o.modal?I.jsx(zBe,{...i,ref:t}):I.jsx(UBe,{...i,ref:t})})});aK.displayName=mh;var zBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(null),i=Kt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return dg(a)},[]),I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(uK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0,l=u.button===2||s;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),UBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uK=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,...d}=e,h=Hl(mh,n),v=Dg(n);return Lx(),I.jsx(lg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(Wx,{"data-state":lK(h.open),role:"dialog",id:h.contentId,...v,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sK="PopoverClose",WBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(sK,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});WBe.displayName=sK;var VBe="PopoverArrow",HBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dg(n);return I.jsx(Vx,{...i,...r,ref:t})});HBe.displayName=VBe;function lK(e){return e?"open":"closed"}var XYe=tK,QYe=iK,JYe=oK,eZe=aK,Qb={exports:{}};/** + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t,",").concat(n+i-u*g," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},VRe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,u=n.width,s=n.height;if(Math.abs(u)>0&&Math.abs(s)>0){var l=Math.min(o,o+u),c=Math.max(o,o+u),d=Math.min(a,a+s),h=Math.max(a,a+s);return r>=l&&r<=c&&i>=d&&i<=h}return!1},HRe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eP=function(t){var n=$7($7({},HRe),t),r=y.useRef(),i=y.useState(-1),o=NRe(i,2),a=o[0],u=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&u(A)}catch{}},[]);var s=n.x,l=n.y,c=n.width,d=n.height,h=n.radius,v=n.className,g=n.animationEasing,m=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||d!==+d||c===0||d===0)return null;var S=fn("recharts-rectangle",v);return x?j.createElement(Ya,{canBegin:a>0,from:{width:c,height:d,x:s,y:l},to:{width:c,height:d,x:s,y:l},duration:m,animationEasing:g,isActive:x},function(A){var E=A.width,C=A.height,T=A.x,M=A.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,isActive:w,easing:g},j.createElement("path",Tb({},Bt(n,!0),{className:S,d:I7(T,M,E,C,h),ref:r})))}):j.createElement("path",Tb({},Bt(n,!0),{className:S,d:I7(s,l,c,d,h)}))};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var JRe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},e9e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,u=a===void 0?0:a,s=t.left,l=s===void 0?0:s,c=t.width,d=c===void 0?0:c,h=t.height,v=h===void 0?0:h,g=t.className,m=XRe(t,qRe),b=KRe({x:r,y:o,top:u,left:l,width:d,height:v},m);return!Ke(r)||!Ke(o)||!Ke(d)||!Ke(v)||!Ke(u)||!Ke(l)?null:j.createElement("path",r6({},Bt(b,!0),{className:fn("recharts-cross",g),d:JRe(r,o,d,v,u,l)}))},t9e=dW,n9e=t9e(Object.getPrototypeOf,Object),r9e=n9e,i9e=As,o9e=r9e,a9e=Ps,u9e="[object Object]",s9e=Function.prototype,l9e=Object.prototype,ZV=s9e.toString,c9e=l9e.hasOwnProperty,f9e=ZV.call(Object);function d9e(e){if(!a9e(e)||i9e(e)!=u9e)return!1;var t=o9e(e);if(t===null)return!0;var n=c9e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZV.call(n)==f9e}var h9e=d9e;const p9e=Pn(h9e);var v9e=As,g9e=Ps,m9e="[object Boolean]";function y9e(e){return e===!0||e===!1||g9e(e)&&v9e(e)==m9e}var b9e=y9e;const x9e=Pn(b9e);function Iv(e){"@babel/helpers - typeof";return Iv=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},Iv(e)}function Mb(){return Mb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:s,y:l},to:{upperWidth:c,lowerWidth:d,height:h,x:s,y:l},duration:m,animationEasing:g,isActive:w},function(S){var A=S.upperWidth,E=S.lowerWidth,C=S.height,T=S.x,M=S.y;return j.createElement(Ya,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:m,easing:g},j.createElement("path",Mb({},Bt(n,!0),{className:x,d:B7(T,M,A,E,C),ref:r})))}):j.createElement("g",null,j.createElement("path",Mb({},Bt(n,!0),{className:x,d:B7(s,l,c,d,h)})))},M9e=["option","shapeType","propTransformer","activeClassName","isActive"];function Nv(e){"@babel/helpers - typeof";return Nv=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},Nv(e)}function R9e(e,t){if(e==null)return{};var n=D9e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function z7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Eo(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,u=i.startIndex;a?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Eo(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Eo(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Eo(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Eo(r,"handleSlideDragStart",function(i){var o=G7(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return gDe(t,e),dDe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,u=this.props,s=u.gap,l=u.data,c=l.length-1,d=Math.min(i,o),h=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,h);return{startIndex:v-v%s,endIndex:g===c?c:g-g%s}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,u=i.dataKey,s=qr(o[r],u,r);return Wt(a)?a(s,r):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,u=i.endX,s=this.props,l=s.x,c=s.width,d=s.travellerWidth,h=s.startIndex,v=s.endIndex,g=s.onChange,m=r.pageX-o;m>0?m=Math.min(m,l+c-d-u,l+c-d-a):m<0&&(m=Math.max(m,l-a,l-u));var b=this.getIndex({startX:a+m,endX:u+m});(b.startIndex!==h||b.endIndex!==v)&&g&&g(b),this.setState({startX:a+m,endX:u+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=G7(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,u=i.endX,s=i.startX,l=this.state[a],c=this.props,d=c.x,h=c.width,v=c.travellerWidth,g=c.onChange,m=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,d+h-v-l):x<0&&(x=Math.max(x,d-l)),w[a]=l+x;var S=this.getIndex(w),A=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(u>s?A%m===0:E%m===0)||us?E%m===0:A%m===0)||u>s&&E===M};this.setState(Eo(Eo({},a,l+x),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,u=a.scaleValues,s=a.startX,l=a.endX,c=this.state[i],d=u.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=u.length)){var v=u[h];i==="startX"&&v>=l||i==="endX"&&v<=s||this.setState(Eo({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.fill,l=r.stroke;return j.createElement("rect",{stroke:l,fill:s,x:i,y:o,width:a,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,s=r.data,l=r.children,c=r.padding,d=y.Children.only(l);return d?j.cloneElement(d,{x:i,y:o,width:a,height:u,margin:c,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,u=this,s=this.props,l=s.y,c=s.travellerWidth,d=s.height,h=s.traveller,v=s.ariaLabel,g=s.data,m=s.startIndex,b=s.endIndex,w=Math.max(r,this.props.x),x=zS(zS({},Bt(this.props,!1)),{},{x:w,y:l,width:c,height:d}),S=v||"Min value: ".concat((o=g[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[b])===null||a===void 0?void 0:a.name);return j.createElement(Sn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,u=o.height,s=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,d=Math.max(Math.abs(i-r)-l,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:c,y:a,width:d,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,u=r.height,s=r.travellerWidth,l=r.stroke,c=this.state,d=c.startX,h=c.endX,v=5,g={pointerEvents:"none",fill:l};return j.createElement(Sn,{className:"recharts-brush-texts"},j.createElement(cb,$b({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-v,y:a+u/2},g),this.getTextOfTick(i)),j.createElement(cb,$b({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+s+v,y:a+u/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,u=r.x,s=r.y,l=r.width,c=r.height,d=r.alwaysShowText,h=this.state,v=h.startX,g=h.endX,m=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!Ke(u)||!Ke(s)||!Ke(l)||!Ke(c)||l<=0||c<=0)return null;var S=fn("recharts-brush",o),A=j.Children.count(a)===1,E=cDe("userSelect","none");return j.createElement(Sn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(m||b||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,u=r.height,s=r.stroke,l=Math.floor(o+u/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:i,y:o,width:a,height:u,fill:s,stroke:"none"}),j.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return j.isValidElement(r)?o=j.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,u=r.x,s=r.travellerWidth,l=r.updateId,c=r.startIndex,d=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return zS({prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a},o&&o.length?yDe({data:o,width:a,x:u,travellerWidth:s,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+a-s]);var h=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:s,prevUpdateId:l,prevX:u,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,u=o-1;u-a>1;){var s=Math.floor((a+u)/2);r[s]>i?u=s:a=s}return i>=r[u]?u:a}}])}(y.PureComponent);Eo(rh,"displayName","Brush");Eo(rh,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var bDe=E5;function xDe(e,t){var n;return bDe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var wDe=xDe,_De=iW,SDe=jl,CDe=wDe,EDe=vo,ADe=Cw;function PDe(e,t,n){var r=EDe(e)?_De:CDe;return n&&ADe(e,t,n)&&(t=void 0),r(e,SDe(t))}var ODe=PDe;const kDe=Pn(ODe);var Cu=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},Y7=AW;function TDe(e,t,n){t=="__proto__"&&Y7?Y7(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var MDe=TDe,RDe=MDe,DDe=CW,$De=jl;function IDe(e,t){var n={};return t=$De(t),DDe(e,function(r,i,o){RDe(n,i,t(r,i,o))}),n}var NDe=IDe;const FDe=Pn(NDe);function LDe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function n7e(e,t){var n=e.x,r=e.y,i=e7e(e,ZDe),o="".concat(n),a=parseInt(o,10),u="".concat(r),s=parseInt(u,10),l="".concat(t.height||i.height),c=parseInt(l,10),d="".concat(t.width||i.width),h=parseInt(d,10);return jp(jp(jp(jp(jp({},t),i),a?{x:a}:{}),s?{y:s}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function X7(e){return j.createElement(i6,a6({shapeType:"rectangle",propTransformer:n7e,activeClassName:"recharts-active-bar"},e))}var r7e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Qc(),n)}},i7e=["value","background"],nH;function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function o7e(e,t){if(e==null)return{};var n=a7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nb(){return Nb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ie=Math.min((se||0)-(Z[de-1]||0),ie))}),Number.isFinite(ie)){var G=ie/W,K=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(T=G*K/2),m.padding==="no-gap"){var V=Yc(t.barCategoryGap,G*K),B=G*K/2;T=B-V-(B-V)/K*V}}}i==="xAxis"?M=[r.left+(S.left||0)+(T||0),r.left+r.width-(S.right||0)-(T||0)]:i==="yAxis"?M=s==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(T||0),r.top+r.height-(S.bottom||0)-(T||0)]:M=m.range,E&&(M=[M[1],M[0]]);var q=rTe(m,o,h),Y=q.scale,ue=q.realScaleType;Y.domain(w).range(M),iTe(Y);var Q=dTe(Y,Ra(Ra({},m),{},{realScaleType:ue}));i==="xAxis"?(H=b==="top"&&!A||b==="bottom"&&A,F=r.left,U=d[C]-H*m.height):i==="yAxis"&&(H=b==="left"&&!A||b==="right"&&A,F=d[C]-H*m.width,U=r.top);var J=Ra(Ra(Ra({},m),Q),{},{realScaleType:ue,x:F,y:U,scale:Y,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return J.bandSize=Cb(J,Q),!m.hide&&i==="xAxis"?d[C]+=(H?-1:1)*J.height:m.hide||(d[C]+=(H?-1:1)*J.width),Ra(Ra({},v),{},Fw({},g,J))},{})},aH=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},y7e=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return aH({x:n,y:r},{x:i,y:o})},uH=function(){function e(t){p7e(this,e),this.scale=t}return v7e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Fw(uH,"EPS",1e-4);var tP=function(t){var n=Object.keys(t).reduce(function(r,i){return Ra(Ra({},r),{},Fw({},i,uH.create(t[i])))},{});return Ra(Ra({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,u=o.position;return FDe(i,function(s,l){return n[l].apply(s,{bandAware:a,position:u})})},isInRange:function(i){return tH(i,function(o,a){return n[a].isInRange(o)})}})};function b7e(e){return(e%180+180)%180}var x7e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=b7e(i),a=o*Math.PI/180,u=Math.atan(r/n),s=a>u&&a-1?i[o?t[a]:a]:void 0}}var E7e=C7e,A7e=XV;function P7e(e){var t=A7e(e),n=t%1;return t===t?n?t-n:t:0}var O7e=P7e,k7e=yW,T7e=jl,M7e=O7e,R7e=Math.max;function D7e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:M7e(n);return i<0&&(i=R7e(r+i,0)),k7e(e,T7e(t),i)}var $7e=D7e,I7e=E7e,N7e=$7e,F7e=I7e(N7e),L7e=F7e;const j7e=Pn(L7e);var B7e=Ube(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),nP=y.createContext(void 0),rP=y.createContext(void 0),sH=y.createContext(void 0),lH=y.createContext({}),cH=y.createContext(void 0),fH=y.createContext(0),dH=y.createContext(0),n$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,u=t.children,s=t.width,l=t.height,c=B7e(o);return j.createElement(nP.Provider,{value:r},j.createElement(rP.Provider,{value:i},j.createElement(lH.Provider,{value:o},j.createElement(sH.Provider,{value:c},j.createElement(cH.Provider,{value:a},j.createElement(fH.Provider,{value:l},j.createElement(dH.Provider,{value:s},u)))))))},z7e=function(){return y.useContext(cH)},hH=function(t){var n=y.useContext(nP);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},U7e=function(){var t=y.useContext(nP);return Js(t)},W7e=function(){var t=y.useContext(rP),n=j7e(t,function(r){return tH(r.domain,Number.isFinite)});return n||Js(t)},pH=function(t){var n=y.useContext(rP);n==null&&Qc();var r=n[t];return r==null&&Qc(),r},V7e=function(){var t=y.useContext(sH);return t},H7e=function(){return y.useContext(lH)},iP=function(){return y.useContext(dH)},oP=function(){return y.useContext(fH)};function oh(e){"@babel/helpers - typeof";return oh=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},oh(e)}function q7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K7e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function O$e(e,t){return wH(e,t+1)}function k$e(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,u=t.end,s=0,l=1,c=a,d=function(){var g=r?.[s];if(g===void 0)return{v:wH(r,l)};var m=s,b,w=function(){return b===void 0&&(b=n(g,m)),b},x=g.coordinate,S=s===0||zb(e,x,w,c,u);S||(s=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),s+=l)},h;l<=o.length;)if(h=d(),h)return h.v;return[]}function zv(e){"@babel/helpers - typeof";return zv=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},zv(e)}function c$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pi(e){for(var t=1;t0?v.coordinate-b*e:v.coordinate})}else o[h]=v=Pi(Pi({},v),{},{tickCoord:v.coordinate});var w=zb(e,v.tickCoord,m,u,s);w&&(s=v.tickCoord-e*(m()/2+i),o[h]=Pi(Pi({},v),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function $$e(e,t,n,r,i,o){var a=(r||[]).slice(),u=a.length,s=t.start,l=t.end;if(o){var c=r[u-1],d=n(c,u-1),h=e*(c.coordinate+e*d/2-l);a[u-1]=c=Pi(Pi({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var v=zb(e,c.tickCoord,function(){return d},s,l);v&&(l=c.tickCoord-e*(d/2+i),a[u-1]=Pi(Pi({},c),{},{isShow:!0}))}for(var g=o?u-1:u,m=function(x){var S=a[x],A,E=function(){return A===void 0&&(A=n(S,x)),A};if(x===0){var C=e*(S.coordinate-e*E()/2-s);a[x]=S=Pi(Pi({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Pi(Pi({},S),{},{tickCoord:S.coordinate});var T=zb(e,S.tickCoord,E,s,l);T&&(s=S.tickCoord+e*(E()/2+i),a[x]=Pi(Pi({},S),{},{isShow:!0}))},b=0;b=2?Ba(i[1].coordinate-i[0].coordinate):1,w=P$e(o,b,v);return s==="equidistantPreserveStart"?k$e(b,w,m,i,a):(s==="preserveStart"||s==="preserveStartEnd"?h=$$e(b,w,m,i,a,s==="preserveStartEnd"):h=D$e(b,w,m,i,a),h.filter(function(x){return x.isShow}))}var I$e=["viewBox"],N$e=["viewBox"],F$e=["ticks"];function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function j$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d$(e,t){for(var n=0;n0?s(this.props):s(v)),a<=0||u<=0||!g||!g.length?null:j.createElement(Sn,{className:fn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return j.isValidElement(r)?a=j.cloneElement(r,i):Wt(r)?a=r(i):a=j.createElement(cb,cd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);lP(Yh,"displayName","CartesianAxis");lP(Yh,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var q$e=["x1","y1","x2","y2","key"],K$e=["offset"];function Jc(e){"@babel/helpers - typeof";return Jc=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},Jc(e)}function h$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Q$e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,u=t.height,s=t.ry;return j.createElement("rect",{x:i,y:o,ry:s,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function CH(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,u=t.key,s=p$(t,q$e),l=Bt(s,!1);l.offset;var c=p$(l,K$e);n=j.createElement("line",_c({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:u}))}return n}function J$e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(s),index:s});return CH(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function eIe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,s){var l=Ti(Ti({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(s),index:s});return CH(i,l)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function tIe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,u=e.horizontalPoints,s=e.horizontal,l=s===void 0?!0:s;if(!l||!t||!t.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,v){return h-v});i!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?i+a-h:c[v+1]-h;if(m<=0)return null;var b=v%t.length;return j.createElement("rect",{key:"react-".concat(v),y:h,x:r,height:m,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function nIe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,u=e.width,s=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,v){return h-v});o!==c[0]&&c.unshift(0);var d=c.map(function(h,v){var g=!c[v+1],m=g?o+u-h:c[v+1]-h;if(m<=0)return null;var b=v%r.length;return j.createElement("rect",{key:"react-".concat(v),x:h,y:a,width:m,height:s,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var rIe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return NV(sP(Ti(Ti(Ti({},Yh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},iIe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return NV(sP(Ti(Ti(Ti({},Yh.defaultProps),r),{},{ticks:rs(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Wf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function oIe(e){var t,n,r,i,o,a,u=iP(),s=oP(),l=H7e(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Wf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Wf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Wf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Wf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Wf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Wf.verticalFill,x:Ke(e.x)?e.x:l.left,y:Ke(e.y)?e.y:l.top,width:Ke(e.width)?e.width:l.width,height:Ke(e.height)?e.height:l.height}),d=c.x,h=c.y,v=c.width,g=c.height,m=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=U7e(),S=W7e();if(!Ke(v)||v<=0||!Ke(g)||g<=0||!Ke(d)||d!==+d||!Ke(h)||h!==+h)return null;var A=c.verticalCoordinatesGenerator||rIe,E=c.horizontalCoordinatesGenerator||iIe,C=c.horizontalPoints,T=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,F=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:u,height:s,offset:l},M?!0:m);ss(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(F),"]")),Array.isArray(F)&&(C=F)}if((!T||!T.length)&&Wt(A)){var U=w&&w.length,H=A({xAxis:x?Ti(Ti({},x),{},{ticks:U?w:x.ticks}):void 0,width:u,height:s,offset:l},U?!0:m);ss(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Jc(H),"]")),Array.isArray(H)&&(T=H)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(Q$e,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),j.createElement(J$e,_c({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),j.createElement(eIe,_c({},c,{offset:l,verticalPoints:T,xAxis:x,yAxis:S})),j.createElement(tIe,_c({},c,{horizontalPoints:C})),j.createElement(nIe,_c({},c,{verticalPoints:T})))}oIe.displayName="CartesianGrid";var aIe=["type","layout","connectNulls","ref"],uIe=["key"];function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}function v$(e,t){if(e==null)return{};var n=sIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function g0(){return g0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(Vf(s.slice(0,g)),[d-m]);break}var b=v.length%2===0?[0,h]:[h];return[].concat(Vf(t.repeat(s,c)),Vf(v),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Da(n,"id",df("recharts-line-")),Da(n,"pathRef",function(a){n.mainCurve=a}),Da(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Da(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return yIe(t,e),pIe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,u=o.xAxis,s=o.yAxis,l=o.layout,c=o.children,d=fo(c,qh);if(!d)return null;var h=function(m,b){return{x:m.x,y:m.y,value:m.value,errorVal:qr(m.payload,b)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return j.createElement(Sn,v,d.map(function(g){return j.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:u,yAxis:s,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var u=this.props,s=u.dot,l=u.points,c=u.dataKey,d=Bt(this.props,!1),h=Bt(s,!0),v=l.map(function(m,b){var w=Co(Co(Co({key:"dot-".concat(b),r:3},d),h),{},{value:m.value,dataKey:c,cx:m.x,cy:m.y,index:b,payload:m.payload});return t.renderDotItem(s,w)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return j.createElement(Sn,g0({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var u=this.props,s=u.type,l=u.layout,c=u.connectNulls;u.ref;var d=v$(u,aIe),h=Co(Co(Co({},Bt(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:s,layout:l,connectNulls:c});return j.createElement(Tc,g0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,u=a.points,s=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,v=a.animationId,g=a.animateNewValues,m=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return j.createElement(Ya,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var E=A.t;if(x){var C=x.length/u.length,T=u.map(function(W,ie){var Z=Math.floor(ie*C);if(x[Z]){var G=x[Z],K=Er(G.x,W.x),V=Er(G.y,W.y);return Co(Co({},W),{},{x:K(E),y:V(E)})}if(g){var B=Er(m*2,W.x),q=Er(b/2,W.y);return Co(Co({},W),{},{x:B(E),y:q(E)})}return Co(Co({},W),{},{x:W.x,y:W.y})});return o.renderCurveStatically(T,r,i)}var M=Er(0,S),F=M(E),U;if(s){var H="".concat(s).split(/[,\s]+/gim).map(function(W){return parseFloat(W)});U=o.getStrokeDasharray(F,S,H)}else U=o.generateSimpleStrokeDasharray(S,F);return o.renderCurveStatically(u,r,i,{strokeDasharray:U})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,u=o.isAnimationActive,s=this.state,l=s.prevPoints,c=s.totalLength;return u&&a&&a.length&&(!l&&c>0||!Zc(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.xAxis,c=i.yAxis,d=i.top,h=i.left,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=fn("recharts-line",s),A=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=kU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?h:h-v/2,y:E?d:d-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:h-K/2,y:d-K/2,width:v+K,height:g+K}))):null,!x&&this.renderCurve(C,T),this.renderErrorBar(C,T),(x||a)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Vf(r),[0]):r,a=[],u=0;u=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Ie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Zc(c,a)||!Zc(d,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,u=i.points,s=i.className,l=i.top,c=i.left,d=i.xAxis,h=i.yAxis,v=i.width,g=i.height,m=i.isAnimationActive,b=i.id;if(o||!u||!u.length)return null;var w=this.state.isAnimationFinished,x=u.length===1,S=fn("recharts-area",s),A=d&&d.allowDataOverflow,E=h&&h.allowDataOverflow,C=A||E,T=zt(b)?this.id:b,M=(r=Bt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},F=M.r,U=F===void 0?3:F,H=M.strokeWidth,W=H===void 0?2:H,ie=kU(a)?a:{},Z=ie.clipDot,G=Z===void 0?!0:Z,K=U*2+W;return j.createElement(Sn,{className:S},A||E?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(T)},j.createElement("rect",{x:A?c:c-v/2,y:E?l:l-g/2,width:A?v:v*2,height:E?g:g*2})),!G&&j.createElement("clipPath",{id:"clipPath-dots-".concat(T)},j.createElement("rect",{x:c-K/2,y:l-K/2,width:v+K,height:g+K}))):null,x?null:this.renderArea(C,T),(a||x)&&this.renderDots(C,G,T),(!m||w)&&Su.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);PH=vf;vu(vf,"displayName","Area");vu(vf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Va.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vu(vf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,u=a??o;if(Ke(u)&&typeof u=="number")return u;var s=i==="horizontal"?r:n,l=s.scale.domain();if(s.type==="number"){var c=Math.max(l[0],l[1]),d=Math.min(l[0],l[1]);return u==="dataMin"?d:u==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return u==="dataMin"?l[0]:u==="dataMax"?l[1]:l[0]});vu(vf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,u=e.bandSize,s=e.dataKey,l=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,v=t.layout,g=l&&l.length,m=PH.getBaseValue(t,n,r,i),b=v==="horizontal",w=!1,x=d.map(function(A,E){var C;g?C=l[c+E]:(C=qr(A,s),Array.isArray(C)?w=!0:C=[m,C]);var T=C[1]==null||g&&qr(A,s)==null;return b?{x:eh({axis:r,ticks:o,bandSize:u,entry:A,index:E}),y:T?null:i.scale(C[1]),value:C,payload:A}:{x:T?null:r.scale(C[1]),y:eh({axis:i,ticks:a,bandSize:u,entry:A,index:E}),value:C,payload:A}}),S;return g||w?S=x.map(function(A){var E=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:E!=null&&A.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:A.y}}):S=b?i.scale(m):r.scale(m),Hs({points:x,baseLine:S,layout:v,isRange:w},h)});vu(vf,"renderDotItem",function(e,t){var n;if(j.isValidElement(e))n=j.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=fn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=OH(t,wIe);n=j.createElement($w,Sc({},o,{key:i,className:r}))}return n});function fh(e){"@babel/helpers - typeof";return fh=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},fh(e)}function TIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MIe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zIe(e){var t=e.option,n=e.isActive,r=jIe(e,LIe);return typeof t=="string"?j.createElement(i6,m0({option:j.createElement(ww,m0({type:t},r)),isActive:n,shapeType:"symbols"},r)):j.createElement(i6,m0({option:t,isActive:n,shapeType:"symbols"},r))}function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function INe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FNe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ke(i)&&Ke(o)?t.slice(i,o+1):[]};function ZH(e){return e==="number"?[0,"auto"]:void 0}var O6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,u=Hw(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(s,l){var c,d=(c=l.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?u:d;h=Y1(v,a.dataKey,i)}else h=d&&d[r]||u[r];return h?[].concat(gh(s),[LV(l,h)]):s},[])},P$=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=YNe(o,r),u=t.orderedTooltipTicks,s=t.tooltipAxis,l=t.tooltipTicks,c=Xke(a,u,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,h=O6(t,n,c,d),v=ZNe(r,u,c,o);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:v}}return null},XNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,v=IV(c,o);return r.reduce(function(g,m){var b,w=m.type.defaultProps!==void 0?Ee(Ee({},m.type.defaultProps),m.props):m.props,x=w.type,S=w.dataKey,A=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,T=w.ticks,M=w.includeHidden,F=w[a];if(g[F])return g;var U=Hw(t.data,{graphicalItems:i.filter(function(Q){var J,se=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return se===F}),dataStartIndex:s,dataEndIndex:l}),H=U.length,W,ie,Z;SNe(w.domain,A,x)&&(W=zE(w.domain,null,A),v&&(x==="number"||C!=="auto")&&(Z=p0(U,S,"category")));var G=ZH(x);if(!W||W.length===0){var K,V=(K=w.domain)!==null&&K!==void 0?K:G;if(S){if(W=p0(U,S,x),x==="category"&&v){var B=jxe(W);E&&B?(ie=W,W=Db(0,H)):E||(W=t7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(gh(Q),[J])},[]))}else if(x==="category")E?W=W.filter(function(Q){return Q!==""&&!zt(Q)}):W=t7(V,W,m).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||zt(J)?Q:[].concat(gh(Q),[J])},[]);else if(x==="number"){var q=nTe(U,i.filter(function(Q){var J,se,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(se=Q.type.defaultProps)===null||se===void 0?void 0:se.hide;return de===F&&(M||!Se)}),S,o,c);q&&(W=q)}v&&(x==="number"||C!=="auto")&&(Z=p0(U,S,"category"))}else v?W=Db(0,H):u&&u[F]&&u[F].hasStack&&x==="number"?W=h==="expand"?[0,1]:FV(u[F].stackGroups,s,l):W=$V(U,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],se="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===F&&(M||!se)}),x,c,!0);if(x==="number")W=E6(d,W,F,o,T),V&&(W=zE(V,W,A));else if(x==="category"&&V){var Y=V,ue=W.every(function(Q){return Y.indexOf(Q)>=0});ue&&(W=Y)}}return Ee(Ee({},g),{},kt({},F,Ee(Ee({},w),{},{axisType:o,domain:W,categoricalDomain:Z,duplicateDomain:ie,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:v,layout:c})))},{})},QNe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,d=t.children,h=Hw(t.data,{graphicalItems:r,dataStartIndex:s,dataEndIndex:l}),v=h.length,g=IV(c,o),m=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],A=ZH("number");if(!b[S]){m++;var E;return g?E=Db(0,v):u&&u[S]&&u[S].hasStack?(E=FV(u[S].stackGroups,s,l),E=E6(d,E,S,o)):(E=zE(A,$V(h,r.filter(function(C){var T,M,F=a in C.props?C.props[a]:(T=C.type.defaultProps)===null||T===void 0?void 0:T[a],U="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return F===S&&!U}),"number",c),i.defaultProps.allowDataOverflow),E=E6(d,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:da(KNe,"".concat(o,".").concat(m%2),null),domain:E,originalDomain:A,isCategorical:g,layout:c})))}return b},{})},JNe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,u=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,c=t.children,d="".concat(i,"Id"),h=fo(c,o),v={};return h.length?v=XNe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(v=QNe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:s,dataEndIndex:l})),v},eFe=function(t){var n=Js(t),r=rs(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:A5(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Cb(n,r)}},O$=function(t){var n=t.children,r=t.defaultShowTooltip,i=Oo(n,rh),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},tFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=us(n&&n.type);return r&&r.indexOf("Bar")>=0})},k$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},nFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,u=t.yAxisMap,s=u===void 0?{}:u,l=r.width,c=r.height,d=r.children,h=r.margin||{},v=Oo(d,rh),g=Oo(d,Ad),m=Object.keys(s).reduce(function(E,C){var T=s[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,E[M]+T.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var T=a[C],M=T.orientation;return!T.mirror&&!T.hide?Ee(Ee({},E),{},kt({},M,da(E,"".concat(M))+T.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),m),x=w.bottom;v&&(w.bottom+=v.props.height||rh.defaultProps.height),g&&n&&(w=eTe(w,i,r,n));var S=l-w.left-w.right,A=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(A,0)})},rFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},iFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,u=a===void 0?["axis"]:a,s=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(w,x){var S=x.graphicalItems,A=x.stackGroups,E=x.offset,C=x.updateId,T=x.dataStartIndex,M=x.dataEndIndex,F=w.barSize,U=w.layout,H=w.barGap,W=w.barCategoryGap,ie=w.maxBarSize,Z=k$(U),G=Z.numericAxisName,K=Z.cateAxisName,V=tFe(S),B=[];return S.forEach(function(q,Y){var ue=Hw(w.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:M}),Q=q.type.defaultProps!==void 0?Ee(Ee({},q.type.defaultProps),q.props):q.props,J=Q.dataKey,se=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(K,"Id")],ge={},Ze=s.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||Qc();var gt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,gt),"".concat(je.axisType,"Ticks"),rs(gt)))},ge),Pe=Ze[K],Fe=Ze["".concat(K,"Ticks")],$e=A&&A[de]&&A[de].hasStack&&pTe(q,A[de].stackGroups),be=us(q.type).indexOf("Bar")>=0,yt=Cb(Pe,Fe),lt=[],It=V&&Qke({barSize:F,stackGroups:A,totalSize:rFe(Ze,K)});if(be){var mn,en,re=zt(se)?ie:se,pe=(mn=(en=Cb(Pe,Fe,!0))!==null&&en!==void 0?en:re)!==null&&mn!==void 0?mn:0;lt=Jke({barGap:H,barCategoryGap:W,bandSize:pe!==yt?pe:yt,sizeList:It[Se],maxBarSize:re}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=q&&q.type&&q.type.getComposedData;ye&&B.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:ue,props:w,dataKey:J,item:q,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:U,dataStartIndex:T,dataEndIndex:M}))),{},kt(kt(kt({key:q.key||"item-".concat(Y)},G,Ze[G]),K,Ze[K]),"animationId",C)),childIndex:Xxe(q,w.children),item:q})}),B},v=function(w,x){var S=w.props,A=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!YR({props:S}))return null;var T=S.children,M=S.layout,F=S.stackOffset,U=S.data,H=S.reverseStackOrder,W=k$(M),ie=W.numericAxisName,Z=W.cateAxisName,G=fo(T,r),K=fTe(U,G,"".concat(ie,"Id"),"".concat(Z,"Id"),F,H),V=s.reduce(function(Q,J){var se="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},se,JNe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ie&&K,dataStartIndex:A,dataEndIndex:E}))))},{}),B=nFe(Ee(Ee({},V),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(V).forEach(function(Q){V[Q]=c(S,V[Q],B,Q.replace("Map",""),n)});var q=V["".concat(Z,"Map")],Y=eFe(q),ue=h(S,Ee(Ee({},V),{},{dataStartIndex:A,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:K,offset:B}));return Ee(Ee({formattedGraphicalItems:ue,graphicalItems:G,offset:B,stackGroups:K},Y),V)},g=function(b){function w(x){var S,A,E;return NNe(this,w),E=jNe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new _Ne),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var T=E.state,M=T.dataStartIndex,F=T.dataEndIndex,U=T.updateId;E.setState(Ee({legendBBox:C},v({props:E.props,dataStartIndex:M,dataEndIndex:F,updateId:U},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,T,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(T)}}),kt(E,"handleBrushChange",function(C){var T=C.startIndex,M=C.endIndex;if(T!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var F=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:T,dataEndIndex:M},v({props:E.props,dataStartIndex:T,dataEndIndex:M,updateId:F},E.state))}),E.triggerSyncEvent({dataStartIndex:T,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseEnter;Wt(F)&&F(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var T=E.getMouseInfo(C),M=T?Ee(Ee({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var F=E.props.onMouseMove;Wt(F)&&F(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};E.setState(T),E.triggerSyncEvent(T);var M=E.props.onMouseLeave;Wt(M)&&M(T,C)}),kt(E,"handleOuterEvent",function(C){var T=Zxe(C),M=da(E.props,"".concat(T));if(T&&Wt(M)){var F,U;/.*touch.*/i.test(T)?U=E.getMouseInfo(C.changedTouches[0]):U=E.getMouseInfo(C),M((F=U)!==null&&F!==void 0?F:{},C)}}),kt(E,"handleClick",function(C){var T=E.getMouseInfo(C);if(T){var M=Ee(Ee({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var F=E.props.onClick;Wt(F)&&F(M,C)}}),kt(E,"handleMouseDown",function(C){var T=E.props.onMouseDown;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleMouseUp",function(C){var T=E.props.onMouseUp;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var T=E.props.onDoubleClick;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"handleContextMenu",function(C){var T=E.props.onContextMenu;if(Wt(T)){var M=E.getMouseInfo(C);T(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&WS.emit(VS,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var T=E.props,M=T.layout,F=T.syncMethod,U=E.state.updateId,H=C.dataStartIndex,W=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:W},v({props:E.props,dataStartIndex:H,dataEndIndex:W,updateId:U},E.state)));else if(C.activeTooltipIndex!==void 0){var ie=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,K=E.state,V=K.offset,B=K.tooltipTicks;if(!V)return;if(typeof F=="function")G=F(B,C);else if(F==="value"){G=-1;for(var q=0;q=0){var $e,be;if(ie.dataKey&&!ie.allowDuplicatedCategory){var yt=typeof ie.dataKey=="function"?Fe:"payload.".concat(ie.dataKey.toString());$e=Y1(q,yt,G),be=Y&&ue&&Y1(ue,yt,G)}else $e=q?.[Z],be=Y&&ue&&ue[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:lt})),null,null]}if(!zt($e))return[Pe].concat(gh(E.renderActivePoints({item:F,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var It,mn=(It=E.getItemByXY(E.state.activeCoordinate))!==null&&It!==void 0?It:{graphicalItem:Pe},en=mn.graphicalItem,re=en.item,pe=re===void 0?C:re,ye=en.childIndex,Ue=Ee(Ee(Ee({},F.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Pe,null,null]:[Pe,null]}),kt(E,"renderCustomized",function(C,T,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:hy,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:hy},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:hy},YAxis:{handler:hy},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:df("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=RW(E.triggeredAfterMouseMove,(A=x.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return UNe(w,b),LNe(w,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,E=S.data,C=S.height,T=S.layout,M=Oo(A,Yu);if(M){var F=M.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,H=O6(this.state,E,F,U),W=this.state.tooltipTicks[F].coordinate,ie=(this.state.offset.top+C)/2,Z=T==="horizontal",G=Z?{x:W,y:ie}:{y:W,x:ie},K=this.state.formattedGraphicalItems.find(function(B){var q=B.item;return q.type.name==="Scatter"});K&&(G=Ee(Ee({},G),K.props.points[F].tooltipPosition),H=K.props.points[F].tooltipPayload);var V={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:U,activePayload:H,activeCoordinate:G};this.setState(V),this.renderCursor(M),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){nE([Oo(S.children,Yu)],[Oo(this.props.children,Yu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Oo(this.props.children,Yu);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return u.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),C=S5e(E),T={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/A.offsetWidth||1,F=this.inRange(T.chartX,T.chartY,M);if(!F)return null;var U=this.state,H=U.xAxisMap,W=U.yAxisMap,ie=this.getTooltipEventType();if(ie!=="axis"&&H&&W){var Z=Js(H).scale,G=Js(W).scale,K=Z&&Z.invert?Z.invert(T.chartX):null,V=G&&G.invert?G.invert(T.chartY):null;return Ee(Ee({},T),{},{xValue:K,yValue:V})}var B=P$(this.state,this.props.data,this.props.layout,F);return B?Ee(Ee({},T),B):null}},{key:"inRange",value:function(S,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,T=S/E,M=A/E;if(C==="horizontal"||C==="vertical"){var F=this.state.offset,U=T>=F.left&&T<=F.left+F.width&&M>=F.top&&M<=F.top+F.height;return U?{x:T,y:M}:null}var H=this.state,W=H.angleAxisMap,ie=H.radiusAxisMap;if(W&&ie){var Z=Js(W);return i7({x:T,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),E=Oo(S,Yu),C={};E&&A==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Z1(this.props,this.handleOuterEvent);return Ee(Ee({},T),C)}},{key:"addListener",value:function(){WS.on(VS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){WS.removeListener(VS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,E){for(var C=this.state.formattedGraphicalItems,T=0,M=C.length;T{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:u,activationMode:s="automatic",...l}=e,c=hg(u),[d,h]=Ga({prop:r,onChange:i,defaultProp:o});return I.jsx(aFe,{scope:n,baseId:No(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:s,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});QH.displayName=dP;var JH="TabsList",eq=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=hP(JH,n),a=XH(n);return I.jsx(GB,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});eq.displayName=JH;var tq="TabsTrigger",nq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=hP(tq,n),u=XH(n),s=oq(a.baseId,r),l=aq(a.baseId,r),c=r===a.value;return I.jsx(YB,{asChild:!0,...u,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:s,...o,ref:t,onMouseDown:Ye(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:Ye(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!i&&d&&a.onValueChange(r)})})})});nq.displayName=tq;var rq="TabsContent",iq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,u=hP(rq,n),s=oq(u.baseId,r),l=aq(u.baseId,r),c=r===u.value,d=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":s,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&o})})});iq.displayName=rq;function oq(e,t){return`${e}-trigger-${t}`}function aq(e,t){return`${e}-content-${t}`}var kYe=QH,TYe=eq,MYe=nq,RYe=iq;function k6(e,[t,n]){return Math.min(n,Math.max(t,e))}function pP(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uFe=[" ","Enter","ArrowUp","ArrowDown"],sFe=[" ","Enter"],kg="Select",[qw,Kw,lFe]=RA(kg),[Zh,DYe]=mi(kg,[lFe,Fl]),Gw=Fl(),[cFe,Wl]=Zh(kg),[fFe,dFe]=Zh(kg),uq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:u,onValueChange:s,dir:l,name:c,autoComplete:d,disabled:h,required:v,form:g}=e,m=Gw(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[A,E]=y.useState(!1),C=hg(l),[T=!1,M]=Ga({prop:r,defaultProp:i,onChange:o}),[F,U]=Ga({prop:a,defaultProp:u,onChange:s}),H=y.useRef(null),W=b?g||!!b.closest("form"):!0,[ie,Z]=y.useState(new Set),G=Array.from(ie).map(K=>K.props.value).join(";");return I.jsx(Wx,{...m,children:I.jsxs(cFe,{required:v,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:No(),value:F,onValueChange:U,open:T,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(qw.Provider,{scope:t,children:I.jsx(fFe,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(K=>{Z(V=>new Set(V).add(K))},[]),onNativeOptionRemove:y.useCallback(K=>{Z(V=>{const B=new Set(V);return B.delete(K),B})},[]),children:n})}),W?I.jsxs(Dq,{"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:d,value:F,onChange:K=>U(K.target.value),disabled:h,form:g,children:[F===void 0?I.jsx("option",{value:""}):null,Array.from(ie)]},G):null]})})};uq.displayName=kg;var sq="SelectTrigger",lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Gw(n),a=Wl(sq,n),u=a.disabled||r,s=Kt(t,a.onTriggerChange),l=Kw(n),c=y.useRef("touch"),[d,h,v]=$q(m=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Iq(b,m,w);x!==void 0&&a.onValueChange(x.value)}),g=m=>{u||(a.onOpenChange(!0),v()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return I.jsx(vg,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Rq(a.value)?"":void 0,...i,ref:s,onClick:Ye(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:Ye(i.onPointerDown,m=>{c.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:Ye(i.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&uFe.includes(m.key)&&(g(),m.preventDefault())})})})});lq.displayName=sq;var cq="SelectValue",fq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...u}=e,s=Wl(cq,n),{onValueNodeHasChildrenChange:l}=s,c=o!==void 0,d=Kt(t,s.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...u,ref:d,style:{pointerEvents:"none"},children:Rq(s.value)?I.jsx(I.Fragment,{children:a}):o})});fq.displayName=cq;var hFe="SelectIcon",dq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});dq.displayName=hFe;var pFe="SelectPortal",hq=e=>I.jsx(Th,{asChild:!0,...e});hq.displayName=pFe;var ef="SelectContent",pq=y.forwardRef((e,t)=>{const n=Wl(ef,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ss.createPortal(I.jsx(vq,{scope:e.__scopeSelect,children:I.jsx(qw.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(gq,{...e,ref:t})});pq.displayName=ef;var Oa=10,[vq,Vl]=Zh(ef),vFe="SelectContentImpl",gq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b,...w}=e,x=Wl(ef,n),[S,A]=y.useState(null),[E,C]=y.useState(null),T=Kt(t,ge=>A(ge)),[M,F]=y.useState(null),[U,H]=y.useState(null),W=Kw(n),[ie,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return dg(S)},[S]),jx();const K=y.useCallback(ge=>{const[Ze,...Pe]=W().map(be=>be.ref.current),[Fe]=Pe.slice(-1),$e=document.activeElement;for(const be of ge)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Fe&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[W,E]),V=y.useCallback(()=>K([M,S]),[K,M,S]);y.useEffect(()=>{ie&&V()},[ie,V]);const{onOpenChange:B,triggerPointerDownPosRef:q}=x;y.useEffect(()=>{if(S){let ge={x:0,y:0};const Ze=Fe=>{ge={x:Math.abs(Math.round(Fe.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(Fe.pageY)-(q.current?.y??0))}},Pe=Fe=>{ge.x<=10&&ge.y<=10?Fe.preventDefault():S.contains(Fe.target)||B(!1),document.removeEventListener("pointermove",Ze),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[S,B,q]),y.useEffect(()=>{const ge=()=>B(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[B]);const[Y,ue]=$q(ge=>{const Ze=W().filter($e=>!$e.disabled),Pe=Ze.find($e=>$e.ref.current===document.activeElement),Fe=Iq(Ze,ge,Pe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),Q=y.useCallback((ge,Ze,Pe)=>{const Fe=!G.current&&!Pe;(x.value!==void 0&&x.value===Ze||Fe)&&(F(ge),Fe&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),se=y.useCallback((ge,Ze,Pe)=>{const Fe=!G.current&&!Pe;(x.value!==void 0&&x.value===Ze||Fe)&&H(ge)},[x.value]),de=r==="popper"?T6:mq,Se=de===T6?{side:u,sideOffset:s,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return I.jsx(vq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:se,focusSelectedItem:V,selectedItemText:U,position:r,isPositioned:ie,searchRef:Y,children:I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(cg,{asChild:!0,trapped:x.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:Ye(i,ge=>{x.trigger?.focus({preventScroll:!0}),ge.preventDefault()}),children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ge=>ge.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,ge=>{const Ze=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!Ze&&ge.key.length===1&&ue(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Fe=W().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const $e=ge.target,be=Fe.indexOf($e);Fe=Fe.slice(be+1)}setTimeout(()=>K(Fe)),ge.preventDefault()}})})})})})})});gq.displayName=vFe;var gFe="SelectItemAlignedPosition",mq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Wl(ef,n),a=Vl(ef,n),[u,s]=y.useState(null),[l,c]=y.useState(null),d=Kt(t,T=>c(T)),h=Kw(n),v=y.useRef(!1),g=y.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&l&&m&&b&&w){const T=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=U.left-M.left,be=F.left-$e,yt=T.left-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Oa,en=k6(be,[Oa,Math.max(Oa,mn-It)]);u.style.minWidth=lt+"px",u.style.left=en+"px"}else{const $e=M.right-U.right,be=window.innerWidth-F.right-$e,yt=window.innerWidth-T.right-be,lt=T.width+yt,It=Math.max(lt,M.width),mn=window.innerWidth-Oa,en=k6(be,[Oa,Math.max(Oa,mn-It)]);u.style.minWidth=lt+"px",u.style.right=en+"px"}const H=h(),W=window.innerHeight-Oa*2,ie=m.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),K=parseInt(Z.paddingTop,10),V=parseInt(Z.borderBottomWidth,10),B=parseInt(Z.paddingBottom,10),q=G+K+ie+B+V,Y=Math.min(b.offsetHeight*5,q),ue=window.getComputedStyle(m),Q=parseInt(ue.paddingTop,10),J=parseInt(ue.paddingBottom,10),se=T.top+T.height/2-Oa,de=W-se,Se=b.offsetHeight/2,ge=b.offsetTop+Se,Ze=G+K+ge,Pe=q-Ze;if(Ze<=se){const $e=H.length>0&&b===H[H.length-1].ref.current;u.style.bottom="0px";const be=l.clientHeight-m.offsetTop-m.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+V),lt=Ze+yt;u.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;u.style.top="0px";const yt=Math.max(se,G+m.offsetTop+($e?Q:0)+Se)+Pe;u.style.height=yt+"px",m.scrollTop=Ze-se+m.offsetTop}u.style.margin=`${Oa}px 0`,u.style.minHeight=Y+"px",u.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,o.trigger,o.valueNode,u,l,m,b,w,o.dir,r]);ii(()=>S(),[S]);const[A,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(T=>{T&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]);return I.jsx(yFe,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:C,children:I.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:I.jsx(pt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});mq.displayName=gFe;var mFe="SelectPopperPosition",T6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Oa,...o}=e,a=Gw(n);return I.jsx(Vx,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});T6.displayName=mFe;var[yFe,vP]=Zh(ef,{}),M6="SelectViewport",yq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Vl(M6,n),a=vP(M6,n),u=Kt(t,o.onViewportChange),s=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(qw.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){const v=Math.abs(s.current-c.scrollTop);if(v>0){const g=window.innerHeight-Oa*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),w=Math.max(m,b);if(w0?A:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});yq.displayName=M6;var bq="SelectGroup",[bFe,xFe]=Zh(bq),xq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=No();return I.jsx(bFe,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});xq.displayName=bq;var wq="SelectLabel",_q=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=xFe(wq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});_q.displayName=wq;var Zb="SelectItem",[wFe,Sq]=Zh(Zb),Cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,u=Wl(Zb,n),s=Vl(Zb,n),l=u.value===r,[c,d]=y.useState(o??""),[h,v]=y.useState(!1),g=Kt(t,x=>s.itemRefCallback?.(x,r,i)),m=No(),b=y.useRef("touch"),w=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(wFe,{scope:n,value:r,disabled:i,textId:m,isSelected:l,onItemTextChange:y.useCallback(x=>{d(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(qw.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:Ye(a.onFocus,()=>v(!0)),onBlur:Ye(a.onBlur,()=>v(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?s.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{s.searchRef?.current!==""&&x.key===" "||(sFe.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Cq.displayName=Zb;var Jp="SelectItemText",Eq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Wl(Jp,n),u=Vl(Jp,n),s=Sq(Jp,n),l=dFe(Jp,n),[c,d]=y.useState(null),h=Kt(t,w=>d(w),s.onItemTextChange,w=>u.itemTextRefCallback?.(w,s.value,s.disabled)),v=c?.textContent,g=y.useMemo(()=>I.jsx("option",{value:s.value,disabled:s.disabled,children:v},s.value),[s.disabled,s.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=l;return ii(()=>(m(g),()=>b(g)),[m,b,g]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:s.textId,...o,ref:h}),s.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ss.createPortal(o.children,a.valueNode):null]})});Eq.displayName=Jp;var Aq="SelectItemIndicator",Pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Sq(Aq,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Pq.displayName=Aq;var R6="SelectScrollUpButton",Oq=y.forwardRef((e,t)=>{const n=Vl(R6,e.__scopeSelect),r=vP(R6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollTop>0;o(l)};const s=n.viewport;return u(),s.addEventListener("scroll",u),()=>s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Tq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop-s.offsetHeight)}}):null});Oq.displayName=R6;var D6="SelectScrollDownButton",kq=y.forwardRef((e,t)=>{const n=Vl(D6,e.__scopeSelect),r=vP(D6,e.__scopeSelect),[i,o]=y.useState(!1),a=Kt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let u=function(){const l=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)s.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?I.jsx(Tq,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:s}=n;u&&s&&(u.scrollTop=u.scrollTop+s.offsetHeight)}}):null});kq.displayName=D6;var Tq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Vl("SelectScrollButton",n),a=y.useRef(null),u=Kw(n),s=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>s(),[s]),ii(()=>{u().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{s()})})}),_Fe="SelectSeparator",Mq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Mq.displayName=_Fe;var $6="SelectArrow",SFe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Gw(n),o=Wl($6,n),a=Vl($6,n);return o.open&&a.position==="popper"?I.jsx(Hx,{...i,...r,ref:t}):null});SFe.displayName=$6;function Rq(e){return e===""||e===void 0}var Dq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Kt(t,i),a=pP(n);return y.useEffect(()=>{const u=i.current,s=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==n&&c){const d=new Event("change",{bubbles:!0});c.call(u,n),u.dispatchEvent(d)}},[a,n]),I.jsx(ZA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});Dq.displayName="BubbleSelect";function $q(e){const t=Wr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const u=n.current+a;t(u),function s(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>s(""),1e3))}(u)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Iq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=CFe(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const s=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}function CFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $Ye=uq,IYe=lq,NYe=fq,FYe=dq,LYe=hq,jYe=pq,BYe=yq,zYe=xq,UYe=_q,WYe=Cq,VYe=Eq,HYe=Pq,qYe=Oq,KYe=kq,GYe=Mq;const gP=6048e5,EFe=864e5,T$=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&T$ in e?e[T$](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Rn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Za(e,t,n){const r=Rn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let AFe={};function Tg(){return AFe}function ma(e,t){const n=Tg(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Xb(e){const t=Rn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function nf(e,t){const n=Rn(e,t?.in);return n.setHours(0,0,0,0),n}function gu(e,t,n){const[r,i]=gf(n?.in,e,t),o=nf(r),a=nf(i),u=+o-Xb(o),s=+a-Xb(a);return Math.round((u-s)/EFe)}function PFe(e,t){const n=Nq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),tf(r)}function I6(e,t,n){return Ui(e,t*7,n)}function OFe(e,t,n){return Za(e,t*12,n)}function kFe(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Rn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function ao(e,t,n){const[r,i]=gf(n?.in,e,t);return+nf(r)==+nf(i)}function mP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function MFe(e){return!(!mP(e)&&typeof e!="number"||isNaN(+Rn(e)))}function Vv(e,t,n){const[r,i]=gf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function RFe(e,t,n){const[r,i]=gf(n?.in,e,t),o=ma(r,n),a=ma(i,n),u=+o-Xb(o),s=+a-Xb(a);return Math.round((u-s)/gP)}function yP(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ho(e,t){const n=Rn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Fq(e,t){const n=Rn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function bP(e,t){const n=Tg(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Rn(e,t?.in),o=i.getDay(),a=(o{let r;const i=DFe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function kd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const IFe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},NFe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FFe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LFe={date:kd({formats:IFe,defaultWidth:"full"}),time:kd({formats:NFe,defaultWidth:"full"}),dateTime:kd({formats:FFe,defaultWidth:"full"})},jFe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},BFe=(e,t,n,r)=>jFe[e];function fu(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):a;i=e.formattingValues[u]||e.formattingValues[a]}else{const a=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const zFe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UFe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WFe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},VFe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},HFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KFe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},GFe={ordinalNumber:KFe,era:fu({values:zFe,defaultWidth:"wide"}),quarter:fu({values:UFe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:WFe,defaultWidth:"wide"}),day:fu({values:VFe,defaultWidth:"wide"}),dayPeriod:fu({values:HFe,defaultWidth:"wide",formattingValues:qFe,defaultFormattingWidth:"wide"})};function du(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?ZFe(u,d=>d.test(a)):YFe(u,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function YFe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ZFe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const u=t.slice(i.length);return{value:a,rest:u}}}const XFe=/^(\d+)(th|st|nd|rd)?/i,QFe=/\d+/i,JFe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},eLe={any:[/^b/i,/^(a|c)/i]},tLe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nLe={any:[/1/i,/2/i,/3/i,/4/i]},rLe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},iLe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oLe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},aLe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},uLe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sLe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lLe={ordinalNumber:jq({matchPattern:XFe,parsePattern:QFe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:JFe,defaultMatchWidth:"wide",parsePatterns:eLe,defaultParseWidth:"any"}),quarter:du({matchPatterns:tLe,defaultMatchWidth:"wide",parsePatterns:nLe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:rLe,defaultMatchWidth:"wide",parsePatterns:iLe,defaultParseWidth:"any"}),day:du({matchPatterns:oLe,defaultMatchWidth:"wide",parsePatterns:aLe,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:uLe,defaultMatchWidth:"any",parsePatterns:sLe,defaultParseWidth:"any"})},Bq={code:"en-US",formatDistance:$Fe,formatLong:LFe,formatRelative:BFe,localize:GFe,match:lLe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cLe(e,t){const n=Rn(e,t?.in);return gu(n,Fq(n))+1}function zq(e,t){const n=Rn(e,t?.in),r=+tf(n)-+PFe(n);return Math.round(r/gP)+1}function Uq(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=Tg(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const u=ma(a,t),s=oi(t?.in||e,0);s.setFullYear(r,0,o),s.setHours(0,0,0,0);const l=ma(s,t);return+n>=+u?r+1:+n>=+l?r:r-1}function fLe(e,t){const n=Tg(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Uq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ma(o,t)}function Wq(e,t){const n=Rn(e,t?.in),r=+ma(n,t)-+fLe(n,t);return Math.round(r/gP)+1}function Tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Us={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tn(n+1,2)},d(e,t){return Tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tn(e.getHours()%12||12,t.length)},H(e,t){return Tn(e.getHours(),t.length)},m(e,t){return Tn(e.getMinutes(),t.length)},s(e,t){return Tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tn(i,t.length)}},Hf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},M$={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Us.y(e,t)},Y:function(e,t,n,r){const i=Uq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Tn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Tn(o,t.length)},R:function(e,t){const n=Nq(e);return Tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Us.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Wq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tn(i,t.length)},I:function(e,t,n){const r=zq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Us.d(e,t)},D:function(e,t,n){const r=cLe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Tn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Tn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Hf.noon:r===0?i=Hf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Hf.evening:r>=12?i=Hf.afternoon:r>=4?i=Hf.morning:i=Hf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Us.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Us.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Us.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Us.s(e,t)},S:function(e,t){return Us.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return D$(r);case"XXXX":case"XX":return cc(r);case"XXXXX":case"XXX":default:return cc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return D$(r);case"xxxx":case"xx":return cc(r);case"xxxxx":case"xxx":default:return cc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+R$(r,":");case"OOOO":default:return"GMT"+cc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+R$(r,":");case"zzzz":default:return"GMT"+cc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tn(r,t.length)},T:function(e,t,n){return Tn(+e,t.length)}};function R$(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Tn(o,2)}function D$(e,t){return e%60===0?(e>0?"-":"+")+Tn(Math.abs(e)/60,2):cc(e,t)}function cc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tn(Math.trunc(r/60),2),o=Tn(r%60,2);return n+i+t+o}const $$=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Vq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},dLe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return $$(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",$$(r,t)).replace("{{time}}",Vq(i,t))},hLe={p:Vq,P:dLe},pLe=/^D+$/,vLe=/^Y+$/,gLe=["D","DD","YY","YYYY"];function mLe(e){return pLe.test(e)}function yLe(e){return vLe.test(e)}function bLe(e,t,n){const r=xLe(e,t,n);if(console.warn(r),gLe.includes(e))throw new RangeError(r)}function xLe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wLe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_Le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SLe=/^'([^]*?)'?$/,CLe=/''/g,ELe=/[a-zA-Z]/;function mf(e,t,n){const r=Tg(),i=n?.locale??r.locale??Bq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Rn(e,n?.in);if(!MFe(u))throw new RangeError("Invalid time value");let s=t.match(_Le).map(c=>{const d=c[0];if(d==="p"||d==="P"){const h=hLe[d];return h(c,i.formatLong)}return c}).join("").match(wLe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const d=c[0];if(d==="'")return{isToken:!1,value:ALe(c)};if(M$[d])return{isToken:!0,value:c};if(d.match(ELe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return s.map(c=>{if(!c.isToken)return c.value;const d=c.value;(!n?.useAdditionalWeekYearTokens&&yLe(d)||!n?.useAdditionalDayOfYearTokens&&mLe(d))&&bLe(d,t,String(e));const h=M$[d[0]];return h(u,d,i.localize,l)}).join("")}function ALe(e){const t=e.match(SLe);return t?t[1].replace(CLe,"'"):e}function PLe(e,t){const n=Rn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function OLe(e){return Math.trunc(+Rn(e)/1e3)}function kLe(e,t){const n=Rn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Rn(n,t?.in)}function TLe(e,t){const n=Rn(e,t?.in);return RFe(kLe(n,t),ho(n,t),t)+1}function N6(e,t){return+Rn(e)>+Rn(t)}function Hq(e,t){return+Rn(e)<+Rn(t)}function MLe(e,t,n){const[r,i]=gf(n?.in,e,t);return+ma(r,n)==+ma(i,n)}function xP(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function RLe(e,t,n){const[r,i]=gf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function qS(e,t,n){return Ui(e,-t,n)}function KS(e,t,n){const r=Rn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const u=PLe(a);return r.setMonth(t,Math.min(o,u)),r}function I$(e,t,n){const r=Rn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function YYe(e){return nf(Date.now(),e)}const DLe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},$Le=(e,t,n)=>{let r;const i=DLe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},ILe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},NLe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},FLe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},LLe={date:kd({formats:ILe,defaultWidth:"full"}),time:kd({formats:NLe,defaultWidth:"full"}),dateTime:kd({formats:FLe,defaultWidth:"full"})};function N$(e,t,n){const r="eeee p";return MLe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const jLe={lastWeek:N$,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:N$,other:"PP p"},BLe=(e,t,n,r)=>{const i=jLe[e];return typeof i=="function"?i(t,n,r):i},zLe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},ULe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},WLe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},VLe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},HLe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},qLe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},KLe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},GLe={ordinalNumber:KLe,era:fu({values:zLe,defaultWidth:"wide"}),quarter:fu({values:ULe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fu({values:WLe,defaultWidth:"wide"}),day:fu({values:VLe,defaultWidth:"wide"}),dayPeriod:fu({values:HLe,defaultWidth:"wide",formattingValues:qLe,defaultFormattingWidth:"wide"})},YLe=/^(第\s*)?\d+(日|时|分|秒)?/i,ZLe=/\d+/i,XLe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},QLe={any:[/^(前)/i,/^(公元)/i]},JLe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},eje={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},tje={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},nje={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},rje={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},ije={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},oje={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},aje={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},uje={ordinalNumber:jq({matchPattern:YLe,parsePattern:ZLe,valueCallback:e=>parseInt(e,10)}),era:du({matchPatterns:XLe,defaultMatchWidth:"wide",parsePatterns:QLe,defaultParseWidth:"any"}),quarter:du({matchPatterns:JLe,defaultMatchWidth:"wide",parsePatterns:eje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:du({matchPatterns:tje,defaultMatchWidth:"wide",parsePatterns:nje,defaultParseWidth:"any"}),day:du({matchPatterns:rje,defaultMatchWidth:"wide",parsePatterns:ije,defaultParseWidth:"any"}),dayPeriod:du({matchPatterns:oje,defaultMatchWidth:"any",parsePatterns:aje,defaultParseWidth:"any"})},ZYe={code:"zh-CN",formatDistance:$Le,formatLong:LLe,formatRelative:BLe,localize:GLe,match:uje,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(s||!l),d=t>1&&(l||!s),h=function(){r&&o(r)},v=function(){i&&o(i)};return I.jsx(Bje,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:v})}function zje(e){var t,n=Hn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,u=n.components,s=(t=u?.CaptionLabel)!==null&&t!==void 0?t:Gq,l;return i?l=I.jsx(s,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(F$,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(F$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(L$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(L$,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Uje(e){var t=Hn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Wje(e,t,n){for(var r=n?tf(new Date):ma(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Vje(){var e=Hn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,u=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=Wje(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,d){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":s(c,{locale:i}),children:u(c,{locale:i})},d)})]})}function Hje(){var e,t=Hn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Vje;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function qje(e){var t=Hn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var wP=y.createContext(void 0);function Kje(e){if(!Mg(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(wP.Provider,{value:t,children:e.children})}return I.jsx(Gje,{initialProps:e.initialProps,children:e.children})}function Gje(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,d){var h,v;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,d);var g=!!(c.selected&&i&&r?.length===i);if(!g){var m=!!(!c.selected&&o&&r?.length===o);if(!m){var b=r?qq([],r):[];if(c.selected){var w=b.findIndex(function(x){return ao(l,x)});b.splice(w,1)}else b.push(l);(v=t.onSelect)===null||v===void 0||v.call(t,b,l,c,d)}}},u={disabled:[]};r&&u.disabled.push(function(l){var c=o&&r.length>o-1,d=r.some(function(h){return ao(h,l)});return!!(c&&!d)});var s={selected:r,onDayClick:a,modifiers:u};return I.jsx(wP.Provider,{value:s,children:n})}function _P(){var e=y.useContext(wP);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Yje(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?ao(i,e)&&ao(r,e)?void 0:ao(i,e)?{from:i,to:void 0}:ao(r,e)?void 0:N6(r,e)?{from:e,to:i}:{from:r,to:e}:i?N6(e,i)?{from:i,to:e}:{from:e,to:i}:r?Hq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var SP=y.createContext(void 0);function Zje(e){if(!Rg(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(SP.Provider,{value:t,children:e.children})}return I.jsx(Xje,{initialProps:e.initialProps,children:e.children})}function Xje(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,u=t.min,s=t.max,l=function(v,g,m){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,v,g,m);var x=Yje(v,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,v,g,m)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],ao(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),u&&(o&&!a&&c.disabled.push({after:qS(o,u-1),before:Ui(o,u-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,u-1)}),!o&&a&&c.disabled.push({after:qS(a,u-1),before:Ui(a,u-1)})),s){if(o&&!a&&(c.disabled.push({before:Ui(o,-s+1)}),c.disabled.push({after:Ui(o,s-1)})),o&&a){var d=gu(a,o)+1,h=s-d;c.disabled.push({before:qS(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-s+1)}),c.disabled.push({after:Ui(a,s-1)}))}return I.jsx(SP.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function CP(){var e=y.useContext(SP);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Vy(e){return Array.isArray(e)?qq([],e):e!==void 0?[e]:[]}function Qje(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=Vy(i)}),t}var Xa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Xa||(Xa={}));var Jje=Xa.Selected,Hu=Xa.Disabled,eBe=Xa.Hidden,tBe=Xa.Today,GS=Xa.RangeEnd,YS=Xa.RangeMiddle,ZS=Xa.RangeStart,nBe=Xa.Outside;function rBe(e,t,n){var r,i=(r={},r[Jje]=Vy(e.selected),r[Hu]=Vy(e.disabled),r[eBe]=Vy(e.hidden),r[tBe]=[e.today],r[GS]=[],r[YS]=[],r[ZS]=[],r[nBe]=[],r);return e.fromDate&&i[Hu].push({before:e.fromDate}),e.toDate&&i[Hu].push({after:e.toDate}),Mg(e)?i[Hu]=i[Hu].concat(t.modifiers[Hu]):Rg(e)&&(i[Hu]=i[Hu].concat(n.modifiers[Hu]),i[ZS]=n.modifiers[ZS],i[YS]=n.modifiers[YS],i[GS]=n.modifiers[GS]),i}var Xq=y.createContext(void 0);function iBe(e){var t=Hn(),n=_P(),r=CP(),i=rBe(t,n,r),o=Qje(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Xq.Provider,{value:a,children:e.children})}function Qq(){var e=y.useContext(Xq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function oBe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function aBe(e){return!!(e&&typeof e=="object"&&"from"in e)}function uBe(e){return!!(e&&typeof e=="object"&&"after"in e)}function sBe(e){return!!(e&&typeof e=="object"&&"before"in e)}function lBe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function cBe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=gu(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=gu(e,r)>=0&&gu(i,e)>=0;return a}return i?ao(i,e):r?ao(r,e):!1}function fBe(e){return mP(e)}function dBe(e){return Array.isArray(e)&&e.every(mP)}function hBe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(fBe(n))return ao(e,n);if(dBe(n))return n.includes(e);if(aBe(n))return cBe(e,n);if(lBe(n))return n.dayOfWeek.includes(e.getDay());if(oBe(n)){var r=gu(n.before,e),i=gu(n.after,e),o=r>0,a=i<0,u=N6(n.before,n.after);return u?a&&o:o||a}return uBe(n)?gu(e,n.after)>0:sBe(n)?gu(n.before,e)>0:typeof n=="function"?n(e):!1})}function EP(e,t,n){var r=Object.keys(t).reduce(function(o,a){var u=t[a];return hBe(e,u)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!xP(e,n)&&(i.outside=!0),i}function pBe(e,t){for(var n=ho(e[0]),r=yP(e[e.length-1]),i,o,a=n;a<=r;){var u=EP(a,t),s=!u.disabled&&!u.hidden;if(!s){a=Ui(a,1);continue}if(u.selected)return a;u.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var vBe=365;function Jq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,u=a===void 0?{count:0,lastFocused:e}:a,s=i.weekStartsOn,l=i.fromDate,c=i.toDate,d=i.locale,h={day:Ui,week:I6,month:Za,year:OFe,startOfWeek:function(b){return i.ISOWeek?tf(b):ma(b,{locale:d,weekStartsOn:s})},endOfWeek:function(b){return i.ISOWeek?Lq(b):bP(b,{locale:d,weekStartsOn:s})}},v=h[n](e,r==="after"?1:-1);r==="before"&&l?v=kFe([l,v]):r==="after"&&c&&(v=TFe([c,v]));var g=!0;if(o){var m=EP(v,o);g=!m.disabled&&!m.hidden}return g?v:u.count>vBe?u.lastFocused:Jq(v,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},u),{count:u.count+1})})}var eK=y.createContext(void 0);function gBe(e){var t=Dg(),n=Qq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),u=a[0],s=a[1],l=pBe(t.displayMonths,n),c=i??(u&&t.isDateDisplayed(u))?u:l,d=function(){s(i),o(void 0)},h=function(b){o(b)},v=Hn(),g=function(b,w){if(i){var x=Jq(i,{moveBy:b,direction:w,context:v,modifiers:n});ao(i,x)||(t.goToDate(x,i),h(x))}},m={focusedDay:i,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return I.jsx(eK.Provider,{value:m,children:e.children})}function AP(){var e=y.useContext(eK);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function mBe(e,t){var n=Qq(),r=EP(e,n,t);return r}var PP=y.createContext(void 0);function yBe(e){if(!Yw(e.initialProps)){var t={selected:void 0};return I.jsx(PP.Provider,{value:t,children:e.children})}return I.jsx(bBe,{initialProps:e.initialProps,children:e.children})}function bBe(e){var t=e.initialProps,n=e.children,r=function(o,a,u){var s,l,c;if((s=t.onDayClick)===null||s===void 0||s.call(t,o,a,u),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,u);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,u)},i={selected:t.selected,onDayClick:r};return I.jsx(PP.Provider,{value:i,children:n})}function tK(){var e=y.useContext(PP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function xBe(e,t){var n=Hn(),r=tK(),i=_P(),o=CP(),a=AP(),u=a.focusDayAfter,s=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,v=a.focusMonthBefore,g=a.focusMonthAfter,m=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(V){var B,q,Y,ue;Yw(n)?(B=r.onDayClick)===null||B===void 0||B.call(r,e,t,V):Mg(n)?(q=i.onDayClick)===null||q===void 0||q.call(i,e,t,V):Rg(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,V):(ue=n.onDayClick)===null||ue===void 0||ue.call(n,e,t,V)},A=function(V){var B;h(e),(B=n.onDayFocus)===null||B===void 0||B.call(n,e,t,V)},E=function(V){var B;d(),(B=n.onDayBlur)===null||B===void 0||B.call(n,e,t,V)},C=function(V){var B;(B=n.onDayMouseEnter)===null||B===void 0||B.call(n,e,t,V)},T=function(V){var B;(B=n.onDayMouseLeave)===null||B===void 0||B.call(n,e,t,V)},M=function(V){var B;(B=n.onDayPointerEnter)===null||B===void 0||B.call(n,e,t,V)},F=function(V){var B;(B=n.onDayPointerLeave)===null||B===void 0||B.call(n,e,t,V)},U=function(V){var B;(B=n.onDayTouchCancel)===null||B===void 0||B.call(n,e,t,V)},H=function(V){var B;(B=n.onDayTouchEnd)===null||B===void 0||B.call(n,e,t,V)},W=function(V){var B;(B=n.onDayTouchMove)===null||B===void 0||B.call(n,e,t,V)},ie=function(V){var B;(B=n.onDayTouchStart)===null||B===void 0||B.call(n,e,t,V)},Z=function(V){var B;(B=n.onDayKeyUp)===null||B===void 0||B.call(n,e,t,V)},G=function(V){var B;switch(V.key){case"ArrowLeft":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowRight":V.preventDefault(),V.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowDown":V.preventDefault(),V.stopPropagation(),l();break;case"ArrowUp":V.preventDefault(),V.stopPropagation(),c();break;case"PageUp":V.preventDefault(),V.stopPropagation(),V.shiftKey?m():v();break;case"PageDown":V.preventDefault(),V.stopPropagation(),V.shiftKey?b():g();break;case"Home":V.preventDefault(),V.stopPropagation(),w();break;case"End":V.preventDefault(),V.stopPropagation(),x();break}(B=n.onDayKeyDown)===null||B===void 0||B.call(n,e,t,V)},K={onClick:S,onFocus:A,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:T,onPointerEnter:M,onPointerLeave:F,onTouchCancel:U,onTouchEnd:H,onTouchMove:W,onTouchStart:ie};return K}function wBe(){var e=Hn(),t=tK(),n=_P(),r=CP(),i=Yw(e)?t.selected:Mg(e)?n.selected:Rg(e)?r.selected:void 0;return i}function _Be(e){return Object.values(Xa).includes(e)}function SBe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(_Be(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function CBe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function EBe(e,t,n){var r,i,o,a=Hn(),u=AP(),s=mBe(e,t),l=xBe(e,s),c=wBe(),d=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;s.outside||u.focusedDay&&d&&ao(u.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[u.focusedDay,e,n,d,s.outside]);var h=SBe(a,s).join(" "),v=CBe(a,s),g=!!(s.outside&&!a.showOutsideDays||s.hidden),m=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:qje,b=I.jsx(m,{date:e,displayMonth:t,activeModifiers:s}),w={style:v,className:h,children:b,role:"gridcell"},x=u.focusTarget&&ao(u.focusTarget,e)&&!s.outside,S=u.focusedDay&&ao(u.focusedDay,e),A=Rt(Rt(Rt({},w),(r={disabled:s.disabled,role:"gridcell"},r["aria-selected"]=s.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:d,isHidden:g,activeModifiers:s,selectedDays:c,buttonProps:A,divProps:w};return E}function ABe(e){var t=y.useRef(null),n=EBe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(Qb,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function PBe(e){var t=e.number,n=e.dates,r=Hn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,u=r.locale,s=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:u});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var d=s(Number(t),{locale:u}),h=function(v){i(t,n,v)};return I.jsx(Qb,{name:"week-number","aria-label":d,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function OBe(e){var t,n,r=Hn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,u=r.components,s=(t=u?.Day)!==null&&t!==void 0?t:ABe,l=(n=u?.WeekNumber)!==null&&n!==void 0?n:PBe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(d){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(s,{displayMonth:e.displayMonth,date:d})},OLe(d))})]})}function j$(e,t,n){for(var r=n?.ISOWeek?Lq(t):bP(t,n),i=n?.ISOWeek?tf(e):ma(e,n),o=gu(r,i),a=[],u=0;u<=o;u++)a.push(Ui(i,u));var s=a.reduce(function(l,c){var d=n?.ISOWeek?zq(c):Wq(c,n),h=l.find(function(v){return v.weekNumber===d});return h?(h.dates.push(c),l):(l.push({weekNumber:d,dates:[c]}),l)},[]);return s}function kBe(e,t){var n=j$(ho(e),yP(e),t);if(t?.useFixedWeeks){var r=TLe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=I6(o,6-r),u=j$(I6(o,1),a,t);n.push.apply(n,u)}}return n}function TBe(e){var t,n,r,i=Hn(),o=i.locale,a=i.classNames,u=i.styles,s=i.hideHead,l=i.fixedWeeks,c=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,v=i.ISOWeek,g=kBe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:v,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),m=(t=c?.Head)!==null&&t!==void 0?t:Hje,b=(n=c?.Row)!==null&&n!==void 0?n:OBe,w=(r=c?.Footer)!==null&&r!==void 0?r:Uje;return I.jsxs("table",{id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&I.jsx(m,{}),I.jsx("tbody",{className:a.tbody,style:u.tbody,children:g.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function MBe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var RBe=MBe()?y.useLayoutEffect:y.useEffect,XS=!1,DBe=0;function B$(){return"react-day-picker-".concat(++DBe)}function $Be(e){var t,n=e??(XS?B$():null),r=y.useState(n),i=r[0],o=r[1];return RBe(function(){i===null&&o(B$())},[]),y.useEffect(function(){XS===!1&&(XS=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function IBe(e){var t,n,r=Hn(),i=r.dir,o=r.classNames,a=r.styles,u=r.components,s=Dg().displayMonths,l=$Be(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[o.month],h=a.month,v=e.displayIndex===0,g=e.displayIndex===s.length-1,m=!v&&!g;i==="rtl"&&(t=[v,g],g=t[0],v=t[1]),v&&(d.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),g&&(d.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),m&&(d.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=u?.Caption)!==null&&n!==void 0?n:zje;return I.jsxs("div",{className:d.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(TBe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function NBe(e){var t=Hn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function FBe(e){var t,n,r=e.initialProps,i=Hn(),o=AP(),a=Dg(),u=y.useState(!1),s=u[0],l=u[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(s||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,s,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var d=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(g){return g.startsWith("data-")}).reduce(function(g,m){var b;return Rt(Rt({},g),(b={},b[m]=r[m],b))},{}),v=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:NBe;return I.jsx("div",Rt({className:c.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(v,{children:a.displayMonths.map(function(g,m){return I.jsx(IBe,{displayIndex:m,displayMonth:g},m)})})}))}function LBe(e){var t=e.children,n=sje(e,["children"]);return I.jsx(Pje,{initialProps:n,children:I.jsx(Fje,{children:I.jsx(yBe,{initialProps:n,children:I.jsx(Kje,{initialProps:n,children:I.jsx(Zje,{initialProps:n,children:I.jsx(iBe,{children:I.jsx(gBe,{children:t})})})})})})})}function XYe(e){return I.jsx(LBe,Rt({},e,{children:I.jsx(FBe,{initialProps:e})}))}var OP="Popover",[nK,QYe]=mi(OP,[Fl]),$g=Fl(),[jBe,Hl]=nK(OP),rK=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,u=$g(t),s=y.useRef(null),[l,c]=y.useState(!1),[d=!1,h]=Ga({prop:r,defaultProp:i,onChange:o});return I.jsx(Wx,{...u,children:I.jsx(jBe,{scope:t,contentId:No(),triggerRef:s,open:d,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};rK.displayName=OP;var iK="PopoverAnchor",BBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(iK,n),o=$g(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=i;return y.useEffect(()=>(a(),()=>u()),[a,u]),I.jsx(vg,{...o,...r,ref:t})});BBe.displayName=iK;var oK="PopoverTrigger",aK=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(oK,n),o=$g(n),a=Kt(t,i.triggerRef),u=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fK(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:I.jsx(vg,{asChild:!0,...o,children:u})});aK.displayName=oK;var kP="PopoverPortal",[zBe,UBe]=nK(kP,{forceMount:void 0}),uK=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Hl(kP,t);return I.jsx(zBe,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Th,{asChild:!0,container:i,children:r})})})};uK.displayName=kP;var mh="PopoverContent",sK=y.forwardRef((e,t)=>{const n=UBe(mh,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Hl(mh,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(WBe,{...i,ref:t}):I.jsx(VBe,{...i,ref:t})})});sK.displayName=mh;var WBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(null),i=Kt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return dg(a)},[]),I.jsx(fg,{as:Sl,allowPinchZoom:!0,children:I.jsx(lK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0,l=u.button===2||s;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),VBe=y.forwardRef((e,t)=>{const n=Hl(mh,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(lK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),lK=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,...d}=e,h=Hl(mh,n),v=$g(n);return jx(),I.jsx(cg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(kh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(Vx,{"data-state":fK(h.open),role:"dialog",id:h.contentId,...v,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),cK="PopoverClose",HBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hl(cK,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});HBe.displayName=cK;var qBe="PopoverArrow",KBe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=$g(n);return I.jsx(Hx,{...i,...r,ref:t})});KBe.displayName=qBe;function fK(e){return e?"open":"closed"}var JYe=rK,eZe=aK,tZe=uK,nZe=sK,Jb={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Qb.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",d=1,h=2,v=4,g=1,m=2,b=1,w=2,x=4,S=8,A=16,E=32,C=64,T=128,M=256,F=512,U=30,H="...",W=800,ie=16,Z=1,G=2,K=3,V=1/0,B=9007199254740991,q=17976931348623157e292,Y=NaN,ue=4294967295,Q=ue-1,J=ue>>>1,se=[["ary",T],["bind",b],["bindKey",w],["curry",S],["curryRight",A],["flip",F],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",ge="[object AsyncFunction]",Ze="[object Boolean]",Oe="[object Date]",Fe="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",It="[object Number]",mn="[object Null]",en="[object Object]",re="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",gt="[object WeakMap]",bn="[object WeakSet]",Vt="[object ArrayBuffer]",xn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",ar="[object Int16Array]",ui="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Yi="[object Uint16Array]",go="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,wa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,dn=/[&<>"']/g,wn=RegExp(_t.source),qn=RegExp(dn.source),ur=/<%-([\s\S]+?)%>/g,Zr=/<%([\s\S]+?)%>/g,mo=/<%=([\s\S]+?)%>/g,ql=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yf=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),k=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,O=/\{\n\/\* \[wrapped with (.+)\] \*/,N=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,At=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",st="\\u20d0-\\u20ff",Qe=wt+Je+st,Le="\\u2700-\\u27bf",qe="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",me="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ve="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+me+ve+De,mt="['’]",Nt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Gt="["+Le+"]",an="["+qe+"]",un="[^"+xt+ze+te+Le+qe+Pe+"]",Lt="\\ud83c[\\udffb-\\udfff]",sn="(?:"+$t+"|"+Lt+")",tn="[^"+xt+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",vn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+Pe+"]",Gn="\\u200d",Yn="(?:"+an+"|"+un+")",xr="(?:"+Pn+"|"+un+")",$r="(?:"+mt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+mt+"(?:D|LL|M|RE|S|T|VE))?",Nr=sn+"?",oP="["+Te+"]?",vY="(?:"+Gn+"(?:"+[tn,Kn,vn].join("|")+")"+oP+Nr+")*",gY="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mY="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aP=oP+Nr+vY,yY="(?:"+[Gt,Kn,vn].join("|")+")"+aP,bY="(?:"+[tn+$t+"?",$t,Kn,vn,Nt].join("|")+")",xY=RegExp(mt,"g"),wY=RegExp($t,"g"),o2=RegExp(Lt+"(?="+Lt+")|"+bY+aP,"g"),_Y=RegExp([Pn+"?"+an+"+"+$r+"(?="+[Ft,Pn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,Pn+Yn,"$"].join("|")+")",Pn+"?"+Yn+"+"+$r,Pn+"+"+Ir,mY,gY,te,yY].join("|"),"g"),SY=RegExp("["+Gn+xt+Qe+Te+"]"),CY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,EY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],AY=-1,Zn={};Zn[Ii]=Zn[br]=Zn[yi]=Zn[ar]=Zn[ui]=Zn[bi]=Zn[Rr]=Zn[Yi]=Zn[go]=!0,Zn[de]=Zn[Se]=Zn[Vt]=Zn[Ze]=Zn[xn]=Zn[Oe]=Zn[$e]=Zn[be]=Zn[lt]=Zn[It]=Zn[en]=Zn[ye]=Zn[Ue]=Zn[je]=Zn[gt]=!1;var zn={};zn[de]=zn[Se]=zn[Vt]=zn[xn]=zn[Ze]=zn[Oe]=zn[Ii]=zn[br]=zn[yi]=zn[ar]=zn[ui]=zn[lt]=zn[It]=zn[en]=zn[ye]=zn[Ue]=zn[je]=zn[ke]=zn[bi]=zn[Rr]=zn[Yi]=zn[go]=!0,zn[$e]=zn[be]=zn[gt]=!1;var OY={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},PY={"&":"&","<":"<",">":">",'"':""","'":"'"},kY={"&":"&","<":"<",">":">",""":'"',"'":"'"},TY={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MY=parseFloat,RY=parseInt,uP=typeof ua=="object"&&ua&&ua.Object===Object&&ua,DY=typeof self=="object"&&self&&self.Object===Object&&self,si=uP||DY||Function("return this")(),a2=t&&!t.nodeType&&t,Kl=a2&&!0&&e&&!e.nodeType&&e,sP=Kl&&Kl.exports===a2,u2=sP&&uP.process,Ho=function(){try{var ce=Kl&&Kl.require&&Kl.require("util").types;return ce||u2&&u2.binding&&u2.binding("util")}catch{}}(),lP=Ho&&Ho.isArrayBuffer,cP=Ho&&Ho.isDate,fP=Ho&&Ho.isMap,dP=Ho&&Ho.isRegExp,hP=Ho&&Ho.isSet,pP=Ho&&Ho.isTypedArray;function yo(ce,Ae,we){switch(we.length){case 0:return ce.call(Ae);case 1:return ce.call(Ae,we[0]);case 2:return ce.call(Ae,we[0],we[1]);case 3:return ce.call(Ae,we[0],we[1],we[2])}return ce.apply(Ae,we)}function $Y(ce,Ae,we,ot){for(var jt=-1,_n=ce==null?0:ce.length;++jt<_n;){var Fr=ce[jt];Ae(ot,Fr,we(Fr),ce)}return ot}function qo(ce,Ae){for(var we=-1,ot=ce==null?0:ce.length;++we-1}function s2(ce,Ae,we){for(var ot=-1,jt=ce==null?0:ce.length;++ot-1;);return we}function _P(ce,Ae){for(var we=ce.length;we--&&bf(Ae,ce[we],0)>-1;);return we}function WY(ce,Ae){for(var we=ce.length,ot=0;we--;)ce[we]===Ae&&++ot;return ot}var VY=d2(OY),HY=d2(PY);function qY(ce){return"\\"+TY[ce]}function KY(ce,Ae){return ce==null?n:ce[Ae]}function xf(ce){return SY.test(ce)}function GY(ce){return CY.test(ce)}function YY(ce){for(var Ae,we=[];!(Ae=ce.next()).done;)we.push(Ae.value);return we}function g2(ce){var Ae=-1,we=Array(ce.size);return ce.forEach(function(ot,jt){we[++Ae]=[jt,ot]}),we}function SP(ce,Ae){return function(we){return ce(Ae(we))}}function Rs(ce,Ae){for(var we=-1,ot=ce.length,jt=0,_n=[];++we-1}function NZ(f,p){var _=this.__data__,P=em(_,f);return P<0?(++this.size,_.push([f,p])):_[P][1]=p,this}Du.prototype.clear=RZ,Du.prototype.delete=DZ,Du.prototype.get=$Z,Du.prototype.has=IZ,Du.prototype.set=NZ;function $u(f){var p=-1,_=f==null?0:f.length;for(this.clear();++p<_;){var P=f[p];this.set(P[0],P[1])}}function FZ(){this.size=0,this.__data__={hash:new Yl,map:new(Jh||Du),string:new Yl}}function LZ(f){var p=dm(this,f).delete(f);return this.size-=p?1:0,p}function jZ(f){return dm(this,f).get(f)}function BZ(f){return dm(this,f).has(f)}function zZ(f,p){var _=dm(this,f),P=_.size;return _.set(f,p),this.size+=_.size==P?0:1,this}$u.prototype.clear=FZ,$u.prototype.delete=LZ,$u.prototype.get=jZ,$u.prototype.has=BZ,$u.prototype.set=zZ;function Zl(f){var p=-1,_=f==null?0:f.length;for(this.__data__=new $u;++p<_;)this.add(f[p])}function UZ(f){return this.__data__.set(f,s),this}function WZ(f){return this.__data__.has(f)}Zl.prototype.add=Zl.prototype.push=UZ,Zl.prototype.has=WZ;function Sa(f){var p=this.__data__=new Du(f);this.size=p.size}function VZ(){this.__data__=new Du,this.size=0}function HZ(f){var p=this.__data__,_=p.delete(f);return this.size=p.size,_}function qZ(f){return this.__data__.get(f)}function KZ(f){return this.__data__.has(f)}function GZ(f,p){var _=this.__data__;if(_ instanceof Du){var P=_.__data__;if(!Jh||P.length=p?f:p)),f}function Yo(f,p,_,P,R,z){var X,ae=p&d,fe=p&h,Me=p&v;if(_&&(X=R?_(f,P,R,z):_(f)),X!==n)return X;if(!sr(f))return f;var Re=Ut(f);if(Re){if(X=BX(f),!ae)return Zi(f,X)}else{var Ie=_i(f),et=Ie==be||Ie==yt;if(Ls(f))return o8(f,ae);if(Ie==en||Ie==de||et&&!R){if(X=fe||et?{}:C8(f),!ae)return fe?kX(f,QZ(X,f)):PX(f,IP(X,f))}else{if(!zn[Ie])return R?f:{};X=zX(f,Ie,ae)}}z||(z=new Sa);var ft=z.get(f);if(ft)return ft;z.set(f,X),J8(f)?f.forEach(function(Pt){X.add(Yo(Pt,p,_,Pt,f,z))}):X8(f)&&f.forEach(function(Pt,nn){X.set(nn,Yo(Pt,p,_,nn,f,z))});var Ot=Me?fe?U2:z2:fe?Qi:Xr,Xt=Re?n:Ot(f);return qo(Xt||f,function(Pt,nn){Xt&&(nn=Pt,Pt=f[nn]),rp(X,nn,Yo(Pt,p,_,nn,f,z))}),X}function JZ(f){var p=Xr(f);return function(_){return NP(_,f,p)}}function NP(f,p,_){var P=_.length;if(f==null)return!P;for(f=Ln(f);P--;){var R=_[P],z=p[R],X=f[R];if(X===n&&!(R in f)||!z(X))return!1}return!0}function FP(f,p,_){if(typeof f!="function")throw new Ko(a);return cp(function(){f.apply(n,_)},p)}function ip(f,p,_,P){var R=-1,z=Fg,X=!0,ae=f.length,fe=[],Me=p.length;if(!ae)return fe;_&&(p=nr(p,bo(_))),P?(z=s2,X=!1):p.length>=i&&(z=Xh,X=!1,p=new Zl(p));e:for(;++RR?0:R+_),P=P===n||P>R?R:Yt(P),P<0&&(P+=R),P=_>P?0:tk(P);_0&&_(ae)?p>1?li(ae,p-1,_,P,R):Ms(R,ae):P||(R[R.length]=ae)}return R}var S2=f8(),BP=f8(!0);function ru(f,p){return f&&S2(f,p,Xr)}function C2(f,p){return f&&BP(f,p,Xr)}function nm(f,p){return Ts(p,function(_){return ju(f[_])})}function Ql(f,p){p=Ns(p,f);for(var _=0,P=p.length;f!=null&&_p}function nX(f,p){return f!=null&&kn.call(f,p)}function rX(f,p){return f!=null&&p in Ln(f)}function iX(f,p,_){return f>=wi(p,_)&&f=120&&Re.length>=120)?new Zl(X&&Re):n}Re=f[0];var Ie=-1,et=ae[0];e:for(;++Ie-1;)ae!==f&&Kg.call(ae,fe,1),Kg.call(f,fe,1);return f}function XP(f,p){for(var _=f?p.length:0,P=_-1;_--;){var R=p[_];if(_==P||R!==z){var z=R;Lu(R)?Kg.call(f,R,1):$2(f,R)}}return f}function M2(f,p){return f+Zg(MP()*(p-f+1))}function mX(f,p,_,P){for(var R=-1,z=Lr(Yg((p-f)/(_||1)),0),X=we(z);z--;)X[P?z:++R]=f,f+=_;return X}function R2(f,p){var _="";if(!f||p<1||p>B)return _;do p%2&&(_+=f),p=Zg(p/2),p&&(f+=f);while(p);return _}function Jt(f,p){return Y2(O8(f,p,Ji),f+"")}function yX(f){return $P(Mf(f))}function bX(f,p){var _=Mf(f);return hm(_,Xl(p,0,_.length))}function up(f,p,_,P){if(!sr(f))return f;p=Ns(p,f);for(var R=-1,z=p.length,X=z-1,ae=f;ae!=null&&++RR?0:R+p),_=_>R?R:_,_<0&&(_+=R),R=p>_?0:_-p>>>0,p>>>=0;for(var z=we(R);++P>>1,X=f[z];X!==null&&!wo(X)&&(_?X<=p:X=i){var Me=p?null:DX(f);if(Me)return jg(Me);X=!1,R=Xh,fe=new Zl}else fe=p?[]:ae;e:for(;++P=P?f:Zo(f,p,_)}var i8=cZ||function(f){return si.clearTimeout(f)};function o8(f,p){if(p)return f.slice();var _=f.length,P=AP?AP(_):new f.constructor(_);return f.copy(P),P}function L2(f){var p=new f.constructor(f.byteLength);return new Hg(p).set(new Hg(f)),p}function CX(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.byteLength)}function EX(f){var p=new f.constructor(f.source,Be.exec(f));return p.lastIndex=f.lastIndex,p}function AX(f){return np?Ln(np.call(f)):{}}function a8(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.length)}function u8(f,p){if(f!==p){var _=f!==n,P=f===null,R=f===f,z=wo(f),X=p!==n,ae=p===null,fe=p===p,Me=wo(p);if(!ae&&!Me&&!z&&f>p||z&&X&&fe&&!ae&&!Me||P&&X&&fe||!_&&fe||!R)return 1;if(!P&&!z&&!Me&&f=ae)return fe;var Me=_[P];return fe*(Me=="desc"?-1:1)}}return f.index-p.index}function s8(f,p,_,P){for(var R=-1,z=f.length,X=_.length,ae=-1,fe=p.length,Me=Lr(z-X,0),Re=we(fe+Me),Ie=!P;++ae1?_[R-1]:n,X=R>2?_[2]:n;for(z=f.length>3&&typeof z=="function"?(R--,z):n,X&&Fi(_[0],_[1],X)&&(z=R<3?n:z,R=1),p=Ln(p);++P-1?R[z?p[X]:X]:n}}function p8(f){return Fu(function(p){var _=p.length,P=_,R=Go.prototype.thru;for(f&&p.reverse();P--;){var z=p[P];if(typeof z!="function")throw new Ko(a);if(R&&!X&&fm(z)=="wrapper")var X=new Go([],!0)}for(P=X?P:_;++P<_;){z=p[P];var ae=fm(z),fe=ae=="wrapper"?W2(z):n;fe&&K2(fe[0])&&fe[1]==(T|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[fm(fe[0])].apply(X,fe[3]):X=z.length==1&&K2(z)?X[ae]():X.thru(z)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Ut(Re))return X.plant(Re).value();for(var Ie=0,et=_?p[Ie].apply(this,Me):Re;++Ie<_;)et=p[Ie].call(this,et);return et}})}function um(f,p,_,P,R,z,X,ae,fe,Me){var Re=p&T,Ie=p&b,et=p&w,ft=p&(S|A),Ot=p&F,Xt=et?n:sp(f);function Pt(){for(var nn=arguments.length,hn=we(nn),_o=nn;_o--;)hn[_o]=arguments[_o];if(ft)var Li=kf(Pt),So=WY(hn,Li);if(P&&(hn=s8(hn,P,R,ft)),z&&(hn=l8(hn,z,X,ft)),nn-=So,ft&&nn1&&hn.reverse(),Re&&feae))return!1;var Me=z.get(f),Re=z.get(p);if(Me&&Re)return Me==p&&Re==f;var Ie=-1,et=!0,ft=_&m?new Zl:n;for(z.set(f,p),z.set(p,f);++Ie1?"& ":"")+p[P],p=p.join(_>2?", ":" "),f.replace($,`{ + */Jb.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",d=1,h=2,v=4,g=1,m=2,b=1,w=2,x=4,S=8,A=16,E=32,C=64,T=128,M=256,F=512,U=30,H="...",W=800,ie=16,Z=1,G=2,K=3,V=1/0,B=9007199254740991,q=17976931348623157e292,Y=NaN,ue=4294967295,Q=ue-1,J=ue>>>1,se=[["ary",T],["bind",b],["bindKey",w],["curry",S],["curryRight",A],["flip",F],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",ge="[object AsyncFunction]",Ze="[object Boolean]",Pe="[object Date]",Fe="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",It="[object Number]",mn="[object Null]",en="[object Object]",re="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",gt="[object WeakMap]",bn="[object WeakSet]",Vt="[object ArrayBuffer]",xn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",ar="[object Int16Array]",ui="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Yi="[object Uint16Array]",go="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,wa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,dn=/[&<>"']/g,wn=RegExp(_t.source),qn=RegExp(dn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,mo=/<%=([\s\S]+?)%>/g,ql=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yf=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),k=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P=/\{\n\/\* \[wrapped with (.+)\] \*/,N=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,At=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",st="\\u20d0-\\u20ff",Qe=wt+Je+st,Le="\\u2700-\\u27bf",qe="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",me="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ve="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+me+ve+De,mt="['’]",Nt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Gt="["+Le+"]",an="["+qe+"]",un="[^"+xt+ze+te+Le+qe+Oe+"]",Lt="\\ud83c[\\udffb-\\udfff]",sn="(?:"+$t+"|"+Lt+")",tn="[^"+xt+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",vn="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+Oe+"]",Gn="\\u200d",Yn="(?:"+an+"|"+un+")",xr="(?:"+On+"|"+un+")",$r="(?:"+mt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+mt+"(?:D|LL|M|RE|S|T|VE))?",Nr=sn+"?",aO="["+Te+"]?",mY="(?:"+Gn+"(?:"+[tn,Kn,vn].join("|")+")"+aO+Nr+")*",yY="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bY="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",uO=aO+Nr+mY,xY="(?:"+[Gt,Kn,vn].join("|")+")"+uO,wY="(?:"+[tn+$t+"?",$t,Kn,vn,Nt].join("|")+")",_Y=RegExp(mt,"g"),SY=RegExp($t,"g"),o2=RegExp(Lt+"(?="+Lt+")|"+wY+uO,"g"),CY=RegExp([On+"?"+an+"+"+$r+"(?="+[Ft,On,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,On+Yn,"$"].join("|")+")",On+"?"+Yn+"+"+$r,On+"+"+Ir,bY,yY,te,xY].join("|"),"g"),EY=RegExp("["+Gn+xt+Qe+Te+"]"),AY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],OY=-1,Zn={};Zn[Ii]=Zn[br]=Zn[yi]=Zn[ar]=Zn[ui]=Zn[bi]=Zn[Rr]=Zn[Yi]=Zn[go]=!0,Zn[de]=Zn[Se]=Zn[Vt]=Zn[Ze]=Zn[xn]=Zn[Pe]=Zn[$e]=Zn[be]=Zn[lt]=Zn[It]=Zn[en]=Zn[ye]=Zn[Ue]=Zn[je]=Zn[gt]=!1;var zn={};zn[de]=zn[Se]=zn[Vt]=zn[xn]=zn[Ze]=zn[Pe]=zn[Ii]=zn[br]=zn[yi]=zn[ar]=zn[ui]=zn[lt]=zn[It]=zn[en]=zn[ye]=zn[Ue]=zn[je]=zn[ke]=zn[bi]=zn[Rr]=zn[Yi]=zn[go]=!0,zn[$e]=zn[be]=zn[gt]=!1;var kY={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},TY={"&":"&","<":"<",">":">",'"':""","'":"'"},MY={"&":"&","<":"<",">":">",""":'"',"'":"'"},RY={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},DY=parseFloat,$Y=parseInt,sO=typeof ua=="object"&&ua&&ua.Object===Object&&ua,IY=typeof self=="object"&&self&&self.Object===Object&&self,si=sO||IY||Function("return this")(),a2=t&&!t.nodeType&&t,Kl=a2&&!0&&e&&!e.nodeType&&e,lO=Kl&&Kl.exports===a2,u2=lO&&sO.process,Ho=function(){try{var ce=Kl&&Kl.require&&Kl.require("util").types;return ce||u2&&u2.binding&&u2.binding("util")}catch{}}(),cO=Ho&&Ho.isArrayBuffer,fO=Ho&&Ho.isDate,dO=Ho&&Ho.isMap,hO=Ho&&Ho.isRegExp,pO=Ho&&Ho.isSet,vO=Ho&&Ho.isTypedArray;function yo(ce,Ae,we){switch(we.length){case 0:return ce.call(Ae);case 1:return ce.call(Ae,we[0]);case 2:return ce.call(Ae,we[0],we[1]);case 3:return ce.call(Ae,we[0],we[1],we[2])}return ce.apply(Ae,we)}function NY(ce,Ae,we,ot){for(var jt=-1,_n=ce==null?0:ce.length;++jt<_n;){var Fr=ce[jt];Ae(ot,Fr,we(Fr),ce)}return ot}function qo(ce,Ae){for(var we=-1,ot=ce==null?0:ce.length;++we-1}function s2(ce,Ae,we){for(var ot=-1,jt=ce==null?0:ce.length;++ot-1;);return we}function SO(ce,Ae){for(var we=ce.length;we--&&bf(Ae,ce[we],0)>-1;);return we}function HY(ce,Ae){for(var we=ce.length,ot=0;we--;)ce[we]===Ae&&++ot;return ot}var qY=d2(kY),KY=d2(TY);function GY(ce){return"\\"+RY[ce]}function YY(ce,Ae){return ce==null?n:ce[Ae]}function xf(ce){return EY.test(ce)}function ZY(ce){return AY.test(ce)}function XY(ce){for(var Ae,we=[];!(Ae=ce.next()).done;)we.push(Ae.value);return we}function g2(ce){var Ae=-1,we=Array(ce.size);return ce.forEach(function(ot,jt){we[++Ae]=[jt,ot]}),we}function CO(ce,Ae){return function(we){return ce(Ae(we))}}function Rs(ce,Ae){for(var we=-1,ot=ce.length,jt=0,_n=[];++we-1}function LZ(f,p){var _=this.__data__,O=tm(_,f);return O<0?(++this.size,_.push([f,p])):_[O][1]=p,this}Du.prototype.clear=$Z,Du.prototype.delete=IZ,Du.prototype.get=NZ,Du.prototype.has=FZ,Du.prototype.set=LZ;function $u(f){var p=-1,_=f==null?0:f.length;for(this.clear();++p<_;){var O=f[p];this.set(O[0],O[1])}}function jZ(){this.size=0,this.__data__={hash:new Yl,map:new(ep||Du),string:new Yl}}function BZ(f){var p=hm(this,f).delete(f);return this.size-=p?1:0,p}function zZ(f){return hm(this,f).get(f)}function UZ(f){return hm(this,f).has(f)}function WZ(f,p){var _=hm(this,f),O=_.size;return _.set(f,p),this.size+=_.size==O?0:1,this}$u.prototype.clear=jZ,$u.prototype.delete=BZ,$u.prototype.get=zZ,$u.prototype.has=UZ,$u.prototype.set=WZ;function Zl(f){var p=-1,_=f==null?0:f.length;for(this.__data__=new $u;++p<_;)this.add(f[p])}function VZ(f){return this.__data__.set(f,s),this}function HZ(f){return this.__data__.has(f)}Zl.prototype.add=Zl.prototype.push=VZ,Zl.prototype.has=HZ;function Sa(f){var p=this.__data__=new Du(f);this.size=p.size}function qZ(){this.__data__=new Du,this.size=0}function KZ(f){var p=this.__data__,_=p.delete(f);return this.size=p.size,_}function GZ(f){return this.__data__.get(f)}function YZ(f){return this.__data__.has(f)}function ZZ(f,p){var _=this.__data__;if(_ instanceof Du){var O=_.__data__;if(!ep||O.length=p?f:p)),f}function Yo(f,p,_,O,R,z){var X,ae=p&d,fe=p&h,Me=p&v;if(_&&(X=R?_(f,O,R,z):_(f)),X!==n)return X;if(!sr(f))return f;var Re=Ut(f);if(Re){if(X=UX(f),!ae)return Zi(f,X)}else{var Ie=_i(f),et=Ie==be||Ie==yt;if(Ls(f))return a8(f,ae);if(Ie==en||Ie==de||et&&!R){if(X=fe||et?{}:E8(f),!ae)return fe?MX(f,eX(X,f)):TX(f,NO(X,f))}else{if(!zn[Ie])return R?f:{};X=WX(f,Ie,ae)}}z||(z=new Sa);var ft=z.get(f);if(ft)return ft;z.set(f,X),ek(f)?f.forEach(function(Ot){X.add(Yo(Ot,p,_,Ot,f,z))}):Q8(f)&&f.forEach(function(Ot,nn){X.set(nn,Yo(Ot,p,_,nn,f,z))});var Pt=Me?fe?U2:z2:fe?Qi:Qr,Xt=Re?n:Pt(f);return qo(Xt||f,function(Ot,nn){Xt&&(nn=Ot,Ot=f[nn]),ip(X,nn,Yo(Ot,p,_,nn,f,z))}),X}function tX(f){var p=Qr(f);return function(_){return FO(_,f,p)}}function FO(f,p,_){var O=_.length;if(f==null)return!O;for(f=Ln(f);O--;){var R=_[O],z=p[R],X=f[R];if(X===n&&!(R in f)||!z(X))return!1}return!0}function LO(f,p,_){if(typeof f!="function")throw new Ko(a);return fp(function(){f.apply(n,_)},p)}function op(f,p,_,O){var R=-1,z=Lg,X=!0,ae=f.length,fe=[],Me=p.length;if(!ae)return fe;_&&(p=nr(p,bo(_))),O?(z=s2,X=!1):p.length>=i&&(z=Qh,X=!1,p=new Zl(p));e:for(;++RR?0:R+_),O=O===n||O>R?R:Yt(O),O<0&&(O+=R),O=_>O?0:nk(O);_0&&_(ae)?p>1?li(ae,p-1,_,O,R):Ms(R,ae):O||(R[R.length]=ae)}return R}var S2=d8(),zO=d8(!0);function ru(f,p){return f&&S2(f,p,Qr)}function C2(f,p){return f&&zO(f,p,Qr)}function rm(f,p){return Ts(p,function(_){return ju(f[_])})}function Ql(f,p){p=Ns(p,f);for(var _=0,O=p.length;f!=null&&_p}function iX(f,p){return f!=null&&kn.call(f,p)}function oX(f,p){return f!=null&&p in Ln(f)}function aX(f,p,_){return f>=wi(p,_)&&f=120&&Re.length>=120)?new Zl(X&&Re):n}Re=f[0];var Ie=-1,et=ae[0];e:for(;++Ie-1;)ae!==f&&Gg.call(ae,fe,1),Gg.call(f,fe,1);return f}function QO(f,p){for(var _=f?p.length:0,O=_-1;_--;){var R=p[_];if(_==O||R!==z){var z=R;Lu(R)?Gg.call(f,R,1):$2(f,R)}}return f}function M2(f,p){return f+Xg(RO()*(p-f+1))}function bX(f,p,_,O){for(var R=-1,z=Lr(Zg((p-f)/(_||1)),0),X=we(z);z--;)X[O?z:++R]=f,f+=_;return X}function R2(f,p){var _="";if(!f||p<1||p>B)return _;do p%2&&(_+=f),p=Xg(p/2),p&&(f+=f);while(p);return _}function Jt(f,p){return Y2(O8(f,p,Ji),f+"")}function xX(f){return IO(Mf(f))}function wX(f,p){var _=Mf(f);return pm(_,Xl(p,0,_.length))}function sp(f,p,_,O){if(!sr(f))return f;p=Ns(p,f);for(var R=-1,z=p.length,X=z-1,ae=f;ae!=null&&++RR?0:R+p),_=_>R?R:_,_<0&&(_+=R),R=p>_?0:_-p>>>0,p>>>=0;for(var z=we(R);++O>>1,X=f[z];X!==null&&!wo(X)&&(_?X<=p:X=i){var Me=p?null:IX(f);if(Me)return Bg(Me);X=!1,R=Qh,fe=new Zl}else fe=p?[]:ae;e:for(;++O=O?f:Zo(f,p,_)}var o8=dZ||function(f){return si.clearTimeout(f)};function a8(f,p){if(p)return f.slice();var _=f.length,O=PO?PO(_):new f.constructor(_);return f.copy(O),O}function L2(f){var p=new f.constructor(f.byteLength);return new qg(p).set(new qg(f)),p}function AX(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.byteLength)}function PX(f){var p=new f.constructor(f.source,Be.exec(f));return p.lastIndex=f.lastIndex,p}function OX(f){return rp?Ln(rp.call(f)):{}}function u8(f,p){var _=p?L2(f.buffer):f.buffer;return new f.constructor(_,f.byteOffset,f.length)}function s8(f,p){if(f!==p){var _=f!==n,O=f===null,R=f===f,z=wo(f),X=p!==n,ae=p===null,fe=p===p,Me=wo(p);if(!ae&&!Me&&!z&&f>p||z&&X&&fe&&!ae&&!Me||O&&X&&fe||!_&&fe||!R)return 1;if(!O&&!z&&!Me&&f=ae)return fe;var Me=_[O];return fe*(Me=="desc"?-1:1)}}return f.index-p.index}function l8(f,p,_,O){for(var R=-1,z=f.length,X=_.length,ae=-1,fe=p.length,Me=Lr(z-X,0),Re=we(fe+Me),Ie=!O;++ae1?_[R-1]:n,X=R>2?_[2]:n;for(z=f.length>3&&typeof z=="function"?(R--,z):n,X&&Fi(_[0],_[1],X)&&(z=R<3?n:z,R=1),p=Ln(p);++O-1?R[z?p[X]:X]:n}}function v8(f){return Fu(function(p){var _=p.length,O=_,R=Go.prototype.thru;for(f&&p.reverse();O--;){var z=p[O];if(typeof z!="function")throw new Ko(a);if(R&&!X&&dm(z)=="wrapper")var X=new Go([],!0)}for(O=X?O:_;++O<_;){z=p[O];var ae=dm(z),fe=ae=="wrapper"?W2(z):n;fe&&K2(fe[0])&&fe[1]==(T|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[dm(fe[0])].apply(X,fe[3]):X=z.length==1&&K2(z)?X[ae]():X.thru(z)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Ut(Re))return X.plant(Re).value();for(var Ie=0,et=_?p[Ie].apply(this,Me):Re;++Ie<_;)et=p[Ie].call(this,et);return et}})}function sm(f,p,_,O,R,z,X,ae,fe,Me){var Re=p&T,Ie=p&b,et=p&w,ft=p&(S|A),Pt=p&F,Xt=et?n:lp(f);function Ot(){for(var nn=arguments.length,hn=we(nn),_o=nn;_o--;)hn[_o]=arguments[_o];if(ft)var Li=kf(Ot),So=HY(hn,Li);if(O&&(hn=l8(hn,O,R,ft)),z&&(hn=c8(hn,z,X,ft)),nn-=So,ft&&nn1&&hn.reverse(),Re&&feae))return!1;var Me=z.get(f),Re=z.get(p);if(Me&&Re)return Me==p&&Re==f;var Ie=-1,et=!0,ft=_&m?new Zl:n;for(z.set(f,p),z.set(p,f);++Ie1?"& ":"")+p[O],p=p.join(_>2?", ":" "),f.replace($,`{ /* [wrapped with `+p+`] */ -`)}function WX(f){return Ut(f)||tc(f)||!!(kP&&f&&f[kP])}function Lu(f,p){var _=typeof f;return p=p??B,!!p&&(_=="number"||_!="symbol"&&bt.test(f))&&f>-1&&f%1==0&&f0){if(++p>=W)return arguments[0]}else p=0;return f.apply(n,arguments)}}function hm(f,p){var _=-1,P=f.length,R=P-1;for(p=p===n?P:p;++_1?f[p-1]:n;return _=typeof _=="function"?(f.pop(),_):n,j8(f,_)});function B8(f){var p=L(f);return p.__chain__=!0,p}function eJ(f,p){return p(f),f}function pm(f,p){return p(f)}var tJ=Fu(function(f){var p=f.length,_=p?f[0]:0,P=this.__wrapped__,R=function(z){return _2(z,f)};return p>1||this.__actions__.length||!(P instanceof ln)||!Lu(_)?this.thru(R):(P=P.slice(_,+_+(p?1:0)),P.__actions__.push({func:pm,args:[R],thisArg:n}),new Go(P,this.__chain__).thru(function(z){return p&&!z.length&&z.push(n),z}))});function nJ(){return B8(this)}function rJ(){return new Go(this.value(),this.__chain__)}function iJ(){this.__values__===n&&(this.__values__=ek(this.value()));var f=this.__index__>=this.__values__.length,p=f?n:this.__values__[this.__index__++];return{done:f,value:p}}function oJ(){return this}function aJ(f){for(var p,_=this;_ instanceof Jg;){var P=D8(_);P.__index__=0,P.__values__=n,p?R.__wrapped__=P:p=P;var R=P;_=_.__wrapped__}return R.__wrapped__=f,p}function uJ(){var f=this.__wrapped__;if(f instanceof ln){var p=f;return this.__actions__.length&&(p=new ln(this)),p=p.reverse(),p.__actions__.push({func:pm,args:[Z2],thisArg:n}),new Go(p,this.__chain__)}return this.thru(Z2)}function sJ(){return n8(this.__wrapped__,this.__actions__)}var lJ=am(function(f,p,_){kn.call(f,_)?++f[_]:Iu(f,_,1)});function cJ(f,p,_){var P=Ut(f)?vP:eX;return _&&Fi(f,p,_)&&(p=n),P(f,Et(p,3))}function fJ(f,p){var _=Ut(f)?Ts:jP;return _(f,Et(p,3))}var dJ=h8($8),hJ=h8(I8);function pJ(f,p){return li(vm(f,p),1)}function vJ(f,p){return li(vm(f,p),V)}function gJ(f,p,_){return _=_===n?1:Yt(_),li(vm(f,p),_)}function z8(f,p){var _=Ut(f)?qo:$s;return _(f,Et(p,3))}function U8(f,p){var _=Ut(f)?IY:LP;return _(f,Et(p,3))}var mJ=am(function(f,p,_){kn.call(f,_)?f[_].push(p):Iu(f,_,[p])});function yJ(f,p,_,P){f=Xi(f)?f:Mf(f),_=_&&!P?Yt(_):0;var R=f.length;return _<0&&(_=Lr(R+_,0)),xm(f)?_<=R&&f.indexOf(p,_)>-1:!!R&&bf(f,p,_)>-1}var bJ=Jt(function(f,p,_){var P=-1,R=typeof p=="function",z=Xi(f)?we(f.length):[];return $s(f,function(X){z[++P]=R?yo(p,X,_):op(X,p,_)}),z}),xJ=am(function(f,p,_){Iu(f,_,p)});function vm(f,p){var _=Ut(f)?nr:HP;return _(f,Et(p,3))}function wJ(f,p,_,P){return f==null?[]:(Ut(p)||(p=p==null?[]:[p]),_=P?n:_,Ut(_)||(_=_==null?[]:[_]),YP(f,p,_))}var _J=am(function(f,p,_){f[_?0:1].push(p)},function(){return[[],[]]});function SJ(f,p,_){var P=Ut(f)?l2:bP,R=arguments.length<3;return P(f,Et(p,4),_,R,$s)}function CJ(f,p,_){var P=Ut(f)?NY:bP,R=arguments.length<3;return P(f,Et(p,4),_,R,LP)}function EJ(f,p){var _=Ut(f)?Ts:jP;return _(f,ym(Et(p,3)))}function AJ(f){var p=Ut(f)?$P:yX;return p(f)}function OJ(f,p,_){(_?Fi(f,p,_):p===n)?p=1:p=Yt(p);var P=Ut(f)?YZ:bX;return P(f,p)}function PJ(f){var p=Ut(f)?ZZ:wX;return p(f)}function kJ(f){if(f==null)return 0;if(Xi(f))return xm(f)?wf(f):f.length;var p=_i(f);return p==lt||p==Ue?f.size:P2(f).length}function TJ(f,p,_){var P=Ut(f)?c2:_X;return _&&Fi(f,p,_)&&(p=n),P(f,Et(p,3))}var MJ=Jt(function(f,p){if(f==null)return[];var _=p.length;return _>1&&Fi(f,p[0],p[1])?p=[]:_>2&&Fi(p[0],p[1],p[2])&&(p=[p[0]]),YP(f,li(p,1),[])}),gm=fZ||function(){return si.Date.now()};function RJ(f,p){if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){if(--f<1)return p.apply(this,arguments)}}function W8(f,p,_){return p=_?n:p,p=f&&p==null?f.length:p,Nu(f,T,n,n,n,n,p)}function V8(f,p){var _;if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){return--f>0&&(_=p.apply(this,arguments)),f<=1&&(p=n),_}}var Q2=Jt(function(f,p,_){var P=b;if(_.length){var R=Rs(_,kf(Q2));P|=E}return Nu(f,P,p,_,R)}),H8=Jt(function(f,p,_){var P=b|w;if(_.length){var R=Rs(_,kf(H8));P|=E}return Nu(p,P,f,_,R)});function q8(f,p,_){p=_?n:p;var P=Nu(f,S,n,n,n,n,n,p);return P.placeholder=q8.placeholder,P}function K8(f,p,_){p=_?n:p;var P=Nu(f,A,n,n,n,n,n,p);return P.placeholder=K8.placeholder,P}function G8(f,p,_){var P,R,z,X,ae,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof f!="function")throw new Ko(a);p=Qo(p)||0,sr(_)&&(Re=!!_.leading,Ie="maxWait"in _,z=Ie?Lr(Qo(_.maxWait)||0,p):z,et="trailing"in _?!!_.trailing:et);function ft(_r){var Ea=P,zu=R;return P=R=n,Me=_r,X=f.apply(zu,Ea),X}function Ot(_r){return Me=_r,ae=cp(nn,p),Re?ft(_r):X}function Xt(_r){var Ea=_r-fe,zu=_r-Me,hk=p-Ea;return Ie?wi(hk,z-zu):hk}function Pt(_r){var Ea=_r-fe,zu=_r-Me;return fe===n||Ea>=p||Ea<0||Ie&&zu>=z}function nn(){var _r=gm();if(Pt(_r))return hn(_r);ae=cp(nn,Xt(_r))}function hn(_r){return ae=n,et&&P?ft(_r):(P=R=n,X)}function _o(){ae!==n&&i8(ae),Me=0,P=fe=R=ae=n}function Li(){return ae===n?X:hn(gm())}function So(){var _r=gm(),Ea=Pt(_r);if(P=arguments,R=this,fe=_r,Ea){if(ae===n)return Ot(fe);if(Ie)return i8(ae),ae=cp(nn,p),ft(fe)}return ae===n&&(ae=cp(nn,p)),X}return So.cancel=_o,So.flush=Li,So}var DJ=Jt(function(f,p){return FP(f,1,p)}),$J=Jt(function(f,p,_){return FP(f,Qo(p)||0,_)});function IJ(f){return Nu(f,F)}function mm(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Ko(a);var _=function(){var P=arguments,R=p?p.apply(this,P):P[0],z=_.cache;if(z.has(R))return z.get(R);var X=f.apply(this,P);return _.cache=z.set(R,X)||z,X};return _.cache=new(mm.Cache||$u),_}mm.Cache=$u;function ym(f){if(typeof f!="function")throw new Ko(a);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}function NJ(f){return V8(2,f)}var FJ=SX(function(f,p){p=p.length==1&&Ut(p[0])?nr(p[0],bo(Et())):nr(li(p,1),bo(Et()));var _=p.length;return Jt(function(P){for(var R=-1,z=wi(P.length,_);++R=p}),tc=UP(function(){return arguments}())?UP:function(f){return pr(f)&&kn.call(f,"callee")&&!PP.call(f,"callee")},Ut=we.isArray,QJ=lP?bo(lP):aX;function Xi(f){return f!=null&&bm(f.length)&&!ju(f)}function wr(f){return pr(f)&&Xi(f)}function JJ(f){return f===!0||f===!1||pr(f)&&Ni(f)==Ze}var Ls=hZ||c_,eee=cP?bo(cP):uX;function tee(f){return pr(f)&&f.nodeType===1&&!fp(f)}function nee(f){if(f==null)return!0;if(Xi(f)&&(Ut(f)||typeof f=="string"||typeof f.splice=="function"||Ls(f)||Tf(f)||tc(f)))return!f.length;var p=_i(f);if(p==lt||p==Ue)return!f.size;if(lp(f))return!P2(f).length;for(var _ in f)if(kn.call(f,_))return!1;return!0}function ree(f,p){return ap(f,p)}function iee(f,p,_){_=typeof _=="function"?_:n;var P=_?_(f,p):n;return P===n?ap(f,p,n,_):!!P}function e_(f){if(!pr(f))return!1;var p=Ni(f);return p==$e||p==Fe||typeof f.message=="string"&&typeof f.name=="string"&&!fp(f)}function oee(f){return typeof f=="number"&&TP(f)}function ju(f){if(!sr(f))return!1;var p=Ni(f);return p==be||p==yt||p==ge||p==pe}function Z8(f){return typeof f=="number"&&f==Yt(f)}function bm(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=B}function sr(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}function pr(f){return f!=null&&typeof f=="object"}var X8=fP?bo(fP):lX;function aee(f,p){return f===p||O2(f,p,V2(p))}function uee(f,p,_){return _=typeof _=="function"?_:n,O2(f,p,V2(p),_)}function see(f){return Q8(f)&&f!=+f}function lee(f){if(qX(f))throw new jt(o);return WP(f)}function cee(f){return f===null}function fee(f){return f==null}function Q8(f){return typeof f=="number"||pr(f)&&Ni(f)==It}function fp(f){if(!pr(f)||Ni(f)!=en)return!1;var p=qg(f);if(p===null)return!0;var _=kn.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&Ug.call(_)==uZ}var t_=dP?bo(dP):cX;function dee(f){return Z8(f)&&f>=-B&&f<=B}var J8=hP?bo(hP):fX;function xm(f){return typeof f=="string"||!Ut(f)&&pr(f)&&Ni(f)==je}function wo(f){return typeof f=="symbol"||pr(f)&&Ni(f)==ke}var Tf=pP?bo(pP):dX;function hee(f){return f===n}function pee(f){return pr(f)&&_i(f)==gt}function vee(f){return pr(f)&&Ni(f)==bn}var gee=cm(k2),mee=cm(function(f,p){return f<=p});function ek(f){if(!f)return[];if(Xi(f))return xm(f)?_a(f):Zi(f);if(Qh&&f[Qh])return YY(f[Qh]());var p=_i(f),_=p==lt?g2:p==Ue?jg:Mf;return _(f)}function Bu(f){if(!f)return f===0?f:0;if(f=Qo(f),f===V||f===-V){var p=f<0?-1:1;return p*q}return f===f?f:0}function Yt(f){var p=Bu(f),_=p%1;return p===p?_?p-_:p:0}function tk(f){return f?Xl(Yt(f),0,ue):0}function Qo(f){if(typeof f=="number")return f;if(wo(f))return Y;if(sr(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=sr(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=xP(f);var _=ct.test(f);return _||rt.test(f)?RY(f.slice(2),_?2:8):He.test(f)?Y:+f}function nk(f){return iu(f,Qi(f))}function yee(f){return f?Xl(Yt(f),-B,B):f===0?f:0}function En(f){return f==null?"":xo(f)}var bee=Of(function(f,p){if(lp(p)||Xi(p)){iu(p,Xr(p),f);return}for(var _ in p)kn.call(p,_)&&rp(f,_,p[_])}),rk=Of(function(f,p){iu(p,Qi(p),f)}),wm=Of(function(f,p,_,P){iu(p,Qi(p),f,P)}),xee=Of(function(f,p,_,P){iu(p,Xr(p),f,P)}),wee=Fu(_2);function _ee(f,p){var _=Af(f);return p==null?_:IP(_,p)}var See=Jt(function(f,p){f=Ln(f);var _=-1,P=p.length,R=P>2?p[2]:n;for(R&&Fi(p[0],p[1],R)&&(P=1);++_1),z}),iu(f,U2(f),_),P&&(_=Yo(_,d|h|v,$X));for(var R=p.length;R--;)$2(_,p[R]);return _});function zee(f,p){return ok(f,ym(Et(p)))}var Uee=Fu(function(f,p){return f==null?{}:vX(f,p)});function ok(f,p){if(f==null)return{};var _=nr(U2(f),function(P){return[P]});return p=Et(p),ZP(f,_,function(P,R){return p(P,R[0])})}function Wee(f,p,_){p=Ns(p,f);var P=-1,R=p.length;for(R||(R=1,f=n);++Pp){var P=f;f=p,p=P}if(_||f%1||p%1){var R=MP();return wi(f+R*(p-f+MY("1e-"+((R+"").length-1))),p)}return M2(f,p)}var ete=Pf(function(f,p,_){return p=p.toLowerCase(),f+(_?sk(p):p)});function sk(f){return i_(En(f).toLowerCase())}function lk(f){return f=En(f),f&&f.replace(At,VY).replace(wY,"")}function tte(f,p,_){f=En(f),p=xo(p);var P=f.length;_=_===n?P:Xl(Yt(_),0,P);var R=_;return _-=p.length,_>=0&&f.slice(_,R)==p}function nte(f){return f=En(f),f&&qn.test(f)?f.replace(dn,HY):f}function rte(f){return f=En(f),f&&xe.test(f)?f.replace(le,"\\$&"):f}var ite=Pf(function(f,p,_){return f+(_?"-":"")+p.toLowerCase()}),ote=Pf(function(f,p,_){return f+(_?" ":"")+p.toLowerCase()}),ate=d8("toLowerCase");function ute(f,p,_){f=En(f),p=Yt(p);var P=p?wf(f):0;if(!p||P>=p)return f;var R=(p-P)/2;return lm(Zg(R),_)+f+lm(Yg(R),_)}function ste(f,p,_){f=En(f),p=Yt(p);var P=p?wf(f):0;return p&&P>>0,_?(f=En(f),f&&(typeof p=="string"||p!=null&&!t_(p))&&(p=xo(p),!p&&xf(f))?Fs(_a(f),0,_):f.split(p,_)):[]}var vte=Pf(function(f,p,_){return f+(_?" ":"")+i_(p)});function gte(f,p,_){return f=En(f),_=_==null?0:Xl(Yt(_),0,f.length),p=xo(p),f.slice(_,_+p.length)==p}function mte(f,p,_){var P=L.templateSettings;_&&Fi(f,p,_)&&(p=n),f=En(f),p=wm({},p,P,b8);var R=wm({},p.imports,P.imports,b8),z=Xr(R),X=v2(R,z),ae,fe,Me=0,Re=p.interpolate||vt,Ie="__p += '",et=m2((p.escape||vt).source+"|"+Re.source+"|"+(Re===mo?Ce:vt).source+"|"+(p.evaluate||vt).source+"|$","g"),ft="//# sourceURL="+(kn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++AY+"]")+` -`;f.replace(et,function(Pt,nn,hn,_o,Li,So){return hn||(hn=_o),Ie+=f.slice(Me,So).replace(ht,qY),nn&&(ae=!0,Ie+=`' + +`)}function HX(f){return Ut(f)||tc(f)||!!(TO&&f&&f[TO])}function Lu(f,p){var _=typeof f;return p=p??B,!!p&&(_=="number"||_!="symbol"&&bt.test(f))&&f>-1&&f%1==0&&f0){if(++p>=W)return arguments[0]}else p=0;return f.apply(n,arguments)}}function pm(f,p){var _=-1,O=f.length,R=O-1;for(p=p===n?O:p;++_1?f[p-1]:n;return _=typeof _=="function"?(f.pop(),_):n,B8(f,_)});function z8(f){var p=L(f);return p.__chain__=!0,p}function nJ(f,p){return p(f),f}function vm(f,p){return p(f)}var rJ=Fu(function(f){var p=f.length,_=p?f[0]:0,O=this.__wrapped__,R=function(z){return _2(z,f)};return p>1||this.__actions__.length||!(O instanceof ln)||!Lu(_)?this.thru(R):(O=O.slice(_,+_+(p?1:0)),O.__actions__.push({func:vm,args:[R],thisArg:n}),new Go(O,this.__chain__).thru(function(z){return p&&!z.length&&z.push(n),z}))});function iJ(){return z8(this)}function oJ(){return new Go(this.value(),this.__chain__)}function aJ(){this.__values__===n&&(this.__values__=tk(this.value()));var f=this.__index__>=this.__values__.length,p=f?n:this.__values__[this.__index__++];return{done:f,value:p}}function uJ(){return this}function sJ(f){for(var p,_=this;_ instanceof em;){var O=$8(_);O.__index__=0,O.__values__=n,p?R.__wrapped__=O:p=O;var R=O;_=_.__wrapped__}return R.__wrapped__=f,p}function lJ(){var f=this.__wrapped__;if(f instanceof ln){var p=f;return this.__actions__.length&&(p=new ln(this)),p=p.reverse(),p.__actions__.push({func:vm,args:[Z2],thisArg:n}),new Go(p,this.__chain__)}return this.thru(Z2)}function cJ(){return r8(this.__wrapped__,this.__actions__)}var fJ=um(function(f,p,_){kn.call(f,_)?++f[_]:Iu(f,_,1)});function dJ(f,p,_){var O=Ut(f)?gO:nX;return _&&Fi(f,p,_)&&(p=n),O(f,Et(p,3))}function hJ(f,p){var _=Ut(f)?Ts:BO;return _(f,Et(p,3))}var pJ=p8(I8),vJ=p8(N8);function gJ(f,p){return li(gm(f,p),1)}function mJ(f,p){return li(gm(f,p),V)}function yJ(f,p,_){return _=_===n?1:Yt(_),li(gm(f,p),_)}function U8(f,p){var _=Ut(f)?qo:$s;return _(f,Et(p,3))}function W8(f,p){var _=Ut(f)?FY:jO;return _(f,Et(p,3))}var bJ=um(function(f,p,_){kn.call(f,_)?f[_].push(p):Iu(f,_,[p])});function xJ(f,p,_,O){f=Xi(f)?f:Mf(f),_=_&&!O?Yt(_):0;var R=f.length;return _<0&&(_=Lr(R+_,0)),wm(f)?_<=R&&f.indexOf(p,_)>-1:!!R&&bf(f,p,_)>-1}var wJ=Jt(function(f,p,_){var O=-1,R=typeof p=="function",z=Xi(f)?we(f.length):[];return $s(f,function(X){z[++O]=R?yo(p,X,_):ap(X,p,_)}),z}),_J=um(function(f,p,_){Iu(f,_,p)});function gm(f,p){var _=Ut(f)?nr:qO;return _(f,Et(p,3))}function SJ(f,p,_,O){return f==null?[]:(Ut(p)||(p=p==null?[]:[p]),_=O?n:_,Ut(_)||(_=_==null?[]:[_]),ZO(f,p,_))}var CJ=um(function(f,p,_){f[_?0:1].push(p)},function(){return[[],[]]});function EJ(f,p,_){var O=Ut(f)?l2:xO,R=arguments.length<3;return O(f,Et(p,4),_,R,$s)}function AJ(f,p,_){var O=Ut(f)?LY:xO,R=arguments.length<3;return O(f,Et(p,4),_,R,jO)}function PJ(f,p){var _=Ut(f)?Ts:BO;return _(f,bm(Et(p,3)))}function OJ(f){var p=Ut(f)?IO:xX;return p(f)}function kJ(f,p,_){(_?Fi(f,p,_):p===n)?p=1:p=Yt(p);var O=Ut(f)?XZ:wX;return O(f,p)}function TJ(f){var p=Ut(f)?QZ:SX;return p(f)}function MJ(f){if(f==null)return 0;if(Xi(f))return wm(f)?wf(f):f.length;var p=_i(f);return p==lt||p==Ue?f.size:O2(f).length}function RJ(f,p,_){var O=Ut(f)?c2:CX;return _&&Fi(f,p,_)&&(p=n),O(f,Et(p,3))}var DJ=Jt(function(f,p){if(f==null)return[];var _=p.length;return _>1&&Fi(f,p[0],p[1])?p=[]:_>2&&Fi(p[0],p[1],p[2])&&(p=[p[0]]),ZO(f,li(p,1),[])}),mm=hZ||function(){return si.Date.now()};function $J(f,p){if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){if(--f<1)return p.apply(this,arguments)}}function V8(f,p,_){return p=_?n:p,p=f&&p==null?f.length:p,Nu(f,T,n,n,n,n,p)}function H8(f,p){var _;if(typeof p!="function")throw new Ko(a);return f=Yt(f),function(){return--f>0&&(_=p.apply(this,arguments)),f<=1&&(p=n),_}}var Q2=Jt(function(f,p,_){var O=b;if(_.length){var R=Rs(_,kf(Q2));O|=E}return Nu(f,O,p,_,R)}),q8=Jt(function(f,p,_){var O=b|w;if(_.length){var R=Rs(_,kf(q8));O|=E}return Nu(p,O,f,_,R)});function K8(f,p,_){p=_?n:p;var O=Nu(f,S,n,n,n,n,n,p);return O.placeholder=K8.placeholder,O}function G8(f,p,_){p=_?n:p;var O=Nu(f,A,n,n,n,n,n,p);return O.placeholder=G8.placeholder,O}function Y8(f,p,_){var O,R,z,X,ae,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof f!="function")throw new Ko(a);p=Qo(p)||0,sr(_)&&(Re=!!_.leading,Ie="maxWait"in _,z=Ie?Lr(Qo(_.maxWait)||0,p):z,et="trailing"in _?!!_.trailing:et);function ft(_r){var Ea=O,zu=R;return O=R=n,Me=_r,X=f.apply(zu,Ea),X}function Pt(_r){return Me=_r,ae=fp(nn,p),Re?ft(_r):X}function Xt(_r){var Ea=_r-fe,zu=_r-Me,pk=p-Ea;return Ie?wi(pk,z-zu):pk}function Ot(_r){var Ea=_r-fe,zu=_r-Me;return fe===n||Ea>=p||Ea<0||Ie&&zu>=z}function nn(){var _r=mm();if(Ot(_r))return hn(_r);ae=fp(nn,Xt(_r))}function hn(_r){return ae=n,et&&O?ft(_r):(O=R=n,X)}function _o(){ae!==n&&o8(ae),Me=0,O=fe=R=ae=n}function Li(){return ae===n?X:hn(mm())}function So(){var _r=mm(),Ea=Ot(_r);if(O=arguments,R=this,fe=_r,Ea){if(ae===n)return Pt(fe);if(Ie)return o8(ae),ae=fp(nn,p),ft(fe)}return ae===n&&(ae=fp(nn,p)),X}return So.cancel=_o,So.flush=Li,So}var IJ=Jt(function(f,p){return LO(f,1,p)}),NJ=Jt(function(f,p,_){return LO(f,Qo(p)||0,_)});function FJ(f){return Nu(f,F)}function ym(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Ko(a);var _=function(){var O=arguments,R=p?p.apply(this,O):O[0],z=_.cache;if(z.has(R))return z.get(R);var X=f.apply(this,O);return _.cache=z.set(R,X)||z,X};return _.cache=new(ym.Cache||$u),_}ym.Cache=$u;function bm(f){if(typeof f!="function")throw new Ko(a);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}function LJ(f){return H8(2,f)}var jJ=EX(function(f,p){p=p.length==1&&Ut(p[0])?nr(p[0],bo(Et())):nr(li(p,1),bo(Et()));var _=p.length;return Jt(function(O){for(var R=-1,z=wi(O.length,_);++R=p}),tc=WO(function(){return arguments}())?WO:function(f){return pr(f)&&kn.call(f,"callee")&&!kO.call(f,"callee")},Ut=we.isArray,eee=cO?bo(cO):sX;function Xi(f){return f!=null&&xm(f.length)&&!ju(f)}function wr(f){return pr(f)&&Xi(f)}function tee(f){return f===!0||f===!1||pr(f)&&Ni(f)==Ze}var Ls=vZ||c_,nee=fO?bo(fO):lX;function ree(f){return pr(f)&&f.nodeType===1&&!dp(f)}function iee(f){if(f==null)return!0;if(Xi(f)&&(Ut(f)||typeof f=="string"||typeof f.splice=="function"||Ls(f)||Tf(f)||tc(f)))return!f.length;var p=_i(f);if(p==lt||p==Ue)return!f.size;if(cp(f))return!O2(f).length;for(var _ in f)if(kn.call(f,_))return!1;return!0}function oee(f,p){return up(f,p)}function aee(f,p,_){_=typeof _=="function"?_:n;var O=_?_(f,p):n;return O===n?up(f,p,n,_):!!O}function e_(f){if(!pr(f))return!1;var p=Ni(f);return p==$e||p==Fe||typeof f.message=="string"&&typeof f.name=="string"&&!dp(f)}function uee(f){return typeof f=="number"&&MO(f)}function ju(f){if(!sr(f))return!1;var p=Ni(f);return p==be||p==yt||p==ge||p==pe}function X8(f){return typeof f=="number"&&f==Yt(f)}function xm(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=B}function sr(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}function pr(f){return f!=null&&typeof f=="object"}var Q8=dO?bo(dO):fX;function see(f,p){return f===p||P2(f,p,V2(p))}function lee(f,p,_){return _=typeof _=="function"?_:n,P2(f,p,V2(p),_)}function cee(f){return J8(f)&&f!=+f}function fee(f){if(GX(f))throw new jt(o);return VO(f)}function dee(f){return f===null}function hee(f){return f==null}function J8(f){return typeof f=="number"||pr(f)&&Ni(f)==It}function dp(f){if(!pr(f)||Ni(f)!=en)return!1;var p=Kg(f);if(p===null)return!0;var _=kn.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&Wg.call(_)==lZ}var t_=hO?bo(hO):dX;function pee(f){return X8(f)&&f>=-B&&f<=B}var ek=pO?bo(pO):hX;function wm(f){return typeof f=="string"||!Ut(f)&&pr(f)&&Ni(f)==je}function wo(f){return typeof f=="symbol"||pr(f)&&Ni(f)==ke}var Tf=vO?bo(vO):pX;function vee(f){return f===n}function gee(f){return pr(f)&&_i(f)==gt}function mee(f){return pr(f)&&Ni(f)==bn}var yee=fm(k2),bee=fm(function(f,p){return f<=p});function tk(f){if(!f)return[];if(Xi(f))return wm(f)?_a(f):Zi(f);if(Jh&&f[Jh])return XY(f[Jh]());var p=_i(f),_=p==lt?g2:p==Ue?Bg:Mf;return _(f)}function Bu(f){if(!f)return f===0?f:0;if(f=Qo(f),f===V||f===-V){var p=f<0?-1:1;return p*q}return f===f?f:0}function Yt(f){var p=Bu(f),_=p%1;return p===p?_?p-_:p:0}function nk(f){return f?Xl(Yt(f),0,ue):0}function Qo(f){if(typeof f=="number")return f;if(wo(f))return Y;if(sr(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=sr(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=wO(f);var _=ct.test(f);return _||rt.test(f)?$Y(f.slice(2),_?2:8):He.test(f)?Y:+f}function rk(f){return iu(f,Qi(f))}function xee(f){return f?Xl(Yt(f),-B,B):f===0?f:0}function En(f){return f==null?"":xo(f)}var wee=Pf(function(f,p){if(cp(p)||Xi(p)){iu(p,Qr(p),f);return}for(var _ in p)kn.call(p,_)&&ip(f,_,p[_])}),ik=Pf(function(f,p){iu(p,Qi(p),f)}),_m=Pf(function(f,p,_,O){iu(p,Qi(p),f,O)}),_ee=Pf(function(f,p,_,O){iu(p,Qr(p),f,O)}),See=Fu(_2);function Cee(f,p){var _=Af(f);return p==null?_:NO(_,p)}var Eee=Jt(function(f,p){f=Ln(f);var _=-1,O=p.length,R=O>2?p[2]:n;for(R&&Fi(p[0],p[1],R)&&(O=1);++_1),z}),iu(f,U2(f),_),O&&(_=Yo(_,d|h|v,NX));for(var R=p.length;R--;)$2(_,p[R]);return _});function Wee(f,p){return ak(f,bm(Et(p)))}var Vee=Fu(function(f,p){return f==null?{}:mX(f,p)});function ak(f,p){if(f==null)return{};var _=nr(U2(f),function(O){return[O]});return p=Et(p),XO(f,_,function(O,R){return p(O,R[0])})}function Hee(f,p,_){p=Ns(p,f);var O=-1,R=p.length;for(R||(R=1,f=n);++Op){var O=f;f=p,p=O}if(_||f%1||p%1){var R=RO();return wi(f+R*(p-f+DY("1e-"+((R+"").length-1))),p)}return M2(f,p)}var nte=Of(function(f,p,_){return p=p.toLowerCase(),f+(_?lk(p):p)});function lk(f){return i_(En(f).toLowerCase())}function ck(f){return f=En(f),f&&f.replace(At,qY).replace(SY,"")}function rte(f,p,_){f=En(f),p=xo(p);var O=f.length;_=_===n?O:Xl(Yt(_),0,O);var R=_;return _-=p.length,_>=0&&f.slice(_,R)==p}function ite(f){return f=En(f),f&&qn.test(f)?f.replace(dn,KY):f}function ote(f){return f=En(f),f&&xe.test(f)?f.replace(le,"\\$&"):f}var ate=Of(function(f,p,_){return f+(_?"-":"")+p.toLowerCase()}),ute=Of(function(f,p,_){return f+(_?" ":"")+p.toLowerCase()}),ste=h8("toLowerCase");function lte(f,p,_){f=En(f),p=Yt(p);var O=p?wf(f):0;if(!p||O>=p)return f;var R=(p-O)/2;return cm(Xg(R),_)+f+cm(Zg(R),_)}function cte(f,p,_){f=En(f),p=Yt(p);var O=p?wf(f):0;return p&&O>>0,_?(f=En(f),f&&(typeof p=="string"||p!=null&&!t_(p))&&(p=xo(p),!p&&xf(f))?Fs(_a(f),0,_):f.split(p,_)):[]}var mte=Of(function(f,p,_){return f+(_?" ":"")+i_(p)});function yte(f,p,_){return f=En(f),_=_==null?0:Xl(Yt(_),0,f.length),p=xo(p),f.slice(_,_+p.length)==p}function bte(f,p,_){var O=L.templateSettings;_&&Fi(f,p,_)&&(p=n),f=En(f),p=_m({},p,O,x8);var R=_m({},p.imports,O.imports,x8),z=Qr(R),X=v2(R,z),ae,fe,Me=0,Re=p.interpolate||vt,Ie="__p += '",et=m2((p.escape||vt).source+"|"+Re.source+"|"+(Re===mo?Ce:vt).source+"|"+(p.evaluate||vt).source+"|$","g"),ft="//# sourceURL="+(kn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++OY+"]")+` +`;f.replace(et,function(Ot,nn,hn,_o,Li,So){return hn||(hn=_o),Ie+=f.slice(Me,So).replace(ht,GY),nn&&(ae=!0,Ie+=`' + __e(`+nn+`) + '`),Li&&(fe=!0,Ie+=`'; `+Li+`; __p += '`),hn&&(Ie+=`' + ((__t = (`+hn+`)) == null ? '' : __t) + -'`),Me=So+Pt.length,Pt}),Ie+=`'; -`;var Ot=kn.call(p,"variable")&&p.variable;if(!Ot)Ie=`with (obj) { +'`),Me=So+Ot.length,Ot}),Ie+=`'; +`;var Pt=kn.call(p,"variable")&&p.variable;if(!Pt)Ie=`with (obj) { `+Ie+` } -`;else if(ne.test(Ot))throw new jt(u);Ie=(fe?Ie.replace(xi,""):Ie).replace(Dr,"$1").replace(wa,"$1;"),Ie="function("+(Ot||"obj")+`) { -`+(Ot?"":`obj || (obj = {}); +`;else if(ne.test(Pt))throw new jt(u);Ie=(fe?Ie.replace(xi,""):Ie).replace(Dr,"$1").replace(wa,"$1;"),Ie="function("+(Pt||"obj")+`) { +`+(Pt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Ie+`return __p -}`;var Xt=fk(function(){return _n(z,ft+"return "+Ie).apply(n,X)});if(Xt.source=Ie,e_(Xt))throw Xt;return Xt}function yte(f){return En(f).toLowerCase()}function bte(f){return En(f).toUpperCase()}function xte(f,p,_){if(f=En(f),f&&(_||p===n))return xP(f);if(!f||!(p=xo(p)))return f;var P=_a(f),R=_a(p),z=wP(P,R),X=_P(P,R)+1;return Fs(P,z,X).join("")}function wte(f,p,_){if(f=En(f),f&&(_||p===n))return f.slice(0,CP(f)+1);if(!f||!(p=xo(p)))return f;var P=_a(f),R=_P(P,_a(p))+1;return Fs(P,0,R).join("")}function _te(f,p,_){if(f=En(f),f&&(_||p===n))return f.replace(k,"");if(!f||!(p=xo(p)))return f;var P=_a(f),R=wP(P,_a(p));return Fs(P,R).join("")}function Ste(f,p){var _=U,P=H;if(sr(p)){var R="separator"in p?p.separator:R;_="length"in p?Yt(p.length):_,P="omission"in p?xo(p.omission):P}f=En(f);var z=f.length;if(xf(f)){var X=_a(f);z=X.length}if(_>=z)return f;var ae=_-wf(P);if(ae<1)return P;var fe=X?Fs(X,0,ae).join(""):f.slice(0,ae);if(R===n)return fe+P;if(X&&(ae+=fe.length-ae),t_(R)){if(f.slice(ae).search(R)){var Me,Re=fe;for(R.global||(R=m2(R.source,En(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?ae:Ie)}}else if(f.indexOf(xo(R),ae)!=ae){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+P}function Cte(f){return f=En(f),f&&wn.test(f)?f.replace(_t,JY):f}var Ete=Pf(function(f,p,_){return f+(_?" ":"")+p.toUpperCase()}),i_=d8("toUpperCase");function ck(f,p,_){return f=En(f),p=_?n:p,p===n?GY(f)?nZ(f):jY(f):f.match(p)||[]}var fk=Jt(function(f,p){try{return yo(f,n,p)}catch(_){return e_(_)?_:new jt(_)}}),Ate=Fu(function(f,p){return qo(p,function(_){_=ou(_),Iu(f,_,Q2(f[_],f))}),f});function Ote(f){var p=f==null?0:f.length,_=Et();return f=p?nr(f,function(P){if(typeof P[1]!="function")throw new Ko(a);return[_(P[0]),P[1]]}):[],Jt(function(P){for(var R=-1;++RB)return[];var _=ue,P=wi(f,ue);p=Et(p),f-=ue;for(var R=p2(P,p);++_0||p<0)?new ln(_):(f<0?_=_.takeRight(-f):f&&(_=_.drop(f)),p!==n&&(p=Yt(p),_=p<0?_.dropRight(-p):_.take(p-f)),_)},ln.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},ln.prototype.toArray=function(){return this.take(ue)},ru(ln.prototype,function(f,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),P=/^(?:head|last)$/.test(p),R=L[P?"take"+(p=="last"?"Right":""):p],z=P||/^find/.test(p);R&&(L.prototype[p]=function(){var X=this.__wrapped__,ae=P?[1]:arguments,fe=X instanceof ln,Me=ae[0],Re=fe||Ut(X),Ie=function(nn){var hn=R.apply(L,Ms([nn],ae));return P&&et?hn[0]:hn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,Ot=z&&!et,Xt=fe&&!ft;if(!z&&Re){X=Xt?X:new ln(this);var Pt=f.apply(X,ae);return Pt.__actions__.push({func:pm,args:[Ie],thisArg:n}),new Go(Pt,et)}return Ot&&Xt?f.apply(this,ae):(Pt=this.thru(Ie),Ot?P?Pt.value()[0]:Pt.value():Pt)})}),qo(["pop","push","shift","sort","splice","unshift"],function(f){var p=Bg[f],_=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",P=/^(?:pop|shift)$/.test(f);L.prototype[f]=function(){var R=arguments;if(P&&!this.__chain__){var z=this.value();return p.apply(Ut(z)?z:[],R)}return this[_](function(X){return p.apply(Ut(X)?X:[],R)})}}),ru(ln.prototype,function(f,p){var _=L[p];if(_){var P=_.name+"";kn.call(Ef,P)||(Ef[P]=[]),Ef[P].push({name:p,func:_})}}),Ef[um(n,w).name]=[{name:"wrapper",func:n}],ln.prototype.clone=CZ,ln.prototype.reverse=EZ,ln.prototype.value=AZ,L.prototype.at=tJ,L.prototype.chain=nJ,L.prototype.commit=rJ,L.prototype.next=iJ,L.prototype.plant=aJ,L.prototype.reverse=uJ,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=sJ,L.prototype.first=L.prototype.head,Qh&&(L.prototype[Qh]=oJ),L},_f=rZ();Kl?((Kl.exports=_f)._=_f,a2._=_f):si._=_f}).call(ua)})(Qb,Qb.exports);var tZe=Qb.exports;function qBe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var kO="ScrollArea",[cK,nZe]=mi(kO),[KBe,xa]=cK(kO),fK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[u,s]=y.useState(null),[l,c]=y.useState(null),[d,h]=y.useState(null),[v,g]=y.useState(null),[m,b]=y.useState(null),[w,x]=y.useState(0),[S,A]=y.useState(0),[E,C]=y.useState(!1),[T,M]=y.useState(!1),F=Kt(t,H=>s(H)),U=hg(i);return I.jsx(KBe,{scope:n,type:r,dir:U,scrollHideDelay:o,scrollArea:u,viewport:l,onViewportChange:c,content:d,onContentChange:h,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:A,children:I.jsx(pt.div,{dir:U,...a,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});fK.displayName=kO;var dK="ScrollAreaViewport",hK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=xa(dK,n),u=y.useRef(null),s=Kt(t,u,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});hK.displayName=dK;var Tu="ScrollAreaScrollbar",GBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,u=e.orientation==="horizontal";return y.useEffect(()=>(u?o(!0):a(!0),()=>{u?o(!1):a(!1)}),[u,o,a]),i.type==="hover"?I.jsx(YBe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(ZBe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(pK,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(TO,{...r,ref:t}):null});GBe.displayName=Tu;var YBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const u=i.scrollArea;let s=0;if(u){const l=()=>{window.clearTimeout(s),a(!0)},c=()=>{s=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",l),u.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),u.removeEventListener("pointerenter",l),u.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(oi,{present:n||o,children:I.jsx(pK,{"data-state":o?"visible":"hidden",...r,ref:t})})}),ZBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Xw(()=>s("SCROLL_END"),100),[u,s]=qBe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const l=window.setTimeout(()=>s("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[u,i.scrollHideDelay,s]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let d=l[c];const h=()=>{const v=l[c];d!==v&&(s("SCROLL"),a()),d=v};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,s,a]),I.jsx(oi,{present:n||u!=="hidden",children:I.jsx(TO,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>s("POINTER_LEAVE"))})})}),pK=y.forwardRef((e,t)=>{const n=xa(Tu,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),u=e.orientation==="horizontal",s=Xw(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=xa(Tu,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[u,s]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=yK(u.viewport,u.content),c={...r,sizes:u,onSizesChange:s,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function d(h,v){return rze(h,a.current,u,v)}return n==="horizontal"?I.jsx(XBe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,v=B$(h,u,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}}):n==="vertical"?I.jsx(QBe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,v=B$(h,u);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}}):null}),XBe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarXChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(gK,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),xK(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:ex(a.paddingLeft),paddingEnd:ex(a.paddingRight)}})}})}),QBe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarYChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(gK,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),xK(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:ex(a.paddingTop),paddingEnd:ex(a.paddingBottom)}})}})}),[JBe,vK]=cK(Tu),gK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...h}=e,v=xa(Tu,n),[g,m]=y.useState(null),b=Kt(t,F=>m(F)),w=y.useRef(null),x=y.useRef(""),S=v.viewport,A=r.content-r.viewport,E=Wr(c),C=Wr(s),T=Xw(d,10);function M(F){if(w.current){const U=F.clientX-w.current.left,H=F.clientY-w.current.top;l({x:U,y:H})}}return y.useEffect(()=>{const F=U=>{const H=U.target;g?.contains(H)&&E(U,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[S,g,A,E]),y.useEffect(C,[r,C]),yh(g,T),yh(v.content,T),I.jsx(JBe,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:Wr(o),onThumbPointerUp:Wr(a),onThumbPositionChange:C,onThumbPointerDown:Wr(u),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),w.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),M(F))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,F=>{const U=F.target;U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=x.current,v.viewport&&(v.viewport.style.scrollBehavior=""),w.current=null})})})}),Jb="ScrollAreaThumb",eze=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vK(Jb,e.__scopeScrollArea);return I.jsx(oi,{present:n||i.hasThumb,children:I.jsx(tze,{ref:t,...r})})}),tze=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=xa(Jb,n),a=vK(Jb,n),{onThumbPositionChange:u}=a,s=Kt(t,d=>a.onThumbChange(d)),l=y.useRef(void 0),c=Xw(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(c(),!l.current){const v=ize(d,u);l.current=v,u()}};return u(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,c,u]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),g=d.clientX-v.left,m=d.clientY-v.top;a.onThumbPointerDown({x:g,y:m})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});eze.displayName=Jb;var MO="ScrollAreaCorner",mK=y.forwardRef((e,t)=>{const n=xa(MO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(nze,{...e,ref:t}):null});mK.displayName=MO;var nze=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=xa(MO,n),[o,a]=y.useState(0),[u,s]=y.useState(0),l=!!(o&&u);return yh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),s(c)}),yh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ex(e){return e?parseInt(e,10):0}function yK(e,t){const n=e/t;return isNaN(n)?0:n}function Zw(e){const t=yK(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function rze(e,t,n,r="ltr"){const i=Zw(n),o=i/2,a=t||o,u=i-a,s=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-u,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return bK([s,l],d)(e)}function B$(e,t,n="ltr"){const r=Zw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,u=o-r,s=n==="ltr"?[0,a]:[a*-1,0],l=k6(e,s);return bK([0,a],[0,u])(l)}function bK(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function xK(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,u=n.top!==o.top;(a||u)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Xw(e,t){const n=Wr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function yh(e,t){const n=Wr(t);ri(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var rZe=fK,iZe=hK,oZe=mK,RO="Progress",DO=100,[oze,aZe]=mi(RO),[aze,uze]=oze(RO),wK=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=sze,...a}=e;(i||i===0)&&!z$(i)&&console.error(lze(`${i}`,"Progress"));const u=z$(i)?i:DO;r!==null&&!U$(r,u)&&console.error(cze(`${r}`,"Progress"));const s=U$(r,u)?r:null,l=tx(s)?o(s,u):void 0;return I.jsx(aze,{scope:n,value:s,max:u,children:I.jsx(pt.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":tx(s)?s:void 0,"aria-valuetext":l,role:"progressbar","data-state":CK(s,u),"data-value":s??void 0,"data-max":u,...a,ref:t})})});wK.displayName=RO;var _K="ProgressIndicator",SK=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=uze(_K,n);return I.jsx(pt.div,{"data-state":CK(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});SK.displayName=_K;function sze(e,t){return`${Math.round(e/t*100)}%`}function CK(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function tx(e){return typeof e=="number"}function z$(e){return tx(e)&&!isNaN(e)&&e>0}function U$(e,t){return tx(e)&&!isNaN(e)&&e<=t&&e>=0}function lze(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DO}\`.`}function cze(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: +}`;var Xt=dk(function(){return _n(z,ft+"return "+Ie).apply(n,X)});if(Xt.source=Ie,e_(Xt))throw Xt;return Xt}function xte(f){return En(f).toLowerCase()}function wte(f){return En(f).toUpperCase()}function _te(f,p,_){if(f=En(f),f&&(_||p===n))return wO(f);if(!f||!(p=xo(p)))return f;var O=_a(f),R=_a(p),z=_O(O,R),X=SO(O,R)+1;return Fs(O,z,X).join("")}function Ste(f,p,_){if(f=En(f),f&&(_||p===n))return f.slice(0,EO(f)+1);if(!f||!(p=xo(p)))return f;var O=_a(f),R=SO(O,_a(p))+1;return Fs(O,0,R).join("")}function Cte(f,p,_){if(f=En(f),f&&(_||p===n))return f.replace(k,"");if(!f||!(p=xo(p)))return f;var O=_a(f),R=_O(O,_a(p));return Fs(O,R).join("")}function Ete(f,p){var _=U,O=H;if(sr(p)){var R="separator"in p?p.separator:R;_="length"in p?Yt(p.length):_,O="omission"in p?xo(p.omission):O}f=En(f);var z=f.length;if(xf(f)){var X=_a(f);z=X.length}if(_>=z)return f;var ae=_-wf(O);if(ae<1)return O;var fe=X?Fs(X,0,ae).join(""):f.slice(0,ae);if(R===n)return fe+O;if(X&&(ae+=fe.length-ae),t_(R)){if(f.slice(ae).search(R)){var Me,Re=fe;for(R.global||(R=m2(R.source,En(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?ae:Ie)}}else if(f.indexOf(xo(R),ae)!=ae){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+O}function Ate(f){return f=En(f),f&&wn.test(f)?f.replace(_t,tZ):f}var Pte=Of(function(f,p,_){return f+(_?" ":"")+p.toUpperCase()}),i_=h8("toUpperCase");function fk(f,p,_){return f=En(f),p=_?n:p,p===n?ZY(f)?iZ(f):zY(f):f.match(p)||[]}var dk=Jt(function(f,p){try{return yo(f,n,p)}catch(_){return e_(_)?_:new jt(_)}}),Ote=Fu(function(f,p){return qo(p,function(_){_=ou(_),Iu(f,_,Q2(f[_],f))}),f});function kte(f){var p=f==null?0:f.length,_=Et();return f=p?nr(f,function(O){if(typeof O[1]!="function")throw new Ko(a);return[_(O[0]),O[1]]}):[],Jt(function(O){for(var R=-1;++RB)return[];var _=ue,O=wi(f,ue);p=Et(p),f-=ue;for(var R=p2(O,p);++_0||p<0)?new ln(_):(f<0?_=_.takeRight(-f):f&&(_=_.drop(f)),p!==n&&(p=Yt(p),_=p<0?_.dropRight(-p):_.take(p-f)),_)},ln.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},ln.prototype.toArray=function(){return this.take(ue)},ru(ln.prototype,function(f,p){var _=/^(?:filter|find|map|reject)|While$/.test(p),O=/^(?:head|last)$/.test(p),R=L[O?"take"+(p=="last"?"Right":""):p],z=O||/^find/.test(p);R&&(L.prototype[p]=function(){var X=this.__wrapped__,ae=O?[1]:arguments,fe=X instanceof ln,Me=ae[0],Re=fe||Ut(X),Ie=function(nn){var hn=R.apply(L,Ms([nn],ae));return O&&et?hn[0]:hn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,Pt=z&&!et,Xt=fe&&!ft;if(!z&&Re){X=Xt?X:new ln(this);var Ot=f.apply(X,ae);return Ot.__actions__.push({func:vm,args:[Ie],thisArg:n}),new Go(Ot,et)}return Pt&&Xt?f.apply(this,ae):(Ot=this.thru(Ie),Pt?O?Ot.value()[0]:Ot.value():Ot)})}),qo(["pop","push","shift","sort","splice","unshift"],function(f){var p=zg[f],_=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",O=/^(?:pop|shift)$/.test(f);L.prototype[f]=function(){var R=arguments;if(O&&!this.__chain__){var z=this.value();return p.apply(Ut(z)?z:[],R)}return this[_](function(X){return p.apply(Ut(X)?X:[],R)})}}),ru(ln.prototype,function(f,p){var _=L[p];if(_){var O=_.name+"";kn.call(Ef,O)||(Ef[O]=[]),Ef[O].push({name:p,func:_})}}),Ef[sm(n,w).name]=[{name:"wrapper",func:n}],ln.prototype.clone=AZ,ln.prototype.reverse=PZ,ln.prototype.value=OZ,L.prototype.at=rJ,L.prototype.chain=iJ,L.prototype.commit=oJ,L.prototype.next=aJ,L.prototype.plant=sJ,L.prototype.reverse=lJ,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=cJ,L.prototype.first=L.prototype.head,Jh&&(L.prototype[Jh]=uJ),L},_f=oZ();Kl?((Kl.exports=_f)._=_f,a2._=_f):si._=_f}).call(ua)})(Jb,Jb.exports);var rZe=Jb.exports;function GBe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var TP="ScrollArea",[dK,iZe]=mi(TP),[YBe,xa]=dK(TP),hK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[u,s]=y.useState(null),[l,c]=y.useState(null),[d,h]=y.useState(null),[v,g]=y.useState(null),[m,b]=y.useState(null),[w,x]=y.useState(0),[S,A]=y.useState(0),[E,C]=y.useState(!1),[T,M]=y.useState(!1),F=Kt(t,H=>s(H)),U=hg(i);return I.jsx(YBe,{scope:n,type:r,dir:U,scrollHideDelay:o,scrollArea:u,viewport:l,onViewportChange:c,content:d,onContentChange:h,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:A,children:I.jsx(pt.div,{dir:U,...a,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});hK.displayName=TP;var pK="ScrollAreaViewport",vK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=xa(pK,n),u=y.useRef(null),s=Kt(t,u,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});vK.displayName=pK;var Tu="ScrollAreaScrollbar",ZBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,u=e.orientation==="horizontal";return y.useEffect(()=>(u?o(!0):a(!0),()=>{u?o(!1):a(!1)}),[u,o,a]),i.type==="hover"?I.jsx(XBe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(QBe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(gK,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(MP,{...r,ref:t}):null});ZBe.displayName=Tu;var XBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const u=i.scrollArea;let s=0;if(u){const l=()=>{window.clearTimeout(s),a(!0)},c=()=>{s=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",l),u.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),u.removeEventListener("pointerenter",l),u.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(gK,{"data-state":o?"visible":"hidden",...r,ref:t})})}),QBe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xa(Tu,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Xw(()=>s("SCROLL_END"),100),[u,s]=GBe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const l=window.setTimeout(()=>s("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[u,i.scrollHideDelay,s]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let d=l[c];const h=()=>{const v=l[c];d!==v&&(s("SCROLL"),a()),d=v};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,s,a]),I.jsx(Gr,{present:n||u!=="hidden",children:I.jsx(MP,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>s("POINTER_LEAVE"))})})}),gK=y.forwardRef((e,t)=>{const n=xa(Tu,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),u=e.orientation==="horizontal",s=Xw(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=xa(Tu,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[u,s]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=xK(u.viewport,u.content),c={...r,sizes:u,onSizesChange:s,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function d(h,v){return oze(h,a.current,u,v)}return n==="horizontal"?I.jsx(JBe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,v=z$(h,u,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}}):n==="vertical"?I.jsx(eze,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,v=z$(h,u);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}}):null}),JBe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarXChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(yK,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),_K(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:tx(a.paddingLeft),paddingEnd:tx(a.paddingRight)}})}})}),eze=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=xa(Tu,e.__scopeScrollArea),[a,u]=y.useState(),s=y.useRef(null),l=Kt(t,s,o.onScrollbarYChange);return y.useEffect(()=>{s.current&&u(getComputedStyle(s.current))},[s]),I.jsx(yK,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zw(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),_K(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:tx(a.paddingTop),paddingEnd:tx(a.paddingBottom)}})}})}),[tze,mK]=dK(Tu),yK=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...h}=e,v=xa(Tu,n),[g,m]=y.useState(null),b=Kt(t,F=>m(F)),w=y.useRef(null),x=y.useRef(""),S=v.viewport,A=r.content-r.viewport,E=Wr(c),C=Wr(s),T=Xw(d,10);function M(F){if(w.current){const U=F.clientX-w.current.left,H=F.clientY-w.current.top;l({x:U,y:H})}}return y.useEffect(()=>{const F=U=>{const H=U.target;g?.contains(H)&&E(U,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[S,g,A,E]),y.useEffect(C,[r,C]),yh(g,T),yh(v.content,T),I.jsx(tze,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:Wr(o),onThumbPointerUp:Wr(a),onThumbPositionChange:C,onThumbPointerDown:Wr(u),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),w.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),M(F))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,F=>{const U=F.target;U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=x.current,v.viewport&&(v.viewport.style.scrollBehavior=""),w.current=null})})})}),ex="ScrollAreaThumb",nze=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mK(ex,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(rze,{ref:t,...r})})}),rze=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=xa(ex,n),a=mK(ex,n),{onThumbPositionChange:u}=a,s=Kt(t,d=>a.onThumbChange(d)),l=y.useRef(void 0),c=Xw(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(c(),!l.current){const v=aze(d,u);l.current=v,u()}};return u(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,c,u]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),g=d.clientX-v.left,m=d.clientY-v.top;a.onThumbPointerDown({x:g,y:m})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});nze.displayName=ex;var RP="ScrollAreaCorner",bK=y.forwardRef((e,t)=>{const n=xa(RP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(ize,{...e,ref:t}):null});bK.displayName=RP;var ize=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=xa(RP,n),[o,a]=y.useState(0),[u,s]=y.useState(0),l=!!(o&&u);return yh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),s(c)}),yh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tx(e){return e?parseInt(e,10):0}function xK(e,t){const n=e/t;return isNaN(n)?0:n}function Zw(e){const t=xK(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function oze(e,t,n,r="ltr"){const i=Zw(n),o=i/2,a=t||o,u=i-a,s=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-u,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return wK([s,l],d)(e)}function z$(e,t,n="ltr"){const r=Zw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,u=o-r,s=n==="ltr"?[0,a]:[a*-1,0],l=k6(e,s);return wK([0,a],[0,u])(l)}function wK(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function _K(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,u=n.top!==o.top;(a||u)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Xw(e,t){const n=Wr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function yh(e,t){const n=Wr(t);ii(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var oZe=hK,aZe=vK,uZe=bK,DP="Progress",$P=100,[uze,sZe]=mi(DP),[sze,lze]=uze(DP),SK=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=cze,...a}=e;(i||i===0)&&!U$(i)&&console.error(fze(`${i}`,"Progress"));const u=U$(i)?i:$P;r!==null&&!W$(r,u)&&console.error(dze(`${r}`,"Progress"));const s=W$(r,u)?r:null,l=nx(s)?o(s,u):void 0;return I.jsx(sze,{scope:n,value:s,max:u,children:I.jsx(pt.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":nx(s)?s:void 0,"aria-valuetext":l,role:"progressbar","data-state":AK(s,u),"data-value":s??void 0,"data-max":u,...a,ref:t})})});SK.displayName=DP;var CK="ProgressIndicator",EK=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=lze(CK,n);return I.jsx(pt.div,{"data-state":AK(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});EK.displayName=CK;function cze(e,t){return`${Math.round(e/t*100)}%`}function AK(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function nx(e){return typeof e=="number"}function U$(e){return nx(e)&&!isNaN(e)&&e>0}function W$(e,t){return nx(e)&&!isNaN(e)&&e<=t&&e>=0}function fze(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${$P}\`.`}function dze(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - - less than the value passed to \`max\` (or ${DO} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${$P} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var uZe=wK,sZe=SK,fze="Separator",W$="horizontal",dze=["horizontal","vertical"],EK=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=W$,...i}=e,o=hze(r)?r:W$,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...u,...i,ref:t})});EK.displayName=fze;function hze(e){return dze.includes(e)}var lZe=EK,$O="Switch",[pze,cZe]=mi($O),[vze,gze]=pze($O),AK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,S=>v(S)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l});return I.jsxs(vze,{scope:n,checked:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":kK(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onClick:Ye(e.onClick,S=>{x(A=>!A),b&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})}),b&&I.jsx(mze,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"}})]})});AK.displayName=$O;var OK="SwitchThumb",PK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=gze(OK,n);return I.jsx(pt.span,{"data-state":kK(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});PK.displayName=OK;var mze=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=hO(n),u=jA(t);return y.useEffect(()=>{const s=o.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const h=new Event("click",{bubbles:r});d.call(s,n),s.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function kK(e){return e?"checked":"unchecked"}var fZe=AK,dZe=PK;/** +Defaulting to \`null\`.`}var lZe=SK,cZe=EK,hze="Separator",V$="horizontal",pze=["horizontal","vertical"],PK=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=V$,...i}=e,o=vze(r)?r:V$,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...u,...i,ref:t})});PK.displayName=hze;function vze(e){return pze.includes(e)}var fZe=PK,IP="Switch",[gze,dZe]=mi(IP),[mze,yze]=gze(IP),OK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,S=>v(S)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l});return I.jsxs(mze,{scope:n,checked:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":MK(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onClick:Ye(e.onClick,S=>{x(A=>!A),b&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})}),b&&I.jsx(bze,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"}})]})});OK.displayName=IP;var kK="SwitchThumb",TK=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=yze(kK,n);return I.jsx(pt.span,{"data-state":MK(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});TK.displayName=kK;var bze=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=pP(n),u=jA(t);return y.useEffect(()=>{const s=o.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const h=new Event("click",{bubbles:r});d.call(s,n),s.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function MK(e){return e?"checked":"unchecked"}var hZe=OK,pZe=TK;/** * table-core * * Copyright (c) TanStack @@ -481,10 +481,10 @@ Defaulting to \`null\`.`}var uZe=wK,sZe=SK,fze="Separator",W$="horizontal",dze=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ul(e,t){return typeof e=="function"?e(t):e}function zo(e,t){return n=>{t.setState(r=>({...r,[e]:ul(n,r[e])}))}}function Qw(e){return e instanceof Function}function yze(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function bze(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const u=e(o);if(!(u.length!==r.length||u.some((c,d)=>r[d]!==c)))return i;r=u;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-l)*100)/100,h=d/16,v=(g,m)=>{for(g=String(g);g.length{t.setState(r=>({...r,[e]:ul(n,r[e])}))}}function Qw(e){return e instanceof Function}function xze(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function wze(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const u=e(o);if(!(u.length!==r.length||u.some((c,d)=>r[d]!==c)))return i;r=u;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-l)*100)/100,h=d/16,v=(g,m)=>{for(g=String(g);g.length{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function xze(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,u,s,l)=>({table:a,column:u,row:s,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function wze(e,t,n,r){var i,o;const u={...e._getDefaultColumnDef(),...t},s=u.accessorKey;let l=(i=(o=u.id)!=null?o:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:s&&(s.includes(".")?c=h=>{let v=h;for(const m of s.split(".")){var g;v=(g=v)==null?void 0:g[m]}return v}:c=h=>h[u.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(v=>v.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var v;if((v=d.columns)!=null&&v.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return h(g)}return[d]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const Ei="debugHeaders";function V$(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(u),a.push(s)};return u(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const _ze={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const u=(o=r?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?o:[],s=(a=i?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],l=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return hy(t,[...u,...l,...s],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),hy(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return hy(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return hy(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,u,s,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(s=(l=r[0])==null?void 0:l.headers)!=null?s:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function hy(e,t,n,r){var i,o;let a=0;const u=function(h,v){v===void 0&&(v=1),a=Math.max(a,v),h.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&u(g.columns,v+1)},0)};u(e);let s=[];const l=(h,v)=>{const g={depth:v,id:[r,`${v}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const w=[...m].reverse()[0],x=b.column.depth===g.depth;let S,A=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,A=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=V$(n,S,{id:[r,v,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${m.filter(C=>C.column===S).length}`:void 0,depth:v,index:m.length});E.subHeaders.push(b),m.push(E)}g.headers.push(b),b.headerGroup=g}),s.push(g),v>0&&l(m,v-1)},c=t.map((h,v)=>V$(n,h,{depth:a,index:v}));l(c,a-1),s.reverse();const d=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,w=[0];g.subHeaders&&g.subHeaders.length?(w=[],d(g.subHeaders).forEach(S=>{let{colSpan:A,rowSpan:E}=S;m+=A,w.push(E)})):m=1;const x=Math.min(...w);return b=b+x,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return d((i=(o=s[0])==null?void 0:o.headers)!=null?i:[]),s}const IO=(e,t,n,r,i,o,a)=>{let u={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(u._valuesCache.hasOwnProperty(s))return u._valuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return u._valuesCache[s]=l.accessorFn(u.original,r),u._valuesCache[s]},getUniqueValues:s=>{if(u._uniqueValuesCache.hasOwnProperty(s))return u._uniqueValuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(u._uniqueValuesCache[s]=l.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[s]):(u._uniqueValuesCache[s]=[u.getValue(s)],u._uniqueValuesCache[s])},renderValue:s=>{var l;return(l=u.getValue(s))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>bze(u.subRows,s=>s.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let s=[],l=u;for(;;){const c=l.getParentRow();if(!c)break;s.push(c),l=c}return s.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],s=>s.map(l=>xze(e,u,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[u.getAllCells()],s=>s.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let s=0;s{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},TK=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};TK.autoRemove=e=>Ha(e);const MK=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};MK.autoRemove=e=>Ha(e);const RK=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};RK.autoRemove=e=>Ha(e);const DK=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};DK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const $K=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});$K.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const IK=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});IK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const NK=(e,t,n)=>e.getValue(t)===n;NK.autoRemove=e=>Ha(e);const FK=(e,t,n)=>e.getValue(t)==n;FK.autoRemove=e=>Ha(e);const NO=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};NO.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const u=o;o=a,a=u}return[o,a]};NO.autoRemove=e=>Ha(e)||Ha(e[0])&&Ha(e[1]);const Zu={includesString:TK,includesStringSensitive:MK,equalsString:RK,arrIncludes:DK,arrIncludesAll:$K,arrIncludesSome:IK,equals:NK,weakEquals:FK,inNumberRange:NO};function Ha(e){return e==null||e===""}const Cze={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:zo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Zu.includesString:typeof r=="number"?Zu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Zu.equals:Array.isArray(r)?Zu.arrIncludes:Zu.weakEquals},e.getFilterFn=()=>{var n,r;return Qw(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Zu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=ul(n,o?o.value:void 0);if(H$(i,a,e)){var u;return(u=r?.filter(c=>c.id!==e.id))!=null?u:[]}const s={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?s:c))!=null?l:[]}return r!=null&&r.length?[...r,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=ul(t,i))==null?void 0:o.filter(a=>{const u=n.find(s=>s.id===a.id);if(u){const s=u.getFilterFn();if(H$(s,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function H$(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Eze=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),Aze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Oze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},Pze=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},Tze=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!yze(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Mze=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Rze=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Dze=(e,t)=>t.length,QS={sum:Eze,min:Aze,max:Oze,extent:Pze,mean:kze,median:Tze,unique:Mze,uniqueCount:Rze,count:Dze},$ze={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:zo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return QS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return QS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:QS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function Ize(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const Nze={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:zo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[y0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=y0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=y0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],u=[...i];for(;u.length&&a.length;){const s=a.shift(),l=u.findIndex(c=>c.id===s);l>-1&&o.push(u.splice(l,1)[0])}o=[...o,...u]}return Ize(o,n,r)},Ct(e.options,"debugTable"))}},JS=()=>({left:[],right:[]}),Fze={getInitialState:e=>({columnPinning:JS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:zo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var u,s;return{left:((u=i?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=i?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?JS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:JS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},py={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},e3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Lze={getDefaultColumnDef:()=>py,getInitialState:e=>({columnSizing:{},columnSizingInfo:e3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:zo("columnSizing",e),onColumnSizingInfoChange:zo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:py.minSize,(r=o??e.columnDef.size)!=null?r:py.size),(i=e.columnDef.maxSize)!=null?i:py.maxSize)},e.getStart=St(n=>[n,y0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,y0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),t3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],s=t3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var A,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,T=(x-((A=S?.startOffset)!=null?A:0))*C,M=Math.max(T/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(F=>{let[U,H]=F;l[U]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:T,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},d=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},v=n||typeof document<"u"?document:null,g={moveHandler:w=>d(w.clientX),upHandler:w=>{v?.removeEventListener("mousemove",g.moveHandler),v?.removeEventListener("mouseup",g.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var x;v?.removeEventListener("touchmove",m.moveHandler),v?.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=jze()?{passive:!1}:!1;t3(o)?(v?.addEventListener("touchmove",m.moveHandler,b),v?.addEventListener("touchend",m.upHandler,b)):(v?.addEventListener("mousemove",g.moveHandler,b),v?.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?e3():(n=e.initialState.columnSizingInfo)!=null?n:e3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let vy=null;function jze(){if(typeof vy=="boolean")return vy;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return vy=e,vy}function t3(e){return e.type==="touchstart"}const Bze={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:zo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function y0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const zze={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Uze={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:zo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Zu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Qw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Zu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Wze={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:zo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:u,...s}=a;return s}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},F6=0,L6=10,n3=()=>({pageIndex:F6,pageSize:L6}),Vze={getInitialState:e=>({...e,pagination:{...n3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:zo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>ul(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?n3():(i=e.initialState.pagination)!=null?i:n3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=ul(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?F6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:F6)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?L6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:L6)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,ul(r,i.pageSize)),a=i.pageSize*i.pageIndex,u=Math.floor(a/o);return{...i,pageIndex:u,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=ul(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},r3=()=>({top:[],bottom:[]}),Hze={getInitialState:e=>({rowPinning:r3(),...e}),getDefaultOptions:e=>({onRowPinningChange:zo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(s=>{let{id:l}=s;return l}):[],a=i?e.getParentRows().map(s=>{let{id:l}=s;return l}):[],u=new Set([...a,e.id,...o]);t.setRowPinning(s=>{var l,c;if(n==="bottom"){var d,h;return{top:((d=s?.top)!=null?d:[]).filter(m=>!(u!=null&&u.has(m))),bottom:[...((h=s?.bottom)!=null?h:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)]}}if(n==="top"){var v,g;return{top:[...((v=s?.top)!=null?v:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)],bottom:((g=s?.bottom)!=null?g:[]).filter(m=>!(u!=null&&u.has(m)))}}return{top:((l=s?.top)!=null?l:[]).filter(m=>!(u!=null&&u.has(m))),bottom:((c=s?.bottom)!=null?c:[]).filter(m=>!(u!=null&&u.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:u}=a;return u});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?r3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:r3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(a=>t.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},qze={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:zo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{j6(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const u={...o};return j6(u,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return FO(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},j6=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>j6(e,u.id,n,r,i))};function i3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,u){return a.map(s=>{var l;const c=FO(s,n);if(c&&(r.push(s),i[s.id]=s),(l=s.subRows)!=null&&l.length&&(s={...s,subRows:o(s.subRows)}),c)return s}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function FO(e,t){var n;return(n=t[e.id])!=null?n:!1}function B6(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(FO(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const u=B6(a,t);u==="all"?o=!0:(u==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const z6=/([0-9]+)/gm,Kze=(e,t,n)=>LK(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Gze=(e,t,n)=>LK(Ml(e.getValue(n)),Ml(t.getValue(n))),Yze=(e,t,n)=>LO(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Zze=(e,t,n)=>LO(Ml(e.getValue(n)),Ml(t.getValue(n))),Xze=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rLO(e.getValue(n),t.getValue(n));function LO(e,t){return e===t?0:e>t?1:-1}function Ml(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function LK(e,t){const n=e.split(z6).filter(Boolean),r=t.split(z6).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),u=parseInt(o,10),s=[a,u].sort();if(isNaN(s[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return n.length-r.length}const jp={alphanumeric:Kze,alphanumericCaseSensitive:Gze,text:Yze,textCaseSensitive:Zze,datetime:Xze,basic:Qze},Jze={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:zo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return jp.datetime;if(typeof o=="string"&&(r=!0,o.split(z6).length>1))return jp.alphanumeric}return r?jp.text:jp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:jp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const u=a?.find(v=>v.id===e.id),s=a?.findIndex(v=>v.id===e.id);let l=[],c,d=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?c="toggle":c="add":a!=null&&a.length&&s!==a.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:d}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(v=>v.id===e.id?{...v,desc:d}:v):c==="remove"?l=a.filter(v=>v.id!==e.id):l=[{id:e.id,desc:d}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},eUe=[_ze,Bze,Nze,Fze,Sze,Cze,zze,Uze,Jze,$ze,Wze,Vze,Hze,qze,Lze];function tUe(e){var t,n;const r=[...eUe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,v)=>Object.assign(h,v.getDefaultOptions==null?void 0:v.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let s={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var v;s=(v=h.getInitialState==null?void 0:h.getInitialState(s))!=null?v:s});const l=[];let c=!1;const d={_features:r,options:{...o,...e},initialState:s,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const v=ul(h,i.options);i.options=a(v)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,v,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,v,g))!=null?m:`${g?[g.id,v].join("."):v}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,v)=>{let g=(v?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw new Error;return g},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var v;return h=(v=h)!=null?v:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,b;return(m=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const v=function(g,m,b){return b===void 0&&(b=0),g.map(w=>{const x=wze(i,w,b,m),S=w;return x.columns=S.columns?v(S.columns,x,b+1):[],x})};return v(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(v=>v.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((v,g)=>(v[g.id]=g,v),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,v)=>{let g=h.flatMap(m=>m.getLeafColumns());return v(g)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,d);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const u=[];for(let l=0;le._autoResetPageIndex()))}function nUe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function jK(e,t,n){return n.options.filterFromLeafRows?rUe(e,t,n):iUe(e,t,n)}function rUe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(s,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(u=>u.id).filter(u=>u!==t),i?"__global__":void 0].filter(Boolean),a=u=>{for(let s=0;sSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var v;const g=e.getColumn(h.id);if(!g)return;const m=g.getFilterFn();m&&i.push({id:h.id,filterFn:m,resolvedValue:(v=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?v:h.value})});const a=(n??[]).map(h=>h.id),u=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&u&&s.length&&(a.push("__global__"),s.forEach(h=>{var v;o.push({id:h.id,filterFn:u,resolvedValue:(v=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?v:r})}));let l,c;for(let h=0;h{v.columnFiltersMeta[m]=b})}if(o.length){for(let g=0;g{v.columnFiltersMeta[m]=b})){v.columnFilters.__global__=!0;break}}v.columnFilters.__global__!==!0&&(v.columnFilters.__global__=!1)}}const d=h=>{for(let v=0;ve._autoResetPageIndex()))}function mZe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:u,rowsById:s}=r;const l=i*o,c=l+i;a=a.slice(l,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:u,rowsById:s}:d=nUe({rows:a,flatRows:u,rowsById:s}),d.flatRows=[];const h=v=>{d.flatRows.push(v),v.subRows.length&&v.subRows.forEach(h)};return d.rows.forEach(h),d},Ct(t.options,"debugTable"))}function yZe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(s=>{var l;return(l=e.getColumn(s.id))==null?void 0:l.getCanSort()}),a={};o.forEach(s=>{const l=e.getColumn(s.id);l&&(a[s.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const u=s=>{const l=s.map(c=>({...c}));return l.sort((c,d)=>{for(let v=0;v{var d;i.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=u(c.subRows))}),l};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Ct(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function _ze(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,u,s,l)=>({table:a,column:u,row:s,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function Sze(e,t,n,r){var i,o;const u={...e._getDefaultColumnDef(),...t},s=u.accessorKey;let l=(i=(o=u.id)!=null?o:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:s&&(s.includes(".")?c=h=>{let v=h;for(const m of s.split(".")){var g;v=(g=v)==null?void 0:g[m]}return v}:c=h=>h[u.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(v=>v.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var v;if((v=d.columns)!=null&&v.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return h(g)}return[d]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const Ei="debugHeaders";function H$(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(u),a.push(s)};return u(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const Cze={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const u=(o=r?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?o:[],s=(a=i?.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],l=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return py(t,[...u,...l,...s],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),py(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return py(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return py(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,u,s,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(s=(l=r[0])==null?void 0:l.headers)!=null?s:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function py(e,t,n,r){var i,o;let a=0;const u=function(h,v){v===void 0&&(v=1),a=Math.max(a,v),h.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&u(g.columns,v+1)},0)};u(e);let s=[];const l=(h,v)=>{const g={depth:v,id:[r,`${v}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const w=[...m].reverse()[0],x=b.column.depth===g.depth;let S,A=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,A=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=H$(n,S,{id:[r,v,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${m.filter(C=>C.column===S).length}`:void 0,depth:v,index:m.length});E.subHeaders.push(b),m.push(E)}g.headers.push(b),b.headerGroup=g}),s.push(g),v>0&&l(m,v-1)},c=t.map((h,v)=>H$(n,h,{depth:a,index:v}));l(c,a-1),s.reverse();const d=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,w=[0];g.subHeaders&&g.subHeaders.length?(w=[],d(g.subHeaders).forEach(S=>{let{colSpan:A,rowSpan:E}=S;m+=A,w.push(E)})):m=1;const x=Math.min(...w);return b=b+x,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return d((i=(o=s[0])==null?void 0:o.headers)!=null?i:[]),s}const NP=(e,t,n,r,i,o,a)=>{let u={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(u._valuesCache.hasOwnProperty(s))return u._valuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return u._valuesCache[s]=l.accessorFn(u.original,r),u._valuesCache[s]},getUniqueValues:s=>{if(u._uniqueValuesCache.hasOwnProperty(s))return u._uniqueValuesCache[s];const l=e.getColumn(s);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(u._uniqueValuesCache[s]=l.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[s]):(u._uniqueValuesCache[s]=[u.getValue(s)],u._uniqueValuesCache[s])},renderValue:s=>{var l;return(l=u.getValue(s))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>wze(u.subRows,s=>s.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let s=[],l=u;for(;;){const c=l.getParentRow();if(!c)break;s.push(c),l=c}return s.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],s=>s.map(l=>_ze(e,u,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[u.getAllCells()],s=>s.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let s=0;s{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},RK=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};RK.autoRemove=e=>Ha(e);const DK=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};DK.autoRemove=e=>Ha(e);const $K=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};$K.autoRemove=e=>Ha(e);const IK=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};IK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const NK=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});NK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const FK=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});FK.autoRemove=e=>Ha(e)||!(e!=null&&e.length);const LK=(e,t,n)=>e.getValue(t)===n;LK.autoRemove=e=>Ha(e);const jK=(e,t,n)=>e.getValue(t)==n;jK.autoRemove=e=>Ha(e);const FP=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};FP.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const u=o;o=a,a=u}return[o,a]};FP.autoRemove=e=>Ha(e)||Ha(e[0])&&Ha(e[1]);const Zu={includesString:RK,includesStringSensitive:DK,equalsString:$K,arrIncludes:IK,arrIncludesAll:NK,arrIncludesSome:FK,equals:LK,weakEquals:jK,inNumberRange:FP};function Ha(e){return e==null||e===""}const Aze={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:zo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Zu.includesString:typeof r=="number"?Zu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Zu.equals:Array.isArray(r)?Zu.arrIncludes:Zu.weakEquals},e.getFilterFn=()=>{var n,r;return Qw(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Zu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=ul(n,o?o.value:void 0);if(q$(i,a,e)){var u;return(u=r?.filter(c=>c.id!==e.id))!=null?u:[]}const s={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?s:c))!=null?l:[]}return r!=null&&r.length?[...r,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=ul(t,i))==null?void 0:o.filter(a=>{const u=n.find(s=>s.id===a.id);if(u){const s=u.getFilterFn();if(q$(s,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function q$(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Pze=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),Oze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},kze=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},Tze=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},Rze=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!xze(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Dze=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),$ze=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Ize=(e,t)=>t.length,QS={sum:Pze,min:Oze,max:kze,extent:Tze,mean:Mze,median:Rze,unique:Dze,uniqueCount:$ze,count:Ize},Nze={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:zo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return QS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return QS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:QS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function Fze(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const Lze={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:zo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[b0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=b0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=b0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],u=[...i];for(;u.length&&a.length;){const s=a.shift(),l=u.findIndex(c=>c.id===s);l>-1&&o.push(u.splice(l,1)[0])}o=[...o,...u]}return Fze(o,n,r)},Ct(e.options,"debugTable"))}},JS=()=>({left:[],right:[]}),jze={getInitialState:e=>({columnPinning:JS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:zo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var u,s;return{left:((u=i?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=i?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?JS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:JS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},vy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},e3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Bze={getDefaultColumnDef:()=>vy,getInitialState:e=>({columnSizing:{},columnSizingInfo:e3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:zo("columnSizing",e),onColumnSizingInfoChange:zo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:vy.minSize,(r=o??e.columnDef.size)!=null?r:vy.size),(i=e.columnDef.maxSize)!=null?i:vy.maxSize)},e.getStart=St(n=>[n,b0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,b0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),t3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],s=t3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var A,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,T=(x-((A=S?.startOffset)!=null?A:0))*C,M=Math.max(T/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(F=>{let[U,H]=F;l[U]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:T,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},d=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},v=n||typeof document<"u"?document:null,g={moveHandler:w=>d(w.clientX),upHandler:w=>{v?.removeEventListener("mousemove",g.moveHandler),v?.removeEventListener("mouseup",g.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var x;v?.removeEventListener("touchmove",m.moveHandler),v?.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=zze()?{passive:!1}:!1;t3(o)?(v?.addEventListener("touchmove",m.moveHandler,b),v?.addEventListener("touchend",m.upHandler,b)):(v?.addEventListener("mousemove",g.moveHandler,b),v?.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?e3():(n=e.initialState.columnSizingInfo)!=null?n:e3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let gy=null;function zze(){if(typeof gy=="boolean")return gy;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return gy=e,gy}function t3(e){return e.type==="touchstart"}const Uze={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:zo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function b0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Wze={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Vze={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:zo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Zu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Qw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Zu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Hze={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:zo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:u,...s}=a;return s}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},F6=0,L6=10,n3=()=>({pageIndex:F6,pageSize:L6}),qze={getInitialState:e=>({...e,pagination:{...n3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:zo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>ul(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?n3():(i=e.initialState.pagination)!=null?i:n3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=ul(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?F6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:F6)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?L6:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:L6)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,ul(r,i.pageSize)),a=i.pageSize*i.pageIndex,u=Math.floor(a/o);return{...i,pageIndex:u,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=ul(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},r3=()=>({top:[],bottom:[]}),Kze={getInitialState:e=>({rowPinning:r3(),...e}),getDefaultOptions:e=>({onRowPinningChange:zo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(s=>{let{id:l}=s;return l}):[],a=i?e.getParentRows().map(s=>{let{id:l}=s;return l}):[],u=new Set([...a,e.id,...o]);t.setRowPinning(s=>{var l,c;if(n==="bottom"){var d,h;return{top:((d=s?.top)!=null?d:[]).filter(m=>!(u!=null&&u.has(m))),bottom:[...((h=s?.bottom)!=null?h:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)]}}if(n==="top"){var v,g;return{top:[...((v=s?.top)!=null?v:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)],bottom:((g=s?.bottom)!=null?g:[]).filter(m=>!(u!=null&&u.has(m)))}}return{top:((l=s?.top)!=null?l:[]).filter(m=>!(u!=null&&u.has(m))),bottom:((c=s?.bottom)!=null?c:[]).filter(m=>!(u!=null&&u.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(u=>r?.includes(u)),a=n.some(u=>i?.includes(u));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:u}=a;return u});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?r3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:r3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(a=>t.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},Gze={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:zo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{j6(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?i3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const u={...o};return j6(u,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return LP(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return B6(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},j6=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>j6(e,u.id,n,r,i))};function i3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,u){return a.map(s=>{var l;const c=LP(s,n);if(c&&(r.push(s),i[s.id]=s),(l=s.subRows)!=null&&l.length&&(s={...s,subRows:o(s.subRows)}),c)return s}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function LP(e,t){var n;return(n=t[e.id])!=null?n:!1}function B6(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(LP(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const u=B6(a,t);u==="all"?o=!0:(u==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const z6=/([0-9]+)/gm,Yze=(e,t,n)=>BK(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Zze=(e,t,n)=>BK(Ml(e.getValue(n)),Ml(t.getValue(n))),Xze=(e,t,n)=>jP(Ml(e.getValue(n)).toLowerCase(),Ml(t.getValue(n)).toLowerCase()),Qze=(e,t,n)=>jP(Ml(e.getValue(n)),Ml(t.getValue(n))),Jze=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rjP(e.getValue(n),t.getValue(n));function jP(e,t){return e===t?0:e>t?1:-1}function Ml(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function BK(e,t){const n=e.split(z6).filter(Boolean),r=t.split(z6).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),u=parseInt(o,10),s=[a,u].sort();if(isNaN(s[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return n.length-r.length}const Bp={alphanumeric:Yze,alphanumericCaseSensitive:Zze,text:Xze,textCaseSensitive:Qze,datetime:Jze,basic:eUe},tUe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:zo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Bp.datetime;if(typeof o=="string"&&(r=!0,o.split(z6).length>1))return Bp.alphanumeric}return r?Bp.text:Bp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Qw(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Bp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const u=a?.find(v=>v.id===e.id),s=a?.findIndex(v=>v.id===e.id);let l=[],c,d=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?c="toggle":c="add":a!=null&&a.length&&s!==a.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:d}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(v=>v.id===e.id?{...v,desc:d}:v):c==="remove"?l=a.filter(v=>v.id!==e.id):l=[{id:e.id,desc:d}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},nUe=[Cze,Uze,Lze,jze,Eze,Aze,Wze,Vze,tUe,Nze,Hze,qze,Kze,Gze,Bze];function rUe(e){var t,n;const r=[...nUe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,v)=>Object.assign(h,v.getDefaultOptions==null?void 0:v.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let s={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var v;s=(v=h.getInitialState==null?void 0:h.getInitialState(s))!=null?v:s});const l=[];let c=!1;const d={_features:r,options:{...o,...e},initialState:s,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const v=ul(h,i.options);i.options=a(v)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,v,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,v,g))!=null?m:`${g?[g.id,v].join("."):v}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,v)=>{let g=(v?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw new Error;return g},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var v;return h=(v=h)!=null?v:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,b;return(m=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const v=function(g,m,b){return b===void 0&&(b=0),g.map(w=>{const x=Sze(i,w,b,m),S=w;return x.columns=S.columns?v(S.columns,x,b+1):[],x})};return v(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(v=>v.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((v,g)=>(v[g.id]=g,v),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,v)=>{let g=h.flatMap(m=>m.getLeafColumns());return v(g)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,d);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const u=[];for(let l=0;le._autoResetPageIndex()))}function iUe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function zK(e,t,n){return n.options.filterFromLeafRows?oUe(e,t,n):aUe(e,t,n)}function oUe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(s,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(u=>u.id).filter(u=>u!==t),i?"__global__":void 0].filter(Boolean),a=u=>{for(let s=0;sSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var v;const g=e.getColumn(h.id);if(!g)return;const m=g.getFilterFn();m&&i.push({id:h.id,filterFn:m,resolvedValue:(v=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?v:h.value})});const a=(n??[]).map(h=>h.id),u=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&u&&s.length&&(a.push("__global__"),s.forEach(h=>{var v;o.push({id:h.id,filterFn:u,resolvedValue:(v=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?v:r})}));let l,c;for(let h=0;h{v.columnFiltersMeta[m]=b})}if(o.length){for(let g=0;g{v.columnFiltersMeta[m]=b})){v.columnFilters.__global__=!0;break}}v.columnFilters.__global__!==!0&&(v.columnFilters.__global__=!1)}}const d=h=>{for(let v=0;ve._autoResetPageIndex()))}function bZe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:u,rowsById:s}=r;const l=i*o,c=l+i;a=a.slice(l,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:u,rowsById:s}:d=iUe({rows:a,flatRows:u,rowsById:s}),d.flatRows=[];const h=v=>{d.flatRows.push(v),v.subRows.length&&v.subRows.forEach(h)};return d.rows.forEach(h),d},Ct(t.options,"debugTable"))}function xZe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(s=>{var l;return(l=e.getColumn(s.id))==null?void 0:l.getCanSort()}),a={};o.forEach(s=>{const l=e.getColumn(s.id);l&&(a[s.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const u=s=>{const l=s.map(c=>({...c}));return l.sort((c,d)=>{for(let v=0;v{var d;i.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=u(c.subRows))}),l};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack @@ -493,32 +493,32 @@ Defaulting to \`null\`.`}var uZe=wK,sZe=SK,fze="Separator",W$="horizontal",dze=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function bZe(e,t){return e?oUe(e)?y.createElement(e,t):e:null}function oUe(e){return aUe(e)||typeof e=="function"||uUe(e)}function aUe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function uUe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function xZe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:tUe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const BK=Object.freeze({left:0,top:0,width:16,height:16}),nx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jO=Object.freeze({...BK,...nx}),U6=Object.freeze({...jO,body:"",hidden:!1});function sUe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function q$(e,t){const n=sUe(e,t);for(const r in U6)r in nx?r in e&&!(r in n)&&(n[r]=nx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function lUe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const u=r[a]&&r[a].parent,s=u&&o(u);s&&(i[a]=[u].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function cUe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(u){o=q$(r[u]||i[u],o)}return a(t),n.forEach(a),q$(e,o)}function zK(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=lUe(e);for(const i in r){const o=r[i];o&&(t(i,cUe(e,i,o)),n.push(i))}return n}const fUe={provider:"",aliases:{},not_found:{},...BK};function o3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function UK(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!o3(e,fUe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!o3(o,U6))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!o3(o,U6))return null}return t}const WK=/^[a-z0-9]+(-[a-z0-9]+)*$/,Jw=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const u=i.pop(),s=i.pop(),l={provider:i.length>0?i[0]:r,prefix:s,name:u};return t&&!Vy(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Vy(u)?null:u}if(n&&r===""){const u={provider:r,prefix:"",name:o};return t&&!Vy(u,n)?null:u}return null},Vy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,K$=Object.create(null);function dUe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function rf(e,t){const n=K$[e]||(K$[e]=Object.create(null));return n[t]||(n[t]=dUe(e,t))}function BO(e,t){return UK(t)?zK(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function hUe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Vv=!1;function VK(e){return typeof e=="boolean"&&(Vv=e),Vv}function G$(e){const t=typeof e=="string"?Jw(e,!0,Vv):e;if(t){const n=rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function pUe(e,t){const n=Jw(e,!0,Vv);if(!n)return!1;const r=rf(n.provider,n.prefix);return t?hUe(r,n.name,t):(r.missing.add(n.name),!0)}function vUe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Vv&&!t&&!e.prefix){let i=!1;return UK(e)&&(e.prefix="",zK(e,(o,a)=>{pUe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Vy({provider:t,prefix:n,name:"a"}))return!1;const r=rf(t,n);return!!BO(r,e)}const HK=Object.freeze({width:null,height:null}),qK=Object.freeze({...HK,...nx}),gUe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mUe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Y$(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(gUe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=mUe.test(o);for(;;){if(a){const u=parseFloat(o);isNaN(u)?i.push(o):i.push(Math.ceil(u*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function yUe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function bUe(e,t){return e?""+e+""+t:t}function xUe(e,t,n){const r=yUe(e);return bUe(r.defs,t+r.content+n)}const wUe=e=>e==="unset"||e==="undefined"||e==="none";function _Ue(e,t){const n={...jO,...e},r={...qK,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],w=m.hFlip,x=m.vFlip;let S=m.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let A;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:A=i.height/2+i.top,b.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:A=i.width/2+i.left,b.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}S%2===1&&(i.left!==i.top&&(A=i.left,i.left=i.top,i.top=A),i.width!==i.height&&(A=i.width,i.width=i.height,i.height=A)),b.length&&(o=xUe(o,'',""))});const a=r.width,u=r.height,s=i.width,l=i.height;let c,d;a===null?(d=u===null?"1em":u==="auto"?l:u,c=Y$(d,s/l)):(c=a==="auto"?s:a,d=u===null?Y$(c,l/s):u==="auto"?l:u);const h={},v=(m,b)=>{wUe(b)||(h[m]=b.toString())};v("width",c),v("height",d);const g=[i.left,i.top,s,l];return h.viewBox=g.join(" "),{attributes:h,viewBox:g,body:o}}const SUe=/\sid="(\S+)"/g,CUe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let EUe=0;function AUe(e,t=CUe){const n=[];let r;for(;r=SUe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(EUe++).toString(),u=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const W6=Object.create(null);function OUe(e,t){W6[e]=t}function V6(e){return W6[e]||W6[""]}function zO(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const UO=Object.create(null),Bp=["https://api.simplesvg.com","https://api.unisvg.com"],Hy=[];for(;Bp.length>0;)Bp.length===1||Math.random()>.5?Hy.push(Bp.shift()):Hy.push(Bp.pop());UO[""]=zO({resources:["https://api.iconify.design"].concat(Hy)});function PUe(e,t){const n=zO(t);return n===null?!1:(UO[e]=n,!0)}function WO(e){return UO[e]}const kUe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Z$=kUe();function TUe(e,t){const n=WO(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function MUe(e){return e===404}const RUe=(e,t,n)=>{const r=[],i=TUe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,l)=>{u+=s.length+1,u>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},u=s.length),a.icons.push(s)}),r.push(a),r};function DUe(e){if(typeof e=="string"){const t=WO(e);if(t)return t.path}return"/"}const $Ue=(e,t,n)=>{if(!Z$){n("abort",424);return}let r=DUe(t.provider);switch(t.type){case"icons":{const o=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});r+=o+".json?"+s.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Z$(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(MUe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},IUe={prepare:RUe,send:$Ue};function NUe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,u=i.name,s=n[o]||(n[o]=Object.create(null)),l=s[a]||(s[a]=rf(o,a));let c;u in l.icons?c=t.loaded:a===""||l.missing.has(u)?c=t.missing:c=t.pending;const d={provider:o,prefix:a,name:u};c.push(d)}),t}function KK(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function FUe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,u=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const l=s.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==u&&(n||KK([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let LUe=0;function jUe(e,t,n){const r=LUe++,i=KK.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function BUe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?Jw(i,t,n):i;o&&r.push(o)}),r}var zUe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function UUe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const T=Math.floor(Math.random()*C.length);a.push(C[T]),C=C.slice(0,T).concat(C.slice(T+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const u=Date.now();let s="pending",l=0,c,d=null,h=[],v=[];typeof r=="function"&&v.push(r);function g(){d&&(clearTimeout(d),d=null)}function m(){s==="pending"&&(s="aborted"),g(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,T){T&&(v=[]),typeof C=="function"&&v.push(C)}function w(){return{startTime:u,payload:t,status:s,queriesSent:l,queriesPending:h.length,subscribe:b,abort:m}}function x(){s="failed",v.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function A(C,T,M){const F=T!=="success";switch(h=h.filter(U=>U!==C),s){case"pending":break;case"failed":if(F||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){c=M,x();return}if(F){c=M,h.length||(a.length?E():x());return}if(g(),S(),!e.random){const U=e.resources.indexOf(C.resource);U!==-1&&U!==e.index&&(e.index=U)}s="completed",v.forEach(U=>{U(M)})}function E(){if(s!=="pending")return;g();const C=a.shift();if(C===void 0){if(h.length){d=setTimeout(()=>{g(),s==="pending"&&(S(),x())},e.timeout);return}x();return}const T={status:"pending",resource:C,callback:(M,F)=>{A(T,M,F)}};h.push(T),l++,d=setTimeout(E,e.rotate),n(C,t,T.callback)}return setTimeout(E),w}function GK(e){const t={...zUe,...e};let n=[];function r(){n=n.filter(u=>u().status==="pending")}function i(u,s,l){const c=UUe(t,u,s,(d,h)=>{r(),l&&l(d,h)});return n.push(c),c}function o(u){return n.find(s=>u(s))||null}return{query:i,find:o,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:r}}function X$(){}const a3=Object.create(null);function WUe(e){if(!a3[e]){const t=WO(e);if(!t)return;const n=GK(t),r={config:t,redundancy:n};a3[e]=r}return a3[e]}function VUe(e,t,n){let r,i;if(typeof e=="string"){const o=V6(e);if(!o)return n(void 0,424),X$;i=o.send;const a=WUe(e);a&&(r=a.redundancy)}else{const o=zO(e);if(o){r=GK(o);const a=e.resources?e.resources[0]:"",u=V6(a);u&&(i=u.send)}}return!r||!i?(n(void 0,424),X$):r.query(t,i,n)().abort}const Q$="iconify2",Hv="iconify",YK=Hv+"-count",J$=Hv+"-version",ZK=36e5,HUe=168,qUe=50;function H6(e,t){try{return e.getItem(t)}catch{}}function VO(e,t,n){try{return e.setItem(t,n),!0}catch{}}function eI(e,t){try{e.removeItem(t)}catch{}}function q6(e,t){return VO(e,YK,t.toString())}function K6(e){return parseInt(H6(e,YK))||0}const e2={local:!0,session:!0},XK={local:new Set,session:new Set};let HO=!1;function KUe(e){HO=e}let gy=typeof window>"u"?{}:window;function QK(e){const t=e+"Storage";try{if(gy&&gy[t]&&typeof gy[t].length=="number")return gy[t]}catch{}e2[e]=!1}function JK(e,t){const n=QK(e);if(!n)return;const r=H6(n,J$);if(r!==Q$){if(r){const u=K6(n);for(let s=0;s{const s=Hv+u.toString(),l=H6(n,s);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,u))return!0}catch{}eI(n,s)}};let a=K6(n);for(let u=a-1;u>=0;u--)o(u)||(u===a-1?(a--,q6(n,a)):XK[e].add(u))}function eG(){if(!HO){KUe(!0);for(const e in e2)JK(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=rf(r,i);if(!BO(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function GUe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in e2)JK(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function YUe(e,t){HO||eG();function n(r){let i;if(!e2[r]||!(i=QK(r)))return;const o=XK[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=K6(i),a>=qUe||!q6(i,a+1))return;const u={cached:Math.floor(Date.now()/ZK),provider:e.provider,data:t};return VO(i,Hv+a.toString(),JSON.stringify(u))}t.lastModified&&!GUe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function ZUe(){}function XUe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,FUe(e)}))}function QUe(e){const t=[],n=[];return e.forEach(r=>{(r.match(WK)?t:n).push(r)}),{valid:t,invalid:n}}function zp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!BO(e,n).length){i();return}r&&YUe(e,n)}catch(o){console.error(o)}i(),XUe(e)}function tI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function JUe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){tI(e.loadIcons(i,r,n),c=>{zp(e,i,c,!1)});return}if(o){i.forEach(c=>{const d=o(c,r,n);tI(d,h=>{const v=h?{prefix:r,icons:{[c]:h}}:null;zp(e,[c],v,!1)})});return}const{valid:a,invalid:u}=QUe(i);if(u.length&&zp(e,u,null,!1),!a.length)return;const s=r.match(WK)?V6(n):null;if(!s){zp(e,a,null,!1);return}s.prepare(n,r,a).forEach(c=>{VUe(n,c,d=>{zp(e,c.icons,d,!0)})})}))}const eWe=(e,t)=>{const n=BUe(e,!0,VK()),r=NUe(n);if(!r.pending.length){let s=!0;return setTimeout(()=>{s&&t(r.loaded,r.missing,r.pending,ZUe)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,u;return r.pending.forEach(s=>{const{provider:l,prefix:c}=s;if(c===u&&l===a)return;a=l,u=c,o.push(rf(l,c));const d=i[l]||(i[l]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(s=>{const{provider:l,prefix:c,name:d}=s,h=rf(l,c),v=h.pendingIcons||(h.pendingIcons=new Set);v.has(d)||(v.add(d),i[l][c].push(d))}),o.forEach(s=>{const l=i[s.provider][s.prefix];l.length&&JUe(s,l)}),jUe(t,r,o)};function tWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in HK?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const nWe=/[\s,]+/;function rWe(e,t){t.split(nWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function iWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function oWe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function aWe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function uWe(e){return"data:image/svg+xml,"+aWe(e)}function sWe(e){return'url("'+uWe(e)+'")'}let b0;function lWe(){try{b0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{b0=null}}function cWe(e){return b0===void 0&&lWe(),b0?b0.createHTML(e):e}const tG={...qK,inline:!1},fWe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},dWe={display:"inline-block"},G6={backgroundColor:"currentColor"},nG={backgroundColor:"transparent"},nI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},rI={WebkitMask:G6,mask:G6,background:nG};for(const e in rI){const t=rI[e];for(const n in nI)t[e+n]=nI[n]}const hWe={...tG,inline:!0};function iI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const pWe=(e,t,n)=>{const r=t.inline?hWe:tG,i=tWe(r,t),o=t.mode||"svg",a={},u=t.style||{},s={...o==="svg"?fWe:{}};if(n){const b=Jw(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);s.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":s.ref=w;break;case"className":s[b]=(s[b]?s[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&rWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=iWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete s["aria-hidden"];break;default:r[b]===void 0&&(s[b]=w)}}const l=_Ue(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){s.style={...a,...u},Object.assign(s,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),s.dangerouslySetInnerHTML={__html:cWe(AUe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",s)}const{body:d,width:h,height:v}=e,g=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),m=oWe(d,{...c,width:h+"",height:v+""});return s.style={...a,"--svg":sWe(m),width:iI(c.width),height:iI(c.height),...dWe,...g?G6:nG,...u},y.createElement("span",s)};VK(!0);OUe("",IUe);if(typeof document<"u"&&typeof window<"u"){eG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!vUe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;PUe(n,i)||console.error(r)}catch{console.error(r)}}}}function rG(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(v){if(v){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const m=G$(g);if(m)return{name:g,data:m}}return{name:""}}const[a,u]=y.useState(o(!!e.ssr));function s(){const v=r.callback;v&&(v(),i({}))}function l(v){if(JSON.stringify(a)!==JSON.stringify(v))return s(),u(v),!0}function c(){var v;const g=e.icon;if(typeof g=="object"){l({name:"",data:g});return}const m=G$(g);if(l({name:g,data:m}))if(m===void 0){const b=eWe([g],c);i({callback:b})}else m&&((v=e.onLoad)===null||v===void 0||v.call(e,g))}y.useEffect(()=>(n(!0),s),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:d,data:h}=a;return h?pWe({...jO,...h},e,d):e.children?e.children:y.createElement("span",{})}const wZe=y.forwardRef((e,t)=>rG({...e,_ref:t}));y.forwardRef((e,t)=>rG({inline:!0,...e,_ref:t}));var iG="AlertDialog",[vWe,_Ze]=mi(iG,[rB]),ks=rB(),oG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(spe,{...r,...n,modal:!0})};oG.displayName=iG;var gWe="AlertDialogTrigger",aG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(lpe,{...i,...r,ref:t})});aG.displayName=gWe;var mWe="AlertDialogPortal",uG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(cpe,{...r,...n})};uG.displayName=mWe;var yWe="AlertDialogOverlay",sG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(fpe,{...i,...r,ref:t})});sG.displayName=yWe;var Td="AlertDialogContent",[bWe,xWe]=vWe(Td),lG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=ks(n),a=y.useRef(null),u=Kt(t,a),s=y.useRef(null);return I.jsx(ipe,{contentName:Td,titleName:cG,docsSlug:"alert-dialog",children:I.jsx(bWe,{scope:n,cancelRef:s,children:I.jsxs(dpe,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(nA,{children:r}),I.jsx(_We,{contentRef:a})]})})})});lG.displayName=Td;var cG="AlertDialogTitle",fG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(hpe,{...i,...r,ref:t})});fG.displayName=cG;var dG="AlertDialogDescription",hG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(ppe,{...i,...r,ref:t})});hG.displayName=dG;var wWe="AlertDialogAction",pG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(bB,{...i,...r,ref:t})});pG.displayName=wWe;var vG="AlertDialogCancel",gG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=xWe(vG,n),o=ks(n),a=Kt(t,i);return I.jsx(bB,{...o,...r,ref:a})});gG.displayName=vG;var _We=({contentRef:e})=>{const t=`\`${Td}\` requires a description for the component to be accessible for screen reader users. + */function wZe(e,t){return e?uUe(e)?y.createElement(e,t):e:null}function uUe(e){return sUe(e)||typeof e=="function"||lUe(e)}function sUe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function lUe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function _Ze(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:rUe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const UK=Object.freeze({left:0,top:0,width:16,height:16}),rx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),BP=Object.freeze({...UK,...rx}),U6=Object.freeze({...BP,body:"",hidden:!1});function cUe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function K$(e,t){const n=cUe(e,t);for(const r in U6)r in rx?r in e&&!(r in n)&&(n[r]=rx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function fUe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const u=r[a]&&r[a].parent,s=u&&o(u);s&&(i[a]=[u].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function dUe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(u){o=K$(r[u]||i[u],o)}return a(t),n.forEach(a),K$(e,o)}function WK(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=fUe(e);for(const i in r){const o=r[i];o&&(t(i,dUe(e,i,o)),n.push(i))}return n}const hUe={provider:"",aliases:{},not_found:{},...UK};function o3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function VK(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!o3(e,hUe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!o3(o,U6))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!o3(o,U6))return null}return t}const HK=/^[a-z0-9]+(-[a-z0-9]+)*$/,Jw=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const u=i.pop(),s=i.pop(),l={provider:i.length>0?i[0]:r,prefix:s,name:u};return t&&!Hy(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Hy(u)?null:u}if(n&&r===""){const u={provider:r,prefix:"",name:o};return t&&!Hy(u,n)?null:u}return null},Hy=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,G$=Object.create(null);function pUe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function rf(e,t){const n=G$[e]||(G$[e]=Object.create(null));return n[t]||(n[t]=pUe(e,t))}function zP(e,t){return VK(t)?WK(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function vUe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Hv=!1;function qK(e){return typeof e=="boolean"&&(Hv=e),Hv}function Y$(e){const t=typeof e=="string"?Jw(e,!0,Hv):e;if(t){const n=rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function gUe(e,t){const n=Jw(e,!0,Hv);if(!n)return!1;const r=rf(n.provider,n.prefix);return t?vUe(r,n.name,t):(r.missing.add(n.name),!0)}function mUe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Hv&&!t&&!e.prefix){let i=!1;return VK(e)&&(e.prefix="",WK(e,(o,a)=>{gUe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Hy({provider:t,prefix:n,name:"a"}))return!1;const r=rf(t,n);return!!zP(r,e)}const KK=Object.freeze({width:null,height:null}),GK=Object.freeze({...KK,...rx}),yUe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bUe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Z$(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(yUe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=bUe.test(o);for(;;){if(a){const u=parseFloat(o);isNaN(u)?i.push(o):i.push(Math.ceil(u*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function xUe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function wUe(e,t){return e?""+e+""+t:t}function _Ue(e,t,n){const r=xUe(e);return wUe(r.defs,t+r.content+n)}const SUe=e=>e==="unset"||e==="undefined"||e==="none";function CUe(e,t){const n={...BP,...e},r={...GK,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],w=m.hFlip,x=m.vFlip;let S=m.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let A;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:A=i.height/2+i.top,b.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:A=i.width/2+i.left,b.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}S%2===1&&(i.left!==i.top&&(A=i.left,i.left=i.top,i.top=A),i.width!==i.height&&(A=i.width,i.width=i.height,i.height=A)),b.length&&(o=_Ue(o,'',""))});const a=r.width,u=r.height,s=i.width,l=i.height;let c,d;a===null?(d=u===null?"1em":u==="auto"?l:u,c=Z$(d,s/l)):(c=a==="auto"?s:a,d=u===null?Z$(c,l/s):u==="auto"?l:u);const h={},v=(m,b)=>{SUe(b)||(h[m]=b.toString())};v("width",c),v("height",d);const g=[i.left,i.top,s,l];return h.viewBox=g.join(" "),{attributes:h,viewBox:g,body:o}}const EUe=/\sid="(\S+)"/g,AUe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let PUe=0;function OUe(e,t=AUe){const n=[];let r;for(;r=EUe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(PUe++).toString(),u=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const W6=Object.create(null);function kUe(e,t){W6[e]=t}function V6(e){return W6[e]||W6[""]}function UP(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const WP=Object.create(null),zp=["https://api.simplesvg.com","https://api.unisvg.com"],qy=[];for(;zp.length>0;)zp.length===1||Math.random()>.5?qy.push(zp.shift()):qy.push(zp.pop());WP[""]=UP({resources:["https://api.iconify.design"].concat(qy)});function TUe(e,t){const n=UP(t);return n===null?!1:(WP[e]=n,!0)}function VP(e){return WP[e]}const MUe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X$=MUe();function RUe(e,t){const n=VP(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function DUe(e){return e===404}const $Ue=(e,t,n)=>{const r=[],i=RUe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,l)=>{u+=s.length+1,u>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},u=s.length),a.icons.push(s)}),r.push(a),r};function IUe(e){if(typeof e=="string"){const t=VP(e);if(t)return t.path}return"/"}const NUe=(e,t,n)=>{if(!X$){n("abort",424);return}let r=IUe(t.provider);switch(t.type){case"icons":{const o=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});r+=o+".json?"+s.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;X$(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(DUe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},FUe={prepare:$Ue,send:NUe};function LUe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,u=i.name,s=n[o]||(n[o]=Object.create(null)),l=s[a]||(s[a]=rf(o,a));let c;u in l.icons?c=t.loaded:a===""||l.missing.has(u)?c=t.missing:c=t.pending;const d={provider:o,prefix:a,name:u};c.push(d)}),t}function YK(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function jUe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,u=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const l=s.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==u&&(n||YK([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let BUe=0;function zUe(e,t,n){const r=BUe++,i=YK.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function UUe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?Jw(i,t,n):i;o&&r.push(o)}),r}var WUe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function VUe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const T=Math.floor(Math.random()*C.length);a.push(C[T]),C=C.slice(0,T).concat(C.slice(T+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const u=Date.now();let s="pending",l=0,c,d=null,h=[],v=[];typeof r=="function"&&v.push(r);function g(){d&&(clearTimeout(d),d=null)}function m(){s==="pending"&&(s="aborted"),g(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,T){T&&(v=[]),typeof C=="function"&&v.push(C)}function w(){return{startTime:u,payload:t,status:s,queriesSent:l,queriesPending:h.length,subscribe:b,abort:m}}function x(){s="failed",v.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function A(C,T,M){const F=T!=="success";switch(h=h.filter(U=>U!==C),s){case"pending":break;case"failed":if(F||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){c=M,x();return}if(F){c=M,h.length||(a.length?E():x());return}if(g(),S(),!e.random){const U=e.resources.indexOf(C.resource);U!==-1&&U!==e.index&&(e.index=U)}s="completed",v.forEach(U=>{U(M)})}function E(){if(s!=="pending")return;g();const C=a.shift();if(C===void 0){if(h.length){d=setTimeout(()=>{g(),s==="pending"&&(S(),x())},e.timeout);return}x();return}const T={status:"pending",resource:C,callback:(M,F)=>{A(T,M,F)}};h.push(T),l++,d=setTimeout(E,e.rotate),n(C,t,T.callback)}return setTimeout(E),w}function ZK(e){const t={...WUe,...e};let n=[];function r(){n=n.filter(u=>u().status==="pending")}function i(u,s,l){const c=VUe(t,u,s,(d,h)=>{r(),l&&l(d,h)});return n.push(c),c}function o(u){return n.find(s=>u(s))||null}return{query:i,find:o,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:r}}function Q$(){}const a3=Object.create(null);function HUe(e){if(!a3[e]){const t=VP(e);if(!t)return;const n=ZK(t),r={config:t,redundancy:n};a3[e]=r}return a3[e]}function qUe(e,t,n){let r,i;if(typeof e=="string"){const o=V6(e);if(!o)return n(void 0,424),Q$;i=o.send;const a=HUe(e);a&&(r=a.redundancy)}else{const o=UP(e);if(o){r=ZK(o);const a=e.resources?e.resources[0]:"",u=V6(a);u&&(i=u.send)}}return!r||!i?(n(void 0,424),Q$):r.query(t,i,n)().abort}const J$="iconify2",qv="iconify",XK=qv+"-count",eI=qv+"-version",QK=36e5,KUe=168,GUe=50;function H6(e,t){try{return e.getItem(t)}catch{}}function HP(e,t,n){try{return e.setItem(t,n),!0}catch{}}function tI(e,t){try{e.removeItem(t)}catch{}}function q6(e,t){return HP(e,XK,t.toString())}function K6(e){return parseInt(H6(e,XK))||0}const e2={local:!0,session:!0},JK={local:new Set,session:new Set};let qP=!1;function YUe(e){qP=e}let my=typeof window>"u"?{}:window;function eG(e){const t=e+"Storage";try{if(my&&my[t]&&typeof my[t].length=="number")return my[t]}catch{}e2[e]=!1}function tG(e,t){const n=eG(e);if(!n)return;const r=H6(n,eI);if(r!==J$){if(r){const u=K6(n);for(let s=0;s{const s=qv+u.toString(),l=H6(n,s);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,u))return!0}catch{}tI(n,s)}};let a=K6(n);for(let u=a-1;u>=0;u--)o(u)||(u===a-1?(a--,q6(n,a)):JK[e].add(u))}function nG(){if(!qP){YUe(!0);for(const e in e2)tG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=rf(r,i);if(!zP(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ZUe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in e2)tG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function XUe(e,t){qP||nG();function n(r){let i;if(!e2[r]||!(i=eG(r)))return;const o=JK[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=K6(i),a>=GUe||!q6(i,a+1))return;const u={cached:Math.floor(Date.now()/QK),provider:e.provider,data:t};return HP(i,qv+a.toString(),JSON.stringify(u))}t.lastModified&&!ZUe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function QUe(){}function JUe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,jUe(e)}))}function eWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(HK)?t:n).push(r)}),{valid:t,invalid:n}}function Up(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!zP(e,n).length){i();return}r&&XUe(e,n)}catch(o){console.error(o)}i(),JUe(e)}function nI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function tWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){nI(e.loadIcons(i,r,n),c=>{Up(e,i,c,!1)});return}if(o){i.forEach(c=>{const d=o(c,r,n);nI(d,h=>{const v=h?{prefix:r,icons:{[c]:h}}:null;Up(e,[c],v,!1)})});return}const{valid:a,invalid:u}=eWe(i);if(u.length&&Up(e,u,null,!1),!a.length)return;const s=r.match(HK)?V6(n):null;if(!s){Up(e,a,null,!1);return}s.prepare(n,r,a).forEach(c=>{qUe(n,c,d=>{Up(e,c.icons,d,!0)})})}))}const nWe=(e,t)=>{const n=UUe(e,!0,qK()),r=LUe(n);if(!r.pending.length){let s=!0;return setTimeout(()=>{s&&t(r.loaded,r.missing,r.pending,QUe)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,u;return r.pending.forEach(s=>{const{provider:l,prefix:c}=s;if(c===u&&l===a)return;a=l,u=c,o.push(rf(l,c));const d=i[l]||(i[l]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(s=>{const{provider:l,prefix:c,name:d}=s,h=rf(l,c),v=h.pendingIcons||(h.pendingIcons=new Set);v.has(d)||(v.add(d),i[l][c].push(d))}),o.forEach(s=>{const l=i[s.provider][s.prefix];l.length&&tWe(s,l)}),zUe(t,r,o)};function rWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in KK?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const iWe=/[\s,]+/;function oWe(e,t){t.split(iWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function aWe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function uWe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function sWe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function lWe(e){return"data:image/svg+xml,"+sWe(e)}function cWe(e){return'url("'+lWe(e)+'")'}let x0;function fWe(){try{x0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{x0=null}}function dWe(e){return x0===void 0&&fWe(),x0?x0.createHTML(e):e}const rG={...GK,inline:!1},hWe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},pWe={display:"inline-block"},G6={backgroundColor:"currentColor"},iG={backgroundColor:"transparent"},rI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},iI={WebkitMask:G6,mask:G6,background:iG};for(const e in iI){const t=iI[e];for(const n in rI)t[e+n]=rI[n]}const vWe={...rG,inline:!0};function oI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const gWe=(e,t,n)=>{const r=t.inline?vWe:rG,i=rWe(r,t),o=t.mode||"svg",a={},u=t.style||{},s={...o==="svg"?hWe:{}};if(n){const b=Jw(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);s.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":s.ref=w;break;case"className":s[b]=(s[b]?s[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&oWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=aWe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete s["aria-hidden"];break;default:r[b]===void 0&&(s[b]=w)}}const l=CUe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){s.style={...a,...u},Object.assign(s,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),s.dangerouslySetInnerHTML={__html:dWe(OUe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",s)}const{body:d,width:h,height:v}=e,g=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),m=uWe(d,{...c,width:h+"",height:v+""});return s.style={...a,"--svg":cWe(m),width:oI(c.width),height:oI(c.height),...pWe,...g?G6:iG,...u},y.createElement("span",s)};qK(!0);kUe("",FUe);if(typeof document<"u"&&typeof window<"u"){nG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!mUe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;TUe(n,i)||console.error(r)}catch{console.error(r)}}}}function oG(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(v){if(v){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const m=Y$(g);if(m)return{name:g,data:m}}return{name:""}}const[a,u]=y.useState(o(!!e.ssr));function s(){const v=r.callback;v&&(v(),i({}))}function l(v){if(JSON.stringify(a)!==JSON.stringify(v))return s(),u(v),!0}function c(){var v;const g=e.icon;if(typeof g=="object"){l({name:"",data:g});return}const m=Y$(g);if(l({name:g,data:m}))if(m===void 0){const b=nWe([g],c);i({callback:b})}else m&&((v=e.onLoad)===null||v===void 0||v.call(e,g))}y.useEffect(()=>(n(!0),s),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:d,data:h}=a;return h?gWe({...BP,...h},e,d):e.children?e.children:y.createElement("span",{})}const SZe=y.forwardRef((e,t)=>oG({...e,_ref:t}));y.forwardRef((e,t)=>oG({inline:!0,...e,_ref:t}));var aG="AlertDialog",[mWe,CZe]=mi(aG,[iB]),ks=iB(),uG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(cpe,{...r,...n,modal:!0})};uG.displayName=aG;var yWe="AlertDialogTrigger",sG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(fpe,{...i,...r,ref:t})});sG.displayName=yWe;var bWe="AlertDialogPortal",lG=e=>{const{__scopeAlertDialog:t,...n}=e,r=ks(t);return I.jsx(dpe,{...r,...n})};lG.displayName=bWe;var xWe="AlertDialogOverlay",cG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(hpe,{...i,...r,ref:t})});cG.displayName=xWe;var Td="AlertDialogContent",[wWe,_We]=mWe(Td),fG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=ks(n),a=y.useRef(null),u=Kt(t,a),s=y.useRef(null);return I.jsx(ape,{contentName:Td,titleName:dG,docsSlug:"alert-dialog",children:I.jsx(wWe,{scope:n,cancelRef:s,children:I.jsxs(ppe,{role:"alertdialog",...o,...i,ref:u,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(nA,{children:r}),I.jsx(CWe,{contentRef:a})]})})})});fG.displayName=Td;var dG="AlertDialogTitle",hG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(vpe,{...i,...r,ref:t})});hG.displayName=dG;var pG="AlertDialogDescription",vG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(gpe,{...i,...r,ref:t})});vG.displayName=pG;var SWe="AlertDialogAction",gG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=ks(n);return I.jsx(xB,{...i,...r,ref:t})});gG.displayName=SWe;var mG="AlertDialogCancel",yG=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=_We(mG,n),o=ks(n),a=Kt(t,i);return I.jsx(xB,{...o,...r,ref:a})});yG.displayName=mG;var CWe=({contentRef:e})=>{const t=`\`${Td}\` requires a description for the component to be accessible for screen reader users. -You can add a description to the \`${Td}\` by passing a \`${dG}\` component as a child, which also benefits sighted users by adding visible context to the dialog. +You can add a description to the \`${Td}\` by passing a \`${pG}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Td}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},SZe=oG,CZe=aG,EZe=uG,AZe=sG,OZe=lG,PZe=pG,kZe=gG,TZe=fG,MZe=hG,my,SWe=new Uint8Array(16);function CWe(){if(!my&&(my=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!my))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return my(SWe)}const EWe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function AWe(e){return typeof e=="string"&&EWe.test(e)}var ci=[];for(var u3=0;u3<256;++u3)ci.push((u3+256).toString(16).substr(1));function OWe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!AWe(n))throw TypeError("Stringified UUID is invalid");return n}function mG(e,t,n){e=e||{};var r=e.random||(e.rng||CWe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,OWe(r)}function Or(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function PWe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function kWe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var yG=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Nn=new RWe;function qv(e){"@babel/helpers - typeof";return qv=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},qv(e)}function DWe(e,t){if(qv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function $We(e){var t=DWe(e,"string");return qv(t)=="symbol"?t:t+""}function IWe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LWe(e,t){if(e){if(typeof e=="string")return oI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oI(e,t)}}function oI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var u=FWe(n),s;!(s=u()).done;){var l=s.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function s3(e,t){var n=e.split(` +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},EZe=uG,AZe=sG,PZe=lG,OZe=cG,kZe=fG,TZe=gG,MZe=yG,RZe=hG,DZe=vG,yy,EWe=new Uint8Array(16);function AWe(){if(!yy&&(yy=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!yy))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yy(EWe)}const PWe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function OWe(e){return typeof e=="string"&&PWe.test(e)}var ci=[];for(var u3=0;u3<256;++u3)ci.push((u3+256).toString(16).substr(1));function kWe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!OWe(n))throw TypeError("Stringified UUID is invalid");return n}function bG(e,t,n){e=e||{};var r=e.random||(e.rng||AWe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,kWe(r)}function Pr(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function TWe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function MWe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var xG=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,sl.emit(sl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Nn=new $We;function Kv(e){"@babel/helpers - typeof";return Kv=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},Kv(e)}function IWe(e,t){if(Kv(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function NWe(e){var t=IWe(e,"string");return Kv(t)=="symbol"?t:t+""}function FWe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BWe(e,t){if(e){if(typeof e=="string")return aI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aI(e,t)}}function aI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var u=jWe(n),s;!(s=u()).done;){var l=s.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function s3(e,t){var n=e.split(` `),r=e.substr(0,t).split(` `),i=r.length,o=r[r.length-1].length,a=n[r.length-1],u=r.length>1?r[r.length-2]:null,s=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:u,nextLine:s}}var Yf={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` > `,` -`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var yy=1;yy<=6;yy++)Yf["h"+yy]=[` -`+jWe("#",yy)+" ",` -`];function zWe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],u=["|"],s="",l=1;l<=i;l++)o.push(" Head |"),u.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)s+=` +`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var by=1;by<=6;by++)Yf["h"+by]=[` +`+zWe("#",by)+" ",` +`];function WWe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],u=["|"],s="",l=1;l<=i;l++)o.push(" Head |"),u.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)s+=` `+a.join("");return o.join("")+` -`+u.join("")+s}function aI(e,t){var n=t;if(n.substr(0,1)!==` +`+u.join("")+s}function uI(e,t){var n=t;if(n.substr(0,1)!==` `&&(n=` `+n),e==="unordered")return n.length>1?n.replace(/\n/g,` * `).trim():"* ";var r=1;return n.length>1?n.replace(/\n/g,function(){return` `+r+++". "}).trim():"1. "}function l3(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function Z6(e,t,n){if(typeof Yf[t]<"u")return{text:""+Yf[t][0]+e+Yf[t][1],selection:{start:Yf[t][0].length,end:Yf[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` `+r),o=e.includes(` -`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return l3(aI("unordered",e),!0);case"order":return l3(aI("order",e),!0);case"hr":return l3("---",!0);case"table":return{text:zWe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function xG(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=xG(e[r],t[r]);return}n[r]=t[r]}),n}function UWe(e){for(var t=fr({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HWe(e,t){if(e){if(typeof e=="string")return sI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sI(e,t)}}function sI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[d.comp.align]=[]);var h=d.comp.pluginName==="divider"?mG():d.comp.pluginName;c[d.comp.align].push(y.createElement(d.comp,{editor:i,editorConfig:i.config,config:fr({},d.comp.defaultConfig||{},d.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var u=this.config.syncScrollMode,s=u===void 0?[]:u;s.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return qO(a)?a.then(function(u){return o.setHtml(u)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,u=i.key,s=i.currentTarget;if((a===13||u==="Enter")&&this.composing===!1){var l=s.value,c=s.selectionStart,d=s3(l,c),h=function(){var x=s.value.substr(0,c-d.curLine.length)+s.value.substr(c);o.setText(x,void 0,{start:c-d.curLine.length,end:c-d.curLine.length}),i.preventDefault()},v=function(x){o.insertText(` -`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},g=d.curLine.match(/^(\s*?)\* /);if(g){if(/^(\s*?)\* $/.test(d.curLine)){h();return}v(g[0]);return}var m=d.curLine.match(/^(\s*?)(\d+)\. /);if(m){if(/^(\s*?)(\d+)\. $/.test(d.curLine)){h();return}var b=""+m[1]+(parseInt(m[2],10)+1)+". ";v(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fr({},NWe);var o=i.selectionStart,a=i.selectionEnd,u=(i.value||"").slice(o,a);return{start:o,end:a,text:u}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),u=o?fr({},o):{};if(i==="image"&&(u=fr({},u,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(u=fr({},u,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var s=this.getMdValue().slice(0,a.start).lastIndexOf(` +`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return l3(uI("unordered",e),!0);case"order":return l3(uI("order",e),!0);case"hr":return l3("---",!0);case"table":return{text:WWe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function _G(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=_G(e[r],t[r]);return}n[r]=t[r]}),n}function VWe(e){for(var t=fr({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KWe(e,t){if(e){if(typeof e=="string")return lI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lI(e,t)}}function lI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[d.comp.align]=[]);var h=d.comp.pluginName==="divider"?bG():d.comp.pluginName;c[d.comp.align].push(y.createElement(d.comp,{editor:i,editorConfig:i.config,config:fr({},d.comp.defaultConfig||{},d.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var u=this.config.syncScrollMode,s=u===void 0?[]:u;s.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return KP(a)?a.then(function(u){return o.setHtml(u)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,u=i.key,s=i.currentTarget;if((a===13||u==="Enter")&&this.composing===!1){var l=s.value,c=s.selectionStart,d=s3(l,c),h=function(){var x=s.value.substr(0,c-d.curLine.length)+s.value.substr(c);o.setText(x,void 0,{start:c-d.curLine.length,end:c-d.curLine.length}),i.preventDefault()},v=function(x){o.insertText(` +`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},g=d.curLine.match(/^(\s*?)\* /);if(g){if(/^(\s*?)\* $/.test(d.curLine)){h();return}v(g[0]);return}var m=d.curLine.match(/^(\s*?)(\d+)\. /);if(m){if(/^(\s*?)(\d+)\. $/.test(d.curLine)){h();return}var b=""+m[1]+(parseInt(m[2],10)+1)+". ";v(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fr({},LWe);var o=i.selectionStart,a=i.selectionEnd,u=(i.value||"").slice(o,a);return{start:o,end:a,text:u}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),u=o?fr({},o):{};if(i==="image"&&(u=fr({},u,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(u=fr({},u,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var s=this.getMdValue().slice(0,a.start).lastIndexOf(` `)+1;this.setSelection({start:s,end:a.end})}var l=Z6(a.text,i,u),c=l.text,d=l.selection;if(l.newBlock){var h=s3(this.getMdValue(),a.start),v=h.col,g=h.curLine;v>0&&g.length>0&&(c=` `+c,d&&(d.start++,d.end++));var m=h.afterText;a.start!==a.end&&(m=s3(this.getMdValue(),a.end).afterText),m.trim()!==""&&m.substr(0,2)!==` @@ -526,12 +526,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `&&(c+=` `),c+=` `)}this.insertText(c,!0,d)},n.insertPlaceholder=function(i,o){var a=this;this.insertText(i,!0),o.then(function(u){var s=a.getMdValue().replace(i,u);a.setText(s)})},n.insertText=function(i,o,a){i===void 0&&(i=""),o===void 0&&(o=!1);var u=this.state.text,s=this.getSelection(),l=u.slice(0,s.start),c=u.slice(o?s.end:s.start,u.length);this.setText(l+i+c,void 0,a?{start:a.start+l.length,end:a.end+l.length}:{start:s.start,end:s.start})},n.setText=function(i,o,a){var u=this;i===void 0&&(i="");var s=this.config.onChangeTrigger,l=s===void 0?"both":s,c=i.replace(/↵/g,` -`);if(this.state.text!==i){this.setState({text:c}),this.props.onChange&&(l==="both"||l==="beforeRender")&&this.props.onChange({text:c,html:this.getHtmlValue()},o),this.emitter.emit(this.emitter.EVENT_CHANGE,i,o,typeof o>"u"),a&&setTimeout(function(){return u.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var d=this.renderHTML(c);(l==="both"||l==="afterRender")&&d.then(function(){u.props.onChange&&u.props.onChange({text:u.state.text,html:u.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(u){return o.offKeyboard(u)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=c3(this.keyboardListeners),a;!(a=o()).done;){var u=a.value;if(BWe(i,u)){i.preventDefault(),u.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fr({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fr({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,u=new Array(a>1?a-1:0),s=1;s0&&i.onImageChanged(u.target.files[0])}}))},t}(mr);DG.pluginName="image";var $G=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Nn.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Or,{type:"link"}))},t}(mr);$G.pluginName="link";var IG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Nn.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Or,{type:"list-ordered"}))},t}(mr);IG.pluginName="list-ordered";var NG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Nn.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Or,{type:"list-unordered"}))},t}(mr);NG.pluginName="list-unordered";var GWe=100,YWe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?GWe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),FG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(jn(i)),i.handleRedo=i.handleRedo.bind(jn(i)),i.handleUndo=i.handleUndo.bind(jn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new YWe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var u=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){u.logger.getLast()!==i&&(u.logger.push(i),u.lastPop=null,u.forceUpdate()),window.clearTimeout(u.timerId),u.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Nn.get("btnUndo"),onClick:this.handleUndo},y.createElement(Or,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Nn.get("btnRedo"),onClick:this.handleRedo},y.createElement(Or,{type:"redo"})))},t}(mr);FG.pluginName="logger";var Ai;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Ai||(Ai={}));var GO=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(jn(i)),i.handleChange=i.handleChange.bind(jn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Ai.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Ai.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Ai.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Ai.SHOW_ALL:return{icon:"view-split",title:"All"};case Ai.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Nn.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Or,{type:i.icon}))}return null},bG(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Ai.SHOW_ALL,Ai.SHOW_MD,Ai.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Ai.SHOW_ALL),1),i.md||a.splice(a.indexOf(Ai.SHOW_MD),1),i.html||a.splice(a.indexOf(Ai.SHOW_HTML),1));var u=Ai.SHOW_MD;if(o.html&&(u=Ai.SHOW_HTML),o.html&&o.md&&(u=Ai.SHOW_ALL),a.length===0)return u;if(a.length===1)return a[0];var s=a.indexOf(u);return s"u"),a&&setTimeout(function(){return u.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var d=this.renderHTML(c);(l==="both"||l==="afterRender")&&d.then(function(){u.props.onChange&&u.props.onChange({text:u.state.text,html:u.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(u){return o.offKeyboard(u)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=c3(this.keyboardListeners),a;!(a=o()).done;){var u=a.value;if(UWe(i,u)){i.preventDefault(),u.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fr({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fr({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,u=new Array(a>1?a-1:0),s=1;s0&&i.onImageChanged(u.target.files[0])}}))},t}(mr);IG.pluginName="image";var NG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Nn.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Pr,{type:"link"}))},t}(mr);NG.pluginName="link";var FG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Nn.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Pr,{type:"list-ordered"}))},t}(mr);FG.pluginName="list-ordered";var LG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Nn.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Pr,{type:"list-unordered"}))},t}(mr);LG.pluginName="list-unordered";var ZWe=100,XWe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?ZWe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),jG=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(jn(i)),i.handleRedo=i.handleRedo.bind(jn(i)),i.handleUndo=i.handleUndo.bind(jn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new XWe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var u=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){u.logger.getLast()!==i&&(u.logger.push(i),u.lastPop=null,u.forceUpdate()),window.clearTimeout(u.timerId),u.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Nn.get("btnUndo"),onClick:this.handleUndo},y.createElement(Pr,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Nn.get("btnRedo"),onClick:this.handleRedo},y.createElement(Pr,{type:"redo"})))},t}(mr);jG.pluginName="logger";var Ai;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Ai||(Ai={}));var YP=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(jn(i)),i.handleChange=i.handleChange.bind(jn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Ai.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Ai.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Ai.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Ai.SHOW_ALL:return{icon:"view-split",title:"All"};case Ai.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Nn.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Pr,{type:i.icon}))}return null},wG(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Ai.SHOW_ALL,Ai.SHOW_MD,Ai.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Ai.SHOW_ALL),1),i.md||a.splice(a.indexOf(Ai.SHOW_MD),1),i.html||a.splice(a.indexOf(Ai.SHOW_HTML),1));var u=Ai.SHOW_MD;if(o.html&&(u=Ai.SHOW_HTML),o.html&&o.md&&(u=Ai.SHOW_ALL),a.length===0)return u;if(a.length===1)return a[0];var s=a.indexOf(u);return s=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((u&248)===240&&o+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}i+="�"}return i})}bh.defaultChars=";/?:@&=+$,#";bh.componentChars="";const cI={};function JWe(e){let t=cI[e];if(t)return t;t=cI[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=JWe(t);let i="";for(let o=0,a=e.length;o=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1=56320&&s<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}$g.defaultChars=";/?:@&=+$,-_.!~*'()#";$g.componentChars="-_.!~*'()";function ZO(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function rx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const eVe=/^([a-z0-9.+-]+:)/i,tVe=/:[0-9]*$/,nVe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rVe=["<",">",'"',"`"," ","\r",` -`," "],iVe=["{","}","|","\\","^","`"].concat(rVe),oVe=["'"].concat(iVe),fI=["%","/","?",";","#"].concat(oVe),dI=["/","?","#"],aVe=255,hI=/^[+a-z0-9A-Z_-]{0,63}$/,uVe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pI={javascript:!0,"javascript:":!0},vI={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function XO(e,t){if(e&&e instanceof rx)return e;const n=new rx;return n.parse(e,t),n}rx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=nVe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=eVe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&pI[a])&&(o=o.substr(2),this.slashes=!0)),!pI[a]&&(i||a&&!vI[a])){let l=-1;for(let g=0;g127?x+="x":x+=w[S];if(!x.match(hI)){const S=g.slice(0,m),A=g.slice(m+1),E=w.match(uVe);E&&(S.push(E[1]),A.unshift(E[2])),A.length&&(o=A.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>aVe&&(this.hostname=""),v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const s=o.indexOf("?");return s!==-1&&(this.search=o.substr(s),o=o.slice(0,s)),o&&(this.pathname=o),vI[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};rx.prototype.parseHost=function(e){let t=tVe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const sVe=Object.freeze(Object.defineProperty({__proto__:null,decode:bh,encode:$g,format:ZO,parse:XO},Symbol.toStringTag,{value:"Module"})),LG=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jG=/[\0-\x1F\x7F-\x9F]/,lVe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,QO=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,BG=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,zG=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,cVe=Object.freeze(Object.defineProperty({__proto__:null,Any:LG,Cc:jG,Cf:lVe,P:QO,S:BG,Z:zG},Symbol.toStringTag,{value:"Module"})),fVe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),dVe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var f3;const hVe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),pVe=(f3=String.fromCodePoint)!==null&&f3!==void 0?f3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function vVe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=hVe.get(e))!==null&&t!==void 0?t:e}var ti;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ti||(ti={}));const gVe=32;var ll;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ll||(ll={}));function X6(e){return e>=ti.ZERO&&e<=ti.NINE}function mVe(e){return e>=ti.UPPER_A&&e<=ti.UPPER_F||e>=ti.LOWER_A&&e<=ti.LOWER_F}function yVe(e){return e>=ti.UPPER_A&&e<=ti.UPPER_Z||e>=ti.LOWER_A&&e<=ti.LOWER_Z||X6(e)}function bVe(e){return e===ti.EQUALS||yVe(e)}var Qr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Qr||(Qr={}));var el;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(el||(el={}));class xVe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=el.Strict}startEntity(t){this.decodeMode=t,this.state=Qr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qr.EntityStart:return t.charCodeAt(n)===ti.NUM?(this.state=Qr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qr.NamedEntity,this.stateNamedEntity(t,n));case Qr.NumericStart:return this.stateNumericStart(t,n);case Qr.NumericDecimal:return this.stateNumericDecimal(t,n);case Qr.NumericHex:return this.stateNumericHex(t,n);case Qr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|gVe)===ti.LOWER_X?(this.state=Qr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ti.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==el.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ll.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ll.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Qr.NamedEntity:return this.result!==0&&(this.decodeMode!==el.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qr.NumericDecimal:return this.emitNumericEntity(0,2);case Qr.NumericHex:return this.emitNumericEntity(0,3);case Qr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qr.EntityStart:return 0}}}function UG(e){let t="";const n=new xVe(e,r=>t+=pVe(r));return function(i,o){let a=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(a,u),n.startEntity(o);const l=n.write(i,u+1);if(l<0){a=u+n.end();break}a=u+l,u=l===0?a+1:a}const s=t+i.slice(a);return t="",s}}function wVe(e,t,n,r){const i=(t&ll.BRANCH_LENGTH)>>7,o=t&ll.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const s=r-o;return s<0||s>=i?-1:e[n+s]-1}let a=n,u=a+i-1;for(;a<=u;){const s=a+u>>>1,l=e[s];if(lr)u=s-1;else return e[s+i]}return-1}const _Ve=UG(fVe);UG(dVe);function WG(e,t=el.Legacy){return _Ve(e,t)}function SVe(e){return Object.prototype.toString.call(e)}function JO(e){return SVe(e)==="[object String]"}const CVe=Object.prototype.hasOwnProperty;function EVe(e,t){return CVe.call(e,t)}function t2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function VG(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function eP(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ix(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const HG=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,AVe=/&([a-z#][a-z0-9]{1,31});/gi,OVe=new RegExp(HG.source+"|"+AVe.source,"gi"),PVe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function kVe(e,t){if(t.charCodeAt(0)===35&&PVe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return eP(r)?ix(r):e}const n=WG(e);return n!==e?n:e}function TVe(e){return e.indexOf("\\")<0?e:e.replace(HG,"$1")}function xh(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(OVe,function(t,n,r){return n||kVe(t,r)})}const MVe=/[&<>"]/,RVe=/[&<>"]/g,DVe={"&":"&","<":"<",">":">",'"':"""};function $Ve(e){return DVe[e]}function Rl(e){return MVe.test(e)?e.replace(RVe,$Ve):e}const IVe=/[.?*+^$[\]\\(){}|-]/g;function NVe(e){return e.replace(IVe,"\\$&")}function Vn(e){switch(e){case 9:case 32:return!0}return!1}function Kv(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Gv(e){return QO.test(e)||BG.test(e)}function Yv(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function n2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const FVe={mdurl:sVe,ucmicro:cVe},LVe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:VG,assign:t2,escapeHtml:Rl,escapeRE:NVe,fromCodePoint:ix,has:EVe,isMdAsciiPunct:Yv,isPunctChar:Gv,isSpace:Vn,isString:JO,isValidEntityCode:eP,isWhiteSpace:Kv,lib:FVe,normalizeReference:n2,unescapeAll:xh,unescapeMd:TVe},Symbol.toStringTag,{value:"Module"}));function jVe(e,t,n){let r,i,o,a;const u=e.posMax,s=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=xh(e.slice(t,i)),o.pos=i,o.ok=!0),o}function zVe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return a;t++,o++,u===40&&(u=41),a.marker=u}for(;o"+Rl(o.content)+""};Mu.code_block=function(e,t,n,r,i){const o=e[t];return""+Rl(e[t].content)+` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((u&248)===240&&o+91114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}i+="�"}return i})}bh.defaultChars=";/?:@&=+$,#";bh.componentChars="";const fI={};function tVe(e){let t=fI[e];if(t)return t;t=fI[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=tVe(t);let i="";for(let o=0,a=e.length;o=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1=56320&&s<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Ig.defaultChars=";/?:@&=+$,-_.!~*'()#";Ig.componentChars="-_.!~*'()";function XP(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function ix(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const nVe=/^([a-z0-9.+-]+:)/i,rVe=/:[0-9]*$/,iVe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,oVe=["<",">",'"',"`"," ","\r",` +`," "],aVe=["{","}","|","\\","^","`"].concat(oVe),uVe=["'"].concat(aVe),dI=["%","/","?",";","#"].concat(uVe),hI=["/","?","#"],sVe=255,pI=/^[+a-z0-9A-Z_-]{0,63}$/,lVe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,vI={javascript:!0,"javascript:":!0},gI={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function QP(e,t){if(e&&e instanceof ix)return e;const n=new ix;return n.parse(e,t),n}ix.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=iVe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=nVe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&vI[a])&&(o=o.substr(2),this.slashes=!0)),!vI[a]&&(i||a&&!gI[a])){let l=-1;for(let g=0;g127?x+="x":x+=w[S];if(!x.match(pI)){const S=g.slice(0,m),A=g.slice(m+1),E=w.match(lVe);E&&(S.push(E[1]),A.unshift(E[2])),A.length&&(o=A.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>sVe&&(this.hostname=""),v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const s=o.indexOf("?");return s!==-1&&(this.search=o.substr(s),o=o.slice(0,s)),o&&(this.pathname=o),gI[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ix.prototype.parseHost=function(e){let t=rVe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const cVe=Object.freeze(Object.defineProperty({__proto__:null,decode:bh,encode:Ig,format:XP,parse:QP},Symbol.toStringTag,{value:"Module"})),BG=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,zG=/[\0-\x1F\x7F-\x9F]/,fVe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,JP=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,UG=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,WG=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,dVe=Object.freeze(Object.defineProperty({__proto__:null,Any:BG,Cc:zG,Cf:fVe,P:JP,S:UG,Z:WG},Symbol.toStringTag,{value:"Module"})),hVe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),pVe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var f3;const vVe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),gVe=(f3=String.fromCodePoint)!==null&&f3!==void 0?f3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function mVe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=vVe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const yVe=32;var ll;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ll||(ll={}));function X6(e){return e>=ni.ZERO&&e<=ni.NINE}function bVe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function xVe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||X6(e)}function wVe(e){return e===ni.EQUALS||xVe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var el;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(el||(el={}));class _Ve{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=el.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|yVe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==el.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ll.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ll.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==el.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function VG(e){let t="";const n=new _Ve(e,r=>t+=gVe(r));return function(i,o){let a=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(a,u),n.startEntity(o);const l=n.write(i,u+1);if(l<0){a=u+n.end();break}a=u+l,u=l===0?a+1:a}const s=t+i.slice(a);return t="",s}}function SVe(e,t,n,r){const i=(t&ll.BRANCH_LENGTH)>>7,o=t&ll.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const s=r-o;return s<0||s>=i?-1:e[n+s]-1}let a=n,u=a+i-1;for(;a<=u;){const s=a+u>>>1,l=e[s];if(lr)u=s-1;else return e[s+i]}return-1}const CVe=VG(hVe);VG(pVe);function HG(e,t=el.Legacy){return CVe(e,t)}function EVe(e){return Object.prototype.toString.call(e)}function eO(e){return EVe(e)==="[object String]"}const AVe=Object.prototype.hasOwnProperty;function PVe(e,t){return AVe.call(e,t)}function t2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function qG(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function tO(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ox(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const KG=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,OVe=/&([a-z#][a-z0-9]{1,31});/gi,kVe=new RegExp(KG.source+"|"+OVe.source,"gi"),TVe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function MVe(e,t){if(t.charCodeAt(0)===35&&TVe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return tO(r)?ox(r):e}const n=HG(e);return n!==e?n:e}function RVe(e){return e.indexOf("\\")<0?e:e.replace(KG,"$1")}function xh(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(kVe,function(t,n,r){return n||MVe(t,r)})}const DVe=/[&<>"]/,$Ve=/[&<>"]/g,IVe={"&":"&","<":"<",">":">",'"':"""};function NVe(e){return IVe[e]}function Rl(e){return DVe.test(e)?e.replace($Ve,NVe):e}const FVe=/[.?*+^$[\]\\(){}|-]/g;function LVe(e){return e.replace(FVe,"\\$&")}function Vn(e){switch(e){case 9:case 32:return!0}return!1}function Gv(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Yv(e){return JP.test(e)||UG.test(e)}function Zv(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function n2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const jVe={mdurl:cVe,ucmicro:dVe},BVe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:qG,assign:t2,escapeHtml:Rl,escapeRE:LVe,fromCodePoint:ox,has:PVe,isMdAsciiPunct:Zv,isPunctChar:Yv,isSpace:Vn,isString:eO,isValidEntityCode:tO,isWhiteSpace:Gv,lib:jVe,normalizeReference:n2,unescapeAll:xh,unescapeMd:RVe},Symbol.toStringTag,{value:"Module"}));function zVe(e,t,n){let r,i,o,a;const u=e.posMax,s=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=xh(e.slice(t,i)),o.pos=i,o.ok=!0),o}function WVe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return a;t++,o++,u===40&&(u=41),a.marker=u}for(;o"+Rl(o.content)+""};Mu.code_block=function(e,t,n,r,i){const o=e[t];return""+Rl(e[t].content)+` `};Mu.fence=function(e,t,n,r,i){const o=e[t],a=o.info?xh(o.info).trim():"";let u="",s="";if(a){const c=a.split(/(\s+)/g);u=c[0],s=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,u,s)||Rl(o.content):l=Rl(o.content),l.indexOf("${l} `}return`
${l}
@@ -540,9 +540,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `};Mu.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
`:`
`:` -`};Mu.text=function(e,t){return Rl(e[t].content)};Mu.html_block=function(e,t){return e[t].content};Mu.html_inline=function(e,t){return e[t].content};function Zh(){this.rules=t2({},Mu)}Zh.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n -`:">",o};Zh.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};nu.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function qG(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}qG.prototype.Token=nu;const WVe=/\r\n?|\n/g,VVe=/\0/g;function HVe(e){let t;t=e.src.replace(WVe,` -`),t=t.replace(VVe,"�"),e.src=t}function qVe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function KVe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function YVe(e){return/^<\/a\s*>/i.test(e)}function ZVe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const u=i[a];if(u.type==="link_close"){for(a--;i[a].level!==u.level&&i[a].type!=="link_open";)a--;continue}if(u.type==="html_inline"&&(GVe(u.content)&&o>0&&o--,YVe(u.content)&&o++),!(o>0)&&u.type==="text"&&e.md.linkify.test(u.content)){const s=u.content;let l=e.md.linkify.match(s);const c=[];let d=u.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let v=0;vh){const E=new e.Token("text","",0);E.content=s.slice(h,w),E.level=d,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=d++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=d,c.push(S);const A=new e.Token("link_close","a",-1);A.level=--d,A.markup="linkify",A.info="auto",c.push(A),h=l[v].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(QVe,eHe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function nHe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&KG.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function rHe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(XVe.test(e.tokens[t].content)&&tHe(e.tokens[t].children),KG.test(e.tokens[t].content)&&nHe(e.tokens[t].children))}const iHe=/['"]/,gI=/['"]/g,mI="’";function by(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function oHe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let u=o.content,s=0,l=u.length;e:for(;s=0)g=u.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(s=48&&g<=57&&(h=d=!1),d&&h&&(d=b,h=w),!d&&!h){v&&(o.content=by(o.content,c.index,mI));continue}if(h)for(n=r.length-1;n>=0;n--){let A=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!iHe.test(e.tokens[t].content)||oHe(e.tokens[t].children,e)}function uHe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ru.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ru.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Vn(this.src.charCodeAt(--t)))return t+1;return t};Ru.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ru.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,u=t;ur?o[a]=new Array(s-r+1).join(" ")+this.src.slice(c,d):o[a]=this.src.slice(c,d)}return o.join("")};Ru.prototype.Token=nu;const sHe=65536;function h3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function yI(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,u="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const u=e.src.charCodeAt(o++);if(u!==124&&u!==45&&u!==58&&!Vn(u)||a===45&&Vn(u))return!1;for(;o=4)return!1;l=yI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const v=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let A=0;A=4||(l=yI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=d-l.length,S>sHe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` -`,o.map=[t,e.line],!0}function fHe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let u=i;i=e.skipChars(i,a);let s=i-u;if(s<3)return!1;const l=e.src.slice(u,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=t,h=!1;for(;d++,!(d>=n||(i=u=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],i=4)&&(i=e.skipChars(i,a),!(i-u=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const u=[],s=[],l=[],c=[],d=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let v=!1,g;for(g=t;g=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[g]+1,C,T;e.src.charCodeAt(i)===32?(i++,E++,T=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[g]+E)%4===3?(i++,E++,T=!1):T=!0):C=!1;let M=E;for(u.push(e.bMarks[g]),e.bMarks[g]=i;i=o,s.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),l.push(e.sCount[g]),e.sCount[g]=M-E,c.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(v)break;let A=!1;for(let E=0,C=d.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,g);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let u=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]=e.blkIndent&&(c=!0);let d,h,v;if((v=xI(e,s))>=0){if(d=!0,a=e.bMarks[s]+e.tShift[s],h=Number(e.src.slice(a,v-1)),c&&h!==1)return!1}else if((v=bI(e,s))>=0)d=!1;else return!1;if(c&&e.skipSpaces(v)>=e.eMarks[s])return!1;if(r)return!0;const g=e.src.charCodeAt(v-1),m=e.tokens.length;d?(u=e.push("ordered_list_open","ol",1),h!==1&&(u.attrs=[["start",h]])):u=e.push("bullet_list_open","ul",1);const b=[s,0];u.map=b,u.markup=String.fromCharCode(g);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";s=i?T=1:T=E-A,T>4&&(T=1);const M=A+T;u=e.push("list_item_open","li",1),u.markup=String.fromCharCode(g);const F=[s,0];u.map=F,d&&(u.info=e.src.slice(a,v-1));const U=e.tight,H=e.tShift[s],W=e.sCount[s],ie=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[s]=C-e.bMarks[s],e.sCount[s]=E,C>=i&&e.isEmpty(s+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,s,n,!0),(!e.tight||w)&&(l=!1),w=e.line-s>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ie,e.tShift[s]=H,e.sCount[s]=W,e.tight=U,u=e.push("list_item_close","li",-1),u.markup=String.fromCharCode(g),s=e.line,F[1]=s,s>=n||e.sCount[s]=4)break;let Z=!1;for(let G=0,K=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function u(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let A=!1;if(e.sCount[x]-e.blkIndent>3&&(A=!0),e.sCount[x]<0&&(A=!0),!A){const T=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let F=!1;for(let U=0,H=T.length;U"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:d}),e.line=a),!0):!1}const mHe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yHe="[a-zA-Z_:][a-zA-Z0-9:._-]*",bHe="[^\"'=<>`\\x00-\\x20]+",xHe="'[^']*'",wHe='"[^"]*"',_He="(?:"+bHe+"|"+xHe+"|"+wHe+")",SHe="(?:\\s+"+yHe+"(?:\\s*=\\s*"+_He+")?)",GG="<[A-Za-z][A-Za-z0-9\\-]*"+SHe+"*\\s*\\/?>",YG="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",CHe="",EHe="<[?][\\s\\S]*?[?]>",AHe="]*>",OHe="",PHe=new RegExp("^(?:"+GG+"|"+YG+"|"+CHe+"|"+EHe+"|"+AHe+"|"+OHe+")"),kHe=new RegExp("^(?:"+GG+"|"+YG+")"),qf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(kHe.source+"\\s*$"),/^$/,!1]];function THe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),u=0;for(;u=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let u=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Vn(e.src.charCodeAt(s-1))&&(o=s),e.line=t+1;const l=e.push("heading_open","h"+String(u),1);l.markup="########".slice(0,u),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const d=e.push("heading_close","h"+String(u),-1);return d.markup="########".slice(0,u),!0}function RHe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,u=t+1;for(;u3)continue;if(e.sCount[u]>=e.blkIndent){let v=e.bMarks[u]+e.tShift[u];const g=e.eMarks[u];if(v=g))){o=a===61?1:2;break}}if(e.sCount[u]<0)continue;let h=!1;for(let v=0,g=r.length;v3||e.sCount[o]<0)continue;let l=!1;for(let c=0,d=r.length;c=n||e.sCount[a]=o){e.line=n;break}const s=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Ig.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(NHe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let u=a.url;if(u.length<=o.length)return!1;u=u.replace(/\*+$/,"");const s=e.md.normalizeLink(u);if(!e.md.validateLink(s))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=u.length-o.length,!0}function LHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){nP[e.charCodeAt(0)]=1});function jHe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&u<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const u=e.push("text_special","",0);i<256&&nP[i]!==0?u.content=o:u.content=a,u.markup=a,u.info="escape"}return e.pos=n+1,!0}function BHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,u=String.fromCharCode(i.marker),s=e.tokens[i.token];s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?u+u:u,s.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?u+u:u,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function VHe(e){const t=e.tokens_meta,n=e.tokens_meta.length;_I(e,e.delimiters);for(let r=0;r=d)return!1;if(s=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?g=i.pos:a="",s=g;g=d||e.src.charCodeAt(g)!==41)&&(l=!0),g++}if(l){if(typeof e.env.references>"u")return!1;if(g=0?r=e.src.slice(s,g++):g=v+1):g=v+1,r||(r=e.src.slice(h,v)),o=e.env.references[n2(r)],!o)return e.pos=c,!1;a=o.href,u=o.title}if(!t){e.pos=h,e.posMax=v;const m=e.push("link_open","a",1),b=[["href",a]];m.attrs=b,u&&b.push(["title",u]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function qHe(e,t){let n,r,i,o,a,u,s,l,c="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const v=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=h)return!1;for(l=o,u=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),u.ok&&(c=e.md.normalizeLink(u.str),e.md.validateLink(c)?o=u.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=g+1):o=g+1,i||(i=e.src.slice(v,g)),a=e.env.references[n2(i)],!a)return e.pos=d,!1;c=a.href,s=a.title}if(!t){r=e.src.slice(v,g);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=m,b.content=r,s&&w.push(["title",s])}return e.pos=o,e.posMax=h,!0}const KHe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,GHe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function YHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(GHe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(KHe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function ZHe(e){return/^\s]/i.test(e)}function XHe(e){return/^<\/a\s*>/i.test(e)}function QHe(e){const t=e|32;return t>=97&&t<=122}function JHe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!QHe(i))return!1;const o=e.src.slice(r).match(PHe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],ZHe(a.content)&&e.linkLevel++,XHe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const eqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,tqe=/^&([a-z][a-z0-9]{1,31});/i;function nqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(eqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),u=e.push("text_special","",0);u.content=eP(a)?ix(a):ix(65533),u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(tqe);if(o){const a=WG(o[0]);if(a!==o[0]){if(!t){const u=e.push("text_special","",0);u.content=a,u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function SI(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const d=e[l];if(d.marker===u.marker&&d.open&&d.end<0){let h=!1;if((d.close||u.open)&&(d.length+u.length)%3===0&&(d.length%3!==0||u.length%3!==0)&&(h=!0),!h){const v=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+v,o[l]=v,u.open=!1,d.end=a,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[u.marker][(u.open?3:0)+(u.length||0)%3]=c)}}function rqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;SI(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ng.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ng.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let u=0;u|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Q6(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function i2(e){return Object.prototype.toString.call(e)}function aqe(e){return i2(e)==="[object String]"}function uqe(e){return i2(e)==="[object Object]"}function sqe(e){return i2(e)==="[object RegExp]"}function CI(e){return i2(e)==="[object Function]"}function lqe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const QG={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function cqe(e){return Object.keys(e||{}).reduce(function(t,n){return t||QG.hasOwnProperty(n)},!1)}const fqe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},dqe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",hqe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function pqe(e){e.__index__=-1,e.__text_cache__=""}function vqe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function EI(){return function(e,t){t.normalize(e)}}function ox(e){const t=e.re=oqe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(dqe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(u){return u.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(u,s){throw new Error('(LinkifyIt) Invalid schema "'+u+'": '+s)}Object.keys(e.__schemas__).forEach(function(u){const s=e.__schemas__[u];if(s===null)return;const l={validate:null,link:null};if(e.__compiled__[u]=l,uqe(s)){sqe(s.validate)?l.validate=vqe(s.validate):CI(s.validate)?l.validate=s.validate:o(u,s),CI(s.normalize)?l.normalize=s.normalize:s.normalize?o(u,s):l.normalize=EI();return}if(aqe(s)){i.push(u);return}o(u,s)}),i.forEach(function(u){e.__compiled__[e.__schemas__[u]]&&(e.__compiled__[u].validate=e.__compiled__[e.__schemas__[u]].validate,e.__compiled__[u].normalize=e.__compiled__[e.__schemas__[u]].normalize)}),e.__compiled__[""]={validate:null,normalize:EI()};const a=Object.keys(e.__compiled__).filter(function(u){return u.length>0&&e.__compiled__[u]}).map(lqe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),pqe(e)}function gqe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function J6(e,t){const n=new gqe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Uo(e,t){if(!(this instanceof Uo))return new Uo(e,t);t||cqe(e)&&(t=e,e={}),this.__opts__=Q6({},QG,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Q6({},fqe,e),this.__compiled__={},this.__tlds__=hqe,this.__tlds_replaced__=!1,this.re={},ox(this)}Uo.prototype.add=function(t,n){return this.__schemas__[t]=n,ox(this),this};Uo.prototype.set=function(t){return this.__opts__=Q6(this.__opts__,t),this};Uo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,u,s,l,c;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],s.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,u=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=u))),this.__index__>=0};Uo.prototype.pretest=function(t){return this.re.pretest.test(t)};Uo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Uo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(J6(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(J6(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Uo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,J6(this,0)):null};Uo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),ox(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ox(this),this)};Uo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Uo.prototype.onCompile=function(){};const Md=2147483647,mu=36,rP=1,Zv=26,mqe=38,yqe=700,JG=72,eY=128,tY="-",bqe=/^xn--/,xqe=/[^\0-\x7F]/,wqe=/[\x2E\u3002\uFF0E\uFF61]/g,_qe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g3=mu-rP,yu=Math.floor,m3=String.fromCharCode;function Ys(e){throw new RangeError(_qe[e])}function Sqe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function nY(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(wqe,".");const i=e.split("."),o=Sqe(i,t).join(".");return r+o}function rY(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),Eqe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:mu},AI=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},iY=function(e,t,n){let r=0;for(e=n?yu(e/yqe):e>>1,e+=yu(e/t);e>g3*Zv>>1;r+=mu)e=yu(e/g3);return yu(r+(g3+1)*e/(e+mqe))},oY=function(e){const t=[],n=e.length;let r=0,i=eY,o=JG,a=e.lastIndexOf(tY);a<0&&(a=0);for(let u=0;u=128&&Ys("not-basic"),t.push(e.charCodeAt(u));for(let u=a>0?a+1:0;u=n&&Ys("invalid-input");const h=Eqe(e.charCodeAt(u++));h>=mu&&Ys("invalid-input"),h>yu((Md-r)/c)&&Ys("overflow"),r+=h*c;const v=d<=o?rP:d>=o+Zv?Zv:d-o;if(hyu(Md/g)&&Ys("overflow"),c*=g}const l=t.length+1;o=iY(r-s,l,s==0),yu(r/l)>Md-i&&Ys("overflow"),i+=yu(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},aY=function(e){const t=[];e=rY(e);const n=e.length;let r=eY,i=0,o=JG;for(const s of e)s<128&&t.push(m3(s));const a=t.length;let u=a;for(a&&t.push(tY);u=r&&cyu((Md-i)/l)&&Ys("overflow"),i+=(s-r)*l,r=s;for(const c of e)if(cMd&&Ys("overflow"),c===r){let d=i;for(let h=mu;;h+=mu){const v=h<=o?rP:h>=o+Zv?Zv:h-o;if(d=0))try{t.hostname=uY.toASCII(t.hostname)}catch{}return $g(ZO(t))}function Nqe(e){const t=XO(e,!0);if(t.hostname&&(!t.protocol||sY.indexOf(t.protocol)>=0))try{t.hostname=uY.toUnicode(t.hostname)}catch{}return bh(ZO(t),bh.defaultChars+"%")}function Qa(e,t){if(!(this instanceof Qa))return new Qa(e,t);t||JO(e)||(t=e||{},e="default"),this.inline=new Ng,this.block=new r2,this.core=new tP,this.renderer=new Zh,this.linkify=new Uo,this.validateLink=$qe,this.normalizeLink=Iqe,this.normalizeLinkText=Nqe,this.utils=LVe,this.helpers=t2({},UVe),this.options={},this.configure(e),t&&this.set(t)}Qa.prototype.set=function(e){return t2(this.options,e),this};Qa.prototype.configure=function(e){const t=this;if(JO(e)){const n=e;if(e=Mqe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Qa.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qa.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qa.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qa.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Qa.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qa.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Qa.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var lY={exports:{}};(function(e){(function(t){var n=function(k){var D,$=new Float64Array(16);if(k)for(D=0;D>24&255,k[D+1]=$>>16&255,k[D+2]=$>>8&255,k[D+3]=$&255,k[D+4]=O>>24&255,k[D+5]=O>>16&255,k[D+6]=O>>8&255,k[D+7]=O&255}function m(k,D,$,O,N){var ee,ne=0;for(ee=0;ee>>8)-1}function b(k,D,$,O){return m(k,D,$,O,16)}function w(k,D,$,O){return m(k,D,$,O,32)}function x(k,D,$,O){for(var N=O[0]&255|(O[1]&255)<<8|(O[2]&255)<<16|(O[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=O[4]&255|(O[5]&255)<<8|(O[6]&255)<<16|(O[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=O[8]&255|(O[9]&255)<<8|(O[10]&255)<<16|(O[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=O[12]&255|(O[13]&255)<<8|(O[14]&255)<<16|(O[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Pe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Pe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;Je=Je+N|0,st=st+ee|0,Qe=Qe+ne|0,Le=Le+he|0,qe=qe+Ce|0,Ge=Ge+Be|0,me=me+He|0,ve=ve+ct|0,De=De+Ne|0,Pe=Pe+rt|0,Te=Te+bt|0,ze=ze+At|0,mt=mt+vt|0,Nt=Nt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=st>>>0&255,k[5]=st>>>8&255,k[6]=st>>>16&255,k[7]=st>>>24&255,k[8]=Qe>>>0&255,k[9]=Qe>>>8&255,k[10]=Qe>>>16&255,k[11]=Qe>>>24&255,k[12]=Le>>>0&255,k[13]=Le>>>8&255,k[14]=Le>>>16&255,k[15]=Le>>>24&255,k[16]=qe>>>0&255,k[17]=qe>>>8&255,k[18]=qe>>>16&255,k[19]=qe>>>24&255,k[20]=Ge>>>0&255,k[21]=Ge>>>8&255,k[22]=Ge>>>16&255,k[23]=Ge>>>24&255,k[24]=me>>>0&255,k[25]=me>>>8&255,k[26]=me>>>16&255,k[27]=me>>>24&255,k[28]=ve>>>0&255,k[29]=ve>>>8&255,k[30]=ve>>>16&255,k[31]=ve>>>24&255,k[32]=De>>>0&255,k[33]=De>>>8&255,k[34]=De>>>16&255,k[35]=De>>>24&255,k[36]=Pe>>>0&255,k[37]=Pe>>>8&255,k[38]=Pe>>>16&255,k[39]=Pe>>>24&255,k[40]=Te>>>0&255,k[41]=Te>>>8&255,k[42]=Te>>>16&255,k[43]=Te>>>24&255,k[44]=ze>>>0&255,k[45]=ze>>>8&255,k[46]=ze>>>16&255,k[47]=ze>>>24&255,k[48]=mt>>>0&255,k[49]=mt>>>8&255,k[50]=mt>>>16&255,k[51]=mt>>>24&255,k[52]=Nt>>>0&255,k[53]=Nt>>>8&255,k[54]=Nt>>>16&255,k[55]=Nt>>>24&255,k[56]=Ft>>>0&255,k[57]=Ft>>>8&255,k[58]=Ft>>>16&255,k[59]=Ft>>>24&255,k[60]=$t>>>0&255,k[61]=$t>>>8&255,k[62]=$t>>>16&255,k[63]=$t>>>24&255}function S(k,D,$,O){for(var N=O[0]&255|(O[1]&255)<<8|(O[2]&255)<<16|(O[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=O[4]&255|(O[5]&255)<<8|(O[6]&255)<<16|(O[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=O[8]&255|(O[9]&255)<<8|(O[10]&255)<<16|(O[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=O[12]&255|(O[13]&255)<<8|(O[14]&255)<<16|(O[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Pe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Pe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=Ge>>>0&255,k[5]=Ge>>>8&255,k[6]=Ge>>>16&255,k[7]=Ge>>>24&255,k[8]=Te>>>0&255,k[9]=Te>>>8&255,k[10]=Te>>>16&255,k[11]=Te>>>24&255,k[12]=$t>>>0&255,k[13]=$t>>>8&255,k[14]=$t>>>16&255,k[15]=$t>>>24&255,k[16]=me>>>0&255,k[17]=me>>>8&255,k[18]=me>>>16&255,k[19]=me>>>24&255,k[20]=ve>>>0&255,k[21]=ve>>>8&255,k[22]=ve>>>16&255,k[23]=ve>>>24&255,k[24]=De>>>0&255,k[25]=De>>>8&255,k[26]=De>>>16&255,k[27]=De>>>24&255,k[28]=Pe>>>0&255,k[29]=Pe>>>8&255,k[30]=Pe>>>16&255,k[31]=Pe>>>24&255}function A(k,D,$,O){x(k,D,$,O)}function E(k,D,$,O){S(k,D,$,O)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(k,D,$,O,N,ee,ne){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;N>=64;){for(A(Ce,he,ne,C),He=0;He<64;He++)k[D+He]=$[O+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;N-=64,D+=64,O+=64}if(N>0)for(A(Ce,he,ne,C),He=0;He=64;){for(A(ne,ee,N,C),Ce=0;Ce<64;Ce++)k[D+Ce]=ne[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(A(ne,ee,N,C),Ce=0;Ce<$;Ce++)k[D+Ce]=ne[Ce];return 0}function F(k,D,$,O,N){var ee=new Uint8Array(32);E(ee,O,N,C);for(var ne=new Uint8Array(8),he=0;he<8;he++)ne[he]=O[he+16];return M(k,D,$,ne,ee)}function U(k,D,$,O,N,ee,ne){var he=new Uint8Array(32);E(he,ee,ne,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return T(k,D,$,O,N,Ce,he)}var H=function(k){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,O,N,ee,ne,he,Ce;D=k[0]&255|(k[1]&255)<<8,this.r[0]=D&8191,$=k[2]&255|(k[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,O=k[4]&255|(k[5]&255)<<8,this.r[2]=($>>>10|O<<6)&7939,N=k[6]&255|(k[7]&255)<<8,this.r[3]=(O>>>7|N<<9)&8191,ee=k[8]&255|(k[9]&255)<<8,this.r[4]=(N>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,ne=k[10]&255|(k[11]&255)<<8,this.r[6]=(ee>>>14|ne<<2)&8191,he=k[12]&255|(k[13]&255)<<8,this.r[7]=(ne>>>11|he<<5)&8065,Ce=k[14]&255|(k[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=k[16]&255|(k[17]&255)<<8,this.pad[1]=k[18]&255|(k[19]&255)<<8,this.pad[2]=k[20]&255|(k[21]&255)<<8,this.pad[3]=k[22]&255|(k[23]&255)<<8,this.pad[4]=k[24]&255|(k[25]&255)<<8,this.pad[5]=k[26]&255|(k[27]&255)<<8,this.pad[6]=k[28]&255|(k[29]&255)<<8,this.pad[7]=k[30]&255|(k[31]&255)<<8};H.prototype.blocks=function(k,D,$){for(var O=this.fin?0:2048,N,ee,ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le=this.h[0],qe=this.h[1],Ge=this.h[2],me=this.h[3],ve=this.h[4],De=this.h[5],Pe=this.h[6],Te=this.h[7],ze=this.h[8],mt=this.h[9],Nt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Gt=this.r[4],an=this.r[5],un=this.r[6],Lt=this.r[7],sn=this.r[8],tn=this.r[9];$>=16;)N=k[D+0]&255|(k[D+1]&255)<<8,Le+=N&8191,ee=k[D+2]&255|(k[D+3]&255)<<8,qe+=(N>>>13|ee<<3)&8191,ne=k[D+4]&255|(k[D+5]&255)<<8,Ge+=(ee>>>10|ne<<6)&8191,he=k[D+6]&255|(k[D+7]&255)<<8,me+=(ne>>>7|he<<9)&8191,Ce=k[D+8]&255|(k[D+9]&255)<<8,ve+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=k[D+10]&255|(k[D+11]&255)<<8,Pe+=(Ce>>>14|Be<<2)&8191,He=k[D+12]&255|(k[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=k[D+14]&255|(k[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,mt+=ct>>>5|O,Ne=0,rt=Ne,rt+=Le*Nt,rt+=qe*(5*tn),rt+=Ge*(5*sn),rt+=me*(5*Lt),rt+=ve*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*an),rt+=Pe*(5*Gt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=mt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Le*Ft,bt+=qe*Nt,bt+=Ge*(5*tn),bt+=me*(5*sn),bt+=ve*(5*Lt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Pe*(5*an),bt+=Te*(5*Gt),bt+=ze*(5*te),bt+=mt*(5*$t),Ne+=bt>>>13,bt&=8191,At=Ne,At+=Le*$t,At+=qe*Ft,At+=Ge*Nt,At+=me*(5*tn),At+=ve*(5*sn),Ne=At>>>13,At&=8191,At+=De*(5*Lt),At+=Pe*(5*un),At+=Te*(5*an),At+=ze*(5*Gt),At+=mt*(5*te),Ne+=At>>>13,At&=8191,vt=Ne,vt+=Le*te,vt+=qe*$t,vt+=Ge*Ft,vt+=me*Nt,vt+=ve*(5*tn),Ne=vt>>>13,vt&=8191,vt+=De*(5*sn),vt+=Pe*(5*Lt),vt+=Te*(5*un),vt+=ze*(5*an),vt+=mt*(5*Gt),Ne+=vt>>>13,vt&=8191,ht=Ne,ht+=Le*Gt,ht+=qe*te,ht+=Ge*$t,ht+=me*Ft,ht+=ve*Nt,Ne=ht>>>13,ht&=8191,ht+=De*(5*tn),ht+=Pe*(5*sn),ht+=Te*(5*Lt),ht+=ze*(5*un),ht+=mt*(5*an),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Le*an,xt+=qe*Gt,xt+=Ge*te,xt+=me*$t,xt+=ve*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Nt,xt+=Pe*(5*tn),xt+=Te*(5*sn),xt+=ze*(5*Lt),xt+=mt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Le*un,wt+=qe*an,wt+=Ge*Gt,wt+=me*te,wt+=ve*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Pe*Nt,wt+=Te*(5*tn),wt+=ze*(5*sn),wt+=mt*(5*Lt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Le*Lt,Je+=qe*un,Je+=Ge*an,Je+=me*Gt,Je+=ve*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Pe*Ft,Je+=Te*Nt,Je+=ze*(5*tn),Je+=mt*(5*sn),Ne+=Je>>>13,Je&=8191,st=Ne,st+=Le*sn,st+=qe*Lt,st+=Ge*un,st+=me*an,st+=ve*Gt,Ne=st>>>13,st&=8191,st+=De*te,st+=Pe*$t,st+=Te*Ft,st+=ze*Nt,st+=mt*(5*tn),Ne+=st>>>13,st&=8191,Qe=Ne,Qe+=Le*tn,Qe+=qe*sn,Qe+=Ge*Lt,Qe+=me*un,Qe+=ve*an,Ne=Qe>>>13,Qe&=8191,Qe+=De*Gt,Qe+=Pe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=mt*Nt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Le=rt,qe=bt,Ge=At,me=vt,ve=ht,De=xt,Pe=wt,Te=Je,ze=st,mt=Qe,D+=16,$-=16;this.h[0]=Le,this.h[1]=qe,this.h[2]=Ge,this.h[3]=me,this.h[4]=ve,this.h[5]=De,this.h[6]=Pe,this.h[7]=Te,this.h[8]=ze,this.h[9]=mt},H.prototype.finish=function(k,D){var $=new Uint16Array(10),O,N,ee,ne;if(this.leftover){for(ne=this.leftover,this.buffer[ne++]=1;ne<16;ne++)this.buffer[ne]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(O=this.h[1]>>>13,this.h[1]&=8191,ne=2;ne<10;ne++)this.h[ne]+=O,O=this.h[ne]>>>13,this.h[ne]&=8191;for(this.h[0]+=O*5,O=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=O,O=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=O,$[0]=this.h[0]+5,O=$[0]>>>13,$[0]&=8191,ne=1;ne<10;ne++)$[ne]=this.h[ne]+O,O=$[ne]>>>13,$[ne]&=8191;for($[9]-=8192,N=(O^1)-1,ne=0;ne<10;ne++)$[ne]&=N;for(N=~N,ne=0;ne<10;ne++)this.h[ne]=this.h[ne]&N|$[ne];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,ne=1;ne<8;ne++)ee=(this.h[ne]+this.pad[ne]|0)+(ee>>>16)|0,this.h[ne]=ee&65535;k[D+0]=this.h[0]>>>0&255,k[D+1]=this.h[0]>>>8&255,k[D+2]=this.h[1]>>>0&255,k[D+3]=this.h[1]>>>8&255,k[D+4]=this.h[2]>>>0&255,k[D+5]=this.h[2]>>>8&255,k[D+6]=this.h[3]>>>0&255,k[D+7]=this.h[3]>>>8&255,k[D+8]=this.h[4]>>>0&255,k[D+9]=this.h[4]>>>8&255,k[D+10]=this.h[5]>>>0&255,k[D+11]=this.h[5]>>>8&255,k[D+12]=this.h[6]>>>0&255,k[D+13]=this.h[6]>>>8&255,k[D+14]=this.h[7]>>>0&255,k[D+15]=this.h[7]>>>8&255},H.prototype.update=function(k,D,$){var O,N;if(this.leftover){for(N=16-this.leftover,N>$&&(N=$),O=0;O=16&&(N=$-$%16,this.blocks(k,D,N),D+=N,$-=N),$){for(O=0;O<$;O++)this.buffer[this.leftover+O]=k[D+O];this.leftover+=$}};function W(k,D,$,O,N,ee){var ne=new H(ee);return ne.update($,O,N),ne.finish(k,D),0}function ie(k,D,$,O,N,ee){var ne=new Uint8Array(16);return W(ne,0,$,O,N,ee),b(k,D,ne,0)}function Z(k,D,$,O,N){var ee;if($<32)return-1;for(U(k,0,D,0,$,O,N),W(k,16,k,32,$-32,k),ee=0;ee<16;ee++)k[ee]=0;return 0}function G(k,D,$,O,N){var ee,ne=new Uint8Array(32);if($<32||(F(ne,0,32,O,N),ie(D,16,D,32,$-32,ne)!==0))return-1;for(U(k,0,D,0,$,O,N),ee=0;ee<32;ee++)k[ee]=0;return 0}function K(k,D){var $;for($=0;$<16;$++)k[$]=D[$]|0}function V(k){var D,$,O=1;for(D=0;D<16;D++)$=k[D]+O+65535,O=Math.floor($/65536),k[D]=$-O*65536;k[0]+=O-1+37*(O-1)}function B(k,D,$){for(var O,N=~($-1),ee=0;ee<16;ee++)O=N&(k[ee]^D[ee]),k[ee]^=O,D[ee]^=O}function q(k,D){var $,O,N,ee=n(),ne=n();for($=0;$<16;$++)ne[$]=D[$];for(V(ne),V(ne),V(ne),O=0;O<2;O++){for(ee[0]=ne[0]-65517,$=1;$<15;$++)ee[$]=ne[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=ne[15]-32767-(ee[14]>>16&1),N=ee[15]>>16&1,ee[14]&=65535,B(ne,ee,1-N)}for($=0;$<16;$++)k[2*$]=ne[$]&255,k[2*$+1]=ne[$]>>8}function Y(k,D){var $=new Uint8Array(32),O=new Uint8Array(32);return q($,k),q(O,D),w($,0,O,0)}function ue(k){var D=new Uint8Array(32);return q(D,k),D[0]&1}function Q(k,D){var $;for($=0;$<16;$++)k[$]=D[2*$]+(D[2*$+1]<<8);k[15]&=32767}function J(k,D,$){for(var O=0;O<16;O++)k[O]=D[O]+$[O]}function se(k,D,$){for(var O=0;O<16;O++)k[O]=D[O]-$[O]}function de(k,D,$){var O,N,ee=0,ne=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,At=0,vt=0,ht=0,xt=0,wt=0,Je=0,st=0,Qe=0,Le=0,qe=0,Ge=0,me=0,ve=0,De=0,Pe=0,Te=0,ze=0,mt=0,Nt=0,Ft=0,$t=0,te=$[0],Gt=$[1],an=$[2],un=$[3],Lt=$[4],sn=$[5],tn=$[6],Kn=$[7],vn=$[8],Pn=$[9],Gn=$[10],Yn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];O=D[0],ee+=O*te,ne+=O*Gt,he+=O*an,Ce+=O*un,Be+=O*Lt,He+=O*sn,ct+=O*tn,Ne+=O*Kn,rt+=O*vn,bt+=O*Pn,At+=O*Gn,vt+=O*Yn,ht+=O*xr,xt+=O*$r,wt+=O*Ir,Je+=O*Nr,O=D[1],ne+=O*te,he+=O*Gt,Ce+=O*an,Be+=O*un,He+=O*Lt,ct+=O*sn,Ne+=O*tn,rt+=O*Kn,bt+=O*vn,At+=O*Pn,vt+=O*Gn,ht+=O*Yn,xt+=O*xr,wt+=O*$r,Je+=O*Ir,st+=O*Nr,O=D[2],he+=O*te,Ce+=O*Gt,Be+=O*an,He+=O*un,ct+=O*Lt,Ne+=O*sn,rt+=O*tn,bt+=O*Kn,At+=O*vn,vt+=O*Pn,ht+=O*Gn,xt+=O*Yn,wt+=O*xr,Je+=O*$r,st+=O*Ir,Qe+=O*Nr,O=D[3],Ce+=O*te,Be+=O*Gt,He+=O*an,ct+=O*un,Ne+=O*Lt,rt+=O*sn,bt+=O*tn,At+=O*Kn,vt+=O*vn,ht+=O*Pn,xt+=O*Gn,wt+=O*Yn,Je+=O*xr,st+=O*$r,Qe+=O*Ir,Le+=O*Nr,O=D[4],Be+=O*te,He+=O*Gt,ct+=O*an,Ne+=O*un,rt+=O*Lt,bt+=O*sn,At+=O*tn,vt+=O*Kn,ht+=O*vn,xt+=O*Pn,wt+=O*Gn,Je+=O*Yn,st+=O*xr,Qe+=O*$r,Le+=O*Ir,qe+=O*Nr,O=D[5],He+=O*te,ct+=O*Gt,Ne+=O*an,rt+=O*un,bt+=O*Lt,At+=O*sn,vt+=O*tn,ht+=O*Kn,xt+=O*vn,wt+=O*Pn,Je+=O*Gn,st+=O*Yn,Qe+=O*xr,Le+=O*$r,qe+=O*Ir,Ge+=O*Nr,O=D[6],ct+=O*te,Ne+=O*Gt,rt+=O*an,bt+=O*un,At+=O*Lt,vt+=O*sn,ht+=O*tn,xt+=O*Kn,wt+=O*vn,Je+=O*Pn,st+=O*Gn,Qe+=O*Yn,Le+=O*xr,qe+=O*$r,Ge+=O*Ir,me+=O*Nr,O=D[7],Ne+=O*te,rt+=O*Gt,bt+=O*an,At+=O*un,vt+=O*Lt,ht+=O*sn,xt+=O*tn,wt+=O*Kn,Je+=O*vn,st+=O*Pn,Qe+=O*Gn,Le+=O*Yn,qe+=O*xr,Ge+=O*$r,me+=O*Ir,ve+=O*Nr,O=D[8],rt+=O*te,bt+=O*Gt,At+=O*an,vt+=O*un,ht+=O*Lt,xt+=O*sn,wt+=O*tn,Je+=O*Kn,st+=O*vn,Qe+=O*Pn,Le+=O*Gn,qe+=O*Yn,Ge+=O*xr,me+=O*$r,ve+=O*Ir,De+=O*Nr,O=D[9],bt+=O*te,At+=O*Gt,vt+=O*an,ht+=O*un,xt+=O*Lt,wt+=O*sn,Je+=O*tn,st+=O*Kn,Qe+=O*vn,Le+=O*Pn,qe+=O*Gn,Ge+=O*Yn,me+=O*xr,ve+=O*$r,De+=O*Ir,Pe+=O*Nr,O=D[10],At+=O*te,vt+=O*Gt,ht+=O*an,xt+=O*un,wt+=O*Lt,Je+=O*sn,st+=O*tn,Qe+=O*Kn,Le+=O*vn,qe+=O*Pn,Ge+=O*Gn,me+=O*Yn,ve+=O*xr,De+=O*$r,Pe+=O*Ir,Te+=O*Nr,O=D[11],vt+=O*te,ht+=O*Gt,xt+=O*an,wt+=O*un,Je+=O*Lt,st+=O*sn,Qe+=O*tn,Le+=O*Kn,qe+=O*vn,Ge+=O*Pn,me+=O*Gn,ve+=O*Yn,De+=O*xr,Pe+=O*$r,Te+=O*Ir,ze+=O*Nr,O=D[12],ht+=O*te,xt+=O*Gt,wt+=O*an,Je+=O*un,st+=O*Lt,Qe+=O*sn,Le+=O*tn,qe+=O*Kn,Ge+=O*vn,me+=O*Pn,ve+=O*Gn,De+=O*Yn,Pe+=O*xr,Te+=O*$r,ze+=O*Ir,mt+=O*Nr,O=D[13],xt+=O*te,wt+=O*Gt,Je+=O*an,st+=O*un,Qe+=O*Lt,Le+=O*sn,qe+=O*tn,Ge+=O*Kn,me+=O*vn,ve+=O*Pn,De+=O*Gn,Pe+=O*Yn,Te+=O*xr,ze+=O*$r,mt+=O*Ir,Nt+=O*Nr,O=D[14],wt+=O*te,Je+=O*Gt,st+=O*an,Qe+=O*un,Le+=O*Lt,qe+=O*sn,Ge+=O*tn,me+=O*Kn,ve+=O*vn,De+=O*Pn,Pe+=O*Gn,Te+=O*Yn,ze+=O*xr,mt+=O*$r,Nt+=O*Ir,Ft+=O*Nr,O=D[15],Je+=O*te,st+=O*Gt,Qe+=O*an,Le+=O*un,qe+=O*Lt,Ge+=O*sn,me+=O*tn,ve+=O*Kn,De+=O*vn,Pe+=O*Pn,Te+=O*Gn,ze+=O*Yn,mt+=O*xr,Nt+=O*$r,Ft+=O*Ir,$t+=O*Nr,ee+=38*st,ne+=38*Qe,he+=38*Le,Ce+=38*qe,Be+=38*Ge,He+=38*me,ct+=38*ve,Ne+=38*De,rt+=38*Pe,bt+=38*Te,At+=38*ze,vt+=38*mt,ht+=38*Nt,xt+=38*Ft,wt+=38*$t,N=1,O=ee+N+65535,N=Math.floor(O/65536),ee=O-N*65536,O=ne+N+65535,N=Math.floor(O/65536),ne=O-N*65536,O=he+N+65535,N=Math.floor(O/65536),he=O-N*65536,O=Ce+N+65535,N=Math.floor(O/65536),Ce=O-N*65536,O=Be+N+65535,N=Math.floor(O/65536),Be=O-N*65536,O=He+N+65535,N=Math.floor(O/65536),He=O-N*65536,O=ct+N+65535,N=Math.floor(O/65536),ct=O-N*65536,O=Ne+N+65535,N=Math.floor(O/65536),Ne=O-N*65536,O=rt+N+65535,N=Math.floor(O/65536),rt=O-N*65536,O=bt+N+65535,N=Math.floor(O/65536),bt=O-N*65536,O=At+N+65535,N=Math.floor(O/65536),At=O-N*65536,O=vt+N+65535,N=Math.floor(O/65536),vt=O-N*65536,O=ht+N+65535,N=Math.floor(O/65536),ht=O-N*65536,O=xt+N+65535,N=Math.floor(O/65536),xt=O-N*65536,O=wt+N+65535,N=Math.floor(O/65536),wt=O-N*65536,O=Je+N+65535,N=Math.floor(O/65536),Je=O-N*65536,ee+=N-1+37*(N-1),N=1,O=ee+N+65535,N=Math.floor(O/65536),ee=O-N*65536,O=ne+N+65535,N=Math.floor(O/65536),ne=O-N*65536,O=he+N+65535,N=Math.floor(O/65536),he=O-N*65536,O=Ce+N+65535,N=Math.floor(O/65536),Ce=O-N*65536,O=Be+N+65535,N=Math.floor(O/65536),Be=O-N*65536,O=He+N+65535,N=Math.floor(O/65536),He=O-N*65536,O=ct+N+65535,N=Math.floor(O/65536),ct=O-N*65536,O=Ne+N+65535,N=Math.floor(O/65536),Ne=O-N*65536,O=rt+N+65535,N=Math.floor(O/65536),rt=O-N*65536,O=bt+N+65535,N=Math.floor(O/65536),bt=O-N*65536,O=At+N+65535,N=Math.floor(O/65536),At=O-N*65536,O=vt+N+65535,N=Math.floor(O/65536),vt=O-N*65536,O=ht+N+65535,N=Math.floor(O/65536),ht=O-N*65536,O=xt+N+65535,N=Math.floor(O/65536),xt=O-N*65536,O=wt+N+65535,N=Math.floor(O/65536),wt=O-N*65536,O=Je+N+65535,N=Math.floor(O/65536),Je=O-N*65536,ee+=N-1+37*(N-1),k[0]=ee,k[1]=ne,k[2]=he,k[3]=Ce,k[4]=Be,k[5]=He,k[6]=ct,k[7]=Ne,k[8]=rt,k[9]=bt,k[10]=At,k[11]=vt,k[12]=ht,k[13]=xt,k[14]=wt,k[15]=Je}function Se(k,D){de(k,D,D)}function ge(k,D){var $=n(),O;for(O=0;O<16;O++)$[O]=D[O];for(O=253;O>=0;O--)Se($,$),O!==2&&O!==4&&de($,$,D);for(O=0;O<16;O++)k[O]=$[O]}function Ze(k,D){var $=n(),O;for(O=0;O<16;O++)$[O]=D[O];for(O=250;O>=0;O--)Se($,$),O!==1&&de($,$,D);for(O=0;O<16;O++)k[O]=$[O]}function Oe(k,D,$){var O=new Uint8Array(32),N=new Float64Array(80),ee,ne,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(ne=0;ne<31;ne++)O[ne]=D[ne];for(O[31]=D[31]&127|64,O[0]&=248,Q(N,$),ne=0;ne<16;ne++)Ce[ne]=N[ne],He[ne]=he[ne]=Be[ne]=0;for(he[0]=He[0]=1,ne=254;ne>=0;--ne)ee=O[ne>>>3]>>>(ne&7)&1,B(he,Ce,ee),B(Be,He,ee),J(ct,he,Be),se(he,he,Be),J(Be,Ce,He),se(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),se(he,he,Be),Se(Ce,he),se(Be,He,Ne),de(he,Be,s),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,N),Se(Ce,ct),B(he,Ce,ee),B(Be,He,ee);for(ne=0;ne<16;ne++)N[ne+16]=he[ne],N[ne+32]=Be[ne],N[ne+48]=Ce[ne],N[ne+64]=He[ne];var rt=N.subarray(32),bt=N.subarray(16);return ge(rt,rt),de(bt,bt,rt),q(k,bt),0}function Fe(k,D){return Oe(k,D,o)}function $e(k,D){return r(D,32),Fe(k,D)}function be(k,D,$){var O=new Uint8Array(32);return Oe(O,$,D),E(k,i,O,C)}var yt=Z,lt=G;function It(k,D,$,O,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),yt(k,D,$,O,ne)}function mn(k,D,$,O,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),lt(k,D,$,O,ne)}var en=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function re(k,D,$,O){for(var N=new Int32Array(16),ee=new Int32Array(16),ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le,qe,Ge,me,ve,De,Pe,Te,ze,mt=k[0],Nt=k[1],Ft=k[2],$t=k[3],te=k[4],Gt=k[5],an=k[6],un=k[7],Lt=D[0],sn=D[1],tn=D[2],Kn=D[3],vn=D[4],Pn=D[5],Gn=D[6],Yn=D[7],xr=0;O>=128;){for(qe=0;qe<16;qe++)Ge=8*qe+xr,N[qe]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[qe]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(qe=0;qe<80;qe++)if(ne=mt,he=Nt,Ce=Ft,Be=$t,He=te,ct=Gt,Ne=an,rt=un,bt=Lt,At=sn,vt=tn,ht=Kn,xt=vn,wt=Pn,Je=Gn,st=Yn,me=un,ve=Yn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=(te>>>14|vn<<18)^(te>>>18|vn<<14)^(vn>>>9|te<<23),ve=(vn>>>14|te<<18)^(vn>>>18|te<<14)^(te>>>9|vn<<23),De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=te&Gt^~te&an,ve=vn&Pn^~vn&Gn,De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=en[qe*2],ve=en[qe*2+1],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=N[qe%16],ve=ee[qe%16],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Le=De&65535|Pe<<16,me=Qe,ve=Le,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=(mt>>>28|Lt<<4)^(Lt>>>2|mt<<30)^(Lt>>>7|mt<<25),ve=(Lt>>>28|mt<<4)^(mt>>>2|Lt<<30)^(mt>>>7|Lt<<25),De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=mt&Nt^mt&Ft^Nt&Ft,ve=Lt&sn^Lt&tn^sn&tn,De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,st=De&65535|Pe<<16,me=Be,ve=ht,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=Qe,ve=Le,De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Pe<<16,Nt=ne,Ft=he,$t=Ce,te=Be,Gt=He,an=ct,un=Ne,mt=rt,sn=bt,tn=At,Kn=vt,vn=ht,Pn=xt,Gn=wt,Yn=Je,Lt=st,qe%16===15)for(Ge=0;Ge<16;Ge++)me=N[Ge],ve=ee[Ge],De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=N[(Ge+9)%16],ve=ee[(Ge+9)%16],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+1)%16],Le=ee[(Ge+1)%16],me=(Qe>>>1|Le<<31)^(Qe>>>8|Le<<24)^Qe>>>7,ve=(Le>>>1|Qe<<31)^(Le>>>8|Qe<<24)^(Le>>>7|Qe<<25),De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+14)%16],Le=ee[(Ge+14)%16],me=(Qe>>>19|Le<<13)^(Le>>>29|Qe<<3)^Qe>>>6,ve=(Le>>>19|Qe<<13)^(Qe>>>29|Le<<3)^(Le>>>6|Qe<<26),De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,N[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Pe<<16;me=mt,ve=Lt,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[0],ve=D[0],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[0]=mt=Te&65535|ze<<16,D[0]=Lt=De&65535|Pe<<16,me=Nt,ve=sn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[1],ve=D[1],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[1]=Nt=Te&65535|ze<<16,D[1]=sn=De&65535|Pe<<16,me=Ft,ve=tn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[2],ve=D[2],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[2]=Ft=Te&65535|ze<<16,D[2]=tn=De&65535|Pe<<16,me=$t,ve=Kn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[3],ve=D[3],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[3]=$t=Te&65535|ze<<16,D[3]=Kn=De&65535|Pe<<16,me=te,ve=vn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[4],ve=D[4],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[4]=te=Te&65535|ze<<16,D[4]=vn=De&65535|Pe<<16,me=Gt,ve=Pn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[5],ve=D[5],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[5]=Gt=Te&65535|ze<<16,D[5]=Pn=De&65535|Pe<<16,me=an,ve=Gn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[6],ve=D[6],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[6]=an=Te&65535|ze<<16,D[6]=Gn=De&65535|Pe<<16,me=un,ve=Yn,De=ve&65535,Pe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[7],ve=D[7],De+=ve&65535,Pe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,k[7]=un=Te&65535|ze<<16,D[7]=Yn=De&65535|Pe<<16,xr+=128,O-=128}return O}function pe(k,D,$){var O=new Int32Array(8),N=new Int32Array(8),ee=new Uint8Array(256),ne,he=$;for(O[0]=1779033703,O[1]=3144134277,O[2]=1013904242,O[3]=2773480762,O[4]=1359893119,O[5]=2600822924,O[6]=528734635,O[7]=1541459225,N[0]=4089235720,N[1]=2227873595,N[2]=4271175723,N[3]=1595750129,N[4]=2917565137,N[5]=725511199,N[6]=4215389547,N[7]=327033209,re(O,N,D,$),$%=128,ne=0;ne<$;ne++)ee[ne]=D[he-$+ne];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,g(ee,$-8,he/536870912|0,he<<3),re(O,N,ee,$),ne=0;ne<8;ne++)g(k,8*ne,O[ne],N[ne]);return 0}function ye(k,D){var $=n(),O=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n(),Be=n(),He=n();se($,k[1],k[0]),se(He,D[1],D[0]),de($,$,He),J(O,k[0],k[1]),J(He,D[0],D[1]),de(O,O,He),de(N,k[3],D[3]),de(N,N,c),de(ee,k[2],D[2]),J(ee,ee,ee),se(ne,O,$),se(he,ee,N),J(Ce,ee,N),J(Be,O,$),de(k[0],ne,he),de(k[1],Be,Ce),de(k[2],Ce,he),de(k[3],ne,Be)}function Ue(k,D,$){var O;for(O=0;O<4;O++)B(k[O],D[O],$)}function je(k,D){var $=n(),O=n(),N=n();ge(N,D[2]),de($,D[0],N),de(O,D[1],N),q(k,O),k[31]^=ue($)<<7}function ke(k,D,$){var O,N;for(K(k[0],a),K(k[1],u),K(k[2],u),K(k[3],a),N=255;N>=0;--N)O=$[N/8|0]>>(N&7)&1,Ue(k,D,O),ye(D,k),ye(k,k),Ue(k,D,O)}function nt(k,D){var $=[n(),n(),n(),n()];K($[0],d),K($[1],h),K($[2],u),de($[3],d,h),ke(k,$,D)}function gt(k,D,$){var O=new Uint8Array(64),N=[n(),n(),n(),n()],ee;for($||r(D,32),pe(O,D,32),O[0]&=248,O[31]&=127,O[31]|=64,nt(N,O),je(k,N),ee=0;ee<32;ee++)D[ee+32]=k[ee];return 0}var bn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Vt(k,D){var $,O,N,ee;for(O=63;O>=32;--O){for($=0,N=O-32,ee=O-12;N>4)*bn[N],$=D[N]>>8,D[N]&=255;for(N=0;N<32;N++)D[N]-=$*bn[N];for(O=0;O<32;O++)D[O+1]+=D[O]>>8,k[O]=D[O]&255}function xn(k){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=k[$];for($=0;$<64;$++)k[$]=0;Vt(k,D)}function Ii(k,D,$,O){var N=new Uint8Array(64),ee=new Uint8Array(64),ne=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(N,O,32),N[0]&=248,N[31]&=127,N[31]|=64;var ct=$+64;for(he=0;he<$;he++)k[64+he]=D[he];for(he=0;he<32;he++)k[32+he]=N[32+he];for(pe(ne,k.subarray(32),$+32),xn(ne),nt(He,ne),je(k,He),he=32;he<64;he++)k[he]=O[he];for(pe(ee,k,$+64),xn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=ne[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*N[Ce];return Vt(k.subarray(32),Be),ct}function br(k,D){var $=n(),O=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n();return K(k[2],u),Q(k[1],D),Se(N,k[1]),de(ee,N,l),se(N,N,k[2]),J(ee,k[2],ee),Se(ne,ee),Se(he,ne),de(Ce,he,ne),de($,Ce,N),de($,$,ee),Ze($,$),de($,$,N),de($,$,ee),de($,$,ee),de(k[0],$,ee),Se(O,k[0]),de(O,O,ee),Y(O,N)&&de(k[0],k[0],v),Se(O,k[0]),de(O,O,ee),Y(O,N)?-1:(ue(k[0])===D[31]>>7&&se(k[0],a,k[0]),de(k[3],k[0],k[1]),0)}function yi(k,D,$,O){var N,ee=new Uint8Array(32),ne=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,O))return-1;for(N=0;N<$;N++)k[N]=D[N];for(N=0;N<32;N++)k[N+32]=O[N];if(pe(ne,k,$),xn(ne),ke(he,Ce,ne),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(N=0;N<$;N++)k[N]=0;return-1}for(N=0;N<$;N++)k[N]=D[N+64];return $}var ar=32,ui=24,bi=32,Rr=16,Yi=32,go=32,xi=32,Dr=32,wa=32,_t=ui,dn=bi,wn=Rr,qn=64,ur=32,Zr=64,mo=32,ql=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:U,crypto_stream:F,crypto_stream_salsa20_xor:T,crypto_stream_salsa20:M,crypto_onetimeauth:W,crypto_onetimeauth_verify:ie,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Oe,crypto_scalarmult_base:Fe,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:It,crypto_box_open:mn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:gt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:ar,crypto_secretbox_NONCEBYTES:ui,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Yi,crypto_scalarmult_SCALARBYTES:go,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:wa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:dn,crypto_box_BOXZEROBYTES:wn,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Zr,crypto_sign_SEEDBYTES:mo,crypto_hash_BYTES:ql,gf:n,D:l,L:bn,pack25519:q,unpack25519:Q,M:de,A:J,S:Se,Z:se,pow2523:Ze,add:ye,set25519:K,modL:Vt,scalarmult:ke,scalarbase:nt};function yf(k,D){if(k.length!==ar)throw new Error("bad key size");if(D.length!==ui)throw new Error("bad nonce size")}function oe(k,D){if(k.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var k=0;k=0},t.sign.keyPair=function(){var k=new Uint8Array(ur),D=new Uint8Array(Zr);return gt(k,D),{publicKey:k,secretKey:D}},t.sign.keyPair.fromSecretKey=function(k){if(le(k),k.length!==Zr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,A=>v(A)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const A=h?.form;if(A){const E=()=>x(S.current);return A.addEventListener("reset",E),()=>A.removeEventListener("reset",E)}},[h,x]),I.jsxs(Lqe,{scope:n,state:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":bl(w)?"mixed":w,"aria-required":a,"data-state":pY(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onKeyDown:Ye(e.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:Ye(e.onClick,A=>{x(E=>bl(E)?!0:!E),b&&(m.current=A.isPropagationStopped(),m.current||A.stopPropagation())})}),b&&I.jsx(Bqe,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"},defaultChecked:bl(o)?!1:o})]})});fY.displayName=iP;var dY="CheckboxIndicator",hY=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=jqe(dY,n);return I.jsx(oi,{present:r||bl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":pY(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});hY.displayName=dY;var Bqe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),u=hO(n),s=jA(t);y.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&v){const g=new Event("click",{bubbles:r});c.indeterminate=bl(n),v.call(c,bl(n)?!1:n),c.dispatchEvent(g)}},[u,n,r]);const l=y.useRef(bl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function bl(e){return e==="indeterminate"}function pY(e){return bl(e)?"indeterminate":e?"checked":"unchecked"}var IZe=fY,NZe=hY;export{_Ge as $,spe as A,DKe as B,BKe as C,fpe as D,dpe as E,jKe as F,bB as G,eGe as H,hKe as I,ppe as J,lpe as K,cpe as L,oKe as M,hGe as N,Uqe as O,Kqe as P,$Ke as Q,j as R,Sl as S,hpe as T,Npe as U,Fpe as V,OGe as W,XKe as X,PGe as Y,yGe as Z,bGe as _,Zqe as a,UYe as a$,SGe as a0,EGe as a1,KKe as a2,CGe as a3,nGe as a4,wGe as a5,AGe as a6,gGe as a7,mGe as a8,xGe as a9,NGe as aA,aGe as aB,dYe as aC,mKe as aD,SKe as aE,wYe as aF,_Ye as aG,SYe as aH,Yqe as aI,PYe as aJ,kYe as aK,TYe as aL,OYe as aM,RYe as aN,$Ye as aO,DYe as aP,IYe as aQ,YKe as aR,VYe as aS,QKe as aT,HYe as aU,NYe as aV,FYe as aW,LYe as aX,BYe as aY,zYe as aZ,WYe as a_,MGe as aa,$Ge as ab,RGe as ac,DGe as ad,Hqe as ae,rKe as af,uKe as ag,_Ke as ah,Qqe as ai,sKe as aj,yKe as ak,aKe as al,dKe as am,wKe as an,xKe as ao,pKe as ap,bKe as aq,nKe as ar,eKe as as,lKe as at,OKe as au,AKe as av,CKe as aw,PKe as ax,gKe as ay,iKe as az,rg as b,OZe as b$,qYe as b0,jYe as b1,YYe as b2,ZKe as b3,JYe as b4,eZe as b5,XYe as b6,QYe as b7,qS as b8,FKe as b9,UGe as bA,jGe as bB,KYe as bC,Ui as bD,uZe as bE,sZe as bF,uYe as bG,pYe as bH,fYe as bI,nYe as bJ,XGe as bK,ZGe as bL,lZe as bM,tKe as bN,EKe as bO,vKe as bP,Jqe as bQ,fZe as bR,dZe as bS,LKe as bT,rGe as bU,iGe as bV,bZe as bW,wZe as bX,QGe as bY,BGe as bZ,AZe as b_,mf as ba,HGe as bb,CYe as bc,EYe as bd,lO as be,cO as bf,rIe as bg,Yu as bh,vf as bi,Kh as bj,GYe as bk,sYe as bl,VGe as bm,LGe as bn,WGe as bo,zGe as bp,yYe as bq,gYe as br,rZe as bs,iZe as bt,oZe as bu,GBe as bv,eze as bw,tZe as bx,lYe as by,FGe as bz,fn as c,TZe as c0,MZe as c1,PZe as c2,kZe as c3,SZe as c4,CZe as c5,EZe as c6,oGe as c7,sGe as c8,vYe as c9,JKe as cA,fGe as cB,GKe as cC,tGe as cD,cGe as cE,iYe as cF,qqe as cG,KGe as cH,WBe as cI,uGe as cJ,JGe as cK,qGe as cL,xZe as ca,hZe as cb,gZe as cc,mZe as cd,yZe as ce,mYe as cf,aYe as cg,GGe as ch,YGe as ci,bYe as cj,Qa as ck,yr as cl,oYe as cm,pZe as cn,vZe as co,lGe as cp,Gc as cq,RZe as cr,DZe as cs,hYe as ct,eYe as cu,rYe as cv,cYe as cw,tYe as cx,IZe as cy,NZe as cz,Wqe as d,Kr as e,RKe as f,TKe as g,MKe as h,kKe as i,I as j,mk as k,NKe as l,Vqe as m,VKe as n,mA as o,fKe as p,cKe as q,y as r,qKe as s,Xqe as t,QF as u,HKe as v,Gqe as w,zKe as x,WKe as y,UKe as z}; +`:">",o};Xh.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};nu.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function GG(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}GG.prototype.Token=nu;const HVe=/\r\n?|\n/g,qVe=/\0/g;function KVe(e){let t;t=e.src.replace(HVe,` +`),t=t.replace(qVe,"�"),e.src=t}function GVe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function YVe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function XVe(e){return/^<\/a\s*>/i.test(e)}function QVe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const u=i[a];if(u.type==="link_close"){for(a--;i[a].level!==u.level&&i[a].type!=="link_open";)a--;continue}if(u.type==="html_inline"&&(ZVe(u.content)&&o>0&&o--,XVe(u.content)&&o++),!(o>0)&&u.type==="text"&&e.md.linkify.test(u.content)){const s=u.content;let l=e.md.linkify.match(s);const c=[];let d=u.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let v=0;vh){const E=new e.Token("text","",0);E.content=s.slice(h,w),E.level=d,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=d++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=d,c.push(S);const A=new e.Token("link_close","a",-1);A.level=--d,A.markup="linkify",A.info="auto",c.push(A),h=l[v].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(eHe,nHe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function iHe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&YG.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function oHe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(JVe.test(e.tokens[t].content)&&rHe(e.tokens[t].children),YG.test(e.tokens[t].content)&&iHe(e.tokens[t].children))}const aHe=/['"]/,mI=/['"]/g,yI="’";function xy(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function uHe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let u=o.content,s=0,l=u.length;e:for(;s=0)g=u.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(s=48&&g<=57&&(h=d=!1),d&&h&&(d=b,h=w),!d&&!h){v&&(o.content=xy(o.content,c.index,yI));continue}if(h)for(n=r.length-1;n>=0;n--){let A=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!aHe.test(e.tokens[t].content)||uHe(e.tokens[t].children,e)}function lHe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ru.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ru.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Vn(this.src.charCodeAt(--t)))return t+1;return t};Ru.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ru.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,u=t;ur?o[a]=new Array(s-r+1).join(" ")+this.src.slice(c,d):o[a]=this.src.slice(c,d)}return o.join("")};Ru.prototype.Token=nu;const cHe=65536;function h3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function bI(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,u="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const u=e.src.charCodeAt(o++);if(u!==124&&u!==45&&u!==58&&!Vn(u)||a===45&&Vn(u))return!1;for(;o=4)return!1;l=bI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const v=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let A=0;A=4||(l=bI(s),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=d-l.length,S>cHe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` +`,o.map=[t,e.line],!0}function hHe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let u=i;i=e.skipChars(i,a);let s=i-u;if(s<3)return!1;const l=e.src.slice(u,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=t,h=!1;for(;d++,!(d>=n||(i=u=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],i=4)&&(i=e.skipChars(i,a),!(i-u=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const u=[],s=[],l=[],c=[],d=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let v=!1,g;for(g=t;g=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[g]+1,C,T;e.src.charCodeAt(i)===32?(i++,E++,T=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[g]+E)%4===3?(i++,E++,T=!1):T=!0):C=!1;let M=E;for(u.push(e.bMarks[g]),e.bMarks[g]=i;i=o,s.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),l.push(e.sCount[g]),e.sCount[g]=M-E,c.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(v)break;let A=!1;for(let E=0,C=d.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,g);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let u=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]=e.blkIndent&&(c=!0);let d,h,v;if((v=wI(e,s))>=0){if(d=!0,a=e.bMarks[s]+e.tShift[s],h=Number(e.src.slice(a,v-1)),c&&h!==1)return!1}else if((v=xI(e,s))>=0)d=!1;else return!1;if(c&&e.skipSpaces(v)>=e.eMarks[s])return!1;if(r)return!0;const g=e.src.charCodeAt(v-1),m=e.tokens.length;d?(u=e.push("ordered_list_open","ol",1),h!==1&&(u.attrs=[["start",h]])):u=e.push("bullet_list_open","ul",1);const b=[s,0];u.map=b,u.markup=String.fromCharCode(g);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";s=i?T=1:T=E-A,T>4&&(T=1);const M=A+T;u=e.push("list_item_open","li",1),u.markup=String.fromCharCode(g);const F=[s,0];u.map=F,d&&(u.info=e.src.slice(a,v-1));const U=e.tight,H=e.tShift[s],W=e.sCount[s],ie=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[s]=C-e.bMarks[s],e.sCount[s]=E,C>=i&&e.isEmpty(s+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,s,n,!0),(!e.tight||w)&&(l=!1),w=e.line-s>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ie,e.tShift[s]=H,e.sCount[s]=W,e.tight=U,u=e.push("list_item_close","li",-1),u.markup=String.fromCharCode(g),s=e.line,F[1]=s,s>=n||e.sCount[s]=4)break;let Z=!1;for(let G=0,K=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function u(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let A=!1;if(e.sCount[x]-e.blkIndent>3&&(A=!0),e.sCount[x]<0&&(A=!0),!A){const T=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let F=!1;for(let U=0,H=T.length;U"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:d}),e.line=a),!0):!1}const bHe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],xHe="[a-zA-Z_:][a-zA-Z0-9:._-]*",wHe="[^\"'=<>`\\x00-\\x20]+",_He="'[^']*'",SHe='"[^"]*"',CHe="(?:"+wHe+"|"+_He+"|"+SHe+")",EHe="(?:\\s+"+xHe+"(?:\\s*=\\s*"+CHe+")?)",ZG="<[A-Za-z][A-Za-z0-9\\-]*"+EHe+"*\\s*\\/?>",XG="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",AHe="",PHe="<[?][\\s\\S]*?[?]>",OHe="]*>",kHe="",THe=new RegExp("^(?:"+ZG+"|"+XG+"|"+AHe+"|"+PHe+"|"+OHe+"|"+kHe+")"),MHe=new RegExp("^(?:"+ZG+"|"+XG+")"),qf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(MHe.source+"\\s*$"),/^$/,!1]];function RHe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),u=0;for(;u=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let u=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Vn(e.src.charCodeAt(s-1))&&(o=s),e.line=t+1;const l=e.push("heading_open","h"+String(u),1);l.markup="########".slice(0,u),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const d=e.push("heading_close","h"+String(u),-1);return d.markup="########".slice(0,u),!0}function $He(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,u=t+1;for(;u3)continue;if(e.sCount[u]>=e.blkIndent){let v=e.bMarks[u]+e.tShift[u];const g=e.eMarks[u];if(v=g))){o=a===61?1:2;break}}if(e.sCount[u]<0)continue;let h=!1;for(let v=0,g=r.length;v3||e.sCount[o]<0)continue;let l=!1;for(let c=0,d=r.length;c=n||e.sCount[a]=o){e.line=n;break}const s=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Ng.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(LHe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let u=a.url;if(u.length<=o.length)return!1;u=u.replace(/\*+$/,"");const s=e.md.normalizeLink(u);if(!e.md.validateLink(s))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",s]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return e.pos+=u.length-o.length,!0}function BHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){rO[e.charCodeAt(0)]=1});function zHe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&u<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const u=e.push("text_special","",0);i<256&&rO[i]!==0?u.content=o:u.content=a,u.markup=a,u.info="escape"}return e.pos=n+1,!0}function UHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,u=String.fromCharCode(i.marker),s=e.tokens[i.token];s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?u+u:u,s.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?u+u:u,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function qHe(e){const t=e.tokens_meta,n=e.tokens_meta.length;SI(e,e.delimiters);for(let r=0;r=d)return!1;if(s=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?g=i.pos:a="",s=g;g=d||e.src.charCodeAt(g)!==41)&&(l=!0),g++}if(l){if(typeof e.env.references>"u")return!1;if(g=0?r=e.src.slice(s,g++):g=v+1):g=v+1,r||(r=e.src.slice(h,v)),o=e.env.references[n2(r)],!o)return e.pos=c,!1;a=o.href,u=o.title}if(!t){e.pos=h,e.posMax=v;const m=e.push("link_open","a",1),b=[["href",a]];m.attrs=b,u&&b.push(["title",u]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function GHe(e,t){let n,r,i,o,a,u,s,l,c="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const v=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=h)return!1;for(l=o,u=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),u.ok&&(c=e.md.normalizeLink(u.str),e.md.validateLink(c)?o=u.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=g+1):o=g+1,i||(i=e.src.slice(v,g)),a=e.env.references[n2(i)],!a)return e.pos=d,!1;c=a.href,s=a.title}if(!t){r=e.src.slice(v,g);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=m,b.content=r,s&&w.push(["title",s])}return e.pos=o,e.posMax=h,!0}const YHe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ZHe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function XHe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(ZHe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(YHe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",a]],u.markup="autolink",u.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function QHe(e){return/^\s]/i.test(e)}function JHe(e){return/^<\/a\s*>/i.test(e)}function eqe(e){const t=e|32;return t>=97&&t<=122}function tqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!eqe(i))return!1;const o=e.src.slice(r).match(THe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],QHe(a.content)&&e.linkLevel++,JHe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const nqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,rqe=/^&([a-z][a-z0-9]{1,31});/i;function iqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(nqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),u=e.push("text_special","",0);u.content=tO(a)?ox(a):ox(65533),u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(rqe);if(o){const a=HG(o[0]);if(a!==o[0]){if(!t){const u=e.push("text_special","",0);u.content=a,u.markup=o[0],u.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function CI(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;as;l-=o[l]+1){const d=e[l];if(d.marker===u.marker&&d.open&&d.end<0){let h=!1;if((d.close||u.open)&&(d.length+u.length)%3===0&&(d.length%3!==0||u.length%3!==0)&&(h=!0),!h){const v=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+v,o[l]=v,u.open=!1,d.end=a,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[u.marker][(u.open?3:0)+(u.length||0)%3]=c)}}function oqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;CI(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Fg.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Fg.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let u=0;u|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Q6(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function i2(e){return Object.prototype.toString.call(e)}function sqe(e){return i2(e)==="[object String]"}function lqe(e){return i2(e)==="[object Object]"}function cqe(e){return i2(e)==="[object RegExp]"}function EI(e){return i2(e)==="[object Function]"}function fqe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const eY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function dqe(e){return Object.keys(e||{}).reduce(function(t,n){return t||eY.hasOwnProperty(n)},!1)}const hqe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},pqe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",vqe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function gqe(e){e.__index__=-1,e.__text_cache__=""}function mqe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function AI(){return function(e,t){t.normalize(e)}}function ax(e){const t=e.re=uqe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(pqe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(u){return u.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(u,s){throw new Error('(LinkifyIt) Invalid schema "'+u+'": '+s)}Object.keys(e.__schemas__).forEach(function(u){const s=e.__schemas__[u];if(s===null)return;const l={validate:null,link:null};if(e.__compiled__[u]=l,lqe(s)){cqe(s.validate)?l.validate=mqe(s.validate):EI(s.validate)?l.validate=s.validate:o(u,s),EI(s.normalize)?l.normalize=s.normalize:s.normalize?o(u,s):l.normalize=AI();return}if(sqe(s)){i.push(u);return}o(u,s)}),i.forEach(function(u){e.__compiled__[e.__schemas__[u]]&&(e.__compiled__[u].validate=e.__compiled__[e.__schemas__[u]].validate,e.__compiled__[u].normalize=e.__compiled__[e.__schemas__[u]].normalize)}),e.__compiled__[""]={validate:null,normalize:AI()};const a=Object.keys(e.__compiled__).filter(function(u){return u.length>0&&e.__compiled__[u]}).map(fqe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),gqe(e)}function yqe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function J6(e,t){const n=new yqe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Uo(e,t){if(!(this instanceof Uo))return new Uo(e,t);t||dqe(e)&&(t=e,e={}),this.__opts__=Q6({},eY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Q6({},hqe,e),this.__compiled__={},this.__tlds__=vqe,this.__tlds_replaced__=!1,this.re={},ax(this)}Uo.prototype.add=function(t,n){return this.__schemas__[t]=n,ax(this),this};Uo.prototype.set=function(t){return this.__opts__=Q6(this.__opts__,t),this};Uo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,u,s,l,c;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],s.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,u=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=u))),this.__index__>=0};Uo.prototype.pretest=function(t){return this.re.pretest.test(t)};Uo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Uo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(J6(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(J6(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Uo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,J6(this,0)):null};Uo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),ax(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ax(this),this)};Uo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Uo.prototype.onCompile=function(){};const Md=2147483647,mu=36,iO=1,Xv=26,bqe=38,xqe=700,tY=72,nY=128,rY="-",wqe=/^xn--/,_qe=/[^\0-\x7F]/,Sqe=/[\x2E\u3002\uFF0E\uFF61]/g,Cqe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g3=mu-iO,yu=Math.floor,m3=String.fromCharCode;function Ys(e){throw new RangeError(Cqe[e])}function Eqe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function iY(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Sqe,".");const i=e.split("."),o=Eqe(i,t).join(".");return r+o}function oY(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),Pqe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:mu},PI=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},aY=function(e,t,n){let r=0;for(e=n?yu(e/xqe):e>>1,e+=yu(e/t);e>g3*Xv>>1;r+=mu)e=yu(e/g3);return yu(r+(g3+1)*e/(e+bqe))},uY=function(e){const t=[],n=e.length;let r=0,i=nY,o=tY,a=e.lastIndexOf(rY);a<0&&(a=0);for(let u=0;u=128&&Ys("not-basic"),t.push(e.charCodeAt(u));for(let u=a>0?a+1:0;u=n&&Ys("invalid-input");const h=Pqe(e.charCodeAt(u++));h>=mu&&Ys("invalid-input"),h>yu((Md-r)/c)&&Ys("overflow"),r+=h*c;const v=d<=o?iO:d>=o+Xv?Xv:d-o;if(hyu(Md/g)&&Ys("overflow"),c*=g}const l=t.length+1;o=aY(r-s,l,s==0),yu(r/l)>Md-i&&Ys("overflow"),i+=yu(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},sY=function(e){const t=[];e=oY(e);const n=e.length;let r=nY,i=0,o=tY;for(const s of e)s<128&&t.push(m3(s));const a=t.length;let u=a;for(a&&t.push(rY);u=r&&cyu((Md-i)/l)&&Ys("overflow"),i+=(s-r)*l,r=s;for(const c of e)if(cMd&&Ys("overflow"),c===r){let d=i;for(let h=mu;;h+=mu){const v=h<=o?iO:h>=o+Xv?Xv:h-o;if(d=0))try{t.hostname=lY.toASCII(t.hostname)}catch{}return Ig(XP(t))}function Lqe(e){const t=QP(e,!0);if(t.hostname&&(!t.protocol||cY.indexOf(t.protocol)>=0))try{t.hostname=lY.toUnicode(t.hostname)}catch{}return bh(XP(t),bh.defaultChars+"%")}function Qa(e,t){if(!(this instanceof Qa))return new Qa(e,t);t||eO(e)||(t=e||{},e="default"),this.inline=new Fg,this.block=new r2,this.core=new nO,this.renderer=new Xh,this.linkify=new Uo,this.validateLink=Nqe,this.normalizeLink=Fqe,this.normalizeLinkText=Lqe,this.utils=BVe,this.helpers=t2({},VVe),this.options={},this.configure(e),t&&this.set(t)}Qa.prototype.set=function(e){return t2(this.options,e),this};Qa.prototype.configure=function(e){const t=this;if(eO(e)){const n=e;if(e=Dqe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Qa.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qa.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qa.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qa.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Qa.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qa.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Qa.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var fY={exports:{}};(function(e){(function(t){var n=function(k){var D,$=new Float64Array(16);if(k)for(D=0;D>24&255,k[D+1]=$>>16&255,k[D+2]=$>>8&255,k[D+3]=$&255,k[D+4]=P>>24&255,k[D+5]=P>>16&255,k[D+6]=P>>8&255,k[D+7]=P&255}function m(k,D,$,P,N){var ee,ne=0;for(ee=0;ee>>8)-1}function b(k,D,$,P){return m(k,D,$,P,16)}function w(k,D,$,P){return m(k,D,$,P,32)}function x(k,D,$,P){for(var N=P[0]&255|(P[1]&255)<<8|(P[2]&255)<<16|(P[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=P[4]&255|(P[5]&255)<<8|(P[6]&255)<<16|(P[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=P[8]&255|(P[9]&255)<<8|(P[10]&255)<<16|(P[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=P[12]&255|(P[13]&255)<<8|(P[14]&255)<<16|(P[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Oe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Oe^=te<<7|te>>>25,te=Oe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Oe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Oe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Oe^=te<<13|te>>>19,te=Oe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;Je=Je+N|0,st=st+ee|0,Qe=Qe+ne|0,Le=Le+he|0,qe=qe+Ce|0,Ge=Ge+Be|0,me=me+He|0,ve=ve+ct|0,De=De+Ne|0,Oe=Oe+rt|0,Te=Te+bt|0,ze=ze+At|0,mt=mt+vt|0,Nt=Nt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=st>>>0&255,k[5]=st>>>8&255,k[6]=st>>>16&255,k[7]=st>>>24&255,k[8]=Qe>>>0&255,k[9]=Qe>>>8&255,k[10]=Qe>>>16&255,k[11]=Qe>>>24&255,k[12]=Le>>>0&255,k[13]=Le>>>8&255,k[14]=Le>>>16&255,k[15]=Le>>>24&255,k[16]=qe>>>0&255,k[17]=qe>>>8&255,k[18]=qe>>>16&255,k[19]=qe>>>24&255,k[20]=Ge>>>0&255,k[21]=Ge>>>8&255,k[22]=Ge>>>16&255,k[23]=Ge>>>24&255,k[24]=me>>>0&255,k[25]=me>>>8&255,k[26]=me>>>16&255,k[27]=me>>>24&255,k[28]=ve>>>0&255,k[29]=ve>>>8&255,k[30]=ve>>>16&255,k[31]=ve>>>24&255,k[32]=De>>>0&255,k[33]=De>>>8&255,k[34]=De>>>16&255,k[35]=De>>>24&255,k[36]=Oe>>>0&255,k[37]=Oe>>>8&255,k[38]=Oe>>>16&255,k[39]=Oe>>>24&255,k[40]=Te>>>0&255,k[41]=Te>>>8&255,k[42]=Te>>>16&255,k[43]=Te>>>24&255,k[44]=ze>>>0&255,k[45]=ze>>>8&255,k[46]=ze>>>16&255,k[47]=ze>>>24&255,k[48]=mt>>>0&255,k[49]=mt>>>8&255,k[50]=mt>>>16&255,k[51]=mt>>>24&255,k[52]=Nt>>>0&255,k[53]=Nt>>>8&255,k[54]=Nt>>>16&255,k[55]=Nt>>>24&255,k[56]=Ft>>>0&255,k[57]=Ft>>>8&255,k[58]=Ft>>>16&255,k[59]=Ft>>>24&255,k[60]=$t>>>0&255,k[61]=$t>>>8&255,k[62]=$t>>>16&255,k[63]=$t>>>24&255}function S(k,D,$,P){for(var N=P[0]&255|(P[1]&255)<<8|(P[2]&255)<<16|(P[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,ne=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=P[4]&255|(P[5]&255)<<8|(P[6]&255)<<16|(P[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=P[8]&255|(P[9]&255)<<8|(P[10]&255)<<16|(P[11]&255)<<24,At=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,vt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=P[12]&255|(P[13]&255)<<8|(P[14]&255)<<16|(P[15]&255)<<24,Je=N,st=ee,Qe=ne,Le=he,qe=Ce,Ge=Be,me=He,ve=ct,De=Ne,Oe=rt,Te=bt,ze=At,mt=vt,Nt=ht,Ft=xt,$t=wt,te,Gt=0;Gt<20;Gt+=2)te=Je+mt|0,qe^=te<<7|te>>>25,te=qe+Je|0,De^=te<<9|te>>>23,te=De+qe|0,mt^=te<<13|te>>>19,te=mt+De|0,Je^=te<<18|te>>>14,te=Ge+st|0,Oe^=te<<7|te>>>25,te=Oe+Ge|0,Nt^=te<<9|te>>>23,te=Nt+Oe|0,st^=te<<13|te>>>19,te=st+Nt|0,Ge^=te<<18|te>>>14,te=Te+me|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,me^=te<<13|te>>>19,te=me+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Le^=te<<7|te>>>25,te=Le+$t|0,ve^=te<<9|te>>>23,te=ve+Le|0,ze^=te<<13|te>>>19,te=ze+ve|0,$t^=te<<18|te>>>14,te=Je+Le|0,st^=te<<7|te>>>25,te=st+Je|0,Qe^=te<<9|te>>>23,te=Qe+st|0,Le^=te<<13|te>>>19,te=Le+Qe|0,Je^=te<<18|te>>>14,te=Ge+qe|0,me^=te<<7|te>>>25,te=me+Ge|0,ve^=te<<9|te>>>23,te=ve+me|0,qe^=te<<13|te>>>19,te=qe+ve|0,Ge^=te<<18|te>>>14,te=Te+Oe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Oe^=te<<13|te>>>19,te=Oe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,mt^=te<<7|te>>>25,te=mt+$t|0,Nt^=te<<9|te>>>23,te=Nt+mt|0,Ft^=te<<13|te>>>19,te=Ft+Nt|0,$t^=te<<18|te>>>14;k[0]=Je>>>0&255,k[1]=Je>>>8&255,k[2]=Je>>>16&255,k[3]=Je>>>24&255,k[4]=Ge>>>0&255,k[5]=Ge>>>8&255,k[6]=Ge>>>16&255,k[7]=Ge>>>24&255,k[8]=Te>>>0&255,k[9]=Te>>>8&255,k[10]=Te>>>16&255,k[11]=Te>>>24&255,k[12]=$t>>>0&255,k[13]=$t>>>8&255,k[14]=$t>>>16&255,k[15]=$t>>>24&255,k[16]=me>>>0&255,k[17]=me>>>8&255,k[18]=me>>>16&255,k[19]=me>>>24&255,k[20]=ve>>>0&255,k[21]=ve>>>8&255,k[22]=ve>>>16&255,k[23]=ve>>>24&255,k[24]=De>>>0&255,k[25]=De>>>8&255,k[26]=De>>>16&255,k[27]=De>>>24&255,k[28]=Oe>>>0&255,k[29]=Oe>>>8&255,k[30]=Oe>>>16&255,k[31]=Oe>>>24&255}function A(k,D,$,P){x(k,D,$,P)}function E(k,D,$,P){S(k,D,$,P)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(k,D,$,P,N,ee,ne){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;N>=64;){for(A(Ce,he,ne,C),He=0;He<64;He++)k[D+He]=$[P+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;N-=64,D+=64,P+=64}if(N>0)for(A(Ce,he,ne,C),He=0;He=64;){for(A(ne,ee,N,C),Ce=0;Ce<64;Ce++)k[D+Ce]=ne[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(A(ne,ee,N,C),Ce=0;Ce<$;Ce++)k[D+Ce]=ne[Ce];return 0}function F(k,D,$,P,N){var ee=new Uint8Array(32);E(ee,P,N,C);for(var ne=new Uint8Array(8),he=0;he<8;he++)ne[he]=P[he+16];return M(k,D,$,ne,ee)}function U(k,D,$,P,N,ee,ne){var he=new Uint8Array(32);E(he,ee,ne,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return T(k,D,$,P,N,Ce,he)}var H=function(k){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,P,N,ee,ne,he,Ce;D=k[0]&255|(k[1]&255)<<8,this.r[0]=D&8191,$=k[2]&255|(k[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,P=k[4]&255|(k[5]&255)<<8,this.r[2]=($>>>10|P<<6)&7939,N=k[6]&255|(k[7]&255)<<8,this.r[3]=(P>>>7|N<<9)&8191,ee=k[8]&255|(k[9]&255)<<8,this.r[4]=(N>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,ne=k[10]&255|(k[11]&255)<<8,this.r[6]=(ee>>>14|ne<<2)&8191,he=k[12]&255|(k[13]&255)<<8,this.r[7]=(ne>>>11|he<<5)&8065,Ce=k[14]&255|(k[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=k[16]&255|(k[17]&255)<<8,this.pad[1]=k[18]&255|(k[19]&255)<<8,this.pad[2]=k[20]&255|(k[21]&255)<<8,this.pad[3]=k[22]&255|(k[23]&255)<<8,this.pad[4]=k[24]&255|(k[25]&255)<<8,this.pad[5]=k[26]&255|(k[27]&255)<<8,this.pad[6]=k[28]&255|(k[29]&255)<<8,this.pad[7]=k[30]&255|(k[31]&255)<<8};H.prototype.blocks=function(k,D,$){for(var P=this.fin?0:2048,N,ee,ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le=this.h[0],qe=this.h[1],Ge=this.h[2],me=this.h[3],ve=this.h[4],De=this.h[5],Oe=this.h[6],Te=this.h[7],ze=this.h[8],mt=this.h[9],Nt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Gt=this.r[4],an=this.r[5],un=this.r[6],Lt=this.r[7],sn=this.r[8],tn=this.r[9];$>=16;)N=k[D+0]&255|(k[D+1]&255)<<8,Le+=N&8191,ee=k[D+2]&255|(k[D+3]&255)<<8,qe+=(N>>>13|ee<<3)&8191,ne=k[D+4]&255|(k[D+5]&255)<<8,Ge+=(ee>>>10|ne<<6)&8191,he=k[D+6]&255|(k[D+7]&255)<<8,me+=(ne>>>7|he<<9)&8191,Ce=k[D+8]&255|(k[D+9]&255)<<8,ve+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=k[D+10]&255|(k[D+11]&255)<<8,Oe+=(Ce>>>14|Be<<2)&8191,He=k[D+12]&255|(k[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=k[D+14]&255|(k[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,mt+=ct>>>5|P,Ne=0,rt=Ne,rt+=Le*Nt,rt+=qe*(5*tn),rt+=Ge*(5*sn),rt+=me*(5*Lt),rt+=ve*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*an),rt+=Oe*(5*Gt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=mt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Le*Ft,bt+=qe*Nt,bt+=Ge*(5*tn),bt+=me*(5*sn),bt+=ve*(5*Lt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Oe*(5*an),bt+=Te*(5*Gt),bt+=ze*(5*te),bt+=mt*(5*$t),Ne+=bt>>>13,bt&=8191,At=Ne,At+=Le*$t,At+=qe*Ft,At+=Ge*Nt,At+=me*(5*tn),At+=ve*(5*sn),Ne=At>>>13,At&=8191,At+=De*(5*Lt),At+=Oe*(5*un),At+=Te*(5*an),At+=ze*(5*Gt),At+=mt*(5*te),Ne+=At>>>13,At&=8191,vt=Ne,vt+=Le*te,vt+=qe*$t,vt+=Ge*Ft,vt+=me*Nt,vt+=ve*(5*tn),Ne=vt>>>13,vt&=8191,vt+=De*(5*sn),vt+=Oe*(5*Lt),vt+=Te*(5*un),vt+=ze*(5*an),vt+=mt*(5*Gt),Ne+=vt>>>13,vt&=8191,ht=Ne,ht+=Le*Gt,ht+=qe*te,ht+=Ge*$t,ht+=me*Ft,ht+=ve*Nt,Ne=ht>>>13,ht&=8191,ht+=De*(5*tn),ht+=Oe*(5*sn),ht+=Te*(5*Lt),ht+=ze*(5*un),ht+=mt*(5*an),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Le*an,xt+=qe*Gt,xt+=Ge*te,xt+=me*$t,xt+=ve*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Nt,xt+=Oe*(5*tn),xt+=Te*(5*sn),xt+=ze*(5*Lt),xt+=mt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Le*un,wt+=qe*an,wt+=Ge*Gt,wt+=me*te,wt+=ve*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Oe*Nt,wt+=Te*(5*tn),wt+=ze*(5*sn),wt+=mt*(5*Lt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Le*Lt,Je+=qe*un,Je+=Ge*an,Je+=me*Gt,Je+=ve*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Oe*Ft,Je+=Te*Nt,Je+=ze*(5*tn),Je+=mt*(5*sn),Ne+=Je>>>13,Je&=8191,st=Ne,st+=Le*sn,st+=qe*Lt,st+=Ge*un,st+=me*an,st+=ve*Gt,Ne=st>>>13,st&=8191,st+=De*te,st+=Oe*$t,st+=Te*Ft,st+=ze*Nt,st+=mt*(5*tn),Ne+=st>>>13,st&=8191,Qe=Ne,Qe+=Le*tn,Qe+=qe*sn,Qe+=Ge*Lt,Qe+=me*un,Qe+=ve*an,Ne=Qe>>>13,Qe&=8191,Qe+=De*Gt,Qe+=Oe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=mt*Nt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Le=rt,qe=bt,Ge=At,me=vt,ve=ht,De=xt,Oe=wt,Te=Je,ze=st,mt=Qe,D+=16,$-=16;this.h[0]=Le,this.h[1]=qe,this.h[2]=Ge,this.h[3]=me,this.h[4]=ve,this.h[5]=De,this.h[6]=Oe,this.h[7]=Te,this.h[8]=ze,this.h[9]=mt},H.prototype.finish=function(k,D){var $=new Uint16Array(10),P,N,ee,ne;if(this.leftover){for(ne=this.leftover,this.buffer[ne++]=1;ne<16;ne++)this.buffer[ne]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(P=this.h[1]>>>13,this.h[1]&=8191,ne=2;ne<10;ne++)this.h[ne]+=P,P=this.h[ne]>>>13,this.h[ne]&=8191;for(this.h[0]+=P*5,P=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=P,P=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=P,$[0]=this.h[0]+5,P=$[0]>>>13,$[0]&=8191,ne=1;ne<10;ne++)$[ne]=this.h[ne]+P,P=$[ne]>>>13,$[ne]&=8191;for($[9]-=8192,N=(P^1)-1,ne=0;ne<10;ne++)$[ne]&=N;for(N=~N,ne=0;ne<10;ne++)this.h[ne]=this.h[ne]&N|$[ne];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,ne=1;ne<8;ne++)ee=(this.h[ne]+this.pad[ne]|0)+(ee>>>16)|0,this.h[ne]=ee&65535;k[D+0]=this.h[0]>>>0&255,k[D+1]=this.h[0]>>>8&255,k[D+2]=this.h[1]>>>0&255,k[D+3]=this.h[1]>>>8&255,k[D+4]=this.h[2]>>>0&255,k[D+5]=this.h[2]>>>8&255,k[D+6]=this.h[3]>>>0&255,k[D+7]=this.h[3]>>>8&255,k[D+8]=this.h[4]>>>0&255,k[D+9]=this.h[4]>>>8&255,k[D+10]=this.h[5]>>>0&255,k[D+11]=this.h[5]>>>8&255,k[D+12]=this.h[6]>>>0&255,k[D+13]=this.h[6]>>>8&255,k[D+14]=this.h[7]>>>0&255,k[D+15]=this.h[7]>>>8&255},H.prototype.update=function(k,D,$){var P,N;if(this.leftover){for(N=16-this.leftover,N>$&&(N=$),P=0;P=16&&(N=$-$%16,this.blocks(k,D,N),D+=N,$-=N),$){for(P=0;P<$;P++)this.buffer[this.leftover+P]=k[D+P];this.leftover+=$}};function W(k,D,$,P,N,ee){var ne=new H(ee);return ne.update($,P,N),ne.finish(k,D),0}function ie(k,D,$,P,N,ee){var ne=new Uint8Array(16);return W(ne,0,$,P,N,ee),b(k,D,ne,0)}function Z(k,D,$,P,N){var ee;if($<32)return-1;for(U(k,0,D,0,$,P,N),W(k,16,k,32,$-32,k),ee=0;ee<16;ee++)k[ee]=0;return 0}function G(k,D,$,P,N){var ee,ne=new Uint8Array(32);if($<32||(F(ne,0,32,P,N),ie(D,16,D,32,$-32,ne)!==0))return-1;for(U(k,0,D,0,$,P,N),ee=0;ee<32;ee++)k[ee]=0;return 0}function K(k,D){var $;for($=0;$<16;$++)k[$]=D[$]|0}function V(k){var D,$,P=1;for(D=0;D<16;D++)$=k[D]+P+65535,P=Math.floor($/65536),k[D]=$-P*65536;k[0]+=P-1+37*(P-1)}function B(k,D,$){for(var P,N=~($-1),ee=0;ee<16;ee++)P=N&(k[ee]^D[ee]),k[ee]^=P,D[ee]^=P}function q(k,D){var $,P,N,ee=n(),ne=n();for($=0;$<16;$++)ne[$]=D[$];for(V(ne),V(ne),V(ne),P=0;P<2;P++){for(ee[0]=ne[0]-65517,$=1;$<15;$++)ee[$]=ne[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=ne[15]-32767-(ee[14]>>16&1),N=ee[15]>>16&1,ee[14]&=65535,B(ne,ee,1-N)}for($=0;$<16;$++)k[2*$]=ne[$]&255,k[2*$+1]=ne[$]>>8}function Y(k,D){var $=new Uint8Array(32),P=new Uint8Array(32);return q($,k),q(P,D),w($,0,P,0)}function ue(k){var D=new Uint8Array(32);return q(D,k),D[0]&1}function Q(k,D){var $;for($=0;$<16;$++)k[$]=D[2*$]+(D[2*$+1]<<8);k[15]&=32767}function J(k,D,$){for(var P=0;P<16;P++)k[P]=D[P]+$[P]}function se(k,D,$){for(var P=0;P<16;P++)k[P]=D[P]-$[P]}function de(k,D,$){var P,N,ee=0,ne=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,At=0,vt=0,ht=0,xt=0,wt=0,Je=0,st=0,Qe=0,Le=0,qe=0,Ge=0,me=0,ve=0,De=0,Oe=0,Te=0,ze=0,mt=0,Nt=0,Ft=0,$t=0,te=$[0],Gt=$[1],an=$[2],un=$[3],Lt=$[4],sn=$[5],tn=$[6],Kn=$[7],vn=$[8],On=$[9],Gn=$[10],Yn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];P=D[0],ee+=P*te,ne+=P*Gt,he+=P*an,Ce+=P*un,Be+=P*Lt,He+=P*sn,ct+=P*tn,Ne+=P*Kn,rt+=P*vn,bt+=P*On,At+=P*Gn,vt+=P*Yn,ht+=P*xr,xt+=P*$r,wt+=P*Ir,Je+=P*Nr,P=D[1],ne+=P*te,he+=P*Gt,Ce+=P*an,Be+=P*un,He+=P*Lt,ct+=P*sn,Ne+=P*tn,rt+=P*Kn,bt+=P*vn,At+=P*On,vt+=P*Gn,ht+=P*Yn,xt+=P*xr,wt+=P*$r,Je+=P*Ir,st+=P*Nr,P=D[2],he+=P*te,Ce+=P*Gt,Be+=P*an,He+=P*un,ct+=P*Lt,Ne+=P*sn,rt+=P*tn,bt+=P*Kn,At+=P*vn,vt+=P*On,ht+=P*Gn,xt+=P*Yn,wt+=P*xr,Je+=P*$r,st+=P*Ir,Qe+=P*Nr,P=D[3],Ce+=P*te,Be+=P*Gt,He+=P*an,ct+=P*un,Ne+=P*Lt,rt+=P*sn,bt+=P*tn,At+=P*Kn,vt+=P*vn,ht+=P*On,xt+=P*Gn,wt+=P*Yn,Je+=P*xr,st+=P*$r,Qe+=P*Ir,Le+=P*Nr,P=D[4],Be+=P*te,He+=P*Gt,ct+=P*an,Ne+=P*un,rt+=P*Lt,bt+=P*sn,At+=P*tn,vt+=P*Kn,ht+=P*vn,xt+=P*On,wt+=P*Gn,Je+=P*Yn,st+=P*xr,Qe+=P*$r,Le+=P*Ir,qe+=P*Nr,P=D[5],He+=P*te,ct+=P*Gt,Ne+=P*an,rt+=P*un,bt+=P*Lt,At+=P*sn,vt+=P*tn,ht+=P*Kn,xt+=P*vn,wt+=P*On,Je+=P*Gn,st+=P*Yn,Qe+=P*xr,Le+=P*$r,qe+=P*Ir,Ge+=P*Nr,P=D[6],ct+=P*te,Ne+=P*Gt,rt+=P*an,bt+=P*un,At+=P*Lt,vt+=P*sn,ht+=P*tn,xt+=P*Kn,wt+=P*vn,Je+=P*On,st+=P*Gn,Qe+=P*Yn,Le+=P*xr,qe+=P*$r,Ge+=P*Ir,me+=P*Nr,P=D[7],Ne+=P*te,rt+=P*Gt,bt+=P*an,At+=P*un,vt+=P*Lt,ht+=P*sn,xt+=P*tn,wt+=P*Kn,Je+=P*vn,st+=P*On,Qe+=P*Gn,Le+=P*Yn,qe+=P*xr,Ge+=P*$r,me+=P*Ir,ve+=P*Nr,P=D[8],rt+=P*te,bt+=P*Gt,At+=P*an,vt+=P*un,ht+=P*Lt,xt+=P*sn,wt+=P*tn,Je+=P*Kn,st+=P*vn,Qe+=P*On,Le+=P*Gn,qe+=P*Yn,Ge+=P*xr,me+=P*$r,ve+=P*Ir,De+=P*Nr,P=D[9],bt+=P*te,At+=P*Gt,vt+=P*an,ht+=P*un,xt+=P*Lt,wt+=P*sn,Je+=P*tn,st+=P*Kn,Qe+=P*vn,Le+=P*On,qe+=P*Gn,Ge+=P*Yn,me+=P*xr,ve+=P*$r,De+=P*Ir,Oe+=P*Nr,P=D[10],At+=P*te,vt+=P*Gt,ht+=P*an,xt+=P*un,wt+=P*Lt,Je+=P*sn,st+=P*tn,Qe+=P*Kn,Le+=P*vn,qe+=P*On,Ge+=P*Gn,me+=P*Yn,ve+=P*xr,De+=P*$r,Oe+=P*Ir,Te+=P*Nr,P=D[11],vt+=P*te,ht+=P*Gt,xt+=P*an,wt+=P*un,Je+=P*Lt,st+=P*sn,Qe+=P*tn,Le+=P*Kn,qe+=P*vn,Ge+=P*On,me+=P*Gn,ve+=P*Yn,De+=P*xr,Oe+=P*$r,Te+=P*Ir,ze+=P*Nr,P=D[12],ht+=P*te,xt+=P*Gt,wt+=P*an,Je+=P*un,st+=P*Lt,Qe+=P*sn,Le+=P*tn,qe+=P*Kn,Ge+=P*vn,me+=P*On,ve+=P*Gn,De+=P*Yn,Oe+=P*xr,Te+=P*$r,ze+=P*Ir,mt+=P*Nr,P=D[13],xt+=P*te,wt+=P*Gt,Je+=P*an,st+=P*un,Qe+=P*Lt,Le+=P*sn,qe+=P*tn,Ge+=P*Kn,me+=P*vn,ve+=P*On,De+=P*Gn,Oe+=P*Yn,Te+=P*xr,ze+=P*$r,mt+=P*Ir,Nt+=P*Nr,P=D[14],wt+=P*te,Je+=P*Gt,st+=P*an,Qe+=P*un,Le+=P*Lt,qe+=P*sn,Ge+=P*tn,me+=P*Kn,ve+=P*vn,De+=P*On,Oe+=P*Gn,Te+=P*Yn,ze+=P*xr,mt+=P*$r,Nt+=P*Ir,Ft+=P*Nr,P=D[15],Je+=P*te,st+=P*Gt,Qe+=P*an,Le+=P*un,qe+=P*Lt,Ge+=P*sn,me+=P*tn,ve+=P*Kn,De+=P*vn,Oe+=P*On,Te+=P*Gn,ze+=P*Yn,mt+=P*xr,Nt+=P*$r,Ft+=P*Ir,$t+=P*Nr,ee+=38*st,ne+=38*Qe,he+=38*Le,Ce+=38*qe,Be+=38*Ge,He+=38*me,ct+=38*ve,Ne+=38*De,rt+=38*Oe,bt+=38*Te,At+=38*ze,vt+=38*mt,ht+=38*Nt,xt+=38*Ft,wt+=38*$t,N=1,P=ee+N+65535,N=Math.floor(P/65536),ee=P-N*65536,P=ne+N+65535,N=Math.floor(P/65536),ne=P-N*65536,P=he+N+65535,N=Math.floor(P/65536),he=P-N*65536,P=Ce+N+65535,N=Math.floor(P/65536),Ce=P-N*65536,P=Be+N+65535,N=Math.floor(P/65536),Be=P-N*65536,P=He+N+65535,N=Math.floor(P/65536),He=P-N*65536,P=ct+N+65535,N=Math.floor(P/65536),ct=P-N*65536,P=Ne+N+65535,N=Math.floor(P/65536),Ne=P-N*65536,P=rt+N+65535,N=Math.floor(P/65536),rt=P-N*65536,P=bt+N+65535,N=Math.floor(P/65536),bt=P-N*65536,P=At+N+65535,N=Math.floor(P/65536),At=P-N*65536,P=vt+N+65535,N=Math.floor(P/65536),vt=P-N*65536,P=ht+N+65535,N=Math.floor(P/65536),ht=P-N*65536,P=xt+N+65535,N=Math.floor(P/65536),xt=P-N*65536,P=wt+N+65535,N=Math.floor(P/65536),wt=P-N*65536,P=Je+N+65535,N=Math.floor(P/65536),Je=P-N*65536,ee+=N-1+37*(N-1),N=1,P=ee+N+65535,N=Math.floor(P/65536),ee=P-N*65536,P=ne+N+65535,N=Math.floor(P/65536),ne=P-N*65536,P=he+N+65535,N=Math.floor(P/65536),he=P-N*65536,P=Ce+N+65535,N=Math.floor(P/65536),Ce=P-N*65536,P=Be+N+65535,N=Math.floor(P/65536),Be=P-N*65536,P=He+N+65535,N=Math.floor(P/65536),He=P-N*65536,P=ct+N+65535,N=Math.floor(P/65536),ct=P-N*65536,P=Ne+N+65535,N=Math.floor(P/65536),Ne=P-N*65536,P=rt+N+65535,N=Math.floor(P/65536),rt=P-N*65536,P=bt+N+65535,N=Math.floor(P/65536),bt=P-N*65536,P=At+N+65535,N=Math.floor(P/65536),At=P-N*65536,P=vt+N+65535,N=Math.floor(P/65536),vt=P-N*65536,P=ht+N+65535,N=Math.floor(P/65536),ht=P-N*65536,P=xt+N+65535,N=Math.floor(P/65536),xt=P-N*65536,P=wt+N+65535,N=Math.floor(P/65536),wt=P-N*65536,P=Je+N+65535,N=Math.floor(P/65536),Je=P-N*65536,ee+=N-1+37*(N-1),k[0]=ee,k[1]=ne,k[2]=he,k[3]=Ce,k[4]=Be,k[5]=He,k[6]=ct,k[7]=Ne,k[8]=rt,k[9]=bt,k[10]=At,k[11]=vt,k[12]=ht,k[13]=xt,k[14]=wt,k[15]=Je}function Se(k,D){de(k,D,D)}function ge(k,D){var $=n(),P;for(P=0;P<16;P++)$[P]=D[P];for(P=253;P>=0;P--)Se($,$),P!==2&&P!==4&&de($,$,D);for(P=0;P<16;P++)k[P]=$[P]}function Ze(k,D){var $=n(),P;for(P=0;P<16;P++)$[P]=D[P];for(P=250;P>=0;P--)Se($,$),P!==1&&de($,$,D);for(P=0;P<16;P++)k[P]=$[P]}function Pe(k,D,$){var P=new Uint8Array(32),N=new Float64Array(80),ee,ne,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(ne=0;ne<31;ne++)P[ne]=D[ne];for(P[31]=D[31]&127|64,P[0]&=248,Q(N,$),ne=0;ne<16;ne++)Ce[ne]=N[ne],He[ne]=he[ne]=Be[ne]=0;for(he[0]=He[0]=1,ne=254;ne>=0;--ne)ee=P[ne>>>3]>>>(ne&7)&1,B(he,Ce,ee),B(Be,He,ee),J(ct,he,Be),se(he,he,Be),J(Be,Ce,He),se(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),se(he,he,Be),Se(Ce,he),se(Be,He,Ne),de(he,Be,s),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,N),Se(Ce,ct),B(he,Ce,ee),B(Be,He,ee);for(ne=0;ne<16;ne++)N[ne+16]=he[ne],N[ne+32]=Be[ne],N[ne+48]=Ce[ne],N[ne+64]=He[ne];var rt=N.subarray(32),bt=N.subarray(16);return ge(rt,rt),de(bt,bt,rt),q(k,bt),0}function Fe(k,D){return Pe(k,D,o)}function $e(k,D){return r(D,32),Fe(k,D)}function be(k,D,$){var P=new Uint8Array(32);return Pe(P,$,D),E(k,i,P,C)}var yt=Z,lt=G;function It(k,D,$,P,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),yt(k,D,$,P,ne)}function mn(k,D,$,P,N,ee){var ne=new Uint8Array(32);return be(ne,N,ee),lt(k,D,$,P,ne)}var en=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function re(k,D,$,P){for(var N=new Int32Array(16),ee=new Int32Array(16),ne,he,Ce,Be,He,ct,Ne,rt,bt,At,vt,ht,xt,wt,Je,st,Qe,Le,qe,Ge,me,ve,De,Oe,Te,ze,mt=k[0],Nt=k[1],Ft=k[2],$t=k[3],te=k[4],Gt=k[5],an=k[6],un=k[7],Lt=D[0],sn=D[1],tn=D[2],Kn=D[3],vn=D[4],On=D[5],Gn=D[6],Yn=D[7],xr=0;P>=128;){for(qe=0;qe<16;qe++)Ge=8*qe+xr,N[qe]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[qe]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(qe=0;qe<80;qe++)if(ne=mt,he=Nt,Ce=Ft,Be=$t,He=te,ct=Gt,Ne=an,rt=un,bt=Lt,At=sn,vt=tn,ht=Kn,xt=vn,wt=On,Je=Gn,st=Yn,me=un,ve=Yn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=(te>>>14|vn<<18)^(te>>>18|vn<<14)^(vn>>>9|te<<23),ve=(vn>>>14|te<<18)^(vn>>>18|te<<14)^(te>>>9|vn<<23),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=te&Gt^~te&an,ve=vn&On^~vn&Gn,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=en[qe*2],ve=en[qe*2+1],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=N[qe%16],ve=ee[qe%16],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Le=De&65535|Oe<<16,me=Qe,ve=Le,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=(mt>>>28|Lt<<4)^(Lt>>>2|mt<<30)^(Lt>>>7|mt<<25),ve=(Lt>>>28|mt<<4)^(mt>>>2|Lt<<30)^(mt>>>7|Lt<<25),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,me=mt&Nt^mt&Ft^Nt&Ft,ve=Lt&sn^Lt&tn^sn&tn,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,st=De&65535|Oe<<16,me=Be,ve=ht,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=Qe,ve=Le,De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Oe<<16,Nt=ne,Ft=he,$t=Ce,te=Be,Gt=He,an=ct,un=Ne,mt=rt,sn=bt,tn=At,Kn=vt,vn=ht,On=xt,Gn=wt,Yn=Je,Lt=st,qe%16===15)for(Ge=0;Ge<16;Ge++)me=N[Ge],ve=ee[Ge],De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=N[(Ge+9)%16],ve=ee[(Ge+9)%16],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+1)%16],Le=ee[(Ge+1)%16],me=(Qe>>>1|Le<<31)^(Qe>>>8|Le<<24)^Qe>>>7,ve=(Le>>>1|Qe<<31)^(Le>>>8|Qe<<24)^(Le>>>7|Qe<<25),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Qe=N[(Ge+14)%16],Le=ee[(Ge+14)%16],me=(Qe>>>19|Le<<13)^(Le>>>29|Qe<<3)^Qe>>>6,ve=(Le>>>19|Qe<<13)^(Qe>>>29|Le<<3)^(Le>>>6|Qe<<26),De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,N[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Oe<<16;me=mt,ve=Lt,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[0],ve=D[0],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[0]=mt=Te&65535|ze<<16,D[0]=Lt=De&65535|Oe<<16,me=Nt,ve=sn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[1],ve=D[1],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[1]=Nt=Te&65535|ze<<16,D[1]=sn=De&65535|Oe<<16,me=Ft,ve=tn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[2],ve=D[2],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[2]=Ft=Te&65535|ze<<16,D[2]=tn=De&65535|Oe<<16,me=$t,ve=Kn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[3],ve=D[3],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[3]=$t=Te&65535|ze<<16,D[3]=Kn=De&65535|Oe<<16,me=te,ve=vn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[4],ve=D[4],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[4]=te=Te&65535|ze<<16,D[4]=vn=De&65535|Oe<<16,me=Gt,ve=On,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[5],ve=D[5],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[5]=Gt=Te&65535|ze<<16,D[5]=On=De&65535|Oe<<16,me=an,ve=Gn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[6],ve=D[6],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[6]=an=Te&65535|ze<<16,D[6]=Gn=De&65535|Oe<<16,me=un,ve=Yn,De=ve&65535,Oe=ve>>>16,Te=me&65535,ze=me>>>16,me=k[7],ve=D[7],De+=ve&65535,Oe+=ve>>>16,Te+=me&65535,ze+=me>>>16,Oe+=De>>>16,Te+=Oe>>>16,ze+=Te>>>16,k[7]=un=Te&65535|ze<<16,D[7]=Yn=De&65535|Oe<<16,xr+=128,P-=128}return P}function pe(k,D,$){var P=new Int32Array(8),N=new Int32Array(8),ee=new Uint8Array(256),ne,he=$;for(P[0]=1779033703,P[1]=3144134277,P[2]=1013904242,P[3]=2773480762,P[4]=1359893119,P[5]=2600822924,P[6]=528734635,P[7]=1541459225,N[0]=4089235720,N[1]=2227873595,N[2]=4271175723,N[3]=1595750129,N[4]=2917565137,N[5]=725511199,N[6]=4215389547,N[7]=327033209,re(P,N,D,$),$%=128,ne=0;ne<$;ne++)ee[ne]=D[he-$+ne];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,g(ee,$-8,he/536870912|0,he<<3),re(P,N,ee,$),ne=0;ne<8;ne++)g(k,8*ne,P[ne],N[ne]);return 0}function ye(k,D){var $=n(),P=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n(),Be=n(),He=n();se($,k[1],k[0]),se(He,D[1],D[0]),de($,$,He),J(P,k[0],k[1]),J(He,D[0],D[1]),de(P,P,He),de(N,k[3],D[3]),de(N,N,c),de(ee,k[2],D[2]),J(ee,ee,ee),se(ne,P,$),se(he,ee,N),J(Ce,ee,N),J(Be,P,$),de(k[0],ne,he),de(k[1],Be,Ce),de(k[2],Ce,he),de(k[3],ne,Be)}function Ue(k,D,$){var P;for(P=0;P<4;P++)B(k[P],D[P],$)}function je(k,D){var $=n(),P=n(),N=n();ge(N,D[2]),de($,D[0],N),de(P,D[1],N),q(k,P),k[31]^=ue($)<<7}function ke(k,D,$){var P,N;for(K(k[0],a),K(k[1],u),K(k[2],u),K(k[3],a),N=255;N>=0;--N)P=$[N/8|0]>>(N&7)&1,Ue(k,D,P),ye(D,k),ye(k,k),Ue(k,D,P)}function nt(k,D){var $=[n(),n(),n(),n()];K($[0],d),K($[1],h),K($[2],u),de($[3],d,h),ke(k,$,D)}function gt(k,D,$){var P=new Uint8Array(64),N=[n(),n(),n(),n()],ee;for($||r(D,32),pe(P,D,32),P[0]&=248,P[31]&=127,P[31]|=64,nt(N,P),je(k,N),ee=0;ee<32;ee++)D[ee+32]=k[ee];return 0}var bn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Vt(k,D){var $,P,N,ee;for(P=63;P>=32;--P){for($=0,N=P-32,ee=P-12;N>4)*bn[N],$=D[N]>>8,D[N]&=255;for(N=0;N<32;N++)D[N]-=$*bn[N];for(P=0;P<32;P++)D[P+1]+=D[P]>>8,k[P]=D[P]&255}function xn(k){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=k[$];for($=0;$<64;$++)k[$]=0;Vt(k,D)}function Ii(k,D,$,P){var N=new Uint8Array(64),ee=new Uint8Array(64),ne=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(N,P,32),N[0]&=248,N[31]&=127,N[31]|=64;var ct=$+64;for(he=0;he<$;he++)k[64+he]=D[he];for(he=0;he<32;he++)k[32+he]=N[32+he];for(pe(ne,k.subarray(32),$+32),xn(ne),nt(He,ne),je(k,He),he=32;he<64;he++)k[he]=P[he];for(pe(ee,k,$+64),xn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=ne[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*N[Ce];return Vt(k.subarray(32),Be),ct}function br(k,D){var $=n(),P=n(),N=n(),ee=n(),ne=n(),he=n(),Ce=n();return K(k[2],u),Q(k[1],D),Se(N,k[1]),de(ee,N,l),se(N,N,k[2]),J(ee,k[2],ee),Se(ne,ee),Se(he,ne),de(Ce,he,ne),de($,Ce,N),de($,$,ee),Ze($,$),de($,$,N),de($,$,ee),de($,$,ee),de(k[0],$,ee),Se(P,k[0]),de(P,P,ee),Y(P,N)&&de(k[0],k[0],v),Se(P,k[0]),de(P,P,ee),Y(P,N)?-1:(ue(k[0])===D[31]>>7&&se(k[0],a,k[0]),de(k[3],k[0],k[1]),0)}function yi(k,D,$,P){var N,ee=new Uint8Array(32),ne=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,P))return-1;for(N=0;N<$;N++)k[N]=D[N];for(N=0;N<32;N++)k[N+32]=P[N];if(pe(ne,k,$),xn(ne),ke(he,Ce,ne),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(N=0;N<$;N++)k[N]=0;return-1}for(N=0;N<$;N++)k[N]=D[N+64];return $}var ar=32,ui=24,bi=32,Rr=16,Yi=32,go=32,xi=32,Dr=32,wa=32,_t=ui,dn=bi,wn=Rr,qn=64,ur=32,Xr=64,mo=32,ql=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:U,crypto_stream:F,crypto_stream_salsa20_xor:T,crypto_stream_salsa20:M,crypto_onetimeauth:W,crypto_onetimeauth_verify:ie,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Pe,crypto_scalarmult_base:Fe,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:It,crypto_box_open:mn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:gt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:ar,crypto_secretbox_NONCEBYTES:ui,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Yi,crypto_scalarmult_SCALARBYTES:go,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:wa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:dn,crypto_box_BOXZEROBYTES:wn,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:mo,crypto_hash_BYTES:ql,gf:n,D:l,L:bn,pack25519:q,unpack25519:Q,M:de,A:J,S:Se,Z:se,pow2523:Ze,add:ye,set25519:K,modL:Vt,scalarmult:ke,scalarbase:nt};function yf(k,D){if(k.length!==ar)throw new Error("bad key size");if(D.length!==ui)throw new Error("bad nonce size")}function oe(k,D){if(k.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var k=0;k=0},t.sign.keyPair=function(){var k=new Uint8Array(ur),D=new Uint8Array(Xr);return gt(k,D),{publicKey:k,secretKey:D}},t.sign.keyPair.fromSecretKey=function(k){if(le(k),k.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:u,value:s="on",onCheckedChange:l,form:c,...d}=e,[h,v]=y.useState(null),g=Kt(t,A=>v(A)),m=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Ga({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const A=h?.form;if(A){const E=()=>x(S.current);return A.addEventListener("reset",E),()=>A.removeEventListener("reset",E)}},[h,x]),I.jsxs(Bqe,{scope:n,state:w,disabled:u,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":bl(w)?"mixed":w,"aria-required":a,"data-state":gY(w),"data-disabled":u?"":void 0,disabled:u,value:s,...d,ref:g,onKeyDown:Ye(e.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:Ye(e.onClick,A=>{x(E=>bl(E)?!0:!E),b&&(m.current=A.isPropagationStopped(),m.current||A.stopPropagation())})}),b&&I.jsx(Uqe,{control:h,bubbles:!m.current,name:r,value:s,checked:w,required:a,disabled:u,form:c,style:{transform:"translateX(-100%)"},defaultChecked:bl(o)?!1:o})]})});hY.displayName=oO;var pY="CheckboxIndicator",vY=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=zqe(pY,n);return I.jsx(Gr,{present:r||bl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":gY(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});vY.displayName=pY;var Uqe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),u=pP(n),s=jA(t);y.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&v){const g=new Event("click",{bubbles:r});c.indeterminate=bl(n),v.call(c,bl(n)?!1:n),c.dispatchEvent(g)}},[u,n,r]);const l=y.useRef(bl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function bl(e){return e==="indeterminate"}function gY(e){return bl(e)?"indeterminate":e?"checked":"unchecked"}var FZe=hY,LZe=vY;export{CGe as $,cpe as A,IKe as B,UKe as C,hpe as D,ppe as E,zKe as F,xB as G,nGe as H,vKe as I,gpe as J,fpe as K,dpe as L,uKe as M,vGe as N,Vqe as O,Yqe as P,NKe as Q,j as R,Sl as S,vpe as T,Lpe as U,jpe as V,kGe as W,JKe as X,TGe as Y,xGe as Z,wGe as _,Qqe as a,VYe as a$,EGe as a0,PGe as a1,YKe as a2,AGe as a3,iGe as a4,SGe as a5,OGe as a6,yGe as a7,bGe as a8,_Ge as a9,LGe as aA,sGe as aB,pYe as aC,bKe as aD,EKe as aE,SYe as aF,CYe as aG,EYe as aH,Xqe as aI,TYe as aJ,MYe as aK,RYe as aL,kYe as aM,$Ye as aN,NYe as aO,IYe as aP,FYe as aQ,XKe as aR,qYe as aS,eGe as aT,KYe as aU,LYe as aV,jYe as aW,BYe as aX,UYe as aY,WYe as aZ,HYe as a_,RGe as aa,NGe as ab,DGe as ac,$Ge as ad,Kqe as ae,oKe as af,lKe as ag,CKe as ah,eKe as ai,cKe as aj,xKe as ak,sKe as al,pKe as am,SKe as an,_Ke as ao,gKe as ap,wKe as aq,iKe as ar,nKe as as,fKe as at,kKe as au,OKe as av,AKe as aw,TKe as ax,yKe as ay,aKe as az,ig as b,kZe as b$,GYe as b0,zYe as b1,XYe as b2,QKe as b3,tZe as b4,nZe as b5,JYe as b6,eZe as b7,qS as b8,jKe as b9,VGe as bA,zGe as bB,YYe as bC,Ui as bD,lZe as bE,cZe as bF,lYe as bG,gYe as bH,hYe as bI,iYe as bJ,JGe as bK,QGe as bL,fZe as bM,rKe as bN,PKe as bO,mKe as bP,tKe as bQ,hZe as bR,pZe as bS,BKe as bT,oGe as bU,aGe as bV,wZe as bW,SZe as bX,eYe as bY,UGe as bZ,OZe as b_,mf as ba,KGe as bb,AYe as bc,PYe as bd,cP as be,fP as bf,oIe as bg,Yu as bh,vf as bi,Gh as bj,ZYe as bk,cYe as bl,qGe as bm,BGe as bn,HGe as bo,WGe as bp,xYe as bq,yYe as br,oZe as bs,aZe as bt,uZe as bu,ZBe as bv,nze as bw,rZe as bx,fYe as by,jGe as bz,fn as c,RZe as c0,DZe as c1,TZe as c2,MZe as c3,EZe as c4,AZe as c5,PZe as c6,uGe as c7,cGe as c8,mYe as c9,LZe as cA,tGe as cB,hGe as cC,ZKe as cD,rGe as cE,dGe as cF,aYe as cG,Gqe as cH,YGe as cI,HBe as cJ,lGe as cK,tYe as cL,GGe as cM,_Ze as ca,vZe as cb,yZe as cc,bZe as cd,xZe as ce,bYe as cf,sYe as cg,ZGe as ch,XGe as ci,wYe as cj,Qa as ck,yr as cl,uYe as cm,gZe as cn,mZe as co,fGe as cp,Gc as cq,$Ze as cr,IZe as cs,IGe as ct,vYe as cu,nYe as cv,oYe as cw,dYe as cx,rYe as cy,FZe as cz,Hqe as d,Kr as e,$Ke as f,RKe as g,DKe as h,MKe as i,I as j,yk as k,LKe as l,qqe as m,qKe as n,mA as o,hKe as p,dKe as q,y as r,GKe as s,Jqe as t,JF as u,KKe as v,Zqe as w,WKe as x,HKe as y,VKe as z};