omnigateway 0.11.3 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/bin/omni.js +2325 -810
- package/gateway.js +2701 -1340
- package/package.json +2 -4
- package/public/assets/{Chip-iJNHhgJ6.js → Chip-D4qvhu1D.js} +1 -1
- package/public/assets/CopyValue-SnsT2LML.js +27 -0
- package/public/assets/Lamp-DkvXKB-B.js +26 -0
- package/public/assets/Rack-CEuCdVXc.js +483 -0
- package/public/assets/RequestTable-CSQGt9W_.js +93 -0
- package/public/assets/{SummaryDeck-BUMth482.js → SummaryDeck-7ivuca39.js} +1 -1
- package/public/assets/Toggle-t82IhqEt.js +39 -0
- package/public/assets/TokenBreakdown-D1Wtza1y.js +32 -0
- package/public/assets/{WindowChart-UHzWV_Tx.js → WindowChart-BeGPsccS.js} +1 -1
- package/public/assets/_app.accounts-W1USUo2Q.js +70 -0
- package/public/assets/{_app.console-C9P3N79h.js → _app.console-BvIGqIe7.js} +2 -2
- package/public/assets/_app.database-CtFJLcfE.js +24 -0
- package/public/assets/_app.index-DigYfob3.js +67 -0
- package/public/assets/_app.keys-B1fRMyU-.js +92 -0
- package/public/assets/_app.logs-D73Qcx9S.js +60 -0
- package/public/assets/_app.models-Dpl1O2RE.js +148 -0
- package/public/assets/{_app.plugins._pluginId-BaZPH3Oh.js → _app.plugins._pluginId-BNrRTn9l.js} +1 -1
- package/public/assets/{_app.settings-neenlxM-.js → _app.settings-tRLrVJoq.js} +4 -4
- package/public/assets/_app.usage-D2qlcEp4.js +76 -0
- package/public/assets/chevron-down-Bs0tSOyA.js +1 -0
- package/public/assets/chevron-right-DSaI1kFo.js +1 -0
- package/public/assets/client-BZ_ev12J.js +39 -0
- package/public/assets/dist-D03q-60i.js +1 -0
- package/public/assets/index-89mqAVmK.js +14 -0
- package/public/assets/{login-COCaKiJ3.js → login-75MYwRdC.js} +2 -2
- package/public/assets/plus-BCfjC6nk.js +1 -0
- package/public/assets/preload-helper-BPaHpbO_.js +1 -0
- package/public/assets/{shared-CNTPQfFU.js → shared-Dtkw6SE0.js} +1 -1
- package/public/assets/trash-D4QWzEK_.js +1 -0
- package/public/index.html +4 -4
- package/public/shared/chunks/react-DK6rpPfu.js +1 -0
- package/public/shared/chunks/react-dom-Wr82bmbV.js +1 -0
- package/public/shared/dashboard-sdk.js +1 -1
- package/public/shared/react-dom-client.js +5 -5
- package/public/shared/react-dom.js +1 -1
- package/public/shared/react-query.js +1 -1
- package/public/shared/react.js +1 -1
- package/public/shared/styled-components.js +1 -1
- package/public/assets/CopyValue-kMuDjb96.js +0 -27
- package/public/assets/Lamp-lkkWBrFM.js +0 -26
- package/public/assets/Rack-B4L2xB7-.js +0 -483
- package/public/assets/RequestTable-DSmx72OY.js +0 -11
- package/public/assets/Toggle-DAjywMl5.js +0 -39
- package/public/assets/TokenBreakdown-DQuX2IKR.js +0 -33
- package/public/assets/_app.accounts-Dd35v-5U.js +0 -59
- package/public/assets/_app.database-DV09HTfL.js +0 -24
- package/public/assets/_app.index-CJm4vBIM.js +0 -67
- package/public/assets/_app.keys-BJYRaiSr.js +0 -92
- package/public/assets/_app.logs-CwfEU7mb.js +0 -58
- package/public/assets/_app.models-BicZeVmX.js +0 -148
- package/public/assets/_app.usage-CXj0B5qT.js +0 -76
- package/public/assets/chevron-right-f-3aPVhf.js +0 -1
- package/public/assets/client-BAOwDPZ1.js +0 -39
- package/public/assets/index-B8HiPc8p.js +0 -13
- package/public/assets/plus-DLJ5ZcBJ.js +0 -1
- package/public/assets/preload-helper-KDDEULHo.js +0 -1
- package/public/assets/trash-2-C937U0RF.js +0 -1
- package/public/shared/chunks/react-GitiQ0dt.js +0 -1
- package/public/shared/chunks/react-dom-BFxyned6.js +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{_ as e,i as t,y as n}from"./shared-Dtkw6SE0.js";import{$ as r,F as i,I as a,K as o,L as s,V as ee,W as te,Zt as ne,at as re,et as ie,g as c,it as ae,j as l,l as oe,nt as u,ot as d,r as f,rt as se,tt as p,u as ce}from"./Lamp-DkvXKB-B.js";import{C as m,D as h,O as g,_,a as le,b as v,i as ue,t as de,v as y,x as b,y as x}from"./Panel-CWmOTDAP.js";import{D as fe,i as pe,t as me,x as S}from"./Rack-CEuCdVXc.js";import{a as he,i as ge,n as _e,r as ve,t as ye}from"./RequestTable-CSQGt9W_.js";import{t as C}from"./chevron-down-Bs0tSOyA.js";import{t as w}from"./chevron-right-DSaI1kFo.js";import{i as T,r as E}from"./index-89mqAVmK.js";import{i as be}from"./Field-BYBri2NV.js";import{t as D}from"./Meter-stpt3vQu.js";import{i as O,n as k,r as A,t as j}from"./Table-CVDZ69Zx.js";import{n as xe,r as M}from"./WindowChart-BeGPsccS.js";import{i as N,n as P,r as Se,t as Ce}from"./SummaryDeck-7ivuca39.js";import{Fragment as we,useMemo as F,useState as I}from"react";import{Fragment as Te,jsx as L,jsxs as R}from"react/jsx-runtime";import z from"styled-components";var B=z.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-areas:
|
|
4
|
+
"chassis"
|
|
5
|
+
"main";
|
|
6
|
+
grid-template-columns: minmax(0, 1fr);
|
|
7
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
8
|
+
height: 100vh;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
`,V=z.main`
|
|
12
|
+
grid-area: main;
|
|
13
|
+
padding: ${({theme:e})=>e.space(4)};
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: ${({theme:e})=>e.space(4)};
|
|
17
|
+
min-width: 0;
|
|
18
|
+
min-height: 0;
|
|
19
|
+
overflow-y: auto;
|
|
20
|
+
|
|
21
|
+
@media (max-width: 720px) {
|
|
22
|
+
padding: ${({theme:e})=>e.space(3)};
|
|
23
|
+
}
|
|
24
|
+
`;function H({children:e}){let{cadence:t}=fe(),n=p(),r=u(200,t(1e4,`res:logs`));return R(B,{"data-testid":`client-shell`,children:[L(S,{logs:r.data??[],logsFailed:r.isError,signOut:{pending:n.isPending,run:()=>{n.mutate(void 0,{onSuccess:()=>window.location.assign(`/login`)})}}}),L(V,{children:e})]})}var U=[20,50,100,250],Ee={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function De({reading:e}){let t=e.window===null?`concurrent requests`:`${e.dimension} ${Ee[e.window]??e.window}`,n=e.dimension===`spend`?s:l,r=e.used===null?null:e.limit===0?1:e.used/e.limit;return R(O,{children:[L(k,{children:t}),L(k,{$align:`right`,$mono:!0,children:e.used===null?L(x,{children:`unknown`}):n(e.used)}),L(k,{$align:`right`,$mono:!0,children:n(e.limit)}),L(k,{children:r===null?null:L(D,{fraction:r,label:`${t}, ${Math.round(Math.min(1,r)*100)}% used`})})]})}function Oe(e){return{observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.usedRatio}}function W(e){return{stale:e.stale,rolledOver:e.rolledOver,estimateStale:e.stale||e.rolledOver,survives:e.survives,exhaustsAt:e.exhaustsAt}}var G=z.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 4px;
|
|
28
|
+
`,K=z.div`
|
|
29
|
+
display: grid;
|
|
30
|
+
/* Bar, figure, legend — the accounts page's own three columns, so the two
|
|
31
|
+
screens read the same way and the legends stay aligned down the stack. */
|
|
32
|
+
grid-template-columns: 96px 34px 1fr;
|
|
33
|
+
align-items: center;
|
|
34
|
+
min-width: 208px;
|
|
35
|
+
gap: 6px;
|
|
36
|
+
`,q=z(y)`
|
|
37
|
+
font-size: 11px;
|
|
38
|
+
text-align: right;
|
|
39
|
+
`;function ke({windows:e,open:t,onToggle:n}){let r=e[0],o=e.filter(e=>e.usedRatio!==null);return R(O,{children:[L(k,{children:r.label}),L(k,{children:o.length===0?L(x,{children:`unknown`}):L(G,{children:o.map(e=>R(K,{children:[L(D,{fraction:e.usedRatio,label:`${e.label} ${e.windowType} window, ${Math.round(e.usedRatio*100)}% used`}),L(q,{children:i(e.usedRatio,0)}),L(_,{children:c(e,W(e),Date.now(),a)})]},e.windowType))})}),L(k,{$align:`right`,children:L(g,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-expanded":t,"aria-label":`${t?`Hide`:`Show`} quota history for ${r.label}`,title:`${t?`Hide`:`Show`} quota history for ${r.label}`,onClick:n,children:L(t?C:w,{})})})]})}function J(){let{cadence:a,live:c}=fe(),[u,p]=I(`24h`),[g,S]=I(he),[C,w]=I(U[0]),[T,E]=I(null),[D,z]=I(null),B=e(u),V=r().data??null,H=F(()=>B.grain===`daily`?n(Date.now()-B.ms,V):Math.floor((Date.now()-B.ms)/6e4)*6e4,[B,V]),Ee=F(()=>H+B.ms,[H,B]),W=re(),G={since:H,grain:B.grain},K=d({...G,groupBy:B.by},a(6e4,`res:usage`)),q=d({...G,groupBy:`model`},a(6e4,`res:usage`)),J=ie(g,C,a(ee,`res:logs`)),Ae=!te(J.data),je=ne(o.clientLogPages(g,C)),Y=se(6e4),X=Y.data??[],Me=F(()=>{let e=new Map;for(let t of X){let n=e.get(t.provider)??new Map,r=n.get(t.credentialId);r===void 0?n.set(t.credentialId,[t]):r.push(t),e.set(t.provider,n)}return[...e.entries()].map(([e,t])=>[e,[...t.entries()].map(([e,t])=>({credentialId:e,windows:[...t].sort((e,t)=>f[e.windowType]-f[t.windowType])}))])},[X]),Z=X.map(e=>M(Oe(e))).filter(e=>e!==null),Ne=Z.length===0?0:Math.floor(Math.min(...Z)/6e4)*6e4,Pe=ae({since:Ne},D!==null&&Z.length>0),Q=F(()=>(J.data?.pages??[]).flatMap(e=>e.logs),[J.data?.pages]),Fe=ve(c&&Q.some(ce)),Ie=Q.filter(oe).length,$=K.data??[],Le=$.reduce((e,t)=>e+t.requests,0),Re=$.reduce((e,t)=>e+t.costUsd,0);return R(m,{$gap:4,children:[L(me,{legend:`Client`,title:`Your usage`,summary:K.isLoading?`Reading your usage…`:`${l(Le)} requests and ${s(Re)} over the last ${B.label}.`,actions:L(P,{children:t.map(e=>L(Se,{type:`button`,$size:`sm`,$on:e.id===u,"aria-pressed":e.id===u,onClick:()=>p(e.id),children:e.id},e.id))})}),L(de,{legend:`Your key`,meta:W.data===void 0?void 0:R(y,{$dim:!0,children:[W.data.prefix,`…`]}),children:W.isPending?L(le,{rows:2}):W.isError?L(ue,{legend:`Could not read your key`,error:W.error}):R(m,{$gap:2,children:[R(v,{$gap:2,$wrap:!0,children:[L(_,{children:W.data.label}),W.data.bodyLoggingOptOut?L(x,{children:`Request bodies are never stored for this key.`}):null]}),W.data.modelAllowlist===null?L(x,{children:`Every model this gateway serves.`}):W.data.modelAllowlist.length===0?L(x,{children:`No models. This key cannot serve a request.`}):L(v,{$gap:1,$wrap:!0,children:W.data.modelAllowlist.map(e=>L(y,{children:e},e))})]})}),L(Ce,{buckets:$,since:H,until:Ee,by:B.by,rangeLabel:B.label,dayOffsetMinutes:V}),L(N,{legend:`By model`,meta:B.label,query:{isLoading:q.isLoading,isError:q.isError,error:q.error,refetch:()=>void q.refetch()},failure:`Could not read usage`,empty:{legend:`No traffic`,message:`Nothing served in this window.`},isEmpty:(q.data??[]).length===0,children:L(b,{children:R(j,{children:[L(`thead`,{children:R(`tr`,{children:[L(A,{children:`Model`}),L(A,{$align:`right`,children:`Requests`}),L(A,{$align:`right`,children:`Tokens`}),L(A,{$align:`right`,children:`Spend`})]})}),L(`tbody`,{children:(q.data??[]).map(e=>R(O,{children:[L(k,{$mono:!0,children:e.key}),L(k,{$align:`right`,$mono:!0,children:l(e.requests)}),L(k,{$align:`right`,$mono:!0,children:l(e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens)}),L(k,{$align:`right`,$mono:!0,children:s(e.costUsd)})]},e.key))})]})})}),L(N,{legend:`Your limits`,query:{isLoading:W.isLoading,isError:W.isError,error:W.error,refetch:()=>void W.refetch()},failure:`Could not read your limits`,empty:W.data?.limits===null?{legend:`Limits unreadable`,message:`This key's limits could not be read. Requests are refused until an operator repairs it.`}:{legend:`No limits`,message:`This key is not rate limited.`},isEmpty:W.data?.limits===null||(W.data?.limitUsage.length??0)===0,footer:L(x,{children:`Counted from completed requests, so a burst in flight right now may not be included yet.`}),children:L(b,{children:R(j,{children:[L(`thead`,{children:R(`tr`,{children:[L(A,{children:`Limit`}),L(A,{$align:`right`,children:`Used`}),L(A,{$align:`right`,children:`Ceiling`}),L(A,{$width:`30%`,children:`Consumption`})]})}),L(`tbody`,{children:(W.data?.limitUsage??[]).map(e=>L(De,{reading:e},`${e.dimension}:${e.window??`gauge`}`))})]})})}),L(N,{legend:`Provider headroom`,query:{isLoading:Y.isLoading,isError:Y.isError,error:Y.error,refetch:()=>void Y.refetch()},failure:`Could not read provider headroom`,empty:{legend:`No data`,message:`No provider has reported a usage window.`},isEmpty:X.length===0,footer:L(x,{children:`What each account serving this gateway has left. A request is served by whichever account of a provider can take it.`}),children:L(m,{$gap:4,children:Me.map(([e,t])=>R(m,{$gap:1,children:[L(_,{children:e}),L(b,{children:R(j,{children:[L(`thead`,{children:R(`tr`,{children:[L(A,{children:`Account`}),L(A,{$width:`60%`,children:`Quota`}),L(A,{})]})}),L(`tbody`,{children:t.map(({credentialId:e,windows:t})=>R(we,{children:[L(ke,{windows:t,open:D===e,onToggle:()=>z(D===e?null:e)}),D===e?L(O,{children:L(k,{colSpan:3,children:L(m,{$gap:4,children:t.map(e=>{let t=Oe(e),n=M(t),r=(Pe.data?.samples??[]).filter(t=>t.credentialId===e.credentialId&&t.windowType===e.windowType&&t.observedAt>=(n??0));return L(xe,{live:t,samples:r.map(e=>({observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.usedRatio})),since:n,now:Date.now(),truncated:Pe.data?.truncated===!0&&n!==null&&r.length>0&&(r[0]?.observedAt??0)>n,ratePerHourRatio:e.ratePerHourRatio,exhaustsAt:e.exhaustsAt,survives:e.survives,stale:e.stale,rolledOver:e.rolledOver,spent:e.usedRatio===null?`no ceiling reported`:`${i(e.usedRatio,0)} used`,rateText:e.ratePerHourRatio===null?`unknown`:`${i(e.ratePerHourRatio,1)}/h`},e.windowType)})})})}):null]},e))})]})})]},e))})}),L(N,{legend:`Recent requests`,meta:`${Q.length} shown`,actions:R(P,{children:[L(ge,{filters:g,onChange:S}),L(be,{value:C,"aria-label":`How many requests per page`,style:{width:`auto`},onChange:e=>w(Number(e.target.value)),children:U.map(e=>R(`option`,{value:e,children:[e,` per page`]},e))})]}),query:{isLoading:J.isLoading,isError:J.isError,error:J.error,refetch:()=>void J.refetch()},failure:`Could not read your requests`,empty:{legend:`No requests`,message:Object.keys(g).length===0?`Nothing served through this key yet.`:`No request served through this key matches these filters.`},isEmpty:Q.length===0,footer:R(v,{$gap:2,$wrap:!0,children:[R(x,{children:[l(Ie),` of the `,l(Q.length),` loaded failed.`]}),J.hasNextPage?L(h,{type:`button`,$size:`sm`,disabled:J.isFetchingNextPage,onClick:()=>void J.fetchNextPage(),children:J.isFetchingNextPage?`Loading…`:`Load older`}):null,Ae?R(Te,{children:[L(x,{children:`Live updates are paused while older pages are loaded.`}),L(h,{type:`button`,$size:`sm`,onClick:je,children:`Back to live`})]}):null]}),children:L(b,{children:L(_e,{rows:Q,now:Fe,onOpen:E})})}),L(pe,{open:T!==null,onOpenChange:e=>{e||E(null)},title:`Request detail`,width:`640px`,footer:L(h,{type:`button`,onClick:()=>E(null),children:`Close`}),children:T===null?null:L(ye,{log:T})})]})}var Ae=()=>L(E,{children:L(T,{children:L(H,{children:L(J,{})})})});export{Ae as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./Rack-CEuCdVXc.js";import*as t from"react";var n=Object.defineProperty,r=(e,t)=>n(e,`name`,{value:t,configurable:!0});function i(n){let[r,i]=t.useState(void 0);return e(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let t=e[0],r,a;if(`borderBoxSize`in t){let e=t.borderBoxSize,n=Array.isArray(e)?e[0]:e;r=n.inlineSize,a=n.blockSize}else r=n.offsetWidth,a=n.offsetHeight;i({width:r,height:a})});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}i(void 0)},[n]),r}r(i,`useSize`);export{i as t};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app-Drf03PWk.js","assets/Panel-CWmOTDAP.js","assets/client-BZ_ev12J.js","assets/shared-Dtkw6SE0.js","assets/Lamp-DkvXKB-B.js","assets/Rack-CEuCdVXc.js","assets/RequestTable-CSQGt9W_.js","assets/TokenBreakdown-D1Wtza1y.js","assets/chevron-right-DSaI1kFo.js","assets/dist-D03q-60i.js","assets/Chip-D4qvhu1D.js","assets/Field-BYBri2NV.js","assets/Table-CVDZ69Zx.js","assets/chevron-down-Bs0tSOyA.js","assets/Meter-stpt3vQu.js","assets/WindowChart-BeGPsccS.js","assets/SummaryDeck-7ivuca39.js","assets/Readout-BTh732hP.js","assets/login-75MYwRdC.js","assets/reasons-Du1OBWAM.js","assets/_app.index-DigYfob3.js","assets/_app.accounts-W1USUo2Q.js","assets/CopyValue-SnsT2LML.js","assets/plus-BCfjC6nk.js","assets/trash-D4QWzEK_.js","assets/Toggle-t82IhqEt.js","assets/_app.console-BvIGqIe7.js","assets/_app.database-CtFJLcfE.js","assets/_app.keys-B1fRMyU-.js","assets/_app.logs-D73Qcx9S.js","assets/_app.models-Dpl1O2RE.js","assets/_app.settings-tRLrVJoq.js","assets/_app.usage-D2qlcEp4.js","assets/_app.plugins._pluginId-BNrRTn9l.js","assets/preload-helper-BPaHpbO_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Cn as e,Dn as t,En as n,H as r,In as i,K as a,Mn as o,Mt as s,Nn as c,On as l,Pn as u,Sn as d,Tn as f,W as p,_n as m,an as h,cn as g,fn as _,gn as v,hn as y,jn as b,kn as x,ln as S,mn as C,on as w,pn as T,rn as E,sn as ee,un as te,vn as ne,wn as re,xn as ie,yn as ae}from"./Lamp-DkvXKB-B.js";import{a as oe,c as se,i as ce,n as D,o as le,r as O,s as ue,t as k}from"./preload-helper-BPaHpbO_.js";import{A as de,C as fe,D as pe,_ as me,a as he,k as A,l as ge,s as _e,t as ve}from"./Panel-CWmOTDAP.js";import{C as ye,E as be,T as xe,n as Se}from"./Rack-CEuCdVXc.js";import{MutationCache as Ce,QueryCache as we,QueryClient as Te,QueryClientProvider as Ee,useQueryClient as De}from"@tanstack/react-query";import*as j from"react";import{StrictMode as Oe,createContext as ke,use as Ae,useEffect as M,useRef as je,useState as Me,useSyncExternalStore as Ne}from"react";import{Fragment as Pe,jsx as N,jsxs as P}from"react/jsx-runtime";import{createRoot as Fe}from"react-dom/client";import Ie from"styled-components";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function F(e){return e?.isNotFound===!0}function Le(){try{return sessionStorage}catch{return}}var Re=`tsr-scroll-restoration-v1_3`,ze=Le();function Be(){try{return JSON.parse(ze?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ve(){try{ze?.setItem(Re,JSON.stringify(I))}catch{}}var I=Be(),He=`data-scroll-restoration-id`,Ue=e=>e.state.__TSR_key||e.href;function We(e){let t=e.getAttribute(He);if(t)return`[${He}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Ge=!1,Ke=`window`;function qe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Je(e){let t=new Set;for(let n of e){if(n===Ke)continue;let e=qe(n);e&&t.add(e)}return t}function Ye(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Ue,a=new Set,o=e=>{let t=I[e]||={};for(let e of a)e===document?t[Ke]={scrollX,scrollY}:e.isConnected&&(t[We(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Ge=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Ge||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ve()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=I[d];if(e){let t=I[u];for(let n in e){if(n===Ke){if(s)continue}else{let e=qe(n);if(!e||s&&o&&(l??=Je(o),l.has(e)))continue}t||=I[u]={},t[n]??=e[n]}}}Ge=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Je(o));let t=e&&i&&c,s=r.restoring?I[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Ke){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=qe(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Ge=!1}}))}function Xe(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Ze(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Qe(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ze(r):Array.isArray(t)?t.push(Ze(r)):n[e]=[t,Ze(r)]}return n}var $e=/^(?:\s|["[{\d-]|fa|nu|tr)/,et=nt(JSON.parse),tt=rt(JSON.stringify,JSON.parse);function nt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=Qe(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!$e.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function rt(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!$e.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Xe(e,r);return t?`?${t}`:``}}function it(e){return{input:({url:t})=>{for(let n of e)t=ot(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=st(e[n],t);return t}}}function at(e){let t=te(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=g([`/`,t,e.pathname]),e)}}function ot(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function st(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ct(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),f=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function p(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let m={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:f,getMatchStore:p,setMatches:h};function h(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{d(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=p(t.routeId);e.get()!==t&&e.set(t)}})}return m}var L=`__TSR_index`,lt=`popstate`,ut=`beforeunload`,dt=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ft(e){let t=dt.exec(e);return t?`/`+e.slice(t[0].length):e}function pt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
3
|
+
\r`.includes(e)?``:encodeURIComponent(e))),ft(e)}function mt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=_t(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[L];i=ht(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[L];i=ht(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[L]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function ht(e,t){t||={};let n=vt();return{...t,key:n,__TSR_key:n,[L]:e}}function gt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>pt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>_t(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=vt();t.history.replaceState({[L]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=_t(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[L]-l.state[L],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=mt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ut,x,{capture:!0}),t.removeEventListener(lt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(ut,x,{capture:!0}),t.addEventListener(lt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function _t(e,t){let n=pt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=vt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[L]:0,key:a,__TSR_key:a}}}function vt(){return(Math.random()+1).toString(36).substring(7)}function yt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function bt(e){return e.pathname+e.search+e.hash}function xt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function St(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Ct({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function wt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Tt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Et=class{constructor(r,i){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=w(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:gt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ae(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ct(this.latestLocation,e),Ye(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=te(a);t&&t!==`/`&&e.push(at({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:it(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ne(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&m(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(t,n)=>{let r=({pathname:t,search:r,hash:i,href:a,state:s})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(t)){let a=this.options.parseSearch(r),c=this.options.stringifySearch(a);return{href:t+c+i,publicHref:t+c+i,pathname:e(t),external:!1,searchStr:c,search:o(n?.search,a),hash:e(i.slice(1)),state:u(n?.state,s)}}let c=new URL(a,this.origin),l=ot(this.rewrite,c),d=this.options.parseSearch(l.search),f=this.options.stringifySearch(d);return l.search=f,{href:l.href.replace(l.origin,``),publicHref:a,pathname:e(ft(l.pathname)),external:!!this.rewrite&&yt(l,this.origin),searchStr:f,search:o(n?.search,d),hash:e(l.hash.slice(1)),state:u(n?.state,s)}},i=r(t),{__tempLocation:a,__tempKey:s}=i.state;if(a&&(!s||s===this.tempLocationKey)){let e=r(a);return e.state.key=i.state.key,e.state.__TSR_key=i.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:i}}return i},this.resolvePathWithBase=(e,t)=>S({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=y(_(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=t=>{let r=(r={})=>{if(r.href){let e=_t(r.href,{});r={...r,to:ot(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let i=r._fromLocation||this._pendingLocation||this.latestLocation,a=this.matchRoutesLightweight(i),s=r.unsafeRelative===`path`?i.pathname:r.from??a[1],c=a[2],d=a[3],p=this.resolvePathWithBase(s,r.to?`${r.to}`:`.`),m=Nt(r.params,d),h=this.routesByPath[_(p)],g;if(h)g=this.getRouteBranch(h);else if(p.includes(`$`))g=[];else{let[e,t,n]=this.getMatchedRoutes(p);g=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&l(m))for(let e of g){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){m===d&&(m=Object.assign(Object.create(null),m));try{Object.assign(m,t(m))}catch{}}}let v=t.leaveParams?p:e(ft(ee({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath)),y=c;if(t._includeValidateSearch&&this.options.search?.strict){let e={};g.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,At(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=jt(y,r,g,t._includeValidateSearch),y=o(c,y);let b=this.options.stringifySearch(y),x=r.hash===!0?i.hash:r.hash?n(r.hash,i.hash):void 0,S=x?`#${x}`:``,C=r.state===!0?i.state:r.state?n(r.state,i.state):{};r.state&&(C=u(i.state,C));let w=`${v}${b}${S}`,T,E,te=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=st(this.rewrite,e);T=bt(e),yt(n,t)?(E=n.href,te=!0):E=ft(bt(n))}else T=f(w),E=T;return{publicHref:E,href:T,pathname:v,search:y,searchStr:b,state:C,hash:x??``,external:te,unmaskOnReload:r.unmaskOnReload}},i=r(t);if(t.mask)i.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){let e=C(i.pathname,this.processedTree);if(e){let n=Object.assign(Object.create(null),e.rawParams),{from:a,params:o,...s}=e.route,c=Nt(o,n);i.maskedLocation=r({from:t.from,...s,params:c})}}return i},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Dt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=_(this.latestLocation.href)===_(n.href)&&re(Ct(n.state),Ct(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:n,href:r,publicHref:i,...a})=>{let o=r?t(r):void 0;if(o||n){if(e!==void 0||!r){let t=this.buildLocation({to:e,...a}),n=t.maskedLocation??t;r??=n.publicHref,i??=n.publicHref}let t=!o&&i?i:r;return Dt(this,t,a)}return this.buildAndCommitLocation({...a,href:r,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await pn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(St(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&xt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let n=e.options,r=e.headers.get(`Location`)||n.href;if(!r){let e=this.buildLocation(n);r=(e.maskedLocation??e).publicHref||`/`}let i;if(c.test(r)||(i=t(r))&&!this.protocolAllowlist.has(i))throw Error(`Redirect blocked: unsafe protocol`);if(i===`http:`||i===`https:`){let e=new URL(r);e.pathname.startsWith(`//`)?r=e.href:yt(e,this.origin)||(r=bt(e),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,e.headers.set(`Location`,r),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=R,this.preloadRoute=e=>mn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=v(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!re(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?re(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=i,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...r,caseSensitive:r.caseSensitive??!1,notFoundMode:r.notFoundMode??`fuzzy`,stringifySearch:r.stringifySearch??tt,parseSearch:r.parseSearch??et,protocolAllowlist:r.protocolAllowlist??ie}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=T(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,s=!1;(i?i.path!==`/`&&r[`**`]:_(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:s=!0);let c=s?Mt(this.options.notFoundMode,a):void 0,l=Array(a.length),d=this._committed,f=(e,t)=>{let n=d[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?d.find(t=>t.routeId===e.id):void 0},p;for(let n=0;n<a.length;n++){let i=a[n],s=l[n-1],d,m,h;{let n=s?.search??e.search,r=s?._strictSearch??void 0;try{let e=At(i.options.validateSearch,{...n})??void 0;d={...n,...e},m={...r,...e}}catch(e){let r=e;if(e instanceof Ot||(r=new Ot(e.message,{cause:e})),t?.throwOnError)throw r;d=n,m={},h=r}}let g=``,_=``;try{g=i.options.loaderDeps?.({search:d})??``,_=g&&JSON.stringify(g)||``}catch(e){if(t?.throwOnError)throw e;h??=e}let{interpolatedPath:v,usedParams:y}=ee({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),b=i.id+v+_,x=f(i,n),S=this._cache.get(b)??(x?.id===b?x:void 0);p=S?._strictParams??Object.assign(y,p);let C;if(!S)try{Pt(i,p)}catch(e){if(C=F(e)||le(e)?e:new kt(e.message,{cause:e}),t?.throwOnError)throw C}let w=x?`stay`:`enter`,T;if(S)T={...S,cause:w,search:o(x?x.search:S.search,d),_strictSearch:m,searchError:h};else{let e=xt(i)?`pending`:`success`;T={id:b,ssr:i.options.ssr,index:n,routeId:i.id,params:x?.params??p,_strictParams:p,pathname:v,updatedAt:Date.now(),search:x?o(x.search,d):d,_strictSearch:m,searchError:h,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:x?u(x.loaderDeps,g):g,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let E=c===i.id;T._notFound&&!E&&(T.error=void 0),T._notFound=E,l[n]=T}for(let e=0;e<l.length;e++){let n=l[e];n.params=n.cause===`stay`?o(n.params,p):p,t?._controller&&(n.context={})}return l}matchRoutesLightweight(e){let t=b(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=b(a),c={...e.search};for(let e of a)try{Object.assign(c,At(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{Pt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Dt(e,t,{replace:n,ignoreBlocker:r}){if(!x(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Ot=class extends Error{},kt=class extends Error{};function At(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Ot(`Async validation not supported`);if(n.issues)throw new Ot(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function jt(e,t,r,i){let a=[];for(let e of r){let t=e.options;`search`in t?t.search?.middlewares&&a.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&a.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;i&&n&&a.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=At(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let o=(e,r,i)=>{if(e>=a.length){if(!t.search)return{};if(t.search===!0)return r;let e=n(t.search,r);return i&&(i.explicit=e),e}return a[e]({search:r,next:(t,n)=>{if(n){let n=i||{};return{search:o(e+1,t,n),meta:n}}return o(e+1,t,i)},meta:i})};return o(0,e)}function Mt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return se}function Nt(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let r=Object.assign(Object.create(null),t);return Object.assign(r,n(e,r))}function Pt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Ft(e,t){return e.options[t]?.preload?.()}function It(e,t){let n=Ft(e,`component`),r=Ft(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function R(e,t,n){let r=()=>t===!1?void 0:t?Ft(e,t):It(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Lt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var z=0,B=1,Rt=2,V=3,H=[4];function zt(e){return typeof e[0]==`number`}function U(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function W(e,t){return e.routesById[t.routeId]}function G(e,t,n){return le(e)?[V,e]:F(e)?(e.routeId||=n,[Rt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[B,e]):[z,e]}function Bt(e,t){let n=G(t,!0,e.id);if(n[0]!==B)return n;try{e.options.onError?.(n[1])}catch(t){n=G(t,!0,e.id)}return n}function K(e,t,n,r,i){return i[0].signal.aborted?H:$t(e,t,n,Bt(n,r),i)}async function Vt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=W(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return q(e,r),[i,K(e,t,u,a,n)]}if(c.aborted)return[i,H];let p=r.paramsError??r.searchError;if(p!==void 0)return q(e,r),[i,K(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Wt(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?U(a,c):a);if(c.aborted)return[i,H];let s=$t(e,t,u,G(o,!1,u.id),n);if(s[0]!==z)return q(e,r),[i,s];r.context={...r.context,...o}}catch(a){return q(e,r),[i,K(e,t,u,a,n)]}finally{r.status=h,Wt(e,r,!1,n[0])}}i()}function Ht(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function q(e,t){let n=t._flight;t._flight=void 0,Ht(e,t,n)?.abort()}function J(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Ht(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Ut(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Wt(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Gt(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Kt(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return H;if(!i)return[z,void 0];let l=n._flight;Wt(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Gt(e,t,n,r,s,a,!!o[3]))).then(e=>G(e,!1,r.id),e=>G(e,!0,r.id)).then(t=>(t[0]!==z&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===B&&l[2]?Bt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],$t(e,t,r,await U(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return q(e,n),H}finally{Wt(e,n,!1,s)}}function qt(e,t,n){t[0]!==V&&(e.status=`success`,e.error=void 0,t[0]===z?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Jt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&q(e,r)}function Yt(e,t){return t[0]===B||t[0]===Rt?{...e,status:t[0]===B?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Xt(e,t,n,r,i,a,o){let s=t[1][n],c=W(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Gt(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=H)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,q(e,s),p=K(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Ht(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Kt(e,t,s,c,g,i,a).then(t=>(qt(s,t,l),t[0]===z&&(m&&!a[0].signal.aborted&&Jt(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[z,s.loaderData]),T=(async()=>{try{let e=R(c,void 0,C);e&&await U(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,K(e,t,c,r,a)]}let r=await w;x&&r[0]===z&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Yt(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=Kt(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,qt(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>Yt(E,e))}async function Zt(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=W(e,t[n]);try{let e=R(i,!1);e&&await U(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Y(e,t){t[2]&&=(J(e,t[2].map(e=>e[3])),void 0)}async function Qt(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=V)throw[a,t];!i&&t[0]!==z&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===V)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function $t(e,t,n,r,i,a){for(;r[0]===V;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[V,t]:[V,t,a]}return[V,o,n]}catch(e){r=a?[B,e]:Bt(n,e),a=!0}}return r}async function en(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Rt?Zt(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=V)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==z&&t[0]<V&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=V){let n=s[1];if(n[0]!==V||n[1].options.reloadDocument||n[2])return Y(e,t),n;c=!0,s=[0,[B,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===B?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=W(e,u);try{await U(i?Promise.resolve().then(()=>R(m,l===B?`errorComponent`:`notFoundComponent`)):Promise.all([R(m),R(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Y(e,t),H}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Y(e,t),J(e,o),p()):u.status=`success`}return t}async function tn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=W(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await U(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function nn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Zt(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Xt(e,i,t,u,f,r,l)},m=await Vt(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Rt){let t=await Zt(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=V&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=en(e,i,u,r[0],Qt(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Qt(i[2],void 0,void 0,h.then(e=>zt(e)?0:Lt(n).length,()=>0))),o=await h}catch(t){if(Y(e,i),t===a&&a.aborted)return H;throw t}return zt(o)?o:tn(e,o,a,r[6]===n.length?r[6]:0)}function rn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=W(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>rn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function an(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function on(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Lt(t[3]).some(e=>e.id===n[1]))return;let i;try{await U(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function sn(e,t){e._committed=t,e.stores.setMatches(t)}function cn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Lt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=W(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=wt(n);sn(e,n),J(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Tt(e,i,n,a,l,t)}async function ln(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function un(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function dn(e,t,n,r,i){let a=n.map(e=>({...e}));Ut(a);for(let t of r)q(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await en(e,o,r,t[0],i)}catch(t){throw J(e,a),t}if(zt(s)){J(e,a),s[0]===V&&e._tx===t&&e._committed===n&&await un(e,t,s);return}if(await tn(e,s,t[0].signal),e._tx!==t||e._committed!==n){J(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),q(e,n))}sn(e,a),J(e,n,a)}async function fn(e,t,n,r,i,a){let o=await nn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(zt(o)){let n=o[0]===V&&e._tx===t;if((!n||o[1].options.reloadDocument)&&an(e,t),J(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){an(e,t);return}await un(e,t,o);return}let s=o[1];if(e._tx===t&&await on(e,t),e._tx!==t){an(e,t),J(e,s),Y(e,o);return}let c=t[2],l=St(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await on(e,t),e._tx!==t){an(e,t),J(e,s),Y(e,o);return}let n=await e.startTransition(()=>{an(e,t),cn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Y(e,o);return}u?.length&&dn(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function pn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=St(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ln(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Ut(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){J(e,m),await ln(e,n);return}e._preflight=void 0;let g,_=()=>fn(e,y,f,()=>rn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>ln(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Wt(e,t,!1)}n[0].abort(),J(e,n[3],y[3],!0)}if(e._tx!==y){J(e,y[3]),y[3]=[],g?.(),await ln(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&rn(e,y),g?.(_()),await y[5]}async function mn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Ut(a),o=(e._preloads??=new Map).set(i,a),s=await nn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),J(e,a)),i.abort()}if(!zt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){F(e)||console.error(e);return}}}var hn=class extends j.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?j.createElement(this.props.errorComponent??gn,{error:e[0],reset:this.reset}):this.props.children}};function gn({error:e}){let[t,n]=j.useState(!1);return P(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[P(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[N(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),N(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),N(`div`,{style:{height:`.25rem`}}),t?N(`div`,{children:N(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?N(`code`,{children:e.message}):null})}):null]})}var X=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(X||{});function _n({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function vn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var yn=[],bn=0,{link:xn,unlink:Sn,propagate:Cn,checkDirty:wn,shallowPropagate:Tn}=_n({update(e){return e._update()},notify(e){yn[Dn++]=e,e.flags&=~X.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=X.Mutable|X.Dirty,An(e))}}),En=0,Dn=0,Z,On=0;function kn(e){try{++On,e()}finally{--On||jn()}}function An(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Sn(n,e)}function jn(){if(!(On>0)){for(;En<Dn;){let e=yn[En];yn[En++]=void 0,e.notify()}En=0,Dn=0}}function Mn(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?X.None:X.Mutable,get(){return Z!==void 0&&xn(i,Z,bn),i._snapshot},subscribe(e){let t=vn(e),n={current:!1},r=Nn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Z,o=t?.compare??Object.is;if(n)Z=i,++bn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=X.Mutable|X.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Z=a,n&&(i.flags&=~X.RecursedCheck),An(i)}}};return n?(i.flags=X.Mutable|X.Dirty,i.get=function(){let e=i.flags;if(e&X.Dirty||e&X.Pending&&wn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Tn(e)}}else e&X.Pending&&(i.flags=e&~X.Pending);return Z!==void 0&&xn(i,Z,bn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Cn(e),Tn(e),jn())}},i}function Nn(e){let t=()=>{let t=Z;Z=n,++bn,n.depsTail=void 0,n.flags=X.Watching|X.RecursedCheck;try{return e()}finally{Z=t,n.flags&=~X.RecursedCheck,An(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:X.Watching|X.RecursedCheck,notify(){let e=this.flags;e&X.Dirty||e&X.Pending&&wn(this.deps,this)?t():this.flags=X.Watching},stop(){this.flags=X.None,this.depsTail=void 0,An(this)}};return t(),n}function Pn(e){let t=A(),n=`not-found-${E(t.stores.location,e=>e.pathname)}-${E(t.stores.status,e=>e)}`;return N(hn,{getResetKey:()=>n,onCatch:(t,n)=>{if(F(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(F(t))return e.fallback?.(t);throw t},children:e.children})}function Fn(){return N(`p`,{children:`Not Found`})}function Q(e){return N(Pe,{children:e.children})}function In(e,t,n){return t.options.notFoundComponent?N(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?N(e.options.defaultNotFoundComponent,{...n}):N(Fn,{})}function Ln(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?N(n,{}):null}var Rn=(e,t)=>e[0]===t[0]&&e[1]===t[1],zn=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Bn=j.memo(function({routeId:e}){let t=A();return N(Vn,{router:t,match:E(t.stores.getMatchStore(e),e=>e)})});function Vn({router:e,match:t}){let n=e.routesById[t.routeId],r=Ln(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=zn(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?j.Suspense:Q,l=i?hn:Q,u=o?Pn:Q;return P(n.isRoot?n.options.shellComponent??Q:Q,{children:[N(oe.Provider,{value:t.routeId,children:N(c,{fallback:r,children:N(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(F(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:N(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return j.createElement(o,e)},children:s?N(h,{fallback:r,children:N(Hn,{match:t})}):N(Hn,{match:t})})})})}),null]})}var Hn=j.memo(function({match:e}){let t=A(),n=e.routeId,r=t.routesById[n],i=j.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=j.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?N(e,{},i):N(Un,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!zn(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Ln(t,r)}if(e.status===`notFound`)return In(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Un=j.memo(function(){let e=A(),t=j.useContext(oe),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=E(a,e=>[!!e._notFound,e.error],Rn),i=E(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return In(e,e.routesById[t],r);if(!i)return null;let a=N(Bn,{routeId:i});return t===`__root__`?N(j.Suspense,{fallback:Ln(e),children:a}):a});function Wn(e,t){let n=e[1];e.length=0,n?.(t)}function Gn({t:e}){let t=A(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Wn(n,!1),n.push(i,a),e(t),j.startTransition(r)}),i(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(_(r.publicHref)!==_(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...St(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Kn(){let e=A(),t=e.routesById[se],n=Ln(e,t),r=e.ssr?Q:j.Suspense,i=P(Pe,{children:[N(Gn,{t:j.useState()[1]}),N(r,{fallback:n,children:N(qn,{})})]});return e.options.InnerWrap?N(e.options.InnerWrap,{children:i}):i}function qn(){let e=A(),t=e._rendered,n=E(e.stores.matches,e=>t[0]??e),r=n[0],a=r?.routeId;i(()=>{t[0]===n&&Wn(t,!0)},[t,n]);let o=a?N(Bn,{routeId:a}):null;return N(oe.Provider,{value:a,children:e.options.disableGlobalCatchBoundary?o:N(hn,{getResetKey:()=>r,onCatch:void 0,children:o})})}var Jn=e=>({createMutableStore:Mn,createReadonlyStore:Mn,batch:kn}),Yn=e=>new Xn(e),Xn=class extends Et{constructor(e){super(e,Jn)}};function Zn({router:e,children:t,...n}){l(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=N(de.Provider,{value:e,children:t});return e.options.Wrap?N(e.options.Wrap,{children:r}):r}function Qn({router:e,...t}){return N(Zn,{router:e,...t,children:N(Kn,{})})}var $n=Ie.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
min-height: 100vh;
|
|
8
|
+
padding: ${({theme:e})=>e.space(4)};
|
|
9
|
+
text-align: center;
|
|
10
|
+
`,er=Ie.p`
|
|
11
|
+
font-size: 13px;
|
|
12
|
+
color: ${({theme:e})=>e.color.inkDim};
|
|
13
|
+
max-width: 48ch;
|
|
14
|
+
`,tr=ce()({component:Un,notFoundComponent:()=>N($n,{children:P(fe,{$gap:3,style:{alignItems:`center`},children:[N(me,{children:`Not found`}),N(er,{children:`This console has no screen at that address.`}),N(pe,{as:`a`,href:`/`,$variant:`primary`,$size:`sm`,children:`Back to the rack`})]})})}),nr=`stream:console`,rr={"res:usage":{predicate:e=>e.queryKey[0]===`usage`||e.queryKey[0]===`client`&&(e.queryKey[1]===`usage`||e.queryKey[1]===`summary`)},"res:logs":{predicate:e=>e.queryKey[0]===`logs`&&e.queryKey[1]!==`body`||e.queryKey[0]===`client`&&e.queryKey[1]===`logs`||(e.queryKey[0]===`logPages`||e.queryKey[0]===`client`&&e.queryKey[1]===`logPages`)&&p(e.state.data)},"res:credentials":{queryKey:a.credentials},"res:keys":{queryKey:a.keys},"res:settings":{queryKey:a.settings},"res:models":{queryKey:a.models},"res:quota":{predicate:e=>e.queryKey[0]===`quota-history`||e.queryKey[0]===`credentials`&&e.queryKey[1]===`health`},[nr]:{queryKey:[`console`]}},ir=Object.keys(rr),ar=ir.filter(e=>e.startsWith(`res:`)),or=ir.filter(e=>e.startsWith(`stream:`));function sr(e,t){if(t===`res:*`){lr(e);return}let n=rr[t];n!==void 0&&e.invalidateQueries(n)}function cr(e){for(let t of ir)sr(e,t)}function lr(e){e.invalidateQueries()}var ur=4401,dr=500,fr=3e4,pr=new Set([...ar,...or]),mr=3,hr=6e4,gr=(e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)};function _r(){let{protocol:e,host:t}=window.location;return`${e===`https:`?`wss:`:`ws:`}//${t}/api/stream`}function vr(e){if(typeof e!=`string`)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t||Array.isArray(t))return null;let n=t,{type:r,topic:i,seq:a}=n;return typeof r!=`string`||i!==void 0&&typeof i!=`string`||a!==void 0&&typeof a!=`number`?null:{type:r,...typeof i==`string`?{topic:i}:{},...typeof a==`number`?{seq:a}:{},...`payload`in n?{payload:n.payload}:{}}}function yr(e){let t=new Set,n=new Set,r=new Map,i=new Map,a=new Map,o=e=>a.has(e)||pr.has(e),s=[],c=null,l=!1,u=!1,d=!1,f=!1,p=!1,m=0,h=null,g={status:`poll`,pushed:()=>!1};function _(){let e=p?`offline`:u&&!f?`push`:`poll`,r=e===`push`;g={status:e,pushed:e=>r&&n.has(e)};for(let e of t)e()}function v(e){c?.send(JSON.stringify(e))}function y(e,t){let n=i.get(e);if(n===void 0||n.size===0)return!1;for(let e of[...n])e(t);return!0}function b(){for(let e of ar)v({type:`subscribe`,topic:e});for(let e of or){let t=r.get(e);v(t===void 0?{type:`subscribe`,topic:e}:{type:`subscribe`,topic:e,sinceSeq:t})}for(let e of a.keys())v({type:`subscribe`,topic:e})}function x(){u=!0,m=0,n.clear(),d&&cr(e.client),d=!0,b(),_()}function S(t){let i=vr(t.data);if(i===null)return;let{topic:a}=i;if(i.type===`ack`){a!==void 0&&o(a)&&(n.add(a),y(a,{kind:`open`}),_());return}if(i.type===`error`){a!==void 0&&(n.delete(a)&&_(),y(a,{kind:`refused`}));return}if(a!==void 0){if(i.type===`gap`){i.seq!==void 0&&r.set(a,i.seq),y(a,{kind:`gap`}),sr(e.client,a);return}if(i.type===`event`){if(a===`res:*`){lr(e.client);return}if(i.seq!==void 0){let t=r.get(a);if(r.set(a,i.seq),t!==void 0&&i.seq>t+1){y(a,{kind:`gap`}),sr(e.client,a);return}}i.payload!==void 0&&y(a,{kind:`frame`,payload:i.payload})||sr(e.client,a)}}}function C(t){let r=u;u=!1,c=null,n.clear();for(let e of[...i.keys()])y(e,{kind:`closed`});if(l){if(t.code===ur){p=!0,l=!1,_(),lr(e.client);return}if(!r)f=!0;else{let t=e.now();s=[...s.filter(e=>e>t-hr),t],s.length>=mr&&(f=!0)}_(),w()}}function w(){let t=Math.min(fr,dr*2**m);m+=1,h=e.timer(()=>{h=null,l&&T()},t)}function T(){let t=new WebSocket(e.url());c=t,t.addEventListener(`open`,x),t.addEventListener(`message`,S),t.addEventListener(`close`,C)}function E(e,t){let n=i.get(e)??new Set;return i.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&i.delete(e)}}return{subscribe(e){return t.add(e),()=>{t.delete(e)}},snapshot:()=>g,hold(e,t){let r=E(e,t),i=(a.get(e)??0)+1;a.set(e,i),i===1&&u&&v({type:`subscribe`,topic:e}),n.has(e)&&t({kind:`open`});let o=!1;return()=>{if(o)return;o=!0,r();let t=(a.get(e)??1)-1;if(t>0){a.set(e,t);return}a.delete(e),n.delete(e)&&_(),u&&v({type:`unsubscribe`,topic:e})}},publish(e,t){return!u||!n.has(e)?!1:(v({type:`send`,topic:e,payload:t}),!0)},onStream:E,start(){return l=!0,T(),()=>{l=!1,h?.(),h=null;let e=c;c=null,u=!1,e?.close()}}}}var br=ke(null),xr=ke(null),Sr=ke(null),Cr={status:`poll`,pushed:()=>!1};function wr({children:e,enabled:t=!0,timer:n=gr,now:r=Date.now,url:i=_r}){let a=De(),[o]=Me(()=>yr({client:a,timer:n,now:r,url:i})),[s]=Me(()=>({subscribe:(e,t)=>o.hold(e,e=>{if(e.kind===`gap`){t({kind:`closed`});return}t(e)}),send:o.publish}));M(()=>{if(t)return o.start()},[o,t]);let c=Ne(o.subscribe,o.snapshot,o.snapshot);return N(br,{value:c,children:N(xr,{value:o.onStream,children:N(Sr,{value:s,children:e})})})}function Tr(){return Ae(br)??Cr}function Er(e,t){let n=Ae(xr),r=je(t);M(()=>{r.current=t}),M(()=>{if(n!==null)return n(e,e=>r.current(e))},[n,e])}function Dr(e,t){let n=Ae(Sr),r=je(t);M(()=>{r.current=t}),M(()=>{if(n!==null&&e!==null)return n.subscribe(e,e=>r.current(e))},[n,e])}function Or({children:e}){let t=Tr(),n=Ae(Sr);return N(be,{connection:t,...n===null?{}:{channels:n},children:e})}async function kr(e){return e.queryClient.ensureQueryData({queryKey:a.status,queryFn:()=>ge(`/api/status`),revalidateIfStale:!0})}function Ar(e){let t=e.principal;return e.authenticated!==!0||t==null?`/login`:t.kind===`client`?`/client`:t.kind===`admin`||t.kind===`viewer`?`/`:`/login`}function jr(e,t){let n=Ar(e);if(n===`/login`)throw ue({to:`/login`,search:{next:t}});if(n!==`/`)throw ue({to:n})}function Mr(e,t){let n=Ar(e);if(n===`/login`)throw ue({to:`/login`,search:{next:t}});if(n!==`/client`)throw ue({to:n})}var Nr=O(`/_app`)({beforeLoad:async({context:e,location:t})=>{jr(await kr(e),t.href),await e.queryClient.ensureQueryData(r)},pendingComponent:Pr,pendingMs:200,errorComponent:D(()=>k(()=>import(`./_app-Drf03PWk.js`),__vite__mapDeps([0,1])),`errorComponent`),component:Fr});function Pr(){return N(ve,{legend:`Console`,children:N(he,{rows:6})})}function Fr(){let e=s().data??[];return N(wr,{children:P(Or,{children:[N(xe,{$providers:e}),N(Se,{children:N(Un,{})})]})})}var Ir=O(`/client`)({beforeLoad:async({context:e,location:t})=>{Mr(await kr(e),t.href)},component:D(()=>k(()=>import(`./client-BZ_ev12J.js`),__vite__mapDeps([2,3,4,1,5,6,7,8,9,10,11,12,13,14,15,16,17])),`component`)}),Lr=O(`/login`)({validateSearch:e=>({...typeof e.next==`string`?{next:e.next}:{},...typeof e.reason==`string`?{reason:e.reason}:{}}),component:D(()=>k(()=>import(`./login-75MYwRdC.js`),__vite__mapDeps([18,4,1,11,19])),`component`)}),Rr=O(`/_app/`)({component:D(()=>k(()=>import(`./_app.index-DigYfob3.js`),__vite__mapDeps([20,4,1,5,7,10,14,12,17])),`component`)}),zr=O(`/_app/accounts`)({component:D(()=>k(()=>import(`./_app.accounts-W1USUo2Q.js`),__vite__mapDeps([21,4,1,5,22,13,8,23,24,25,9,10,11,14,12,15,3])),`component`)}),Br=O(`/_app/console`)({component:D(()=>k(()=>import(`./_app.console-BvIGqIe7.js`),__vite__mapDeps([26,4,1,5,11])),`component`)}),Vr=O(`/_app/database`)({component:D(()=>k(()=>import(`./_app.database-CtFJLcfE.js`),__vite__mapDeps([27,4,1,5,24,11,14,12,17,19])),`component`)}),Hr=O(`/_app/keys`)({component:D(()=>k(()=>import(`./_app.keys-B1fRMyU-.js`),__vite__mapDeps([28,4,1,5,22,13,8,23,25,9,10,11,14,12])),`component`)}),Ur=O(`/_app/logs`)({component:D(()=>k(()=>import(`./_app.logs-D73Qcx9S.js`),__vite__mapDeps([29,4,1,5,6,7,8,9,10,11,12])),`component`)}),Wr=O(`/_app/models`)({component:D(()=>k(()=>import(`./_app.models-Dpl1O2RE.js`),__vite__mapDeps([30,4,1,5,23,24,25,9,10,11,14])),`component`)}),Gr=O(`/_app/settings`)({component:D(()=>k(()=>import(`./_app.settings-tRLrVJoq.js`),__vite__mapDeps([31,4,1,5,25,9,11,14,19])),`component`)}),Kr=O(`/_app/usage`)({component:D(()=>k(()=>import(`./_app.usage-D2qlcEp4.js`),__vite__mapDeps([32,3,4,1,5,12,16,17])),`component`)}),qr=O(`/_app/plugins/$pluginId`)({component:D(()=>k(()=>import(`./_app.plugins._pluginId-BNrRTn9l.js`),__vite__mapDeps([33,4,1,34,5])),`component`)}),$=Nr.update({id:`/_app`,getParentRoute:()=>tr}),Jr=Ir.update({id:`/client`,path:`/client`,getParentRoute:()=>tr}),Yr=Lr.update({id:`/login`,path:`/login`,getParentRoute:()=>tr}),Xr=Rr.update({id:`/`,path:`/`,getParentRoute:()=>$}),Zr={AppAccountsRoute:zr.update({id:`/accounts`,path:`/accounts`,getParentRoute:()=>$}),AppConsoleRoute:Br.update({id:`/console`,path:`/console`,getParentRoute:()=>$}),AppDatabaseRoute:Vr.update({id:`/database`,path:`/database`,getParentRoute:()=>$}),AppKeysRoute:Hr.update({id:`/keys`,path:`/keys`,getParentRoute:()=>$}),AppLogsRoute:Ur.update({id:`/logs`,path:`/logs`,getParentRoute:()=>$}),AppModelsRoute:Wr.update({id:`/models`,path:`/models`,getParentRoute:()=>$}),AppSettingsRoute:Gr.update({id:`/settings`,path:`/settings`,getParentRoute:()=>$}),AppUsageRoute:Kr.update({id:`/usage`,path:`/usage`,getParentRoute:()=>$}),AppIndexRoute:Xr,AppPluginsPluginIdRoute:qr.update({id:`/plugins/$pluginId`,path:`/plugins/$pluginId`,getParentRoute:()=>$})},Qr={AppRoute:$._addFileChildren(Zr),ClientRoute:Jr,LoginRoute:Yr},$r=tr._addFileChildren(Qr)._addFileTypes();function ei(e){return{isLoginRoute:()=>e().state.location.pathname===`/login`,onUnauthenticated:()=>void e().navigate({to:`/login`,search:{next:e().state.location.href}})}}function ti(e){let t=t=>{t instanceof _e&&t.isUnauthenticated&&(e.isLoginRoute()||e.onUnauthenticated())};return new Te({queryCache:new we({onError:t}),mutationCache:new Ce({onError:t}),defaultOptions:{queries:{retry:(e,t)=>t instanceof _e&&t.isUnauthenticated?!1:e<2,staleTime:5e3,refetchOnWindowFocus:!0},mutations:{retry:!1}}})}var ni,ri=ti(ei(()=>ni));ni=Yn({routeTree:$r,context:{queryClient:ri}});var ii=document.getElementById(`root`);if(ii===null)throw Error(`#root is missing from index.html`);Fe(ii).render(N(Oe,{children:N(ye,{children:N(Ee,{client:ri,children:N(Qn,{router:ni})})})}));export{Dr as a,sr as c,Or as i,Lr as n,Er as o,wr as r,nr as s,qr as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Et as e,Xt as t,nn as n,qt as r,t as i}from"./Lamp-DkvXKB-B.js";import{C as a,D as o,E as s,_ as c,b as l,n as u,o as d}from"./Panel-CWmOTDAP.js";import{n as f}from"./index-89mqAVmK.js";import{n as p,t as m}from"./Field-BYBri2NV.js";import{t as h}from"./reasons-Du1OBWAM.js";import{useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import y from"styled-components";var b=y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -42,4 +42,4 @@ import{Gt as e,Ht as t,St as n,Xt as r,t as i}from"./Lamp-lkkWBrFM.js";import{C
|
|
|
42
42
|
font: inherit;
|
|
43
43
|
font-size: 12px;
|
|
44
44
|
cursor: pointer;
|
|
45
|
-
`;function O(){let s=
|
|
45
|
+
`;function O(){let s=n(),{next:u,reason:y}=f.useSearch(),O=t(),k=e(),A=r(),[j,M]=g(``),[N,P]=g(``),[F,I]=g(null),[L,R]=g(`admin`),z=O.data?.configured===!1,B=[{id:`admin`,label:`Operator`,blurb:`This console is for the operator of this gateway.`},...O.data?.viewerConfigured===!0?[{id:`viewer`,label:`Read-only`,blurb:`Everything the operator can see, and nothing they can change.`}]:[],{id:`client`,label:`API key`,blurb:`Your own usage, limits and requests. Sign in with a gateway API key.`}],V=L===`client`,H=h(y),U=k.isPending||A.isPending||O.isLoading,W=()=>{if(V){s({to:`/client`});return}s({to:u?.startsWith(`/`)===!0?u:`/`})};return _(b,{children:v(x,{children:[v(S,{children:[_(i,{state:O.isError?`down`:`ok`,label:O.isError?`gateway unreachable`:`gateway reachable`}),`Omnigateway`]}),v(C,{onSubmit:e=>{if(e.preventDefault(),I(null),z){if(j!==N){I(`The two passwords do not match.`);return}A.mutate(j,{onSuccess:W,onError:e=>I(d(e))});return}k.mutate({mode:L,secret:j},{onSuccess:W,onError:()=>I(V?`That API key was not accepted. It may have been revoked.`:`That password does not match. Try again.`)})},children:[O.isError?_(T,{children:`The gateway is not answering. Check that it is running, then reload.`}):null,H===null?null:_(E,{role:`status`,children:H}),v(a,{$gap:1,children:[_(c,{children:z?`First run`:`Sign in`}),_(w,{children:z?`Set the operator password for this gateway. It is the only account, and it is stored hashed.`:B.find(e=>e.id===L)?.blurb??``})]}),z||B.length<2?null:_(l,{$gap:1,$wrap:!0,role:`tablist`,"aria-label":`Sign in as`,children:B.map(e=>_(D,{type:`button`,role:`tab`,"aria-selected":e.id===L,$on:e.id===L,onClick:()=>{R(e.id),M(``),I(null)},children:e.label},e.id))}),_(m,{label:V?`API key`:`Password`,children:e=>_(p,{...e,type:`password`,autoFocus:!0,autoComplete:z?`new-password`:V?`off`:`current-password`,value:j,onChange:e=>M(e.target.value)})}),z?_(m,{label:`Confirm password`,children:e=>_(p,{...e,type:`password`,autoComplete:`new-password`,value:N,onChange:e=>P(e.target.value)})}):null,F===null?null:_(T,{role:`alert`,children:F}),_(l,{children:_(o,{type:`submit`,$variant:`primary`,disabled:U||j.length===0,children:z?`Set password and sign in`:`Sign in`})})]})]})})}export{O as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e}from"./Rack-CEuCdVXc.js";var t={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{An as e,Fn as t,Pn as n,bn as r,cn as i,dn as a,fn as o,nn as s,rn as c,tn as l}from"./Lamp-DkvXKB-B.js";import{k as u}from"./Panel-CWmOTDAP.js";import*as d from"react";import f from"react";import{jsx as p}from"react/jsx-runtime";var m=`__root__`;function h(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function g(e){return e instanceof Response&&!!e.options}var _=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=m:this.parentRoute||r();let s=n?m:t?.path;s&&s!==`/`&&(s=a(s));let c=t?.id||s,l=n?m:i([this.parentRoute.id===`__root__`?``:this.parentRoute.id,c]);s===`__root__`&&(s=`/`),l!==`__root__`&&(l=i([`/`,l]));let u=l===`__root__`?`/`:i([this.parentRoute.fullPath,s]);this._path=s,this._id=l,this._fullPath=u,this._to=o(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>h({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},v=class extends _{constructor(e){super(e)}},y=d.createContext(void 0),b=d.createContext(void 0),x={};function S(e,t){let r=d.useRef();return i=>{let a=e?.select?e.select(i):i;return e?.structuralSharing??t.options.defaultStructuralSharing?r.current=n(r.current,a):a}}function C(e){let t=u(),n=d.useContext(e.from?b:y),i=e.from??n,a=t.stores.getMatchStore(i),o=S(e,t),s=c(a,e=>e?o(e):x);if(s!==x)return s;(e.shouldThrow??!0)&&r()}function w(e){return C({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function T(e){let{select:t,...n}=e;return C({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function E(e){return C({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function D(e){return C({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function O(e){return C({...e,select:t=>e.select?e.select(t.context):t.context})}var k=class extends _{constructor(e){super(e),this.useMatch=e=>C({...e,from:this.id}),this.useRouteContext=e=>O({...e,from:this.id}),this.useSearch=e=>D({...e,from:this.id}),this.useParams=e=>E({...e,from:this.id}),this.useLoaderDeps=e=>T({...e,from:this.id}),this.useLoaderData=e=>w({...e,from:this.id}),this.useNavigate=()=>s({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>p(l,{ref:t,from:this.fullPath,...e}))}};function A(e){return new k(e)}function j(){return e=>N(e)}var M=class extends v{constructor(e){super(e),this.useMatch=e=>C({...e,from:this.id}),this.useRouteContext=e=>O({...e,from:this.id}),this.useSearch=e=>D({...e,from:this.id}),this.useParams=e=>E({...e,from:this.id}),this.useLoaderDeps=e=>T({...e,from:this.id}),this.useLoaderData=e=>w({...e,from:this.id}),this.useNavigate=()=>s({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>p(l,{ref:t,from:this.fullPath,...e}))}};function N(e){return new M(e)}function P(e){return e=>{let t=A(e);return t.isRoot=!1,t}}function F(n,r){let i,a,o,s=()=>(i||=(o=void 0,n().then(e=>{i=void 0,c.preload=void 0,a=e[r??`default`]}).catch(e=>{i=void 0,o=e})),i),c=function(n){if(o){if(e(o)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw o}if(!a){if(t)t(s());else throw s()}return d.createElement(a,n)};return c.preload=s,c}var I=`modulepreload`,L=function(e){return`/`+e},R={},z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=L(t,n),t=s(t),t in R)return;R[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:I,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{y as a,m as c,j as i,F as n,g as o,P as r,h as s,z as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{L as e,Qt as t,j as n}from"./Lamp-lkkWBrFM.js";import{b as r}from"./Panel-CWmOTDAP.js";import*as i from"react";import{Component as a,cloneElement as o,createContext as s,createElement as c,forwardRef as l,isValidElement as u,memo as d,useCallback as f,useContext as p,useEffect as m,useImperativeHandle as h,useLayoutEffect as g,useMemo as _,useRef as v,useState as y}from"react";import b from"styled-components";import{createPortal as x}from"react-dom";var S=Object.create,C=Object.defineProperty,w=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyNames,E=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,O=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),k=(e,t)=>{let n={};for(var r in e)C(n,r,{get:e[r],enumerable:!0});return t||C(n,Symbol.toStringTag,{value:`Module`}),n},A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=T(t),a=0,o=i.length,s;a<o;a++)s=i[a],!D.call(e,s)&&s!==n&&C(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=w(t,s))||r.enumerable});return e},j=(e,t,n)=>(n=e==null?{}:S(E(e)),A(t||!e||!e.__esModule||!D.call(e,`default`)?C(n,`default`,{value:e,enumerable:!0}):n,e));function M(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;t<i;t++)e[t]&&(n=M(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function N(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=M(e))&&(r&&(r+=` `),r+=t);return r}var ee=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function te(e){return typeof e==`string`&&ee.includes(e)}var ne=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function re(e){return typeof e==`string`&&ne.has(e)}function ie(e){return typeof e==`string`&&e.startsWith(`data-`)}function ae(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n))&&(t[n]=e[n]);return t}function oe(e){if(e==null)return null;if(u(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return ae(t)}return typeof e==`object`&&!Array.isArray(e)?ae(e):null}function se(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n)||te(n))&&(t[n]=e[n]);return t}function ce(e){return e==null?null:u(e)?se(e.props):typeof e==`object`&&!Array.isArray(e)?se(e):null}var le=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function de(e,t){if(e==null)return{};var n,r,i=fe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var pe=l((e,t)=>{var n=e.children,r=e.width,a=e.height,o=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=de(e,le),f=o||{width:r,height:a,x:0,y:0},p=N(`recharts-surface`,s);return i.createElement(`svg`,ue({},se(d),{className:p,width:r,height:a,style:c,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:t}),i.createElement(`title`,null,l),i.createElement(`desc`,null,u),n)}),me=[`children`,`className`];function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(null,arguments)}function ge(e,t){if(e==null)return{};var n,r,i=_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ve=i.forwardRef((e,t)=>{var n=e.children,r=e.className,a=ge(e,me),o=N(`recharts-layer`,r);return i.createElement(`g`,he({className:o},se(a),{ref:t}),n)});function ye(e){return e===`__proto__`}var be=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xe(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:be.test(e);default:return!1}}function Se(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ce(e){return typeof e==`symbol`||e instanceof Symbol}function we(e){return e==null?``:Te(e)}function Te(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Te).join(`,`);if(Ce(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Ee(e){if(Array.isArray(e))return e.map(Se);if(typeof e==`symbol`)return[e];e=we(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function De(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?xe(t)&&!Object.hasOwn(e,t)?De(e,Ee(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Se(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Oe(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function Oe(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var ke=4;function Ae(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ke),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function je(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+Ae(i)+n},``)}var Me=e=>e===0?0:e>0?1:-1,Ne=e=>typeof e==`number`&&e!=+e,Pe=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,P=e=>(typeof e==`number`||e instanceof Number)&&!Ne(e),Fe=e=>P(e)||typeof e==`string`,Ie=0,Le=e=>{var t=++Ie;return`${e||``}${t}`},Re=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!P(e)&&typeof e!=`string`)return n;var i;if(Pe(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Ne(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},ze=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Be(e,t,n){return P(e)&&P(t)?Ae(e+n*(t-e)):t}function Ve(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):De(e,t))===n)}var F=e=>e==null,He=e=>F(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ue(e){return e!=null}function We(){}function Ge(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ke(Object(n),!0).forEach(function(t){Je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Je(e,t,n){return(t=Ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){var t=Xe(e,`string`);return typeof t==`symbol`?t:t+``}function Xe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ze=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Ge(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?qe({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?qe({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?qe({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?qe({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?qe({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?qe({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?qe({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?qe({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(P(n.x)||Pe(n.x))&&(P(n.y)||Pe(n.y))?qe({x:c+Re(n.x,g),y:l+Re(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):qe({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Qe=[`top`,`left`,`right`,`bottom`];function $e(e){return e==null?!1:typeof e==`object`||Qe.includes(e)}var et=s(null);function I(e){return function(){return e}}var tt=Math.PI,nt=2*tt,rt=1e-6,it=nt-rt;function at(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ot(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return at;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var st=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?at:ot(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>rt){if(!(Math.abs(u*s-c*l)>rt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((tt-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>rt||Math.abs(this._y1-l)>rt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nt+nt),d>it?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>rt&&this._append`A${n},${n},0,${+(d>=tt)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};st.prototype;function ct(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new st(t)}Array.prototype.slice;function lt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ut(e){this._context=e}ut.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)}}};function dt(e){return new ut(e)}function ft(e){return e[0]}function pt(e){return e[1]}function mt(e,t){var n=I(!0),r=null,i=dt,a=null,o=ct(s);e=typeof e==`function`?e:e===void 0?ft:I(e),t=typeof t==`function`?t:t===void 0?pt:I(t);function s(s){var c,l=(s=lt(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:I(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ht(e,t,n){var r=null,i=I(!0),a=null,o=dt,s=null,c=ct(l);e=typeof e==`function`?e:e===void 0?ft:I(+e),t=typeof t==`function`?t:I(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pt:I(+n);function l(l){var u,d,f,p=(l=lt(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mt().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:I(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:I(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:I(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var gt=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function _t(e){return new gt(e,!0)}function vt(e){return new gt(e,!1)}function yt(){}function bt(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 xt(e){this._context=e}xt.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:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function St(e){return new xt(e)}function Ct(e){this._context=e}Ct.prototype={areaStart:yt,areaEnd:yt,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)}},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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Et(e){return new Tt(e)}function Dt(e){this._context=e}Dt.prototype={areaStart:yt,areaEnd:yt,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 Ot(e){return new Dt(e)}function kt(e){return e<0?-1:1}function At(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kt(a)+kt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mt(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Nt(e){this._context=e}Nt.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:Mt(this,this._t0,jt(this,this._t0))}(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,Mt(this,jt(this,n=At(this,e,t)),n);break;default:Mt(this,this._t0,n=At(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pt(e){this._context=new Ft(e)}(Pt.prototype=Object.create(Nt.prototype)).point=function(e,t){Nt.prototype.point.call(this,t,e)};function Ft(e){this._context=e}Ft.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,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function It(e){return new Nt(e)}function Lt(e){return new Pt(e)}function Rt(e){this._context=e}Rt.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=zt(e),i=zt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bt(e){return new Rt(e)}function Vt(e,t){this._context=e,this._t=t}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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)}}this._x=e,this._y=t}};function Ht(e){return new Vt(e,.5)}function Ut(e){return new Vt(e,0)}function Wt(e){return new Vt(e,1)}function Gt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function qt(e,t){return e[t]}function Jt(e){let t=[];return t.key=e,t}function Yt(){var e=I([]),t=Kt,n=Gt,r=qt;function i(i){var a=Array.from(e.apply(this,arguments),Jt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=lt(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:I(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:I(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Kt:typeof e==`function`?e:I(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Gt,i):n},i}function Xt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Gt(e,t)}}function Zt(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Gt(e,t)}}function Qt(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Gt(e,t)}}var $t=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,en=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if(u(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{te(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},tn=(e,t,n)=>r=>(e(t,n,r),null),nn=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];te(i)&&typeof a==`function`&&(r||={},r[i]=tn(a,t,n))}),r};function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rn(Object(n),!0).forEach(function(t){on(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function on(e,t,n){return(t=sn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(e){var t=cn(e,`string`);return typeof t==`symbol`?t:t+``}function cn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ln(e,t){var n=an({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function un(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function dn(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function fn(e){return e}function pn(e){return Number.isSafeInteger(e)&&e>=0}function mn(e){return e!=null&&typeof e!=`function`&&pn(e.length)}function hn(e){return function(t){return De(t,e)}}function gn(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _n(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function yn(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var bn=`[object RegExp]`,xn=`[object String]`,Sn=`[object Number]`,Cn=`[object Boolean]`,wn=`[object Arguments]`,Tn=`[object Symbol]`,En=`[object Date]`,Dn=`[object Map]`,On=`[object Set]`,kn=`[object Array]`,An=`[object Function]`,jn=`[object ArrayBuffer]`,Mn=`[object Object]`,Nn=`[object Error]`,Pn=`[object DataView]`,Fn=`[object Uint8Array]`,In=`[object Uint8ClampedArray]`,Ln=`[object Uint16Array]`,Rn=`[object Uint32Array]`,zn=`[object BigUint64Array]`,Bn=`[object Int8Array]`,Vn=`[object Int16Array]`,Hn=`[object Int32Array]`,Un=`[object BigInt64Array]`,Wn=`[object Float32Array]`,Gn=`[object Float64Array]`,Kn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function qn(e){return Kn.Buffer!==void 0&&Kn.Buffer.isBuffer(e)}function Jn(e,t){return Yn(e,void 0,e,new Map,t)}function Yn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(gn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Yn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Yn(a,void 0,n,r,i));return t}if(qn(e))return e.subarray();if(_n(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Xn(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof e==`object`&&Zn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Xn(t,e,n,r,i),t}return e}function Xn(e,t,n=e,r,i){let a=[...Object.keys(t),...vn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Yn(t[s],s,n,r,i))}}function Zn(e){switch(yn(e)){case wn:case kn:case jn:case Pn:case Cn:case En:case Wn:case Gn:case Bn:case Vn:case Hn:case Dn:case Sn:case Mn:case bn:case On:case xn:case Tn:case Fn:case In:case Ln:case Rn:return!0;default:return!1}}function Qn(e){return Yn(e,void 0,e,new Map,void 0)}function $n(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function er(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function tr(e,t,n){return typeof n==`function`?nr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?nr(t,r,e,s,!1):!!c},new Map,!0):tr(e,t,()=>void 0)}function nr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return rr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?nr(e,{...t},n,r,i):$n(e,t);default:return er(e)&&i?typeof t!=`string`||t===``:$n(e,t)}}function rr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ar(e,t,n,r);if(t instanceof Map)return ir(e,t,n,r);if(t instanceof Set)return or(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)gn(e)&&(e=Object(e));else{let t=yn(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function ir(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ar(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function or(e,t,n,r){return t.size===0||e instanceof Set&&ar([...e],[...t],n,r)}function sr(e,t){return tr(e,t,()=>void 0)}function cr(e){return e=Qn(e),t=>sr(t,e)}function lr(e,t){return Jn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(yn(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Xn(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Sn:case xn:case Cn:{let t=new e.constructor(e?.valueOf());return Xn(t,e),t}case wn:{let t={};return Xn(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ur(e){return lr(e)}var dr=/^(?:0|[1-9]\d*)$/;function fr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return dr.test(e)}}function pr(e){return typeof e==`object`&&!!e&&yn(e)===`[object Arguments]`}function mr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xe(t)&&!(t in Object(e))?Ee(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=Se(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||pr(r))&&fr(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function hr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Se(e)}return t=ur(t),function(n){let r=De(n,e);return r===void 0?mr(n,e):t===void 0?r===void 0:sr(r,t)}}function gr(e){if(e==null)return fn;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?hr(e[0],e[1]):cr(e);default:return hn(e)}}function _r(e){return e===0?0:e}function vr(e,t=fn){return mn(e)?un(Array.from(e),dn(gr(t),1)).map(_r):[]}function yr(e,t,n){return t===!0?vr(e,n):typeof t==`function`?vr(e,t):e}var br=s(null),xr=e=>e,L=()=>{var e=p(br);return e?e.store.dispatch:xr},Sr=()=>{},Cr=()=>Sr,wr=(e,t)=>e===t;function R(e){var n=p(br),r=_(()=>n?t=>{if(t!=null)return e(t)}:Sr,[n,e]);return t(n?n.subscription.addNestedSub:Cr,n?n.store.getState:Sr,n?n.store.getState:Sr,r,wr)}function Tr(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Er(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Dr=e=>Array.isArray(e)?e:[e];function Or(e){let t=Array.isArray(e[0])?e[0]:e;return Er(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function kr(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ar=class{constructor(e){this.value=e}deref(){return this.value}},jr=typeof WeakRef>`u`?Ar:WeakRef,Mr=0,Nr=1;function Pr(){return{s:Mr,v:void 0,o:null,p:null}}function Fr(e){return e instanceof jr?e.deref():e}function Ir(e,t={}){let n=Pr(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Pr(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Pr(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Nr)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Fr(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new jr(c):c}return s.s=Nr,s.v=c,c}return o.clearCache=()=>{n=Pr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Lr(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Tr(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ir,argsMemoizeOptions:u=[]}={...n,...a},d=Dr(c),f=Dr(u),p=Or(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=kr(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var z=Lr(Ir);function Rr(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function zr(e,t,n){return er(n)&&(typeof t==`number`&&mn(n)&&fr(t)&&t<n.length||typeof t==`string`&&t in n)?$n(n[t],e):!1}function Br(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Vr=(e,t,n)=>{if(e!==t){let r=Br(e),i=Br(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;function Wr(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Ce(e)?!0:typeof e==`string`&&(Ur.test(e)||!Hr.test(e))||t!=null&&Object.hasOwn(t,e)}function Gr(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=mn(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Wr(e)?e:{key:e,path:Ee(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Vr(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Kr(e,...t){let n=t.length;return n>1&&zr(e,t[0],t[1])?t=[]:n>2&&zr(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,Rr(t),[`asc`])}var qr=e=>e.legend.settings,Jr=e=>e.legend.size;z([e=>e.legend.payload,qr],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Kr(r,n):r});function Yr(e,t){return ei(e)||$r(e,t)||Zr(e,t)||Xr()}function Xr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{L as e,in as t,j as n}from"./Lamp-DkvXKB-B.js";import{b as r}from"./Panel-CWmOTDAP.js";import*as i from"react";import{Component as a,cloneElement as o,createContext as s,createElement as c,forwardRef as l,isValidElement as u,memo as d,useCallback as f,useContext as p,useEffect as m,useImperativeHandle as h,useLayoutEffect as g,useMemo as _,useRef as v,useState as y}from"react";import b from"styled-components";import{createPortal as x}from"react-dom";var S=Object.create,C=Object.defineProperty,w=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyNames,E=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,O=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),k=(e,t)=>{let n={};for(var r in e)C(n,r,{get:e[r],enumerable:!0});return t||C(n,Symbol.toStringTag,{value:`Module`}),n},A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=T(t),a=0,o=i.length,s;a<o;a++)s=i[a],!D.call(e,s)&&s!==n&&C(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=w(t,s))||r.enumerable});return e},j=(e,t,n)=>(n=e==null?{}:S(E(e)),A(t||!e||!e.__esModule||!D.call(e,`default`)?C(n,`default`,{value:e,enumerable:!0}):n,e));function M(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;t<i;t++)e[t]&&(n=M(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function N(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=M(e))&&(r&&(r+=` `),r+=t);return r}var ee=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function te(e){return typeof e==`string`&&ee.includes(e)}var ne=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function re(e){return typeof e==`string`&&ne.has(e)}function ie(e){return typeof e==`string`&&e.startsWith(`data-`)}function ae(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n))&&(t[n]=e[n]);return t}function oe(e){if(e==null)return null;if(u(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return ae(t)}return typeof e==`object`&&!Array.isArray(e)?ae(e):null}function se(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n)||te(n))&&(t[n]=e[n]);return t}function ce(e){return e==null?null:u(e)?se(e.props):typeof e==`object`&&!Array.isArray(e)?se(e):null}var le=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function de(e,t){if(e==null)return{};var n,r,i=fe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var pe=l((e,t)=>{var n=e.children,r=e.width,a=e.height,o=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=de(e,le),f=o||{width:r,height:a,x:0,y:0},p=N(`recharts-surface`,s);return i.createElement(`svg`,ue({},se(d),{className:p,width:r,height:a,style:c,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:t}),i.createElement(`title`,null,l),i.createElement(`desc`,null,u),n)}),me=[`children`,`className`];function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(null,arguments)}function ge(e,t){if(e==null)return{};var n,r,i=_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ve=i.forwardRef((e,t)=>{var n=e.children,r=e.className,a=ge(e,me),o=N(`recharts-layer`,r);return i.createElement(`g`,he({className:o},se(a),{ref:t}),n)});function ye(e){return e===`__proto__`}var be=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xe(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:be.test(e);default:return!1}}function Se(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ce(e){return typeof e==`symbol`||e instanceof Symbol}function we(e){return e==null?``:Te(e)}function Te(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Te).join(`,`);if(Ce(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Ee(e){if(Array.isArray(e))return e.map(Se);if(typeof e==`symbol`)return[e];e=we(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function De(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?xe(t)&&!Object.hasOwn(e,t)?De(e,Ee(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Se(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Oe(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function Oe(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var ke=4;function Ae(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ke),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function je(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+Ae(i)+n},``)}var Me=e=>e===0?0:e>0?1:-1,Ne=e=>typeof e==`number`&&e!=+e,Pe=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,P=e=>(typeof e==`number`||e instanceof Number)&&!Ne(e),Fe=e=>P(e)||typeof e==`string`,Ie=0,Le=e=>{var t=++Ie;return`${e||``}${t}`},Re=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!P(e)&&typeof e!=`string`)return n;var i;if(Pe(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Ne(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},ze=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Be(e,t,n){return P(e)&&P(t)?Ae(e+n*(t-e)):t}function Ve(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):De(e,t))===n)}var F=e=>e==null,He=e=>F(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ue(e){return e!=null}function We(){}function Ge(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ke(Object(n),!0).forEach(function(t){Je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Je(e,t,n){return(t=Ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){var t=Xe(e,`string`);return typeof t==`symbol`?t:t+``}function Xe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ze=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Ge(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?qe({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?qe({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?qe({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?qe({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?qe({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?qe({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?qe({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?qe({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(P(n.x)||Pe(n.x))&&(P(n.y)||Pe(n.y))?qe({x:c+Re(n.x,g),y:l+Re(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):qe({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Qe=[`top`,`left`,`right`,`bottom`];function $e(e){return e==null?!1:typeof e==`object`||Qe.includes(e)}var et=s(null);function I(e){return function(){return e}}var tt=Math.PI,nt=2*tt,rt=1e-6,it=nt-rt;function at(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ot(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return at;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var st=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?at:ot(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>rt){if(!(Math.abs(u*s-c*l)>rt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((tt-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>rt||Math.abs(this._y1-l)>rt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nt+nt),d>it?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>rt&&this._append`A${n},${n},0,${+(d>=tt)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};st.prototype;function ct(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new st(t)}Array.prototype.slice;function lt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ut(e){this._context=e}ut.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)}}};function dt(e){return new ut(e)}function ft(e){return e[0]}function pt(e){return e[1]}function mt(e,t){var n=I(!0),r=null,i=dt,a=null,o=ct(s);e=typeof e==`function`?e:e===void 0?ft:I(e),t=typeof t==`function`?t:t===void 0?pt:I(t);function s(s){var c,l=(s=lt(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:I(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ht(e,t,n){var r=null,i=I(!0),a=null,o=dt,s=null,c=ct(l);e=typeof e==`function`?e:e===void 0?ft:I(+e),t=typeof t==`function`?t:I(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pt:I(+n);function l(l){var u,d,f,p=(l=lt(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mt().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:I(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:I(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:I(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:I(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:I(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var gt=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function _t(e){return new gt(e,!0)}function vt(e){return new gt(e,!1)}function yt(){}function bt(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 xt(e){this._context=e}xt.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:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function St(e){return new xt(e)}function Ct(e){this._context=e}Ct.prototype={areaStart:yt,areaEnd:yt,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)}},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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.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:bt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Et(e){return new Tt(e)}function Dt(e){this._context=e}Dt.prototype={areaStart:yt,areaEnd:yt,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 Ot(e){return new Dt(e)}function kt(e){return e<0?-1:1}function At(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kt(a)+kt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mt(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Nt(e){this._context=e}Nt.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:Mt(this,this._t0,jt(this,this._t0))}(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,Mt(this,jt(this,n=At(this,e,t)),n);break;default:Mt(this,this._t0,n=At(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pt(e){this._context=new Ft(e)}(Pt.prototype=Object.create(Nt.prototype)).point=function(e,t){Nt.prototype.point.call(this,t,e)};function Ft(e){this._context=e}Ft.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,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function It(e){return new Nt(e)}function Lt(e){return new Pt(e)}function Rt(e){this._context=e}Rt.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=zt(e),i=zt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bt(e){return new Rt(e)}function Vt(e,t){this._context=e,this._t=t}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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)}}this._x=e,this._y=t}};function Ht(e){return new Vt(e,.5)}function Ut(e){return new Vt(e,0)}function Wt(e){return new Vt(e,1)}function Gt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function qt(e,t){return e[t]}function Jt(e){let t=[];return t.key=e,t}function Yt(){var e=I([]),t=Kt,n=Gt,r=qt;function i(i){var a=Array.from(e.apply(this,arguments),Jt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=lt(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:I(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:I(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Kt:typeof e==`function`?e:I(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Gt,i):n},i}function Xt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Gt(e,t)}}function Zt(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Gt(e,t)}}function Qt(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Gt(e,t)}}var $t=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,en=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if(u(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{te(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},tn=(e,t,n)=>r=>(e(t,n,r),null),nn=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];te(i)&&typeof a==`function`&&(r||={},r[i]=tn(a,t,n))}),r};function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rn(Object(n),!0).forEach(function(t){on(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function on(e,t,n){return(t=sn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(e){var t=cn(e,`string`);return typeof t==`symbol`?t:t+``}function cn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ln(e,t){var n=an({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function un(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function dn(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function fn(e){return e}function pn(e){return Number.isSafeInteger(e)&&e>=0}function mn(e){return e!=null&&typeof e!=`function`&&pn(e.length)}function hn(e){return function(t){return De(t,e)}}function gn(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _n(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function yn(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var bn=`[object RegExp]`,xn=`[object String]`,Sn=`[object Number]`,Cn=`[object Boolean]`,wn=`[object Arguments]`,Tn=`[object Symbol]`,En=`[object Date]`,Dn=`[object Map]`,On=`[object Set]`,kn=`[object Array]`,An=`[object Function]`,jn=`[object ArrayBuffer]`,Mn=`[object Object]`,Nn=`[object Error]`,Pn=`[object DataView]`,Fn=`[object Uint8Array]`,In=`[object Uint8ClampedArray]`,Ln=`[object Uint16Array]`,Rn=`[object Uint32Array]`,zn=`[object BigUint64Array]`,Bn=`[object Int8Array]`,Vn=`[object Int16Array]`,Hn=`[object Int32Array]`,Un=`[object BigInt64Array]`,Wn=`[object Float32Array]`,Gn=`[object Float64Array]`,Kn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function qn(e){return Kn.Buffer!==void 0&&Kn.Buffer.isBuffer(e)}function Jn(e,t){return Yn(e,void 0,e,new Map,t)}function Yn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(gn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Yn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Yn(a,void 0,n,r,i));return t}if(qn(e))return e.subarray();if(_n(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Xn(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Xn(t,e,n,r,i),t}if(typeof e==`object`&&Zn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Xn(t,e,n,r,i),t}return e}function Xn(e,t,n=e,r,i){let a=[...Object.keys(t),...vn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Yn(t[s],s,n,r,i))}}function Zn(e){switch(yn(e)){case wn:case kn:case jn:case Pn:case Cn:case En:case Wn:case Gn:case Bn:case Vn:case Hn:case Dn:case Sn:case Mn:case bn:case On:case xn:case Tn:case Fn:case In:case Ln:case Rn:return!0;default:return!1}}function Qn(e){return Yn(e,void 0,e,new Map,void 0)}function $n(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function er(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function tr(e,t,n){return typeof n==`function`?nr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?nr(t,r,e,s,!1):!!c},new Map,!0):tr(e,t,()=>void 0)}function nr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return rr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?nr(e,{...t},n,r,i):$n(e,t);default:return er(e)&&i?typeof t!=`string`||t===``:$n(e,t)}}function rr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ar(e,t,n,r);if(t instanceof Map)return ir(e,t,n,r);if(t instanceof Set)return or(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)gn(e)&&(e=Object(e));else{let t=yn(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function ir(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ar(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function or(e,t,n,r){return t.size===0||e instanceof Set&&ar([...e],[...t],n,r)}function sr(e,t){return tr(e,t,()=>void 0)}function cr(e){return e=Qn(e),t=>sr(t,e)}function lr(e,t){return Jn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(yn(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Xn(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Sn:case xn:case Cn:{let t=new e.constructor(e?.valueOf());return Xn(t,e),t}case wn:{let t={};return Xn(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ur(e){return lr(e)}var dr=/^(?:0|[1-9]\d*)$/;function fr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return dr.test(e)}}function pr(e){return typeof e==`object`&&!!e&&yn(e)===`[object Arguments]`}function mr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xe(t)&&!(t in Object(e))?Ee(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=Se(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||pr(r))&&fr(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function hr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Se(e)}return t=ur(t),function(n){let r=De(n,e);return r===void 0?mr(n,e):t===void 0?r===void 0:sr(r,t)}}function gr(e){if(e==null)return fn;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?hr(e[0],e[1]):cr(e);default:return hn(e)}}function _r(e){return e===0?0:e}function vr(e,t=fn){return mn(e)?un(Array.from(e),dn(gr(t),1)).map(_r):[]}function yr(e,t,n){return t===!0?vr(e,n):typeof t==`function`?vr(e,t):e}var br=s(null),xr=e=>e,L=()=>{var e=p(br);return e?e.store.dispatch:xr},Sr=()=>{},Cr=()=>Sr,wr=(e,t)=>e===t;function R(e){var n=p(br),r=_(()=>n?t=>{if(t!=null)return e(t)}:Sr,[n,e]);return t(n?n.subscription.addNestedSub:Cr,n?n.store.getState:Sr,n?n.store.getState:Sr,r,wr)}function Tr(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Er(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Dr=e=>Array.isArray(e)?e:[e];function Or(e){let t=Array.isArray(e[0])?e[0]:e;return Er(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function kr(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ar=class{constructor(e){this.value=e}deref(){return this.value}},jr=typeof WeakRef>`u`?Ar:WeakRef,Mr=0,Nr=1;function Pr(){return{s:Mr,v:void 0,o:null,p:null}}function Fr(e){return e instanceof jr?e.deref():e}function Ir(e,t={}){let n=Pr(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Pr(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Pr(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Nr)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Fr(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new jr(c):c}return s.s=Nr,s.v=c,c}return o.clearCache=()=>{n=Pr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Lr(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Tr(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ir,argsMemoizeOptions:u=[]}={...n,...a},d=Dr(c),f=Dr(u),p=Or(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=kr(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var z=Lr(Ir);function Rr(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function zr(e,t,n){return er(n)&&(typeof t==`number`&&mn(n)&&fr(t)&&t<n.length||typeof t==`string`&&t in n)?$n(n[t],e):!1}function Br(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Vr=(e,t,n)=>{if(e!==t){let r=Br(e),i=Br(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;function Wr(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Ce(e)?!0:typeof e==`string`&&(Ur.test(e)||!Hr.test(e))||t!=null&&Object.hasOwn(t,e)}function Gr(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=mn(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Wr(e)?e:{key:e,path:Ee(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Vr(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Kr(e,...t){let n=t.length;return n>1&&zr(e,t[0],t[1])?t=[]:n>2&&zr(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,Rr(t),[`asc`])}var qr=e=>e.legend.settings,Jr=e=>e.legend.size;z([e=>e.legend.payload,qr],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Kr(r,n):r});function Yr(e,t){return ei(e)||$r(e,t)||Zr(e,t)||Xr()}function Xr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(e,t){if(e){if(typeof e==`string`)return Qr(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}function Qr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $r(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ei(e){if(Array.isArray(e))return e}var ti=1;function ni(e,t){return Math.abs(e.height-t.height)>ti||Math.abs(e.left-t.left)>ti||Math.abs(e.top-t.top)>ti||Math.abs(e.width-t.width)>ti}function ri(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ii(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=Yr(y({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=v(null),a=v(n);a.current=n;var o=f(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=ri(e);if(ni(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=ri(e);ni(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return m(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function ai(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 oi=typeof Symbol==`function`&&Symbol.observable||`@@observable`,si=()=>Math.random().toString(36).substring(7).split(``).join(`.`),ci={INIT:`@@redux/INIT${si()}`,REPLACE:`@@redux/REPLACE${si()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${si()}`};function li(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ui(e,t,n){if(typeof e!=`function`)throw Error(ai(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(ai(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(ai(1));return n(ui)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(ai(3));return i}function d(e){if(typeof e!=`function`)throw Error(ai(4));if(c)throw Error(ai(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(ai(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!li(e))throw Error(ai(7));if(e.type===void 0)throw Error(ai(8));if(typeof e.type!=`string`)throw Error(ai(17));if(c)throw Error(ai(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(ai(10));r=e,f({type:ci.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(ai(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[oi](){return this}}}return f({type:ci.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[oi]:m}}function di(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:ci.INIT})===void 0)throw Error(ai(12));if(n(void 0,{type:ci.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(ai(13))})}function fi(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{di(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(ai(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function pi(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function mi(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(ai(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=pi(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function hi(e){return li(e)&&`type`in e&&typeof e.type==`string`}var gi=Symbol.for(`immer-nothing`),_i=Symbol.for(`immer-draftable`),vi=Symbol.for(`immer-state`);function yi(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var bi=Object,xi=bi.getPrototypeOf,Si=`constructor`,Ci=`prototype`,wi=`configurable`,Ti=`enumerable`,Ei=`writable`,Di=`value`,Oi=e=>!!e&&!!e[vi];function ki(e){return e?Mi(e)||zi(e)||!!e[_i]||!!e[Si]?.[_i]||Bi(e)||Vi(e):!1}var Ai=bi[Ci][Si].toString(),ji=new WeakMap;function Mi(e){if(!e||!Hi(e))return!1;let t=xi(e);if(t===null||t===bi[Ci])return!0;let n=bi.hasOwnProperty.call(t,Si)&&t[Si];if(n===Object)return!0;if(!Ui(n))return!1;let r=ji.get(n);return r===void 0&&(r=Function.toString.call(n),ji.set(n,r)),r===Ai}function Ni(e,t,n=!0){Pi(e)===0?(n?Reflect.ownKeys(e):bi.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Pi(e){let t=e[vi];return t?t.type_:zi(e)?1:Bi(e)?2:Vi(e)?3:0}var Fi=(e,t,n=Pi(e))=>n===2?e.has(t):bi[Ci].hasOwnProperty.call(e,t),Ii=(e,t,n=Pi(e))=>n===2?e.get(t):e[t],Li=(e,t,n,r=Pi(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ri(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var zi=Array.isArray,Bi=e=>e instanceof Map,Vi=e=>e instanceof Set,Hi=e=>typeof e==`object`,Ui=e=>typeof e==`function`,Wi=e=>typeof e==`boolean`;function Gi(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ki=e=>e.copy_||e.base_,qi=e=>e.modified_?e.copy_:e.base_;function Ji(e,t){if(Bi(e))return new Map(e);if(Vi(e))return new Set(e);if(zi(e))return Array[Ci].slice.call(e);let n=Mi(e);if(t===!0||t===`class_only`&&!n){let t=bi.getOwnPropertyDescriptors(e);delete t[vi];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ei]===!1&&(a[Ei]=!0,a[wi]=!0),(a.get||a.set)&&(t[i]={[wi]:!0,[Ei]:!0,[Ti]:a[Ti],[Di]:e[i]})}return bi.create(xi(e),t)}{let t=xi(e);if(t!==null&&n)return{...e};let r=bi.create(t);return bi.assign(r,e)}}function Yi(e,t=!1){return Qi(e)||Oi(e)||!ki(e)?e:(Pi(e)>1&&bi.defineProperties(e,{set:Zi,add:Zi,clear:Zi,delete:Zi}),bi.freeze(e),t&&Ni(e,(e,t)=>{Yi(t,!0)},!1),e)}function Xi(){yi(2)}var Zi={[Di]:Xi};function Qi(e){return e===null||!Hi(e)||bi.isFrozen(e)}var $i=`MapSet`,ea=`Patches`,ta=`ArrayMethods`,na={};function ra(e){let t=na[e];return t||yi(0,e),t}var ia=e=>!!na[e],aa,oa=()=>aa,sa=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ia($i)?ra($i):void 0,arrayMethodsPlugin_:ia(ta)?ra(ta):void 0});function ca(e,t){t&&(e.patchPlugin_=ra(ea),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function la(e){ua(e),e.drafts_.forEach(fa),e.drafts_=null}function ua(e){e===aa&&(aa=e.parent_)}var da=e=>aa=sa(aa,e);function fa(e){let t=e[vi];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[vi].modified_&&(la(t),yi(4)),ki(e)&&(e=ma(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[vi].base_,e,t)}else e=ma(t,n);return ha(t,e,!0),la(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===gi?void 0:e}function ma(e,t){if(Qi(t))return t;let n=t[vi];if(!n)return Ca(t,e.handledSet_,e);if(!_a(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);xa(n,e)}return n.copy_}function ha(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yi(t,n)}function ga(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _a=(e,t)=>e.scope_===t,va=[];function ya(e,t,n,r){let i=Ki(e),a=e.type_;if(r!==void 0&&Ii(i,r,a)===t){Li(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ni(i,(e,n)=>{if(Oi(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??va;for(let e of o)Li(i,e,n,a)}function ba(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!_a(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=qi(i);ya(e,i.draft_??i,a,n),xa(i,r)})}function xa(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}ga(e)}}function Sa(e,t,n){let{scope_:r}=e;if(Oi(n)){let i=n[vi];_a(i,r)&&i.callbacks_.push(function(){Ma(e),ya(e,n,qi(i),t)})}else ki(n)&&e.callbacks_.push(function(){let i=Ki(e);e.type_===3?i.has(n)&&Ca(n,r.handledSet_,r):Ii(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ca(Ii(e.copy_,t,e.type_),r.handledSet_,r)})}function Ca(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Oi(e)||t.has(e)||!ki(e)||Qi(e)?e:(t.add(e),Ni(e,(r,i)=>{if(Oi(i)){let t=i[vi];_a(t,n)&&(Li(e,r,qi(t),e.type_),ga(t))}else ki(i)&&Ca(i,t,n)}),e)}function wa(e,t){let n=zi(e),r={type_:+!!n,scope_:t?t.scope_:oa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Ta;n&&(i=[r],a=Ea);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ta={get(e,t){if(t===vi)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ki(e);if(!Fi(i,t,e.type_))return ka(e,i,t);let a=i[t];if(e.finalized_||!ki(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Gi(t))return a;if(a===Da(e.base_,t)||Oa(e,t,a)){Ma(e);let n=e.type_===1?+t:t,r=Pa(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ki(e)},ownKeys(e){return Reflect.ownKeys(Ki(e))},set(e,t,n){let r=Aa(Ki(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Da(Ki(e),t),i=r?.[vi];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Ri(n,r)&&(n!==void 0||Fi(e.base_,t,e.type_)))return!0;Ma(e),ja(e)}return e.copy_[t]===n&&(n!==void 0||Fi(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Sa(e,t,n),!0)},deleteProperty(e,t){return Ma(e),Da(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ja(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ki(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ei]:!0,[wi]:e.type_!==1||t!==`length`,[Ti]:r[Ti],[Di]:n[t]}},defineProperty(){yi(11)},getPrototypeOf(e){return xi(e.base_)},setPrototypeOf(){yi(12)}},Ea={};for(let e in Ta){let t=Ta[e];Ea[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Ea.deleteProperty=function(e,t){return Ea.set.call(this,e,t,void 0)},Ea.set=function(e,t,n){return Ta.set.call(this,e[0],t,n,e[0])};function Da(e,t){let n=e[vi];return(n?Ki(n):e)[t]}function Oa(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ki(n)||n[vi]?!1:e.baseRefs_.has(n)}function ka(e,t,n){let r=Aa(t,n);return r?Di in r?r[Di]:r.get?.call(e.draft_):void 0}function Aa(e,t){if(!(t in e))return;let n=xi(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=xi(n)}}function ja(e){e.modified_||(e.modified_=!0,e.parent_&&ja(e.parent_))}function Ma(e){e.copy_||=(e.assigned_=new Map,Ji(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Na=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ui(e)&&!Ui(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ui(t)||yi(6),n!==void 0&&!Ui(n)&&yi(7);let r;if(ki(e)){let i=da(this),a=Pa(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?la(i):ua(i)}return ca(i,n),pa(r,i)}if(!e||!Hi(e)){if(r=t(e),r===void 0&&(r=e),r===gi&&(r=void 0),this.autoFreeze_&&Yi(r,!0),n){let t=[],i=[];ra(ea).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}yi(1,e)},this.produceWithPatches=(e,t)=>{if(Ui(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Wi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Wi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Wi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ki(e)||yi(8),Oi(e)&&(e=Fa(e));let t=da(this),n=Pa(t,e,void 0);return n[vi].isManual_=!0,ua(t),n}finishDraft(e,t){let n=e&&e[vi];(!n||!n.isManual_)&&yi(9);let{scope_:r}=n;return ca(r,t),pa(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=ra(ea).applyPatches_;return Oi(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Pa(e,t,n,r){let[i,a]=Bi(t)?ra($i).proxyMap_(t,n):Vi(t)?ra($i).proxySet_(t,n):wa(t,n);return(n?.scope_??oa()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?ba(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Fa(e){return Oi(e)||yi(10,e),Ia(e)}function Ia(e){if(!ki(e)||Qi(e))return e;let t=e[vi],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ji(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ji(e,!0);return Ni(n,(e,t)=>{Li(n,e,Ia(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var La=new Na().produce,B=e=>e;function Ra(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var za=Ra(),Ba=Ra,Va=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?pi:pi.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Ha(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(Zo(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>hi(t)&&t.type===e,n}var Ua=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Wa(e){return ki(e)?La(e,()=>{}):e}function Ga(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ka(e){return typeof e==`boolean`}var qa=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Ua;return t&&(Ka(t)?a.push(za):a.push(Ba(t.extraArgument))),a},Ja=`RTK_autoBatch`,V=()=>e=>({payload:e,meta:{[Ja]:!0}}),Ya=e=>t=>{setTimeout(t,e)},Xa=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Za=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Xa(window.requestAnimationFrame,100):Ya(10):e.type===`callback`?e.queueNotification:Ya(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Ja],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Qa=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Ua(e);return n&&r.push(Za(typeof n==`object`?n:void 0)),r};function $a(e){let t=qa(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(li(n))c=fi(n);else throw Error(Zo(1));let l;l=typeof r==`function`?r(t):t();let u=pi;i&&(u=Va({trace:!1,...typeof i==`object`&&i}));let d=Qa(mi(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return ui(c,o,p)}function eo(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(Zo(28));if(r in t)throw Error(Zo(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function to(e){return typeof e==`function`}function no(e,t){let[n,r,i]=eo(t),a;if(to(e))a=()=>Wa(e());else{let t=Wa(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(Oi(e)){let r=n(e,t);return r===void 0?e:r}if(ki(e))return La(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var ro=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,io=(e=21)=>{let t=``,n=e;for(;n--;)t+=ro[Math.random()*64|0];return t},ao=Symbol.for(`rtk-slice-createasyncthunk`);function oo(e,t){return`${e}/${t}`}function so({creators:e}={}){let t=e?.asyncThunk?.[ao];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(Zo(11));let i=(typeof e.reducers==`function`?e.reducers(uo()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(Zo(12));if(n in o.sliceCaseReducersByType)throw Error(Zo(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:oo(n,r),createNotation:typeof e.reducers==`function`};po(a)?ho(o,a,s,t):fo(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?eo(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return no(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Ga(d,r,m)),i}function i(t=l){return Ga(Ga(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=co(a,t,()=>Ga(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function co(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var lo=so();function uo(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function fo({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!mo(r))throw Error(Zo(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Ha(e,o):Ha(e))}function po(e){return e._reducerDefinitionType===`asyncThunk`}function mo(e){return e._reducerDefinitionType===`reducerWithPrepare`}function ho({type:e,reducerName:t},n,r,i){if(!i)throw Error(Zo(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||go,pending:s||go,rejected:c||go,settled:l||go})}function go(){}var _o=`task`,vo=`listener`,yo=`completed`,bo=`cancelled`,xo=`task-${bo}`,So=`task-${yo}`,Co=`${vo}-${bo}`,wo=`${vo}-${yo}`,To=class{constructor(e){this.code=e,this.message=`${_o} ${bo} (reason: ${e})`}code;name=`TaskAbortError`;message},Eo=(e,t)=>{if(typeof e!=`function`)throw TypeError(Zo(32))},Do=()=>{},Oo=(e,t=Do)=>(e.catch(t),e),ko=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Ao=e=>{if(e.aborted)throw new To(e.reason)};function jo(e,t){let n=Do;return new Promise((r,i)=>{let a=()=>i(new To(e.reason));if(e.aborted){a();return}n=ko(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Do})}var Mo=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof To?`cancelled`:`rejected`,error:e}}finally{t?.()}},No=e=>t=>Oo(jo(e,t).then(t=>(Ao(e),t))),Po=e=>{let t=No(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Fo}=Object,Io={},Lo=`listenerMiddleware`,Ro=(e,t)=>{let n=t=>ko(e,()=>t.abort(e.reason));return(r,i)=>{Eo(r,`taskExecutor`);let a=new AbortController;n(a);let o=Mo(async()=>{Ao(e),Ao(a.signal);let t=await r({pause:No(a.signal),delay:Po(a.signal),signal:a.signal});return Ao(a.signal),t},()=>a.abort(So));return i?.autoJoin&&t.push(o.catch(Do)),{result:No(e)(o),cancel(){a.abort(xo)}}}},zo=(e,t)=>{let n=async(n,r)=>{Ao(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await jo(t,Promise.race(a));return Ao(t),e}finally{i()}};return((e,t)=>Oo(n(e,t)))},Bo=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Ha(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(Zo(21));return Eo(a,`options.listener`),{predicate:i,type:t,effect:a}},Vo=Fo(e=>{let{type:t,predicate:n,effect:r}=Bo(e);return{id:io(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(Zo(22))}}},{withTypes:()=>Vo}),Ho=(e,t)=>{let{type:n,effect:r,predicate:i}=Bo(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Uo=e=>{e.pending.forEach(e=>{e.abort(Co)})},Wo=(e,t)=>()=>{for(let e of t.keys())Uo(e);e.clear()},Go=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Ko=Fo(Ha(`${Lo}/add`),{withTypes:()=>Ko}),qo=Ha(`${Lo}/removeAll`),Jo=Fo(Ha(`${Lo}/remove`),{withTypes:()=>Jo}),Yo=(...e)=>{console.error(`${Lo}/error`,...e)},Xo=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Yo}=e;Eo(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Uo(e)}),c=(e=>{let n=Ho(t,e)??Vo(e);return s(n)});Fo(c,{withTypes:()=>c});let l=e=>{let n=Ho(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Uo(n)),!!n};Fo(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=zo(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Fo({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Po(u.signal),pause:No(u.signal),extra:a,signal:u.signal,fork:Ro(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Co),n.delete(e))})},cancel:()=>{u.abort(Co),e.pending.delete(u)},throwIfCancelled:()=>{Ao(u.signal)}})))}catch(e){e instanceof To||Go(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(wo),i(e),e.pending.delete(u)}},d=Wo(t,n);return{middleware:e=>n=>r=>{if(!hi(r))return n(r);if(Ko.match(r))return c(r.payload);if(qo.match(r)){d();return}if(Jo.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Io)throw Error(Zo(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,Go(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Io}return s},startListening:c,stopListening:l,clearListeners:d}};function Zo(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. `}var Qo=lo({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),$o=Qo.actions,es=$o.setMargin,ts=$o.setLayout,ns=$o.setChartSize,rs=$o.setScale,is=Qo.reducer;function as(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function H(e){return Number.isFinite(e)}function os(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ss(Object(n),!0).forEach(function(t){ls(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ls(e,t,n){return(t=us(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function us(e){var t=ds(e,`string`);return typeof t==`symbol`?t:t+``}function ds(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function U(e,t,n){return F(e)||F(t)?n:Fe(t)?De(e,t,n):typeof t==`function`?t(e):n}var fs=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if($e(c)){if(c===`top`&&P(e.top))return cs(cs({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&P(e.bottom))return cs(cs({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&P(e.left))return cs(cs({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&P(e.right))return cs(cs({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&P(e[a]))return cs(cs({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&P(e[o]))return cs(cs({},e),{},{[o]:e[o]+(i||0)})}return e},ps=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,ms=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},hs=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?Me(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return H(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(Ue):c&&l?l.map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ue):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ue):o.domain().map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(Ue)},gs={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=Ne(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Xt,none:Gt,silhouette:Zt,wiggle:Qt,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=Ne(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},_s=(e,t,n)=>{var r=gs[n]??Gt,i=Yt().keys(t).value((e,t)=>Number(U(e,t,0))).order(Kt).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=U(e[i],t[r],0);Array.isArray(a)&&a.length===2&&P(a[0])&&P(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function vs(e){return e==null?void 0:String(e)}function ys(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!F(i[t.dataKey])){var s=Ve(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=U(i,F(o)?t.dataKey:o),l=t.scale.map(c);return P(l)?l:null}var bs=e=>{var t=e.flat(2).filter(P);return[Math.min(...t),Math.max(...t)]},xs=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Ss=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return xs(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=bs(as(r,t,n));return!H(i[0])||!H(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},Cs=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ws=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ts=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Kr(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;s<c;s++){var l=(i[s]?.coordinate||0)-(i[s-1]?.coordinate||0);a.push(l),o=Math.max(l,o)}var u=o*1e-4,d=1/0;for(var f of a)f>u&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Es(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return cs(cs({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Ds(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Os=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},ks=(e,t)=>t===`centric`?e.angle:e.radius,As=e=>e.layout.width,js=e=>e.layout.height,Ms=e=>e.layout.scale,Ns=e=>e.layout.margin,Ps=z(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Fs=z(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Is=`data-recharts-item-index`;function Ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ls(Object(n),!0).forEach(function(t){zs(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ls(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zs(e,t,n){return(t=Bs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bs(e){var t=Vs(e,`string`);return typeof t==`symbol`?t:t+``}function Vs(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Hs=e=>e.brush.height;function Us(e){return Fs(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ws(e){return Fs(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Gs(e){return Ps(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Ks(e){return Ps(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var qs=z([As,js,Ns,Hs,Us,Ws,Gs,Ks,qr,Jr],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Rs(Rs({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=fs(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Rs(Rs({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Js=z(qs,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ys=z(As,js,(e,t)=>({x:0,y:0,width:e,height:t})),Xs=s(null),Zs=()=>p(Xs)!=null,Qs=e=>e.brush,$s=z([Qs,qs,Ns],(e,t,n)=>({height:e.height,x:P(e.x)?e.x:t.left,y:P(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:P(e.width)?e.width:t.width}));function ec(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function tc(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=ec(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function nc(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return tc(e,t,{leading:r,maxWait:t,trailing:i})}var rc=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},ic={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ac=(e,t,n)=>{var r=n.width,i=r===void 0?ic.width:r,a=n.height,o=a===void 0?ic.height:a,s=n.aspect,c=n.maxHeight,l=Pe(i)?e:Number(i),u=Pe(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},oc={width:0,height:0,overflow:`visible`},sc={width:0,overflowX:`visible`},cc={height:0,overflowY:`visible`},lc={},uc=e=>{var t=e.width,n=e.height,r=Pe(t),i=Pe(n);return r&&i?oc:r?sc:i?cc:lc};function dc(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=ic.width,a=ic.height):i===void 0?i=r&&r>0?void 0:ic.width:a===void 0&&(a=r&&r>0?void 0:ic.height),{width:i,height:a}}var fc=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(null,arguments)}function mc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mc(Object(n),!0).forEach(function(t){gc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gc(e,t,n){return(t=_c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _c(e){var t=vc(e,`string`);return typeof t==`symbol`?t:t+``}function vc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yc(e,t){return wc(e)||Cc(e,t)||xc(e,t)||bc()}function bc(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xc(e,t){if(e){if(typeof e==`string`)return Sc(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sc(e,t):void 0}}function Sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cc(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function wc(e){if(Array.isArray(e))return e}function Tc(e,t){if(e==null)return{};var n,r,i=Ec(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ec(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Dc=s(ic.initialDimension);function Oc(e){return os(e.width)&&os(e.height)}function kc(e){var t=e.children,n=e.width,r=e.height,a=_(()=>({width:n,height:r}),[n,r]);return Oc(a)?i.createElement(Dc.Provider,{value:a},t):null}var Ac=()=>p(Dc),jc=l((e,t)=>{var n=e.aspect,r=e.initialDimension,a=r===void 0?ic.initialDimension:r,o=e.width,s=e.height,c=e.minWidth,l=c===void 0?ic.minWidth:c,u=e.minHeight,d=e.maxHeight,p=e.children,g=e.debounce,_=g===void 0?ic.debounce:g,b=e.id,x=e.className,S=e.onResize,C=e.style,w=C===void 0?{}:C,T=Tc(e,fc),E=v(null),D=v();D.current=S,h(t,()=>E.current);var O=yc(y({containerWidth:a.width,containerHeight:a.height}),2),k=O[0],A=O[1],j=f((e,t)=>{A(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);m(()=>{if(E.current==null||typeof ResizeObserver>`u`)return We;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;j(i,a),(t=D.current)==null||t.call(D,i,a)}};_>0&&(e=nc(e,_,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=E.current.getBoundingClientRect(),r=n.width,i=n.height;return j(r,i),t.observe(E.current),()=>{t.disconnect()}},[j,_]);var M=k.containerWidth,ee=k.containerHeight;rc(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var te=ac(M,ee,{width:o,height:s,aspect:n,maxHeight:d}),ne=te.calculatedWidth,re=te.calculatedHeight;return rc(M<0||ee<0||ne!=null&&ne>0||re!=null&&re>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
4
4
|
please check the style of container, or the props width(%s) and height(%s),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e}from"./Rack-CEuCdVXc.js";var t={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};t.node;var n=e(t);export{n as t};
|